[Thread Prev][Thread Next][Index]

Re: X-Y Dimension resolution in Ferret?



Hi Mark,

Please let me know which version of Ferret and which version of LAS you are currently using. There is a known problem with negative longitude coordinate values which will be fixed in Ferret v5.42.  In the meantime, a fix that I've found to work is to write some script that creates all positive coordinate values from the existing axis.  The other problem is that a longitue axis which spans the globe is considered modulo by LAS v5.2.  Your errors indicated that the axis was not being set to modulo.  The request to Ferret that caused the second Error

**ERROR: dimensions improperly specified: must be a 2D region
          shade/levels=64/set lwscp07
was being translated as set region/x=180E:180E which is a single point on the axis.  Okay, enough babble.  I think the following will fix the problem

in your XML file, change the X axis size from 721 to 720
in your XML file, add the ferret init_script property
details at http://ferret.wrc.noaa.gov/Ferret/LAS/Documentation/v5_installation.html#Customizing_LAS

<properties>
 <ferret>
   <init_script>my_data_init</init_script>
 </ferret>
</properties>

copy the server/jnls/std_initialize.jnl to server/jnls/my_data_init.jnl
in my_data_init.jnl, add the following lines just after    "set data ($dset)"

let xstep = x[gx=`$4,return=xaxis`]+360
define axis/x/from_data/name=`$4,return=xaxis`/units="degrees"/modulo xstep[i=1:720]

This should do the trick.

Joe
-------------------------------------------------------

<example omitted>

It's my intent (in this example) to describe a grid (or perhaps a lattice) in which each data point is centered on whole multiples of ten degrees of latitude and longitude (as opposed to grid cell edges which align with whole multiples of ten degrees of latitude and longitude). So for this ten degree grid, for example, the first data point is at 180 W, 90 N (and not 175 W, 85 N). To belabor the point, this means that all data values in the first (and last) row of the grid are identical (since they're all at 90 N -- or 90 S). It also means that the first and last data value in each row are also identical (since their longitudes are 180 W and 180 E, respectively).

Thanks,

Mark

Joseph Mclean wrote:

Hi Mark,

Are you using Ferret to change the axis definition?  If so, could you send me an example of the command you're using.  It seems like this can be fixed using the /EDGE and /MODULO qualifiers.  What are the exact coordinates of the cell corners and centers?

Joe
---------------------------------------------------------

Mark A Ohrenschall wrote:

I'm getting an internal server error when attempting to display a dataset with LAS and Ferret. GenericLAS_debug.txt reports:
 **ERROR: illegal limits: "LWSCP07" is not in the range X=164W:164E(524)
          Axis extremes are X=179.8E(-180.2):179.8W
I get this particular message when I shrink the window somewhat from the full region. This is the error message I get for the full region:
 **ERROR: dimensions improperly specified: must be a 2D region
          shade/levels=64/set lwscp07
What's unusual about this grid is that it has 361 rows and 721 columns, but the grid spacing is still half-degree (you would expect 360 rows by 720 columns). I get an image without error if I change the grid spacing so that it is 0.4993 (instead of 0.5), i.e., so that a ncdump -c shows:
 slon = -180, -179.5007, -179.0014, -178.5021, -178.0028, -177.5035,
    -177.0042, -176.5049, -176.0056, -175.5062, -175.0069, -174.5076,
    -174.0083, -173.509, -173.0097, -172.5104, -172.0111, -171.5118,
But what I'm trying to represent is a grid with corner of cell registration and not center of cell registration, hence the grid spacing of 0.5.

Incidentally, ncBrowse displays the image just fine with the 0.5 grid spacing.

--
Joseph McLean   --------------------------------
NOAA/PMEL/TMAP   "I know what I'm doing"
(206)526-4286                     Bubba Zanetti
     -------------------------------------------
 


[Thread Prev][Thread Next][Index]

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