Model levels
The model levels are staggered hybrid levels. They are terrain following at the surface and gradually change to follow pressure levels at the model top. In GEM4 and up, the hydrostatic pressure at the model levels gets calculated from:
ln(pijk) = Ak + Bk * ln(psurfij*pref)
with:
p : pressure on model level (3-D field depending on i, j and k)
psurf : surface pressure (2-D field depending on the horizontal i and j)
pref : reference pressure (constant, usually set to 100000 Pa)
A, B : coefficients used to define the vertical level structure (1-D fields depending on the level k)
GEM4 and up use Charney-Phillips vertical staggering. The levels of the winds are called "momentum levels" (full levels), the ones of the scalar fields (like temperature and humidity) are called "thermodynamic levels" (half levels). The levels are alternating with the lowest model level being a thermodynamic level, the highest a momentum level.
The above figure shows model levels of the level set with 66 full model levels (66 momentum + 66 thermodynamic levels) and a top at around 25 hPa. For clarity, (1) only shows every tenth momentum and thermodynamic level, whereas (2) shows only the momentum levels but for all levels.
GEM is very sensitive to the location of the model levels. Therefore, certain level sets have been predefined and can get used by setting the parameter 'CLIMAT_etaname' to the desired value as found in the model script 'Climat_eta2preshyb'.
Get local pressure for output fields on model levels
Pick any file that contains data you want to look at on model levels (any dm- or pm- file). Then use the following command:
r.diag ggstat filename -info | less
You should see lines like the following:
:
pref= 100000.00000000000 Pa
:
Equation to compute hydrostatic pressure (pi): ln(pi) = A + B * ln(P0*100/pref)
Momentum levels ip1, A, B:
96649243 5.1943503239077842 0.0000000000000000
:
Thermodynamic levels ip1, A, B:
96683587 5.3687530840411721 2.3925018330509525E-009
:
You see the equation you need to solve above: ln(pi) = A + B * ln(P0*100/pref)
So in this example the local pressure is : pi = exp(A + B * ln(P0*100/pref))
The value for 'pref' is written above: pref = 100000
'P0' is the surface pressure for the current point and timestep.
If you are looking at winds you need to take ip1, A, B from the 'Momentum' level set, otherwise from the 'Thermodynamic' level set. The geopotential 'GZ' exists on both level sets!
'ip1' is the model level "description". Once you read the field you want to plot you also have access to its 'ip1'. If you do not find them let me know. And once you have the ip1 you can get the corresponding 'A' and 'B' from the table above. I suggest you create a case of if statement, for example:
if ip1 == 96649243:
A = 5.1943503239077842
B = 0.0000000000000000
and so on.
Ajouter un commentaire