arlmet.WrfAxis#
- class arlmet.WrfAxis(levels, *, offset=0.0)[source]#
Bases:
VerticalAxisFlag=5. WRF hybrid sigma-pressure levels, as HYSPLIT’s
arw2arlwrites them.arw2arlwrites flag 5 for a WRF run withhybrid_opt=2(flag 1 otherwise). The stored levels are WRF’s eta on the mass levels (ZNU), bottom up, with 1.0 for the surface, andoffsetis WRF’s model-top pressureP_TOP[hPa].Eta alone does not give pressure on hybrid levels: that also takes WRF’s hybrid coefficients, which
arw2arlwrites to a separate text file (hybrid_wrfvcoords.txt), not to the ARL file. So pressure is thePRESfield, as in HYSPLIT’sprfwrf, and heights are found as for a sigma file withPRES, by HYSPLIT’sprfsig, which HYSPLIT uses for a flag-5 file when it does not have the coefficients: hypsometric from the ground (PRSS) up throughPRES, the first layer with the mean of the ground temperature and the first level’s.Examples
>>> import numpy as np >>> from arlmet import WrfAxis >>> axis = WrfAxis(levels=[1.0, 0.995, 0.98], offset=50.0) >>> z = axis.to_height_agl( ... surface_pressure=850.0, ... temperature=np.array([285.0, 284.0]), ... pressure=np.array([845.0, 832.0]), ... ) >>> np.round(z, 1) array([ 49.3, 178.4])
Methods
|
Height AGL [m] by hypsometric integration of |
|
Raise ValueError: WRF hybrid levels need the |
Inherited
From VerticalAxis: from_flag