NCL script for Idealized cases

From: Guan Song <gs6r_at_nyahnyahspammersnyahnyah>
Date: Mon, 22 Oct 2007 14:19:23 +0000

Hi,I remove the wrf_map calls, but there is nothing display any more.The code is as follows, could you please check it for me?Thanks for your prompt reply.;LOAD FUNCTIONS AND PROCEDURESload "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"begin;WRF ARW INPUT FILEa=addfile("../WRFV2/run/wrfout_d01_0001-01-01_00:00:00.nc","r")type="x11"wks=gsn_open_wks(type,"plt_Surface")SET BASIC OPTIONS;GIVE OUR PLOT A MAIN TITLE ; SET FOOTERS OFFARWres=TrueARWres_at_MainTitle="REAL-TIME WRF"ARWres_at_Footer = False;---------------------------------------------------------------;LETS FIND OUT HOW MANY TIMES ARE IN THE DATASETS.times=wrf_user_list_times(a) ; GET TIMES IN THE FILEntimes=dimsizes (times) ;NUMBER OF TIMES IN THE FILEdo it=0,ntimes-1,10 ;WE ARE ONLY INTERESTED IN THE LAST TIMEprint("Working on time:"+times(it))ARWres_at_TimeLabel = times (it);keep some time information;mpres=True;map=wrf_map(wks,a,mpres)ARWres_at_mpMaxLatF =30ARWres_at_mapMinLatF =40ARWres_at_mapMaxLatF =160ARWres_at_mapMinLonF =90u=wrf_user_getvar(a,"U",it)v=wrf_user_getvar(a,"V",it)hgt=wrf_user_getvar(a,"HGT",it)opts=ARWresprint (hgt);opts_at_ContourParameters=(/15.,60.,5./)opts_at_cnMonoFillPattern =Trueopts_at_cnFillOn=Trueopts_at_cnMonoLineColor = Trueopts_at_pmLabelBarDisplayMode = "Always" ; Turn on label bar.;contour=wrf_contour(a,wks,hgt(:,:,5),opts)wrf_contour(a,wks,u(:,:,5),opts);wrf_map_overlay(wks,map,(/contour/),True)end do^^^^^^^^^^^^^^^^^^^^^^^^^^Best regards,GuanFrom: wrfhelp_at_ucar.eduSubject: Re: [ncl-talk] NCL script for Idealized casesDate: Fri, 19 Oct 2007 12:11:51 -0600To: gs6r_at_virginia.eduWe are still working on some sample scripts for idealized data. In terms of WRF data, there is reallyno difference there (2D cases may need special care). The major difference between real data andideal data is that ideal data is typically on cartesian coordinate, and has no projection map. So whatyou should not use is the call to wrf_map calls.wrfhelpOn Oct 18, 2007, at 9:26 AM, Guan Song wrote:Hi Mary and othersThanks a lot for your answer and response regarding NCL programming.I am confused at some points:1. how to know the domain of idealized cases. for 2-d hill, after running, I checked with output and found that the central latitude and central longitude show zero. So I am wondering if I missed to set upmy domain,so my plot is just show a global map?Basically, I wrote the script as follows,it does give me a plot with global map.But because I do not have correct central latitude and longitude, I cannot get what I really want to look at.Can you or is there anyone can help with me to correct my script,please?Thanks in advance!------------------------------------------------------------------------------------------------------------------------------;LOAD FUNCTIONS AND PROCEDURESload "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"begin;WRF ARW INPUT FILEa=addfile("../WRFV2/run/wrfout_d01_0001-01-01_00:00:00.nc","r")type="x11"wks=gsn_open_wks(type,"plt_Surface");SET BASIC OPTIONS;GIVE OUR PLOT A MAIN TITLE ; SET FOOTERS OFFARWres=TrueARWres_at_MainTitle="REAL-TIME WRF"ARWres_at_Footer = False;---------------------------------------------------------------;LETS FIND OUT HOW MANY TIMES ARE IN THE DATASETS.times=wrf_user_list_times(a) ; GET TIMES IN THE FILEntimes=dimsizes (times) ;NUMBER OF TIMES IN THE FILEdo it=0,ntimes-1,10 ;WE ARE ONLY INTERESTED IN THE LAST TIMEprint("Working on time:"+times(it))ARWres_at_TimeLabel = times (it);keep some time informationmpres=Truemap=wrf_map(wks,a,mpres)ARWres_at_mpMaxLatF =30ARWres_at_mapMinLatF =40ARWres_at_mapMaxLatF =160ARWres_at_mapMinLonF =90u=wrf_user_getvar(a,"U",it)v=wrf_user_getvar(a,"V",it)hgt=wrf_user_getvar(a,"HGT",it)opts=ARWresprint (hgt);opts_at_ContourParameters=(/15.,60.,5./)opts_at_cnMonoFillPattern =Trueopts_at_cnFillOn=Trueopts_at_cnMonoLineColor = True;opts_at_sfXArray =lon;opts_at_sfYArray =lat;opts_at_tiXAxisString =lon_at_long_name;opts_at_tiAxisString =lat_at_long_nameopts_at_pmLabelBarDisplayMode = "Always" ; Turn on label bar.contour=wrf_contour(a,wks,v(:,:,5),opts)wrf_map_overlay(wks,map,(/contour/),True)end doend-----------------------------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^Best regards,Guan> Date: Tue, 16 Oct 2007 17:23:18 -0600> From: haley_at_ucar.edu> To: gs6r_at_virginia.edu> CC: ncl-talk_at_ucar.edu; wrfhelp_at_ucar.edu> Subject: Re: [ncl-talk] NCL script for Idealized cases> > Hi Guan,> > You ask a good question, but I'm afraid I don't know the answer to> this one. I looked around on the mmm website for the scripts, but> couldn't find a link to them.> > I've cc'ed wrfhelp_at_ucar.edu as they should be able to point you to the> scripts.> > --Mary> > Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now!
_________________________________________________________________
Climb to the top of the charts!  Play Star Shuffle:  the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 22 2007 - 08:19:23 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 29 2007 - 15:38:46 MDT