Re: NCL Debugging and HDF-EOS Support for AMSR-E LAMAZ Projection?

From: Stewart Dickson <s-dickson_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 14 2011 - 10:44:03 MDT

Thank you, Wei,

That looks very good. I shall be more careful in my data type
conversion. I neglected to try this particular combination.
I shall credit you in the example when published.

-Stewart

On 4/14/2011 11:23 AM, Wei Huang wrote:
> Stewart,
>
> Below is a script which I tried, and the plot it attached.
> Hope this help.
>
> Wei
>
> huangwei@ucar.edu <mailto:huangwei@ucar.edu>
> VETS/CISL
> National Center for Atmospheric Research
> P.O. Box 3000 (1850 Table Mesa Dr.)
> Boulder, CO 80307-3000 USA
> (303) 497-8924
>
>
>
>
>
> -------------
> ;************************************************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ;************************************************
>
> eos_file=addfile("AMSR_E_L3_5DaySnow_V09_20050126.hdf.he2", "r")
> bdata=eos_file->SWE_NorthernPentad_Northern_Hemisphere
> printVarSummary(bdata)
> udata = tounsigned(bdata)
> udata@_FillValue = 255B
> printVarSummary(udata)
> fdata = tofloat(udata)
> fdata@_FillValue = 255.0
> printVarSummary(fdata)
> fdata@lon2d=eos_file->GridLon_Northern_Hemisphere
> fdata@lat2d=eos_file->GridLat_Northern_Hemisphere
>
> xwks=gsn_open_wks("ps","AMSR_E_L3_5DaySnow_V09_20050126_SWE_NH")
>
> res=True
> res@cnFillOn=True
> res@gsnSpreadColors=True
> ;res@cnFillMode="RasterFill"
> ;res@cnMissingValFillPattern = 0 ; missing value pattern is set to
> "SolidFill"
> ;res@cnMissingValFillColor=0; white color for missing values
>
> res@cnLevelSelectionMode="ExplicitLevels"
> res@cnLevels=(/0.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 150.0, 200.0,
> 230.0, 240.0, 245.0, 250.0, 255.0/)
> ;res@cnMinLevelValF=0.0
> ;res@cnMaxLevelValF=260.0
> ;res@cnLevelSpacingF=10.0
>
> res@mpProjection = "LambertEqualArea" ; LAMAZ
> res@mpCenterLatF = 90.0; == North Pole
> res@mpCenterLonF = 0.0
> ;res@mpMinLatF = min(fdata@lat2d)
> res@mpMinLatF = 0.0
>
> plot=gsn_csm_contour_map(xwks,fdata,res)
>
...

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Apr 15 02:44:18 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 19 2011 - 18:32:03 MDT