NetCDF data cannot be saved by the GeoServer raster data source

226 Views Asked by At

My NetCDF file (ERA5 data) is based on CF convention, with 1-dimensional coordinates.

After browsing the NetCDF file, it cannot be saved by the data source, showing the error below:

 There was an error trying to connect to store netcdf_file. Do you want to save it anyway?

Original exception error:

Failed to create reader from file:era5_file.nc and hints Hints: COMPARISON_TOLERANCE = 1.0E-8 FILTER_FACTORY = FilterFactoryImpl GRID_COVERAGE_FACTORY = GridCoverageFactory TILE_ENCODING = null REPOSITORY = org.geoserver.catalog.CatalogRepository@66eb1e17 FORCE_AXIS_ORDER_HONORING = http EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@61dbe424[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@25ad8d63 FORCE_LONGITUDE_FIRST_AXIS_ORDER = true STYLE_FACTORY = StyleFactoryImpl LENIENT_DATUM_SHIFT = true

GeoServer Error image

GeoServer Version is 2.22, and the GeoServer NetCDF plugin has been installed successfully.

At first, the NetCDF had 4 dimensions (time, level, lat, lon). I changed it to 3-dimention (time, lat, lon). But the problem was not solved.

Access to the NetCDF file: https://drive.google.com/file/d/1QMGDZx_Eeb5_t2_U-mawzcYH2i2i7LM1/view?usp=sharing

2

There are 2 best solutions below

5
Andrea Aime On

I have no issues publishing the file in GeoServer, e.g:

enter image description here

and the d2m variable:

enter image description here

It may be you are storing the NetCDF in a directory where GeoServer cannot add its index files, normally included as hidden sidecar directories. The GeoServer NetCDF guide guide has a section about this case.

1
Amirhossein On

It is interesting that GeoServer 2.23.0 is okay with storing and publishing NetCDF (ERA5 data). I think I just replaced GeoServer 2.22 with 2.23 and added the NetCDF plugin, and also changing to Java 11.

Published NetCDF (another data) for the variable d2m