Re: Filtering Land Use in WRF

From: Alessandra Giannini <alesall_at_nyahnyahspammersnyahnyah>
Date: Tue, 04 Sep 2007 10:24:20 -0400

Sean, have you thought of using the "mask" function?
http://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml

-- 
Alessandra Giannini
IRI for Climate and Society - The Earth Institute at Columbia University
P.O. Box 1000, Palisades NY 10964-8000
phone/fax: +1 845 680-4473/4864 - email: alesall_at_iri.columbia.edu
Sean Heuser wrote:
>Soyoung,
>Thank you for the code. Unfortunately I do not have the updated version,
>that's why I was hoping there could be a way to do it via an if loop or a
>do loop or something.  Anyone out there know if this is possible for my
>land use filter?  Thanks.
>
>-Sean
>
>  
>
>>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 Tue Sep 04 2007 - 08:24:20 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 05 2007 - 07:49:00 MDT