EnMAP-Box / enmap-box

EnMAP-Box source code repository. See https://enmap-box.readthedocs.io for documentation
GNU General Public License v3.0
34 stars 16 forks source link

support temporal metadata provided by 'time' dimension in NetCDF files #906

Open janzandr opened 1 month ago

janzandr commented 1 month ago

Requested by @ffilipponi in #552 ...

I additionally suggest to automatically set Date Time reading 'time' dimension in NetCDF file, when available. It would significantly support time series analysis, especially for unevenly spaced time series.

janzandr commented 1 month ago

@ffilipponi, please provide a small NetCDF file for testing.

ffilipponi commented 1 week ago

@janzandr , please find two small samples of time series in NetCDF format:

Please beware that units descriptor string of NetCDF time dimension may contain an origin. Here some examples:

time:units = "seconds since 1970-1-1" time:units = "days since 1970-01-01 00:00:00" time:units = "hours since 1990-11-25 12:00 UTC"

Thanks for considering the new feature request

janzandr commented 1 week ago

Thanks for the datasets. Unfortunately, they don't seem to work in my QGIS: image

ffilipponi commented 3 days ago

@janzandr When importing spatially explicit NetCDF datasets in QGIS, you should only select the layers of interest having the chessboard pattern icon (thus excluding mesh and table icons). From the screenshot you provided I can not see what the danger icon refers to. CRS definition within NetCDF file it is sometimes not successfully read by QGIS. It can be set manually later in the layer properties. In general, two QGIS user environment variables to effectively avoid many warnings and issues when importing NetCDF spatial datasets are: IGNORE_XY_AXIS_NAME_CHECKS=YES GDAL_NETCDF_BOTTOMUP=NO

janzandr commented 2 days ago

Strange, I downloaded your files again, and now ist's working :-)