[Thread Prev][Thread Next][Index]
Re: create density file
Hi Gabriel,
If you define a mask for each depth range (1 within, 0 without)
then a piecewise variable rc can be defined and saved
let m1 = if(z[g=...] lt 1000)then 1 else 0
let m2 = if(z[g=...] ge 1000 and z[g=...] lt 2000)then 1 else 0
...
let/title="Composite r" rc = m1*r1 + m2*r2 + m3*r3 ...
save/file=composite.nc rc
Here is a demo
!Demo for 4 intervals in range z=1:100
def axis/z=1:100:1/depth zax ; def grid/z=zax grd
let R1 = 1.0-0.1*(25-Z[G=GRD])
let R2 = 1.0-0.02*(Z[G=GRD]-25)
let R3 = 0.5+0.03*(Z[G=GRD]-50)
let R4 = 1.25-0.04*(Z[G=GRD]-75)
let M1 = IF(Z[G=GRD] LT 25)THEN 1 ELSE 0
let M2 = IF(Z[G=GRD] GE 25 AND Z[G=GRD] LT 50)THEN 1 ELSE 0
let M3 = IF(Z[G=GRD] GE 50 AND Z[G=GRD] LT 75)THEN 1 ELSE 0
let M4 = IF(Z[G=GRD] GE 75)THEN 1 ELSE 0
let RC = M1*R1 + M2*R2 + M3*R3 + M4*R4
plot/sym=3/line=1 rc
|____Mick.Spillane@noaa.gov____|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement