NOAA-PMEL / Ferret

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

Error or crash, reading from descriptor files at boundary between two .nc files #401

Closed karlmsmith closed 6 years ago

karlmsmith commented 6 years ago

Reported by @AnsleyManke on 23 Apr 2004 17:01 UTC file 1 has times from L= 1 to 60, file 2 has times from L=1 to 60. LIST/L=60 fails

Happens with older versions of Ferret too.

See ~ansley/ans_ferret/users/wittenberg/err560_mc_read.jnl


Under Linux, NOAA/PMEL TMAP FERRET v5.60
Linux(g77) 2.4.20 - 03/17/04 23-Apr-04 09:50

yes? use my yes? list/l=60 temp ** unknown netCDF error code: -31 yes? list/l=59:60 temp VARIABLE : Potential temperature DATA SET : MOM4 OM3_OMIP_NCAR_year FILENAME : my_solaris.des SUBSET : 2 points (TIME) CALENDAR : NOLEAP 16-NOV-1968 / 59: 28.06 16-DEC-1968 / 60: 28.85


Under Solaris, NOAA/PMEL TMAP FERRET v5.60
Solaris 5.6 - 04/09/04 23-Apr-04 09:42

yes? use my_solaris yes? list/l=60 temp Subscript out of range on file mc_read.F, line 178, procedure mc_read. Subscript number 1 has value 5001 in array sf_lastep. Abort

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

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 27 Apr 2004 22:10 UTC The essential thing is using a descriptor file where the time axes are irregular.

The example has two time series files with irregular time steps, monthly data in units of days. The request for data at L=60 should get the last point from the first nc file specified in the descriptor file.

Andrew's example has a couple of things going on. Here is a simpler example using the dataset coads_clim_irreg.des from the benchmark suite. Try to read a point in time which is between the end of one file and the start of the next. The first file listed in the .des file has time range 366 to 1096, the second just one point from 3287 to 3287.

yes? set data coads_clim_irreg yes? list/x=181/y=1/t=2000 sst ! Crashes in mc_read under solaris, ! Under linux, ** unknown netCDF error code: -31

or yes? list/x=181/y=1/t=1-apr-1900 sst ! Same result.

In mc_read we compare the time step to be read with the start and stop points of the nc files to decide what to read. (loop at label 30) This should be the lower and upper bounds of the box edges, not the midpoints.

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 8 Jun 2004 21:29 UTC fixed in mc_read.F

karlmsmith commented 6 years ago

Comment by @AnsleyManke on 4 Nov 2008 19:49 UTC Adding Andrew to the CC list where he is mentioned in the ticket comments.