NOAA-PMEL / Ferret

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

Invalid time axis of ISO strings gets lost #1049

Closed karlmsmith closed 5 years ago

karlmsmith commented 7 years ago

Reported by steven.c.hankin on 21 Dec 2010 22:59 UTC In this data set Ferret recognizes that the time axis is invalid and substitutes an array of indices BUT it does not off the string variable array as a dependent variable (as it should):

yes? use "http://oos.soest.hawaii.edu/thredds/dodsC/hioos/satellite/dhw"
 *** NOTE: If no missing_value or _FillValue attribute on variables, will use NaN
yes? show data
     currently SET data sets:
    1> http://oos.soest.hawaii.edu/thredds/dodsC/hioos/satellite/dhw  (default)
 name     title                             I         J         K         L
 TIME                                      ...       ...       ...       1:1042
 CRW_DHW  Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 CRW_HOTSPOT
          Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 CRW_SST  Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 CRW_SSTANOMALY
          Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 SURFACE_FLAG
          Pixel characteristics flag arra  1:720     1:331     ...       1:1042

yes? show axis time
 name       axis              # pts   start                end
 TIME                        1042 r   1                    1042
   Axis span (to cell edges) = 1042

The CDL of the time axis looks like this:

> ncdump -h http://oos.soest.hawaii.edu/thredds/dodsC/hioos/satellite/dhw
netcdf dhw {
dimensions:
        latitude = 331 ;
        longitude = 720 ;
        maxStrlen64 = 64 ;
        time = 1042 ;
variables:
        float longitude(longitude) ;
                longitude:long_name = "longitude" ;
                longitude:units = "degrees_east" ;
                longitude:standard_name = "longitude" ;
        float latitude(latitude) ;
                latitude:long_name = "latitude" ;
                latitude:units = "degrees_north" ;
                latitude:standard_name = "latitude" ;
        char time(time, maxStrlen64) ;
                time:_CoordinateAxisType = "Time" ;
                time:standard_name = "time" ;
        short CRW_DHW(time, latitude, longitude) ;
                CRW_DHW:long_name = "Twice-weekly global 50km satellite coral bleaching Degree Heating Weeks" ;
                CRW_DHW:units = "Celsius weeks" ;
...

If Ferret offered the string as a dependent variable as it should, then a function could be used to convert the dates into valid time words.

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

karlmsmith commented 7 years ago

Comment by @AnsleyManke on 28 Dec 2010 23:19 UTC So far as I can see, this DOES work as we'd like:

yes? use "http://oos.soest.hawaii.edu/thredds/dodsC/hioos/satellite/dhw"
yes? sho dat
     currently SET data sets:
    1> http://oos.soest.hawaii.edu/thredds/dodsC/hioos/satellite/dhw  (default)
 name     title                             I         J         K         L
 TIME                                      ...       ...       ...       1:1042
 CRW_DHW  Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 CRW_HOTSPOT
          Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 CRW_SST  Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 CRW_SSTANOMALY
          Twice-weekly global 50km satell  1:720     1:331     ...       1:1042
 SURFACE_FLAG
          Pixel characteristics flag arra  1:720     1:331     ...       1:1042

yes? list/L=1:5 time
             VARIABLE : TIME
             DATA SET : Archived Suite of NOAA Coral Reef Watch Operational Twice-Weekly Near-Real-Time Global 50km Satellite Coral Bleaching Monitoring Products
             FILENAME : dhw
             FILEPATH : http://oos.soest.hawaii.edu/thredds/dodsC/hioos/satellite/
             SUBSET   : 5 points (T)
 1   / 1:"2000-12-02T00:00:00Z"
 2   / 2:"2000-12-05T00:00:00Z"
 3   / 3:"2000-12-09T00:00:00Z"
 4   / 4:"2000-12-12T00:00:00Z"
 5   / 5:"2000-12-16T00:00:00Z"

So we could parse the strings in the TIME variable and create a correct time axis. The only thing that's missing is the warning from Ferret that the incoming time axis is invalid.

karlmsmith commented 7 years ago

Modified by @AnsleyManke on 5 Jan 2011 18:26 UTC

AnsleyManke commented 5 years ago

Noticed this old ticket. All it really needs is to have the invalid coordinate axis reported as always when opening the dataset. Char- or string- typed axes aren't standard. So it'll say,

           *** NOTE: Axis time is of type char or string
           *** NOTE: A dummy axis of subscripts will be used

The user can then look at the strings in variable "time" and define a corrected time axis.