Versions Compared

Key

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

...

  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 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.
  3. 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_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.
  4. 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.
  5. 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.

...