The grids of the models being coupled can be given by the user or
directly by the model through PSMILe specific calls (see section
4.2) in grid data files. These files can be all
binary or all NetCDF. In
/prism/data/toyclim/input_toyclim_standard_standard_prism_2-2.tar.gz, NetCDF examples can be found.
The arrays containing the grid information are dimensioned (nx, ny), where nx and ny are the grid first and second dimension, except for Unstructured (U) and Reduced (D) grid, for which the arrays are dimensioned (nbr_pts,1), where nbr_pts is the total number of grid points.
If the SCRIPR/CONSERV interpolation is used for a grid, the grid data file may contain longitudes and latitudes for model mesh corners as arrays dimensioned (nx, ny, 4) or (nbr_pts,1, 4) where 4 is the number of corners; in this case, it must necessarily be a NetCDF file ( grids.nc). For Logically Rectangular LR grids, the grid corners will be automatically calculated approximately if they are not given in grids.nc. The names of the arrays must be composed of the grid prefix and the suffix ``.clo'' or ``.cla'' for respectively the grid corner longitudes or latitudes.
If vector fields are defined on a grid which has a local coordinate system not oriented in the usual zonal and meridional directions, the local angle of the grid coordinate system must be given in grids.nc file in an array which name must be composed of the grid prefix and the suffix ``.ang''. The angle is defined as the angle between the first component and the zonal direction (which is also the angle between the second component and the meridional direction). In the grid file in /prism/data/toyclim/input_toyclim_standard_standard_prism_2-2.tar.gz, the angles of the torc grid are given in array torc.ang. If one of the SCRIPR interpolations is requested for a vector field, OASIS3 automatically performs the rotation from the local coordinate system to the geographic spherical coordinate system for a source grid, or vice-versa for a target grid.
File grids or grids.nc must be present with at least the grid point longitudes and latitudes for all component model.
If the binary format is used, grids, masks, areas, and maskr must have the following structure. The array name is first written to the file to locate a data set corresponding to a given grid. The data set is then written sequentially after its name. Let us call ``brick'' the name and its associated data set. The order in which the bricks are written doesn't matter. All the bricks are written in the grid data file in the following way:
... WRITE(LU) array_name WRITE(LU) auxildata ...where