[Thread Prev][Thread Next][Index]

Re: Longitude weirdness



Hi Steve,

My memory is fuzzy on this, but in subsequent versions of LAS this may not be a
problem.  Until we know for sure, let's try some things.


Steve Cousins wrote:

> On Thu, 26 Jun 2003, Joe McLean wrote:
>
> > Steve,
> >
> > What does your XML file x-axis definition look like?
>
> Hi Joe,
>
> Here is what I have in the las.xml file.  There are no entries for
> latitude or longitude in the <datasets><variables> section.
>
>      <grids>
>       <mf1_11b_19990515_nc_longitude_latitude_grid>
>        <link match="/lasdata/axes/mf1_11b_19990515_nc_longitude"/>
>        <link match="/lasdata/axes/mf1_11b_19990515_nc_latitude"/>
>       </mf1_11b_19990515_nc_longitude_latitude_grid>
>      </grids>
>      <axes>
>       <mf1_11b_19990515_nc_longitude units="degrees" type="x">
>        <v>20.140625
>        </v>
>        <v>20.421875
>        </v>
>        <v>20.703125
>        </v>
>         .
>

Is the longitude axis a regular or irregular axis (equal or unequal steps)?  In
Ferret you can tell by opening the data set and using the command "show grid
varname"

ie

name             axis                        # pts    start                  end
xaxis name    LONGITUDE          180mr   21E                  19E(379)

next to # pts 180, 'm' means modulo and 'r' means regular (i means irregular).  The
fact that your XML file does not have the arange tag, but rather the
<v>20.140625</v> format, tells me LAS thinks it is irregular, but this may be a
precision issue within addXml.pl.  The first two steps are each 0.2812, it may be
regular.

>         .
>         .
>
> The nc header looks like:
>
> dimensions:
>         longitude = 1280 ;
>         latitude = 896 ;
>         z = 20 ;
>
> variables:
>         float longitude(longitude) ;
>                 longitude:units = "degrees" ;
>                 longitude:modulo = " " ;
>         float latitude(latitude) ;
>                 latitude:units = "degrees" ;
>         .
>         .

Good, the longitude coordinate variable is set to modulo.

>         .
>
> > Is your NetCDF longitude coordinate variable set to modulo?
>
> I've tried it both with modulo=" " and without.  When modulo=" " is
> specified, the las.xml file doesn't reflect it.  I've tried hand entering
> in the modulo=" " on the line above like:
>
>      <axes>
>       <mf1_11b_19990515_nc_longitude units="degrees" type="x" modulo=" ">
>
> but it doesn't seem to have any effect either.
>

modulo is not an attribute of the LAS XML variable tag, so this has no effect.
When LAS opens the data in Ferret, Ferret knows about the modulo attribute from the
NetCDF file.

>
> Since this dataset is on a rectilinear grid the latitude and longitude
> variables are just 1D.  I assume this is the way it should be.  I'm used
> to working with 2D vars for these so I'm not positive if I have the netCDF
> part looking ok in this case.
>

Since the axis in the NetCDF file is modulo, it wouldn't matter which start point
you use in the XML axis definition.
if the axis is irregular, subtract 20 from all of the <v>.....</v> entries.

If the axis is regular, you can define your axis in the XML file like this:

   <mf1_11b_19990515_nc_longitude units="degrees" type="x">
       <arange start="0.0" step = "0.2812" size="1280"/>
   </mf1_11b_19990515_nc_longitude>

In fact, try it this way first (less editing) and see if you like the way LAS
responds.

LAS uses these axis coordinates to send a request to Ferret.  Since the longitude
axis is defined as modulo in the NetCDF file, a request for data within longitude
range 10W:10E will correspond with the data axis 350E:370E and all is well.  I
don't know details about the Livemap and why it doesn't like 20E to 380E, but we
can fix it.

By the way, starting the the longitude values at 20 E is for drawing the world by
bisecting Africa at the left and right sides of a plot window, keeping ocean basins
contiguous.

Joe

>
> Thanks for your help,
>
> Steve
>
>
> > Joe
> > -------------------------------
> > Steve Cousins wrote:
> >
> > >> I have some data sets that have longitude values from 20.0 to 380.0.  I'm
> > >> not sure why.  I've brought this into a LAS 5.1 server and am trying to
> > >> navigate with the map.  The original map that comes up works fine if I hit
> > >> the get data button.  However, if I try to specify my own section the
> > >> outline box is pushed way over to the left side of the map and I can't get
> > >> it to come out.  The values in the Latitude dialogs specify:
> > >>
> > >>         18.0 E          19.859375 E
> > >>
> > >> As a test I changed the NetCDF file to have values just from 0 to 360.0
> > >> and everything worked fine, except of course, that everything was shifted
> > >> by 20.0 degrees.  I've also tried changing the "bounds" values in ui.xml.
> > >>
> > >> Is there some way of specifying the values in the NetCDF file differently
> > >> in order to allow this to work?  Some other way?
> > >>
> > >> Thanks very much,
> > >>
> > >> Steve
> > >>
> > >> _____________________________________________________________
> > >>  Steve Cousins                 Email: cousins@umit.maine.edu
> > >>  Research Associate            Phone: (207) 581-4302
> > >>  Ocean Modeling Group
> > >>  School of Marine Sciences     208 Libby Hall
> > >>  University of Maine           Orono, Maine 04469
> > >
> > >
> >



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement