Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To import data from a netCDF file into Delft-FEWS, either create an a time series import run (see 03 Import Module) or an importNetcdfActivity in a general adapter (see 05 General Adapter Module#05GeneralAdapterModule-importNetcdfActivity).

To import scalar time series you also need to configure the corresponding internal locations (see 01 Locations) and an id mapping (see 01 ID Mapping).

To import grid time series you also need to configure the grid definition in Delft-FEWS, see the next section.

Creating the correct grid definition

For irregular or unstructured grids the cell center (and cell boundaries) must be defined for each grid cell. See 06 Grids#06Grids-Irregulargrids for ways to do this.

For a grid that is regular in a certain coordinate system, follow these steps (also see 06 Grids#06Grids-Regulargrids):

For an import run, use one of the following importTypes, depending on the type of data that you want to import:

NETCDF-CF_TIMESERIES, NETCDF-CF_GRID, NETCDF-CF_PROFILE or NETCDF-CF_TRAJECTORY.

Do not use the obsolete importType "NetcdfGridDataset". Only use importType "NetcdfGridDataset" for grid NetCDF files that contain ensembles or qualifiers.

To import scalar time series you also need to configure the corresponding internal locations (see 01 Locations) and an id mapping (see 01 ID Mapping).

To import grid time series you also need to configure the grid definition in Delft-FEWS, see the next section.

Creating the correct grid definition

For irregular or unstructured grids the cell center (and cell boundaries) must be defined for each grid cell. See 06 Grids#06Grids-Irregulargrids for ways to do this.

For a grid that is regular in a certain coordinate system, follow these steps (also see 06 Grids#06Grids-Regulargrids):

  1. In the grids.xml config file create an empty regular grid definition.
  2. Open the netCDF file in your favorite viewer and find the details of the
  3. In the grids.xml config file create an empty regular grid definition.
  4. Open the netCDF file in your favorite viewer and find the details of the coordinate system in which the grid is a regular grid. This coordinate system is usually described in a grid mapping variable, which has an attribute called "grid_mapping_name". In your grid definition choose the geoDatum or grid projection that corresponds to this coordinate system.
  5. In the netCDF file find the variables that contain the coordinates of the grid cells in the coordinate system in which the grid is a regular grid. This coordinate system is usually described in a grid mapping variable, which has an attribute called "grid_mapping_name". In your grid definition choose the geoDatum or grid projection that corresponds to this coordinate system.
  6. In the netCDF file find the variables that contain the coordinates of the grid cells in the coordinate system in which the grid is regular. These are one-dimensional variables that usually have standard names like "projection_x_coordinate" and "projection_y_. These are one-dimensional variables that usually have standard names like "projection_x_coordinate" and "projection_y_coordinate" or "grid_longitude" and "grid_latitude". According to the CF conventions these coordinates are cell centers. Find the lowest x coordinate and use that as firstCellCenter x in your grid definition. Find the highest y coordinate and use that as firstCellCenter y in your grid definition.
  7. In the netCDF file look at the spacings between the x and y coordinates. If these spacings are constant, then use them as xCellSize and yCellSize in your grid definition.
  8. In the netCDF file find the sizes of the dimensions of the coordinate variables. Use these as the number of rows and columns in your grid definition.

If, after following these instructions carefully, the netCDF file is still not imported correctly into Delft-FEWS, then the file is probably not valid according to the NetCDF-CF conventions. In that case try to make the netCDF file CF compliant. As a last resort, you can try to use the obsolete option gridStartPoint (to swap the grid in the north-south direction) or the obsolete importType "NetcdfGridDataset", but only as a last resort.

Error messages from the Delft-FEWS NetCDF import

...