Re: WRF subregion

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 22 2011 - 13:37:42 MST

On Feb 18, 2011, at 6:00 PM, Peter Q. Olsson wrote:

>>
>> Message: 1
>> Date: Fri, 18 Feb 2011 18:40:22 +0000
>> From: WuLongtao <aos_rain@hotmail.com>
>> Subject: how to plot a subregion with wrf_contour
>> To: <ncl-talk@ucar.edu>
>> Message-ID: <SNT134-w23E35090439D5590F20D5AF9D40@phx.gbl>
>> Content-Type: text/plain; charset="gb2312"
>>
>> Hello,
>>
>> I would like to plot a subregion of my wrf output. I tried to set
>> res@mpMinLatF = -50
>> res@mpMaxLatF = 0
>> res@mpMinLonF =-100
>> res@mpMaxLonF =-70
>>
>> But it didn't work. The followings are my setting. Do you have any
>> suggestion? Thanks!
>>
>> -Longtao
>>
> #######################################################################################
>
> Longtao-
>
> I have been trying to do the same thing & my colleague has come up with this method:
>
>
> ;zoom in on map
> mpres@mpLimitMode = 1
> minlat = 60
> maxlat = 62
> minlon = -152
> maxlon = -147
>
> mpres@mpMinLatF = minlat
> mpres@mpMaxLatF = maxlat
> mpres@mpMinLonF = minlon
> mpres@mpMaxLonF = maxlon
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> I have confirmed that it works, and that the final product after wrf_map_overlays()
> is what I expect.
>
> Comparing to yours, it looks like the magic bullet might be:
>
> mpres@mpLimitMode = 1
>
> to get things off on the right foot.
>

Just a word of caution here: if you are indeed dealing with WRF data and using the wrf_xxx plotting routines, just setting the map limits is not enough. The wrf_xxx routines will map whatever data you are plotting to whatever map limits you've chosen. This means if you subset the map but not the data, then your full dataset will incorrectly be overlaid on the map subset. You need to make sure you subset your data correctly too. If you look at the examples on the WRF-ARW-NCL page, you'll notice that they use wrf_user_ll_to_ij to get the i,j indexes of the data that correspond with the map limits that you want. See:

http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/SPECIAL/olr.ncl

--Mary

> PQO
>
>
>> ********************************************************
>> a = addfile("wrfout_d01_2006-09-22_12:00:00.nc","r")
>> pblh = wrf_user_getvar(a,"PBLH",0)
>> wks=gsn_open_wks("ps","pbl_wrf")
>> res=True
>> res@cnFillOn = True
>> pltres = True
>> mpres = True
>> mpres@mpGeophysicalLineColor = "Black"
>> mpres@mpNationalLineColor = "Black"
>> mpres@mpUSStateLineColor = "Black"
>> mpres@mpGridLineColor = "Black"
>>
>> gsn_define_colormap(wks,"rainbow")
>> res@FieldTitle = "PBLH_WRF"
>> contour=wrf_contour(a,wks,pblh,res)
>> plot=wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
>> ***************************************************************
>
>
>
> ___________________________________________________________
> |
> | Dr. Peter Q. Olsson,
> | Alaska State Climatologist, Alaska State Climate Center
> | Chief Scientist, Alaska Experimental Forecast Facility
> | University of Alaska Anchorage
> | 2811 Merrill Field Drive
> | Anchorage, AK 99501
> | voice: (907) 786-7234, fax (907) 786-7237|
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 22 13:37:48 2011

This archive was generated by hypermail 2.1.8 : Wed Feb 23 2011 - 16:47:57 MST