Hello,
I'm not sure that you mean by "the graphic seems wrong". If you are
starting out with NCEP/NCAR Reanalysis data, then there is no need to
use vinth2p or hyam/hybm, as the data is already on pressure levels.
(From the command line do a "ncdump -v level /media/work/vwnd.2009.nc"
and you will see what I mean.)
The example script stream_8.ncl was written for CCSM data that comes on
hybrid-sigma pressure model levels, and was converted to pressure levels
via vinth2p. Always look at your data first before you start analyzing /
plotting it.
In your script, you are also selecting the first 12 levels (0:11), and
you are specifying your latitudes from -40:40. Note that the NCEP
Reanalysis data latitudes runs from north->south. NCL will flip the
latitudes accordingly when you do this, but note that some spherical
harmonics functions require your latitudes to run from south->north.
I also see that you are contouring the V-wind; if that is what you want
then that is fine. (The second input in gsn_csm_pres_hgt_streamline is
the data that is to be contoured.)
You script can also be parred down to the following:
oad "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
dir="/media/work/"
vf=addfile(dir+"vwnd.2009.nc","r")
wf=addfile(dir+"omega.2009.nc","r")
v=short2flt(vf->vwnd)
w=short2flt(wf->omega)
wAve=avg(w(49,:,:,{120})) ; you don't need to scale the data
vAve=avg(v(49,:,:,{120})) ; if you don't want to.
scale=fabs(vAve/wAve)
ws=w*scale
copy_VarCoords(w,ws)
wks=gsn_open_wks("x11","hadley")
res=True
res_at_cnLinesOn=False
res_at_cnLineLabelsOn=False
res_at_cnInfoLabelOn=False
res_at_stMinArrowSpacingF=0.008
res_at_stArrowLengthF=0.008
plot=gsn_csm_pres_hgt_streamline(wks,v(49,0:11,{-40:40},{120}),v(49,0:11,{-40:40},{120}),ws(49,0:11,{-40:40},{120}),res)
end
If the result is still not what you want, please provide to ncl-talk
more details about what is wrong, along with a .jpg or .png or .gif of
the graphic.
Adam
Áõ²®Ææ wrote:
> Hello,
> I'm a starter of NCL, I have a problem about drawing a Hadley Cell
> along 120E by the NCEP/NCAR Reanalysis Data. The problem is that the
> graphic seems something wrong when I use "gsn_csm_pres_hgt_streamline".
> Although I want to use the function "vinth2p", I can not find the Var
> "hyam" and "hybm" (such as the script:
> http://www.ncl.ucar.edu/Applications/Scripts/stream_8.ncl) in the
> NCEP/NCAR Reanalysis Data. Could you please tell me how to solve the
> problem? Thanks for your help!
> The program is as below:
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> begin
> dir="/media/work/"
> vf=addfile(dir+"vwnd.2009.nc","r")
> wf=addfile(dir+"omega.2009.nc","r")
> vv=vf->vwnd
> v=short2flt(vf->vwnd)
> copy_VarMeta(vv,v)
> ww=wf->omega
> w=short2flt(wf->omega)
> copy_VarMeta(ww,w)
>
> wAve=avg(w(49,:,:,{120}))
> vAve=avg(v(49,:,:,{120}))
> scale=fabs(vAve/wAve)
> ws=w*scale
> copy_VarCoords(w,ws)
>
> wks=gsn_open_wks("x11","hadley")
> res=True
>
> res_at_cnLinesOn=False
> res_at_cnLineLabelsOn=False
> res_at_cnInfoLabelOn=False
> res_at_stMinArrowSpacingF=0.008
> res_at_stArrowLengthF=0.008
> plot=gsn_csm_pres_hgt_streamline(wks,v(49,0:11,{-40:40},{120}),v(49,0:11,{-40:40},{120}),-ws(49,0:11,{-40:40},{120}),res)
> end
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Mon Apr 13 2009 - 12:01:35 MDT
This archive was generated by hypermail 2.2.0 : Thu Apr 16 2009 - 10:05:49 MDT