NOAA-PMEL / Ferret

The Ferret program from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
55 stars 20 forks source link

appending in time, get excess output points #1044

Open karlmsmith opened 6 years ago

karlmsmith commented 6 years ago

Reported by @AnsleyManke on 10 Dec 2010 00:25 UTC

yes? use coads
yes? save/file=a.nc/clobber/L=500 sst
yes? save/file=a.nc/append/L=505 sst

The resulting file has a point at the midpoint between the upper bound of the grid cell of the first point and the lower bound of the cell of the second point

yes? use a.nc

yes? list t[gt=sst]
             VARIABLE : T
                        axis TCOADS1
             FILENAME : a.nc
             SUBSET   : 3 points (TIME)
 16-AUG-1987 / 1:  105052.
 01-NOV-1987 / 2:  105128.
 16-JAN-1988 / 3:  105205.

yes? list/L=500:505 t[gt=sst,d=1]
             VARIABLE : T
                        axis TCOADS
             DATA SET : COADS 2x2 Degree Monthly Average Surface Marine Observations
             FILENAME : coads.cdf
             FILEPATH : /home/shiva/data/
             SUBSET   : 6 points (TIME)
 16-AUG-1987 / 500:  105052.
 16-SEP-1987 / 501:  105082.
 16-OCT-1987 / 502:  105113.
 16-NOV-1987 / 503:  105143.
 16-DEC-1987 / 504:  105174.
 16-JAN-1988 / 505:  105205.

Possible solution: write discontinuous bounds, and on reading a file with discontinuous bounds, create new bounds between the coordinate locations.

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1772

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 10 Dec 2010 23:56 UTC This is actually a behavior we put in when adding CF bounds to files, which behaves really badly in this instance, where we are using SAVE/APPEND to write out every Nth timestep to a dataset.

The bahavior is described in the Ferret v5.7 release notes: http://ferret.pmel.noaa.gov/FERRET_17sep07/Documentation/Release_Notes/v57.html#nc_bounds where it says,

"If there is a gap between time steps in the file and the first time step being appended, Ferret inserts a void point whose bounds are the upper bound of the last time in the file, and the lower bound of the first time step being appended."

We could allow the user to work around this with, perhaps, a new qualifier

SAVE/APPEND=discontiguous

or some such thing.

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 14 Dec 2010 00:34 UTC Or, SAVE/NOBOUNDS which has been requested elsewhere. Possibly a range of behaviors.