I see! By the way, do you know how to fix the @DIN cannot be applied correctly after you subtract your data from @AVE?
I need to calculate the mass transported by Hadley cells. So my v-wind must be zero when integrating through the whole column. Usually, it can be solved by subtracting the average value of v-wind. During my process of subtracting the average values, I found if you subtract the average value, pyferret does NOT treat your new values as "spatial data" (I don't know how to describe it). For example,
set data coads_climatology
let test=SST[L=8] ! just a random month
let mean=test[I=@AVE,J=@AVE]
list mean
VARIABLE : TEST[I=@AVE,J=@AVE]
FILENAME : coads_climatology.cdf
FILEPATH : /home/xbai1/miniconda2/envs/FERRET/share/fer_dsets/data/
LONGITUDE: 20E to 20E(380)
LATITUDE : 90S to 90N
TIME : 16-AUG 07:23
21.16
which means the average value is 21.16 Celsius. Then I do:
let comp1=test-mean
let comp2=test-21.16
let bad_din=comp1[I=@DIN,J=@DIN]
let good_din=comp2[I=@DIN,J=@DIN]
list bad_din, good_din
DATA SET: /home/xbai1/miniconda2/envs/FERRET/share/fer_dsets/data/
tor to a curve (x, curvey(x) ) as a function of x.
Regards,
Ryo
-------------------------------------------------
! --- script to generate the data for the plot below ---
set data coads_climatology ! grid spacing is 2°
let _ones_ = 1 + 0*y[gy=SST]
repeat/range=0:40/name=yy (let yhi=`yy/4`; let val = ones[y=0:`yhi`@DIN]; say/quiet `yhi` `val`)

[Caution: Email from External Sender. Do not click or open links or attachments unless you know this sender.]
Dear Ferreters,
Does @DIN have a minimum range? It seems that it stops shrinking when the integration range shrinks below the gridsize.
For a test, I define a variable which is always one and print the values of the integration over y=0:ylim, where ylim = 0, 0.5, 1, 1.5, . . . .
set data coads_climatology ! grid spacing is 2°
let _ones_ = 1 + 0*y[gy=SST]
repeat/range=0:8/name=yy (let val = ones[y=0:`yy/2`@DIN]; say `val`)
I find that the value of the integral is constant when ylim
--