[Thread Prev][Thread Next][Index]
Re: negative longitudes (adding to indices)
Hi Andrew,
A quick idea for your second problem below.
Andrew Woolf wrote:
> In server/Ferret.pl, the routine fixLongitude() unconditionally adds 360
> to negative longitudes.
>
> This causes problems for a netCDF variable defined on a longitude axis
> which goes, for example, from -10 (ie 10 west) to 35; you get an 'illegal
> limits' error from ferret.
>
> For global datasets, you can set the 'modulo' attribute for the longitude
> axis, but not for axes smaller than 360 degrees.
>
> I can, of course, use a ferret init_script to redefine the xaxis to the
> range 350->395, but I think this is an inelegant solution.
>
> Any other ideas?
>
> Also can someone tell me how to redefine an axis by adding 360 on?!
>
> Instead of:
>
> define axis/x=350e:395e:0.25 xlon
>
> I want to do something like:
>
> define axis/x=xlon+360 xlon
>
> But that doesn't work.
>
> --
Try this solution:
define axis/x=-10:35:1/units=degrees xabs
show axis/l=1:50 xabs
let test = 360+x[gx=xabs]
define axis/x/from_data/name=xlon/units=degrees test
show axis/l=1:50 xlon
Joe
>
> -----------------------------------------------------
> Andrew Woolf (awo@mail.nerc-essc.ac.uk)
> Environmental Systems Science Centre (ESSC)
> Reading University
> 3 Earley Gate
> Whiteknights
> Reading RG6 6AL
> UNITED KINGDOM
> Phone: +44 (0)118 931 8741 Fax: +44 (0)118 931 6413
> -----------------------------------------------------
--
Joseph McLean
NOAA/PMEL/TMAP
(206)526-4286
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement