Re: Filtering Land Use in WRF

From: So-Young Ha <syha_at_nyahnyahspammersnyahnyah>
Date: Fri, 31 Aug 2007 08:36:33 -0600

Sean Heuser wrote:
> Hello,
> I am trying to plot land use using the WRF ARW package. However, I would
> only like to plot the areas that have a land_use equal to a certain
> value(say 7 for this case). Is there any simple way to do it? I was
> thinking I need an if loop but I'm not sure how to set it up. Thanks for
> any help.
>
> -Sean
>
>
>
a=addfile("wrfout_d01_2006-10-07_12:00:00.nc","r")
lu=a->LU_INDEX(0,:,:)
lu@_FillValue=-999 ; Missing value

itype=7 ; Landuse index to plot
data=where(lu.eq.itype,lu,lu@_FillValue)
ndata=num(.not.ismissing(data)) ; Just to check how many non-missing
data we've got here.
print(ndata)

wks=gsn_open_wks("ncgm","luidx"+itype)
gsn_define_colormap(wks,"rainbow")

res = True
res_at_cnFillOn = True
res_at_cnLinesOn = False
....
plot = gsn_csm_contour_map(wks,data,res)
------------------------------------------------------------------
Here, to use "where" function, you should use a version 4.3.0 or higher.

Good luck,

Soyoung
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 31 2007 - 08:36:33 MDT

This archive was generated by hypermail 2.2.0 : Sat Sep 01 2007 - 07:29:26 MDT