Re: Filtering Land Use in WRF

From: Sean Heuser <spheuser_at_nyahnyahspammersnyahnyah>
Date: Tue, 4 Sep 2007 10:09:20 -0400 (EDT)

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
>

-- 
Sean Heuser
Masters Student
Department of Marine, Earth & Atmospheric Sciences
North Carolina State University
spheuser_at_ncsu.edu
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Sep 04 2007 - 08:09:20 MDT

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