The pre-processing transformations

The following transformations are available in the pre-processing part of
OASIS3, controlled by `preproc.f`.

**REDGLO***This transformation is deprecated in the current OASIS3 version as interpolations for Gaussian Reduced grid now exist; this transformation should not be used anymore.*`REDGLO`(routine`redglo.f`) performs the interpolation from a Reduced grid to a Gaussian one. The interpolation is linear and performed latitude circle per latitude circle. When present, REDGLO must be the first pre-processing transformation performed. The configuring line is as follows:# REDGLO operation $NNBRLAT $CDMSK

where`$NNBRLAT`is NOxxx where xxx is half the number of latitude circles of the Gaussian grid. For example, for a T42 with 64 latitude circles,`$NNBRLAT`is ``NO32''. In the current version, it can be either NO16, NO24, NO32, NO48, NO80, NO160.`$CDMSK`is a flag indicating if non-masked values have to be extended to masked areas before interpolation (`$CDMSK = SEALAND`) using the Reduced grid mask (see section 7.2) or if the opposite has to be performed (`$CDMSK = LANDSEA`). If`$CDMSK = NOEXTRAP`, then no extrapolation is performed.**INVERT**:*This transformation is deprecated in the current OASIS version and should be used anymore. The fields and corresponding grids can be given in any direction as long as they are coherent.*`INVERT`(routine`invert.f`) reorders a field so that it goes from south to north and from west to east (the first point will be the southern and western most one; then it goes parallel by parallel going from south to north). Note that`INVERT`does not transform the associated grid or mask.`INVERT`should be used only for fields associated to A, B, G, L, Z, or Y grids (see annexe A) but produced by the source model from North to South and/or from East to West.`INVERT`does not work for Reduced ('D') or unstructured ('U') grids (see annexe A).The generic input line is as follows:

# INVERT operation $CORLAT $CORLON

where`$CORLAT = NORSUD`or`SUDNOR`and`$CORLON = ESTWST`or`WSTEST`describes the orientation of the source field in longitude and latitude, respectively.**MASK**:`MASK`(routine`masq.f`) is used before the analysis`EXTRAP`. A given`REAL`value`VALMASK`is assigned to all masked points following the source grid mask (see section 7.2), so they can be detected by`EXTRAP`.The generic input line is as follows:

# MASK operation $VALMASK

Make sure that $VALMASK conforms to a`REAL`value, e.g. ``99999999." not ``99999999" . Problems may arise if the value chosen approaches the maximum value that your computing platform can represent; choose a value well outside the range of your field values but not too large.**EXTRAP**:`EXTRAP`(routine`extrap.f`) performs the extrapolation of a field over its masked points. The analysis`MASK`must be used just before, so that`EXTRAP`can identify masked points. Note that`EXTRAP`does not work for Reduced ('D') or unstructured ('U') grids (see appendix A).Two methods of extrapolation are available. With

`NINENN`, a N-nearest-neighbour method is used. The procedure is iterative and the set of remaining masked points evolves at each iteration. The configuring line is:# EXTRAP operation for $CMETH = NINENN $CMETH $NV $NIO $NID

where`$CMETH = NINENN`;`$NV`is the minimum number of neighbours required to perform the extrapolation (with a maximum of 4)^{13};`$NIO`is the flag that indicates if the weight-address-and-iteration-number dataset will be calculated and written by OASIS3 (`$NIO`= 1), or only read (`$NIO`= 0) in file*nweights*(see section 7.5);`$NID`is the identificator for the weight-address-iteration-number dataset in all the different`EXTRAP/NINENN`datasets in the present coupling.^{14}With

`$CMETH = WEIGHT`, an N-weighted-neighbour extrapolation is performed. In that case, the user has to build the grid-mapping file, giving for each target grid point the weights and addresses of the source grid points used in the extrapolation; the structure of this file has to follow the OASIS3 generic structure for transformation auxiliary data files (see section 7.5).The configuring line is:

# EXTRAP operation for $CMETH = WEIGHT $CMETH $NV $CFILE $NUMLU $NID

where`$CMETH = WEIGHT`;`$NV`is the maximum number of neighbours required by the extrapolation operation;`$CFILE`and`$NUMLU`are the grid-mapping file name and associated logical unit;`$NID`is the identificator for the relevant grid-mapping dataset in all different`EXTRAP/WEIGHT`transformations in the present coupling.**CHECKIN**:`CHECKIN`(routine`chkfld.f`) calculates the mean and extremum values of the source field and prints them to the coupler log file*cplout*(this operation does not transform the field).The generic input line is as follows:

# CHECKIN operation INT=$NINT

where`$NINT`= 1 or 0, depending on whether or not the source field integral is also calculated and printed.**CORRECT**:`CORRECT`(routine`correct.f`) reads external fields from binary files and uses them to modify the coupling field. This transformation can be used, for example, to perform flux correction on the field.This transformation requires at least one configuration line with two parameters:

# CORRECT operation $XMULT $NBFIELDS

where`$XMULT`is the multiplicative coefficient of the current field, and`$NBFIELDS`the number of additional fields to be combined with the current field. For each additional field, an additional configuring line is required:# nbfields lines $CLOC $AMULT $CFILE $NUMLU

where`$CLOC`and`$AMULT`,`$CFILE`and`$NUMLU`are respectively the symbolic name, the multiplicative coefficient, the file name and the associated logical unit on which the additional field is going to be read. The structure of the file has to follow the structure of OASIS3 binary coupling restart files (see section 7.3).

- ... 4)
^{13} - For some grids, the extrapolation may not converge if
`$NV`is too large. - ... coupling.
^{14} - An
`EXTRAP/NINENN`analysis is automatically performed within`GLORED`analysis but the corresponding datasets have to be distinct; this is automatically checked by OASIS3 at the beginning of the run.