Re: help: plot a variable from binary file

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 30 2012 - 10:28:38 MST

You could try modifying the line
tp&lon = lonGlobeFo(nlon,"lon","longitude","degrees_east")
to
tp&lon = lonGlobeFo(nlon,"lon","longitude","degrees_east") -180

It's true that this is not what the ydef specifies, but maybe the specification is wrong.
Also your fspan lines are not being used at all so you might as well get rid of them
 -dave

On Jan 30, 2012, at 10:10 AM, Sha Feng wrote:

> Hi ncl-talkers,
>
> I tried to plot a binary variable using NCL. The ctl file from it is:
>
> xdef 720 linear 0.25 0.5
> ydef 161 linear -40. 0.5
>
> so I use:
>
> lat = fspan(-40,40,nlat)
> lon = fspan(0.25,359.75,nlon)
>
> tp = fbindirread(dir+fn, 0, (/nlat, nlon/), "float")
> tp@_FillValue = -9999.
> tp!0 = "lat"
> tp&lat = latGlobeFo(nlat,"lat","latitude","degrees_north")
> tp!1 = "lon"
> tp&lon = lonGlobeFo(nlon,"lon","longitude","degrees_east")
>
> to designate the attributes for it.
>
> However, the plot was just mismatched the map (dislocation) with 180 degrees in longitude.
>
> Any suggestion is appreciated.
>
> Thanks,
> Sha
>
>
> _______________________________________________
> 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 Mon Jan 30 22:28:49 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 02 2012 - 03:10:31 MST