[Thread Prev][Thread Next][Index]

Variable label on LAS plot.



I've been working on getting LAS to change Sigma depth to Z-Depth
(finally!) and I have part of it working.  The first part has been getting
XY plots to plot at a particular depth in meters, as opposed to a sigma
layer.  I've changed draw_2d.tmpl in the following way to do this:

[% IF args.do_shade %]
    go preplot_setup
    [% IF args.view == 'xy' %]
        set MEMORY/SIZE=20.0
        DEFINE AXIS/Z=-5000.0:0.0:10.0/UNIT=meters/DEPTH zdepth
        let varonsigma= ZAXREPLACE([% args.variable_name %],depth_at_sigma,z[gz=zdepth])
        LET var_at_depth = varonsigma[ [% args.z_lo %] ]
        [% args.fill_type %]/levels=[% args.fill_levels %]/set var_at_depth,'X','Y'
    [% ELSIF args.view == 'xz' %]

       ... Next thing to work on.

There are a couple of things that I'd like to change.  The first thing is
that when Ferret plots this, the label for the plot is : VARONSIGMA[ ].
I'd like to specify the label to be [% args.variable_name %] so it would
put the actual variable name up.  I haven't been able to track down how to
do this.  

The second thing is that I have just hard-wired the maximum depth to be
-5000 meters in the DEFINE AXIS line.  For most of what I'm doing that
would probably be fine, or I could pick a value that would be fine for all
of our data sets.  However, it would be a lot more slick if it could use
the value that is stored in the NetCDF file as part of the valid_range
attribute for DEPTH.  I'm guessing that there isn't a way to do this right
now but that there will in a future version of Ferret.  If I'm mistaken,
please let me know how I can do this.

Finally, for now, in order to get ZAXREPLACE to work, I needed to add a
variable in the NetCDF file called "depth_at_sigma" which is a 3D array
that holds the depth of each sigma layer at each grid point.  I could have
done this instead by using:

	let depth_at_sigma = zpos * depth

where zpos is the variable/dimension of depth.  The NetCDF lists it like:

dimensions:
	xpos = 151 ;
	ypos = 121 ;
	zpos = 15 ;
	time = UNLIMITED ; // (46 currently)
variables:
	float xpos(xpos) ;
		xpos:long_name = "Columns" ;
		xpos:units = "column" ;
	float ypos(ypos) ;
		ypos:long_name = "Rows" ;
		ypos:units = "row" ;
	float zpos(zpos) ;
		zpos:long_name = "Layer" ;
		zpos:units = "sigma_level" ;
.
.
.

 zpos = 0, -0.015625, -0.03125, -0.0625, -0.125, -0.25, -0.375, -0.5,
        -0.625, -0.75, -0.875, -0.9375, -0.96875, -0.984375, -1 ;


However, when I tried doing it this way it produces:

    **ERROR: variable unknown or not in data set: 'zpos'

I'm guessing that it has something to do with it being a dimension
variable but I'm not sure why it isn't usable.

I tried just adding another 1D variable called SIGMA to the NetCDF file
and then doing:

	let depth_at_sigma = sigma * depth
	
This worked fine when I did it in Ferret but then when I tried to bring it
into the LAS database using make, it produced:

Variable 'sigma' is missing an X or Y axis
Need to remove variables with bad axes from XML configuration file(s) at
../xml/perl/genLas2.pl line 69.
make: *** [../ui/config.js] Error 255

Is there a way of bringing in variables that just use the Z axis? Or,
better yet, is there a way to use the existing Z dimension variable that
already has the data I need?

Thanks,

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