Jump to DART Documentation Main Index
It is the foundation for two parts of the code:
static_init_modela 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_domainneeds 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_domainwith almost the same arguments as you would for a netcdf file, but skip the first arguement (netcdf filename).
finished_adding_domainto 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.
|Contact:||DART core group|
|Revision:||$Revision: 11427 $|
|Source:||$URL: https://svn-dares-dart.cgd.ucar.edu/DART/releases/Manhattan/documentation/html/state_structure.html $|
|Change Date:||$Date: 2017-03-31 15:24:30 -0600 (Fri, 31 Mar 2017) $|
|Change history:||try "svn log" or "svn diff"|