Hi All, I have just one thing to add to Jaison's discussion. Ferret infers whether a vertical axis is positive up or down from the netcdf file (if that is where the data comes from), using the axis attribute positive="down" or positive="up". IF the data is not in a netcdf file, and if the axis is defined specifically with a DEFINE AXIS command, the /DEPTH qualifier on the z axis determines whether it is a depth axis (positive downward) or not. If the axis came from a netcdf file, and it is not correctly defined in the file, you can correct for this in your Ferret script. To force the axis to be treated as a depth axis, yes? use data_fileor to make it an axis whose coordinates are positive upward, yes? cancel axis/depth `var,return=zaxis` where var is the name of a variable in the file. Jaison Kurian wrote: Hi Seon, There are several ways to know the details of Z-axis and hence the properties of calculations/operations along Z-axis (like @DDC). If your variable does have proper Z-axis with any of the standard units, Ferret will do everything perfectly while using @DDC transformation. You can check the Z-axis values of your variable using any of the following methods (relevant section in User Manual is also given): yes? list z[gz=temp] ! explicit listing of depth values yes? list/x=60/y=10/l=1 temp ! Depth values will be shown in the 1st ! column by default yes? show grid temp ! see general details like axis names, corresponding ! dimension (X/Y/Z/T), units, number of points, ! regular/irregular, modulo/not, positive up/down ! and start & end values (Ref Sec33.8. SHOW GRID) yes? show axis zaxis ! will show same details as with "show grid", but ! only for the specified axis (Ref Sec33.3 SHOW AXIS) In a normal case, Z-axis should have positive values with a "positive=down" attribute in NetCDF file (equivalent to /DEPTH qualifier to define axis command) if it is an ocean dataset. Axis values should be arranged in the ascending order and hence a depth axis with negative values will not be properly represented in Ferret (in the sense K=1 will be the last depth point instead of the first one). In any case, the actual depth values can be known from 1st and 2nd methods given above. The most simplest way to check whether a calculation/transformation like @DDC is correct is to listing the values at a particular XY point as shown below : yes? use levitus_climatology yes? let dtdz = temp[z=@DDC] yes? set list/precision=7 yes? list/x=60/y=10 z[gz=temp], temp, dtdz The result of list command shows that the calculation [z=@DDC] is correct in a general sense, since dtdz shows negative values in accordance with the decreasing temperature with depth. Now you can manually check the dtdz values (but read the details about @DDC transformation, Ch3 Sec2.4.16, before that). In summary, if you know the depth-wise distribution of the variable (like increasing or decreasing), you can judge whether @DDC calculation is correct or not from the sign of @DDC results, in a general sense. Hope This Helps, Jaison On Sun, 3 Dec 2006, Seon Tae Kim wrote:Hi all... I tried to calculate vertical temperature gradient of upper ocean. I want to know whether ferret recognizes the depth axis as that of postive value 0, 50m, 100m or negative values 0 -50 -100.....when ferret calculates vertical gradient. So if ferret recognizes like the former, when I calculate the gradient, it should be dtdz = -1.0*temp[z=@ddc] -Seon- -- ~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~> Ansley Manke, NOAA/PMEL ansley.b.manke@noaa.gov 7600 Sand Point Way NE, Seattle WA Phone 206-526-6246, FAX 206-526-6744 |