[Thread Prev][Thread Next][Index]

Re: descriptor file and changing scale_factor



Hi again,
Sophie, you can always apply scaling corrections to a time series using
Ferret commands. To outline the process, make lists of the new scale
and offset values, as well as the starting time step of each new file listed
in the MC data set.

yes? set data my_data.des
let scale = {1,65,134,...}
let offset = {0,100,-1,...}
define axis/t/edges/t0=xxx/units=uuu ts = { ... }

The list is the start time step of each file, plus the last time step of
the last file for N+1 points. The time origin and units of the time axis
match those in the MC data set. (you can do this with /units=`tsvar,return=tunits`
and likewise for the time origin).

The lists in ts_scale and ts_offset would be corrections to the scale and
offset that are being applied already. Make the ts_scale and ts_offset
into variables on the time axis that describes the start of each stepfile:

let ts_scale = reshape(scale, t[gt=ts])
let ts_off = reshape(offser, t[gt=ts])

Apply the scaling by putting the scale and offset values on the same
time axis as the time series variable. Use the @NRST regridding
transformation so the scaling values are not interpolated onto the
time axis of var.

let rescaled_var = var * ts_scale[gt=var@nrst] + ts_off[gt=var@nrst]



Sophie CLOCHE wrote:

Hello,

I used a descriptor file to associate into times series groups of netcdf files using different scale_factor and add_offset compression factors for each file; when I plot the time series for the variable, there are some gaps between differents dates; this is due to the fact that the factors of the first netcdf file in the MC descriptor file are applied to all files in the MC descriptor file and not the appropriate factors of each netcdf file;
So, my question is :
there is a special tag for a descriptor file to take into account various compression factors?

thank you

Sophie





[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement