New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2351 for branches/nemo_v3_3_beta/DOC/TexFiles/Chapters/Chap_SBC.tex – NEMO

Ignore:
Timestamp:
2010-11-02T08:09:00+01:00 (13 years ago)
Author:
sga
Message:

NEMO branch nemo_v3_3_beta
modify interpolation on the fly scheme within fldread.F90.
Instead of attempting to decide on cyclicity of input non-model grid by inspecting a longitude variable,
fld_read now expects to find an attribute in the input weights file to tell it how many columns overlap
at the east-west edges of the grid.
iom and iom_nf90.F90 have new routines to expose netcdf attributes to the model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/DOC/TexFiles/Chapters/Chap_SBC.tex

    r2349 r2351  
    641641if this is left as an empty string no action is taken. 
    642642In the model, weights files are read in and stored in a structured type (WGT) in the fldread module, as and when they are first required. 
    643 This initialisation procedure tries to determine whether the input data grid should be treated as cyclical or not. 
     643This initialisation procedure determines whether the input data grid should be treated as cyclical or not by inspecting a global attribute stored in the weights input file. 
     644This attribute must be called "ew_wrap" and be of integer type. 
     645If it is negative, the input non-model grid is assumed not to be cyclic. 
     646If zero or greater, then the value represents the number of columns that overlap. 
     647E.g. if the input grid has columns at longitudes 0, 1, 2, .... , 359, then ew_wrap should be set to 0; 
     648if longitudes are 0.5, 2.5, .... , 358.5, 360.5, 362.5, ew_wrap should be 2. 
     649If the model does not find attribute ew_wrap, then a value of -999 is assumed. 
     650In this case the fld_read routine defaults ew_wrap to value 0 and therefore the grid is assumed to be cyclic 
     651with no overlapping columns. 
    644652(In fact this only matters when bicubic interpolation is required.) 
    645 To do this the model looks in the input data file (i.e. the data to which the weights are to be applied) for a variable with name "nav\_lon" or "lon". 
    646 If found, it checks the difference between the first and last values of longitude along a single row. 
    647 If the absolute value of this difference is close to 360 degrees or less than twice the maximum spacing from 360 degrees, the grid is assumed to be cyclical, and the difference determines whether the first column is a repeat of the last one or not. 
    648 If neither "nav\_lon" or "lon" can be found, the model resorts to looking at the first and last columns of data. 
    649 If the sum of the absolute values of the differences between the columns is very small, then the grid is assumed to be cyclical with coincident first and last columns. 
    650 If both of these tests fail, the grid is assumed not to be cyclical. 
     653Note that no testing is done to check the validity in the model, since there is no way of knowing the name used for the longitude variable, 
     654so it is up to the user to make sure his or her data is correctly represented. 
    651655 
    652656Next the routine reads in the weights. 
     
    655659The size of the input data array is determined by examining the values in the "src" arrays to find the minimum and maximum i and j values required. 
    656660Since bicubic interpolation requires the calculation of gradients at each point on the grid, the corresponding arrays are dimensioned with a halo of width one grid point all the way around. 
    657 When the array of points from the data file is adjacent to an edge of the data grid, the halo is either a copy of the row/column next to it (non-cyclical case), or is a copy of one from the first two rows/columns on the opposite side of the grid (cyclical case with coincident end rows/columns, or cyclical case with non-coincident end rows/columns). 
     661When the array of points from the data file is adjacent to an edge of the data grid, the halo is either a copy of the row/column next to it (non-cyclical case), or is a copy of one from the first few columns on the opposite side of the grid (cyclical case). 
    658662 
    659663\subsection{Limitations} 
     
    662666\begin{description} 
    663667\item 
    664 Input data grids must be logically rectangular. 
     668The case where input data grids are not logically rectangular has not been tested. 
    665669\item 
    666670This code is not guaranteed to produce positive definite answers from positive definite inputs. 
Note: See TracChangeset for help on using the changeset viewer.