![]() |
Jump to DART Documentation Main Index |
It is the foundation for two parts of the code:
static_init_model
a call is made to add_domain
.
This call is required as it communicates to the state structure that a
new domain has been added to the state.
The state structure keeps track of the number of domains in the state. These
may be multiple domains in one model_mod, e.g. nested domains in WRF, or
multiple model_mods, e.g. POP coupled with CAM.
The minimum amount of information add_domain
needs is model size
which means vector of length model size has been added to the state. This
equivalent to Lanai where the only information filter has is that the model is
a vector of length model_size.
For models with netcdf restart files you supply add_domain
with:
add_domain
with almost the same arguments as you
would for a netcdf file, but skip the first arguement (netcdf filename).
add_dimension_to_variable
finished_adding_domain
to let the state structure
know that you have finished adding dimensions to variables.
get_dart_vector_index(i, j, k, dom_id, var_id)
To get the i,j,k, variable, domain from the dart index use:
get_model_variable_indices(dart_index, i, j, k, var_id, dom_id)
Note That (i,j,k) needs to be converted to (lon, lat, lev) or to
whatever grid the variable is on. get_dim_name
can be used to
get the dimension name from i,j,k if needed.
Some model restart files have an unlimited dimension. For IO purposes, e.g.
creating netcdf files, the unlimited dimension is used. For state structure
accessor functions called be the model_mod the unlimited dimension is ignored.
So if you have a variable TEMPARATURE in your netcdf file, with dimensions
(lon, lat, level, time) the IO routines will see a 4D variable, but
get_num_dims
used in model_mod will return 3D.
DART software - Copyright UCAR. This open source software is provided by UCAR, "as is", without charge, subject to all terms of use at http://www.image.ucar.edu/DAReS/DART/DART_download
Contact: | DART core group |
Revision: | $Revision$ |
Source: | $URL$ |
Change Date: | $Date$ |
Change history: | try "svn log" or "svn diff" |