Hi Martin,
Well the script is actually simple and follow this logic:
let threshold=35
repeat/range=1:365/name=it ( ;\
let composite = if tas[x=100e:120e@ave,y=20n:40n@ave,d=1,l=`it`] gt `threshold` then geop[d=2,l=`it`] ;\
if `composite` then (save/append/file=CompositeGeop.nc composite) )
So it saved only the day where the composite is defined.
In that case, the time-mean of the values in CompositeGeop.nc computed by Ferret will be different from the one computed by CDO.
Now I just removed the condition to save all the days even if they are masked:
let threshold=35
repeat/range=1:365/name=it ( ;\
let composite = if tas[x=100e:120e@ave,y=20n:40n@ave,d=1,l=`it`] gt `threshold` then geop[d=2,l=`it`] ;\
save/append/file=CompositeGeop.nc composite )
In this second case, the means computed by either CDO or Ferret are the same (because there is no gap in the calendar of CompositeGeop.nc).
Best,
Nicolas