[Thread Prev][Thread Next][Index]

Re: [ferret_users] vertical section units



Hi Robert,

The units attribute is just a string that is stored and used in labels or in calculations.

SET AXIS/UNITS=m z_t

means that you are telling Ferret that the coordinates on the axis should be seen as representing meters. It's a way to add units to an axis that doesn't have any, or perhaps change the spelling if you wanted centimetres instead of centimeters.

If the coordinates listed in the file are cm, and you want the axis to be in meters, you will need to redefine the coordinates as well.  You can use DEFINE AXIS to redefine the axis, within the Ferret session.  This is the DEFINE AXIS/FROM_DATA form of that command.

yes? use sample_file_POP.nc
yes? let zcm = z[gz=z_t]

yes? list zcm
             VARIABLE : Z[GZ=Z_T]
             SUBSET   : 10 points (Z (centimeters))
 750    /  1:   750.
 1250   /  2:  1250.
 1750   /  3:  1750.
 2301.5 /  4:  2302.
 2967   /  5:  2967.
 3770   /  6:  3770.
 4738.5 /  7:  4739.
 5906.5 /  8:  5907.
 7315   /  9:  7315.
 9014   / 10:  9014.

yes? define axis/z/depth/units=m z_t = zcm/100
Replacing definition of axis Z_T
           *** NOTE: grid GFN2 used by data set sample_file_POP
           *** NOTE: Redefinition may alter apparent contents of data set

yes? shade/j=5 salt  ! axis is meters

yes? ! notice that now the result listing the variable zcm is updated,
     ! listing the new coordinate values from the axis
yes? list zcm
             VARIABLE : Z[GZ=Z_T]
             SUBSET   : 10 points (DEPTH (m))
 7.5   /  1:   7.50
 12.5  /  2:  12.50
 17.5  /  3:  17.50
 23    /  4:  23.02
 29.7  /  5:  29.67
 37.7  /  6:  37.70
 47.4  /  7:  47.38
 59.1  /  8:  59.06
 73.2  /  9:  73.15
 90.1  / 10:  90.14

On 3/31/2017 1:58 AM, Osinski, Robert FORNATL, PL wrote:
Dears ferreters,
I've tried to change the vertical section units but with no success. First I've created a vertical section with 


yes? shade/x=15/y=1:25 temp


 see figure section1. Then I change units with:


yes? set axis/units=meters z_t


and again the section:

yes? shade/x=15/y=1:25 temp 

see figure section2. Unfortunately the change is only to the label but not to the numbers.
Please, find attached a sample file of my data and two figures.

thanks you in advance for any help,
Robert Osinski
NPS 



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement