Create dependent variable. More...
Go to the source code of this file.
Functions/Subroutines | |
| subroutine | gtvarcreate (var, url, dims, xtype, long_name, overwrite, err) |
Create dependent variable.
This subroutine is provided through gtdata_generic.
Definition in file gtvarcreate.f90.
| subroutine gtvarcreate | ( | type(gt_variable), intent(out) | var, |
| character(len = *), intent(in) | url, | ||
| type(gt_variable), dimension(:), intent(in), optional | dims, | ||
| character(len = *), intent(in), optional | xtype, | ||
| character(len = *), intent(in), optional | long_name, | ||
| logical, intent(in), optional | overwrite, | ||
| logical, intent(out), optional | err ) |
Create variable with dimensions
Creates a variable of GT_VARIABLE type with dimensions dims at location url, and sets it to var. Like variables opened with Open, var must later be closed with Close.
If xtype is omitted, it defaults to "float". Creation fails if the variable already exists, but continues by overwriting if overwrite == .true.. (Note: overwrite behavior is not yet guaranteed.) Omitting dims means setting a 0-dimensional variable.
If an error occurs during creation, outputs a message and terminates. If err is provided, returns .true. and program does not terminate.
| [out] | var | Variable handle |
| [in] | url | Variable URL |
| [in] | dims | Dimension variables (optional) |
| [in] | xtype | Data type (optional, default "float") |
| [in] | long_name | Long name attribute (optional) |
| [in] | overwrite | Allow overwrite (optional) |
| [out] | err | Error flag (optional) |
Definition at line 69 of file gtvarcreate.f90.
References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_noerr, dc_trace::endsub(), gtdata_internal_map::gtvar_dump(), gtdata_internal_map::map_create(), dc_error::storeerror(), dc_types::token, and gtdata_internal_map::var_class().