Grid data file definition

Grid data files (see section [*]) are required by OASIS3-MCT for specific operations , i.e. grids.nc and masks.nc for SCRIPR (see section [*]), and masks.nc and areas.nc for CONSERV (see section [*]). These grid data files can be created by the user before the run or can be written directly at run time by the components with the following routines. If a grid data files does not exist, the corresponding routine will create it; if the grid data file exists, the routine can be used to add grid definition fields but it will not overwrite grid definition fields already existing in the file with the same grid name.

These routines can be called only by one component process to write the whole grid or by each process holding a part of a grid. In the former case, optional argument il_part_id is not needed and the arrays (see below) handling the longitudes of the grid points or corners (lon, clon), the latitudes of the grid points or corners (lat, clat), the masks (mask) and areas (area) of the grid cells need to cover the whole grid; in the later case, the il_part_id returned by oasis_def_partition needs to be provided as input argument and the arrays need to cover only the local partition of the grid .

The creation of the different grid data files is effective in the routine oasis_enddef.