RE: [ncl-talk] NCL script for Idealized cases

From: Guan Song <gs6r_at_nyahnyahspammersnyahnyah>
Date: Thu, 18 Oct 2007 15:26:47 +0000

Hi Mary and others

Thanks 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 up
my 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 PROCEDURES
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin

;WRF ARW INPUT FILE

a=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 OFF
ARWres=True
ARWres_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 FILE
ntimes=dimsizes (times) ;NUMBER OF TIMES IN THE FILE
do it=0,ntimes-1,10 ;WE ARE ONLY INTERESTED IN THE LAST TIME
print("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 =30
ARWres_at_mapMinLatF =40
ARWres_at_mapMaxLatF =160
ARWres_at_mapMinLonF =90
u=wrf_user_getvar(a,"U",it)
v=wrf_user_getvar(a,"V",it)

hgt=wrf_user_getvar(a,"HGT",it)

opts=ARWres
print (hgt)
;opts_at_ContourParameters=(/15.,60.,5./)
opts_at_cnMonoFillPattern =True
opts_at_cnFillOn=True
opts_at_cnMonoLineColor = True
;opts_at_sfXArray =lon
;opts_at_sfYArray =lat
;opts_at_tiXAxisString =lon_at_long_name
;opts_at_tiAxisString =lat_at_long_name
opts_at_pmLabelBarDisplayMode = "Always" ; Turn on label bar.

contour=wrf_contour(a,wks,v(:,:,5),opts)

wrf_map_overlay(wks,map,(/contour/),True)
end do
end

-----------------------------------------------------------------------------------------------------------------

^^^^^^^^^^^^^^^^^^^^^^^^^^
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 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.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
Received on Thu Oct 18 2007 - 09:26:47 MDT

This archive was generated by hypermail 2.2.0 : Wed Oct 24 2007 - 09:14:00 MDT