next up previous
Next: Partition definition Up: Interfacing a model with Previous: Initialisation


Grid data file definition

The grid data files grids.nc, masks.nc and areas.nc must be created by the user before the run, or can be written directly at run time by the component models.

If written by the component models, the writing of those grid files is driven by OASIS3 main process. It first checks whether the binary file grids or the netCDF file grids.nc exists (in that case, it is assumed that areas or areas.nc and masks or masks.nc files exist too), or if writing is needed. If grids or grids.nc exists, it must contain all grid information from all models; if it does not exist, each model must write its grid definition in the grid data files.

The coupler sends the information on whether or not writing is needed to the models following an OASIS internal order (below prism_start_grids_writing). If no writing is needed, nothing happens when calling the following prism_write_xxxx routines. If writing is needed, the first model creates the files, writes the data arrays (with prism_write_grid, prism_write_corner, prism_write_mask, prism_write_area calls), and then sends a termination flag to the coupler (below
prism_terminate_grids_writing call). The coupler will send the starting flag to the next model; this ensures that only one model accesses the files at a time.

This section describes the PSMILe routines that may be called by the master process of each component model to write, at run time, the whole grid information to the grid data files. These routines have to be called just after prism_init_comp_proto.

The TOYCLIM coupled model (see the sources of the toy component models in prism/src/mod/toyatm, /toyoce, and /toyche) uses those routines to write its grid data files if gridswr=1 in the running script RUN_toyclim_$<$expid$>$ (see section 8.3).


next up previous
Next: Partition definition Up: Interfacing a model with Previous: Initialisation
Reinhard Budich 2004-12-22