I have adjusted my version of the CAM model to have 50 pressure  
levels. I have adjusted the A and B coefficients (in the equation for  
pressure P=A*P0+B*PS) and know what pressure I should expect on a  
given model hybrid level, from this equation. I also have an estimate  
of what the corresponding heights should be for each of these 50  
pressure levels.
The NCL routine I am using to plot the results of simulations using  
the 50 level model interpolates results  onto chosen pressure levels,  
so that the results are plotted in pressure coordinates rather than  
hybrid coordinates. At first I chose just a few pressure levels for  
the interpolation. My latest attempts now include 50 chosen values of  
pressure, which are close to those that would be expected for each of  
the hybrid levels.
I have also edited the routine "gsn_csm.ncl" to have the same 50  
pressure levels, and their corresponding estimated heights.
My NCL routine produces results plotted as a function of latitude  
versus pressure (in mb) and height (km). I have used the model to  
output values of -loge(Pmid/P0), and also values of loge(Pmid) (where  
Pmid is the pressure at midpoint levels) (making use of variable  
"qrs"). When I plot these as a function of pressure and height using  
the NCL routine, the plotted pressures which are output from the  
model, do not seem to be the same as the pressures which are given on  
the axis, and seem to be incorrect by at least an order of magnitude  
in places.
The NCL routine uses "vinth2p (X, hyam, hybm,  lev_p ,PS, 1, P0mb, 2,  
True)"  to do the interpolation. As far as I can tell from the  
variables used in the NCL routine, the pressure levels must be  
calculated from the netcdf model output file, making use of values of  
hyam, hybm, P0, and PS to calculated the pressure. I have calculated  
values of pressure from the same model netcdf file by hand on various  
levels, and what is plotted on the axis and the pressure that is  
output into the netcdf file do not seem to correspond. As a result I  
am finding the model output very difficult to interpret, as I am not  
quite sure where a given phenomena is happening in terms of  
atmospheric pressure, and all my plots may be quite inaccurate.
I am attaching a copy of my NCL routine.
These are the lines I adjusted in "gsn_csm.ncl" within procedure  
"gsn_geop_hgt" :
  nsa = 51
   psa = new( (/nsa/), float, 1.e36 )
   zsa = new( (/nsa/), float, 1.e36 )
   zsa = (/ 0.0, 0.5, 1.0, 1.2, 1.4, 1.5, 2.0, 3.0, 4.0, 6.0, 10.0,  
\      ; km
           12.0, 15.0, 18.0, 22.0, 25.0, 28.0, 32.0, 35.0, 38.0, 42.0, \
           44.0, 47.0, 50.0, 52.0, 54.0, 56.0, 58.0, 60.0, 62.0, 63.0, \
           64.0, 66.0, 68.0, 71.0, 73.0, 74.0, 75.0, 76.0, 78.0, 79.0, \
           81.0, 82.0, 83.0, 85.0, 87.0, 88.0, 90.0, 94.0, 98.0,  
102.0 /)
   psa = (/ 91942.934, 91716.175, 91108.339, 89840.782,  87684.393,  
\      ; mb (hPa)
            84457.453, 80050.371, 74446.624, 67738.400, 60129.835,  \
            51925.157, 43497.756, 35247.383, 27551.080, 20714.946,  \
            15057.807, 10789.423, 7730.9693, 5539.4781, 3969.2143,  \
            2844.0714, 2037.8669, 1460.1941, 1046.2751, 749.68907,  \
            537.17586, 384.90345, 275.79546, 197.61615, 141.59820,  \
            101.45958, 72.698986, 52.091117, 37.324924, 26.744479,  \
            19.163257, 13.731072, 9.8387413, 7.0497649, 5.0513764,  \
            3.6194688, 2.5934622, 1.8582966, 1.3315275, 0.95408103, \
            0.65574605, 0.39879463, 0.21278452, 0.10202328,         \
            0.030549121, 0.01 /)
This is a plot of -loge(Pmid), with the corresponding pressure axis:
Any ideas why this is not plotting correctly?.
Thanks,
Helen.
  
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Fri Jul 18 2008 - 08:51:52 MDT