# Solution: COHERENS sigma to meters z coordinate

```First of all, I wish to thank the help and advice given by
Paul Farrar and Ansley Manke through the ferret users list.

The solution of how to represent the results from a test case of the
COHERENS model from sigma coordinates to depth coordinates with
ferret, v5.41 for windows, is attached. As an example I used the
Front A test case.

Best regards,

Francisco J. Campuzano

----------------------------------------
Francisco J Campuzano Guillén
Email: G.F.Campuzano@hull.ac.uk
University of Hull

```
```bash-2.05\$ ferret
NOAA/PMEL TMAP
FERRET v5.41
cygwin 1.3.x - 08/30/02
19-Feb-03 15:05

yes? set data frontA_1.out3U.cdf
*** NOTE: Units on axis "z" are not recognized: sigma_level
*** NOTE: They will not be convertible:
yes? show d
currently SET data sets:
1> C:\TMAP\fer_dsets\data\frontA_1.out3U.cdf  (default)
name     title                             I         J         K         L
DEP      water_depth                      1:50      1:1       ...       ...
U2       U3D                              1:50      1:1       1:20      1:13
V2       V3D                              1:50      1:1       1:20      1:13
W2PHYS   W3D                              1:50      1:1       1:20      1:13
CONCN    Contaminant                      1:50      1:1       1:20      1:13

yes? let bb= dep + 0*concn[l=1]
yes? let zz= (z-1)*bb
yes? stat zz

(Z-1)*BB
X (km): 0 to 50
Y (km): 0.5
Z (sigma_level): -0.0000000009313 to 1
T (days): 0
DATA SET: C:\TMAP\fer_dsets\data\frontA_1.out3U.cdf

Total # of data points: 1000 (50*1*20*1)
# flagged as bad  data: 0
Minimum value: -48.75
Maximum value: -0.75
Mean    value: -20.4 (unweighted average)
Standard deviation: 13.02
yes? plot/i=12/j=1 zz                    !you should get an increasing line!
yes? def axis/z=0:-50:.1/depth z100      !defines a new axis with the scale in meters!
yes? let znew = z[gz=z100]
yes? let concn_depth = ZAXREPLACE (concn,zz,znew)   !replace the s-coordinate for the z-coord.!
yes? fill/l=1 concn_depth                           !the graph is upside-down,z is negative!
yes? fill/l=1/vlimits=0:-50:1 concn_depth           !defines how to represent the z-axis!
```