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 )

*phis*- surface geopotential (m^2/s^2). A 2-dimensional array dimensioned
*nlat*x*mlon*where*nlat*is the number of latitudes and*mlon*is the number of longitudes.**Note**: if the utility "ccm2nc" was used to convert the original CCM History Tape file to netCDF, this field may have a time dimension of length one. In this case use "phis(0,:,:)" as the argument to the functions. *pres*- pressure (Pascals). For
*pslhyp*and*pslec*, an array (corresponding to the lowest vertical level) with at least 2 dimensions. The last 2 dimensions being*nlat*x*mlon*where*nlat*is the number of latitudes and*mlon*is the number of longitudes. It must be at least 3 dimensions for*pslhor*because it requires multilevel fields which start at the bottom of the atmosphere (ie, the lowest vertical level). The last two dimensions must be*nlat*x*mlon*. For*pslhyp*, missing values should be indicated by*pres*@_FillValue. If*pres*@_FillValue is not set, then the NCL default (-999) will be assumed. *ps*- surface pressure (Pascals) (last two dimensions must be the same
dimensions as
*phis*). It must be the same dimensions as*pres*except for in*pslhor*it won't have a multilevel field. *t*- temperature (K) (same dimensions as
*pres*) *tv*- virtual temperature (K) (same dimensions as
*pres*) *z*- geopotential height (same dimensions as
*pres*) *lats*- latitudes (degrees). A vector of length
*nlat*.

*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?