As described in Sec. 4.3.7.1 of the User's Guide:
The modulo attribute is *only* automatically applied *if* the axis is a longitude or climatological axis. If it's a longitude axis, the modulo length is set to 360 degrees. If it's a climatological axis, the modulo length is set to one year. Both make sense, and enable one to easily plot any modulo range of the axis (e.g. x=-180:180, or x=0:360, or x=0:720).
For subspan modulo axes (e.g. the Pacific only), Ferret inserts a "void cell" that fills the longitude gap between the end of the axis and the start of the next modulo cycle. Ferret is supposed to prevent smoothers (@sbx, @spz), fillers (@fln, @fnr), and derivatives (@ddc, @ddf) from operating across this void point, so the output should be correct -- no need for CANCEL AXIS/MODULO.
Early versions of Ferret had bugs in these features, but as far as I know (with one exception, see below), everything has worked fine since v6.941 (16 April 2015). Here's a sample session in the latest version.
NOAA/PMEL TMAP
FERRET v6.961 (beta)
Linux 2.6.32-573.8.1.el6.x86_64 64-bit - 12/09/15
10-Feb-16 12:13
yes? def ax/x=0:180:10/unit=degrees_e xax
yes? let a = x[gx=xax]; save/clob/file=a.nc a netcdf a {
dimensions:
XAX = 19 ;
variables:
double XAX(XAX) ;
XAX:units = "degrees_east" ;
XAX:point_spacing = "even" ;
XAX:axis = "X" ;
XAX:modulo = 360. ;
XAX:standard_name = "longitude" ;
double A(XAX) ;
A:missing_value = -1.e+34 ;
A:_FillValue = -1.e+34 ;
A:long_name = "X[GX=XAX]" ;
// global attributes:
:history = "FERRET V6.961 (beta) 10-Feb-16" ;
:Conventions = "CF-1.6" ;
data:
XAX = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150,
160, 170, 180 ;
A = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150,
160, 170, 180 ;
}
Now use the file, and try some transformations across the modulo cut:
yes? can var a; can ax xax; use a.nc yes? list/x=0:720 a, a[x=@sbx:3], a[x=@fln], a[x=@ddf]
LONGITUDE: 0E to 0E(720)
Column 1: A is X[GX=XAX]
Column 2: A[X=@SBX:3] is X[GX=XAX] (box smoothed by 3 pts on X)
Column 3: A[X=@FLN:1] is X[GX=XAX] (linear-filled by 1 pts on X)
Column 4: A[X=@DDF] is X[GX=XAX] (forward derivative on X)
A A A A
0E / 1: 0.0 .... 0.0 8.993E-06
10E / 2: 10.0 10.0 10.0 8.993E-06
20E / 3: 20.0 20.0 20.0 8.993E-06
30E / 4: 30.0 30.0 30.0 8.993E-06
40E / 5: 40.0 40.0 40.0 8.993E-06
50E / 6: 50.0 50.0 50.0 8.993E-06
60E / 7: 60.0 60.0 60.0 8.993E-06
70E / 8: 70.0 70.0 70.0 8.993E-06
80E / 9: 80.0 80.0 80.0 8.993E-06
90E / 10: 90.0 90.0 90.0 8.993E-06
100E / 11: 100.0 100.0 100.0 8.993E-06
110E / 12: 110.0 110.0 110.0 8.993E-06
120E / 13: 120.0 120.0 120.0 8.993E-06
130E / 14: 130.0 130.0 130.0 8.993E-06
140E / 15: 140.0 140.0 140.0 8.993E-06
150E / 16: 150.0 150.0 150.0 8.993E-06
160E / 17: 160.0 160.0 160.0 8.993E-06
170E / 18: 170.0 170.0 170.0 8.993E-06
180E / 19: 180.0 .... 180.0 ....
90W / 20: .... .... .... ....
0E(360) / 21: 0.0 .... 0.0 8.993E-06
10E / 22: 10.0 10.0 10.0 8.993E-06
20E / 23: 20.0 20.0 20.0 8.993E-06
30E / 24: 30.0 30.0 30.0 8.993E-06
40E / 25: 40.0 40.0 40.0 8.993E-06
50E / 26: 50.0 50.0 50.0 8.993E-06
60E / 27: 60.0 60.0 60.0 8.993E-06
70E / 28: 70.0 70.0 70.0 8.993E-06
80E / 29: 80.0 80.0 80.0 8.993E-06
90E / 30: 90.0 90.0 90.0 8.993E-06
100E / 31: 100.0 100.0 100.0 8.993E-06
110E / 32: 110.0 110.0 110.0 8.993E-06
120E / 33: 120.0 120.0 120.0 8.993E-06
130E / 34: 130.0 130.0 130.0 8.993E-06
140E / 35: 140.0 140.0 140.0 8.993E-06
150E / 36: 150.0 150.0 150.0 8.993E-06
160E / 37: 160.0 160.0 160.0 8.993E-06
170E / 38: 170.0 170.0 170.0 8.993E-06
180E / 39: 180.0 .... 180.0 ....
90W / 40: .... .... .... ....
0E(720) / 41: 0.0 .... 0.0 8.993E-06
Looks good. Now remove the modulo and longitude attributes, and try again:
yes? sp ncatted -O -h -a modulo,XAX,d,, -a standard_name,XAX,d,, -a units,XAX,o,c,"meters" a.nc netcdf a {
dimensions:
XAX = 19 ;
variables:
double XAX(XAX) ;
XAX:units = "meters" ;
XAX:point_spacing = "even" ;
XAX:axis = "X" ;
double A(XAX) ;
A:missing_value = -1.e+34 ;
A:_FillValue = -1.e+34 ;
A:long_name = "X[GX=XAX]" ;
// global attributes:
:history = "FERRET V6.961 (beta) 10-Feb-16" ;
:Conventions = "CF-1.6" ;
data:
XAX = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150,
160, 170, 180 ;
A = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150,
160, 170, 180 ;
}
yes? can dat/all; use a.nc yes? list/x=0:720 a, a[x=@sbx:3], a[x=@fln], a[x=@ddf]
X (meters): 0 to 185
Column 1: A is X[GX=XAX]
Column 2: A[X=@SBX:3] is X[GX=XAX] (box smoothed by 3 pts on X)
Column 3: A[X=@FLN:1] is X[GX=XAX] (linear-filled by 1 pts on X)
Column 4: A[X=@DDF] is X[GX=XAX] (forward derivative on X)
A A A A
0 / 1: 0.0 .... 0.0 1.000
10 / 2: 10.0 10.0 10.0 1.000
20 / 3: 20.0 20.0 20.0 1.000
30 / 4: 30.0 30.0 30.0 1.000
40 / 5: 40.0 40.0 40.0 1.000
50 / 6: 50.0 50.0 50.0 1.000
60 / 7: 60.0 60.0 60.0 1.000
70 / 8: 70.0 70.0 70.0 1.000
80 / 9: 80.0 80.0 80.0 1.000
90 / 10: 90.0 90.0 90.0 1.000
100 / 11: 100.0 100.0 100.0 1.000
110 / 12: 110.0 110.0 110.0 1.000
120 / 13: 120.0 120.0 120.0 1.000
130 / 14: 130.0 130.0 130.0 1.000
140 / 15: 140.0 140.0 140.0 1.000
150 / 16: 150.0 150.0 150.0 1.000
160 / 17: 160.0 160.0 160.0 1.000
170 / 18: 170.0 170.0 170.0 1.000
180 / 19: 180.0 .... 180.0 ....
As desired, no subspan modulo behavior. So things look good.
Note that while trying this, I *did* find one additional bug in the handling of centered differences (@ddc) at the inserted void point. I'll report this separately to the developers.