Writer Overview

FME considers a dataset to be a folder name. The feature type of each dataset is the filename.

FME will write a netCDF file with a single data variable for each feature. Coordinate variables and dimensions can be specified through attributes.

By default, FME will write coordinate variables named y and x to capture the georeferencing of the raster. For geographic coordinate systems, these variables will instead be named lat and lon. Multi-band rasters will get an additional band coordinate variable which stores a band index.

Instead of these default coordinate variables, user-defined coordinate variables may be defined using the netcdf_coordinate_variable{} list attribute. For example, the following attributes could be specified to create a data variable that depends on four coordinate variables: {year, month, y, x}

netcdf_coordinate_variable{0}.name = "year"

netcdf_coordinate_variable{0}.type = "int"

netcdf_coordinate_variable{1}.name = "month"

netcdf_coordinate_variable{1}.type = "int"

netcdf_coordinate_variable{2}.name = "y"

netcdf_coordinate_variable{2}.type = "double"

netcdf_coordinate_variable{3}.name = "x"

netcdf_coordinate_variable{3}.type = "double"

When user-defined coordinate variables are specified, values must also be specified for each band for each "extra" (non-x/y) coordinate variable. For example, if the year variable defined above has two possible values {2000, 2001} and the month variable has 12 possible values {1, 2, ..., 12}, then the raster must have 24 bands, and the following attributes should be defined:

netcdf_band{0}.coordinate_variable{0} = 2000

netcdf_band{0}.coordinate_variable{1} = 1

netcdf_band{1}.coordinate_variable{0} = 2000

netcdf_band{1}.coordinate_variable{1} = 2

...

netcdf_band{11}.coordinate_variable{0} = 2000

netcdf_band{11}.coordinate_variable{1} = 12

netcdf_band{12}.coordinate_variable{0} = 2001

netcdf_band{12}.coordinate_variable{1} = 1

...

netcdf_band{23}.coordinate_variable{0} = 2001

netcdf_band{23}.coordinate_variable{1} = 12

The last two coordinate variables are always assumed to be y and x, and their values are based on the georeferencing of the raster. As a result, values do not need to be specified for the last two coordinate variables using the netcdf_band{}.coordinate_variable{} list attribute.