Functions for computing sea level pressures.
function pslhyp( pres : float, z : float, tv : float ) function pslec( t : float, phis : float, ps : float, pres : float ) function pslhor( z : float, t : float, phis : float, ps : float, pres : float, lats : float )
pslec computes the sea level pressure using the ECMWF formulation and returns the results as a float array with the same dimensions as its input arrays.
pslhor computes the sea level pressure using the ECMWF formulation and Trenberth's horizontal correction and returns the results as a float array with the same dimensions as its input arrays ps and phis.
All three of these routines return the attributes long_name, short_name, and units.
Note: For the arrays whose last two dimensions are nlat x nlon, the rest of the dimensions (if any) are collectively referred to as nt. If the input/output arrays are just two dimensions, then nt can either be considered equal to 1 or nothing at all.
t(time, lev, lat, lon), etc. for 4D variablesand that lev(0) is the lowest level, then
phis(time,lat,lon), etc. for 3D variables
PSL = pslhyp (pres(:,0,:,:), z(:,0,:,:), tv(:,0,:,:)or
PSL = pslec (t(:,0,:,:), phis, ps, pres(:,0,:,:) )or
PSL = pslhor (z,t,phis,ps,pres,lat)will return PSL(time,nlat,mlon).
begin nlat = 64 ; T42 gaussian grid mlon = 128 fname = "pslecT42.hsl" ; sequential fortran file nrec = fbinnumrec (fname) ; number of records t = fbinrecread(fname, 0 ,(/nlat,mlon/), "float" ) phis = fbinrecread(fname, 1 ,(/nlat,mlon/), "float" ) ps = fbinrecread(fname, 2 ,(/nlat,mlon/), "float" ) pres = fbinrecread(fname, 3 ,(/nlat,mlon/), "float" ) psl = pslec (t,phis,ps,pres) print(psl) print(psl@long_name) print(psl@short_name) print(psl@units) end
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?