[Thread Prev][Thread Next][Index]

Re: ZAXREPLACE and Sigma to Z depth (fwd)



Just to document to the list the resolution of my problem:

I received two emails that helped me to see what I was doing wrong.  I
also got help from Mingshun Jiang here at UMaine.

The solution boils down to ZAXREPLACE needing variables that share the Z
axis.  Depth is a 2D variable that doesn't have a Z dimension. So, I
created a new 3D variable called depth_at_sigma which holds the depth at
each grid point and layer.  The code now looks like:


    DEFINE AXIS/Z =-5000.0:0.0:10.0/UNIT=meters/DEPTH zdepth
    let varonsigma = ZAXREPLACE(temp,depth_at_sigma,z[gz=zdepth])
    LET var_at_depth = varonsigma[Z=-50]
    SHADE/levels=64/L=5 var_at_depth, 'X','Y'


A similar thing could be done by doing the following before the other
commands:

   let depth_at_sigma= sigma * depth

where sigma is a 1D array that corresponds to zpos in my original post.
That is, it contains the fractions of depth at each layer.

I tried doing:

   let depth_at_sigma = zpos * depth

but it produces:

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

I am guessing that this is caused by it being a dimension variable.  I
don't really understand why it can't be used though. I've tried putting in
another variable that is the exact same thing (called sigma) and it works
just fine but when I try to import the data set into LAS it complains:

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

I guess you can't have everything.  So, for now, I'll just keep the 3D
variable in the NetCDF file since it works.

Many thanks to those who emailed me with suggestions.

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