[gradsusr] use of vint for an area
See Hai Ooi
axl419 at yahoo.com
Sat Aug 28 04:08:32 EDT 2010
Dear Mr Charles Seman,
Great ! You have resolved my problem. Grateful if you could kindly modify my final script (as attached) and delete/add any comments to ensure that the methodology is accurate. Again, thank you very much indeed.
Let me answer your questions and inform you certain approaches taken by me to finalise my script:-
1. The vertical levels are 1000, 925, 850, 700, 600, 500, 400 and 300 hPa.
2. In spmtest2, I set it as 1000 hPa, i.e. the default level.
3. In model.ctl, all the required elements (ps, u, v, hum etc) are in one grib file. For my case, I need to open an additional file of mean sea level pressure. I am not sure how would the vint() function read this mean sea level pressure file, uwnd and vwnd files of standard levels. My "lev" does not vary across the lon/lat domain but it does vary vertically.
In accordance with your suggestions, my corrected analysis is similar to that by Professor Krishnamurthi (He also used NCEP/NCAR Reanalysis Data.). Regretably, he did not mention the unit of the vector scale (just 0.1). In GrADS, the scale factor (f) is set to 100. Am I right to divide my final result by 100 (to get 4 kg/ms instead of 0.1 ??) ? I think I understand why GrADS set the top level as 275. Is it because the next standard level is 250 hPa ? In fact, I found out that it appears to have no impact on the output by using either 300 or 275. Can I just leave the standard levels as they are ?
I believe I can proceed to write my script to obtain vertically integrated moist static energy. I have one question to ask. For specific humidity, the topmost level is 300 hPa. For others, like winds, the levels extend to 50 hPa. As you know, the moist static energy consists of internal energy, potential energy and latent energy. Can I sum all these components (say, specific humidity to 300 hPa while winds, to 100 hPa) with differing numbers of standard levels ?
Best regards.
Ooi
--- On Sat, 28/8/10, Charles Seman <Charles.Seman at noaa.gov> wrote:
From: Charles Seman <Charles.Seman at noaa.gov>
Subject: Re: [gradsusr] use of vint for an area
To: "See Hai Ooi" <axl419 at yahoo.com>
Date: Saturday, 28 August, 2010, 2:13 AM
Dear See Hai Ooi,
Regarding setting a vertical pressure range for defining "um" and "vm": do this first, then go back to set to a single level before defining "ium" and "ivm" (you can try it both ways, with a varying vertical dimension range and when the vertical dimension is set to a single level)... I tried it for a local dataset and found the vertically integrated specific humidity fields were the same for both methods: when the vertical level is set to a single level a 2D (x,y) field is generated by "vint" and when the vertical levels are set to a range then a 3D (x,y,p) field is generated by "vint". I did a difference of "isphum2(x,y,p)" and "isphum1(x,y)" and the result was zero. Note, by defining at a single level "isphum1(x,y)" becomes a "wild card" variable (http://grads.iges.org/grads/gadoc/variable.html#new) and can be used if and when the vertical level is set outside the range used to define "isphum2(x,y,p)"... please see a copy of a GrADS session
below where "isphum1(x,y)" and "isphum2(x,y,p)" are defined as shown:
---
ga-> q dims
Default file number is: 1
X is varying Lon = 178.75 to 188.75 X = 72 to 76
Y is varying Lat = -1 to 9 Y = 45 to 50
Z is fixed Lev = 1000 Z = 1
T is fixed Time = 12Z15JAN1981 T = 1
ga-> isphum1= vint(ps,sphum,125)
Define memory allocation size = 120 bytes
Name already DEFINEd: isphum1. Will be deleted and replaced.
ga-> set z 1 13
LEV set to 1000 100
ga-> isphum2= vint(ps,sphum,125)
Define memory allocation size = 1560 bytes
Name already DEFINEd: isphum2. Will be deleted and replaced.
ga-> set z 14
LEV set to 70 70
ga-> d isphum1
Contouring: 17300 to 18300 interval 100
ga-> d isphum2
Cannot contour grid - all undefined values
ga-> d isphum2(z=13)
Contouring: 17300 to 18300 interval 100
ga-> d isphum2(z=13)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=12)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=11)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=10)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=9)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=8)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=7)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=6)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=5)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=4)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=3)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=2)-isphum1
Constant field. Value = 0
ga-> d isphum2(z=1)-isphum1
Constant field. Value = 0
---
I hope this helps,
Chuck
Charles Seman wrote:
Dear See Hai Ooi,
I took a look at your "spmtest2.doc" including the question regarding "Usage Note No 4 in GrADS document", copied here again from http://grads.iges.org/grads/gadoc/gradfuncvint.html
"It is usually a good idea to make the top pressure value to be at the top of a layer, which is midway between grid points. For example, if the default file (and the data) have pressure levels of ...,500,400,300,250,... then a good value for top might be 275, the value at the top of the layer that extends from 350 to 275 mb. "
My understanding of putting the top at 275 is this: given data pressure levels at 500, 400, 300, 250,... then the midpoint levels would be at 450, 350, 275 which is the halfway distance between immediate lower and upper levels... the layer for the data at 400: 450-350, and the layer for the data at 300: 350-275 <- note, this top layer is not symmetric about the data level...
Some questions and comments about the code in "spmtest2.doc"...
1) what are the vertical pressure levels in your datasets?
2) what is the range of vertical pressure levels set to before you define "um" and "vm"? if it is only set for a single level, try setting the vertical levels to an appropriate range (taking into account "Usage Note No 4 in GrADS document" for guidance)
3) instead of using "lev" for the surface pressure (see "Example 1" in GrADS document: vint(ps,q,275)), I would try bringing in a surface pressure field appropriate for the data (may need to access another dataset?)... say "ps(x,y)" (does "lev" vary across the lon/lat domain?)... you could also try "Example 2" in GrADS document with your data to check on your code...
I hope this helps,
Chuck
********************************************************************
Charles Seman Charles.Seman at noaa.gov
U.S. Department of Commerce / NOAA / OAR
Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547
201 Forrestal Road fax: (609) 987-5063
Princeton, NJ 08540-6649 http://www.gfdl.noaa.gov/~cjs/
********************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100828/d1d0663d/attachment-0003.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spmtest3.doc
Type: application/msword
Size: 57344 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20100828/d1d0663d/attachment-0003.doc
More information about the gradsusr
mailing list