module fd4_globaldef_modTypes:
public type fd4_vartab public type fd4_varinfoVariables:
integer (kind=i_k), public, parameter :: FD4_VARNAME_LEN = 64 real (kind=r_k), private, parameter :: real_variable = 0_r_k real (kind=r_k), public, parameter :: FD4_NOTHRES = huge (real_variable)Subroutines and functions:
public subroutine fd4_vartab_create_varinfo (vartab, varinfo, err) public subroutine fd4_vartab_check (vartab, err)
TODO:
Author: Matthias Lieber
public type fd4_vartab character (len=FD4_VARNAME_LEN) :: name integer (kind=i_k) :: nbins integer (kind=i_k) :: nsteps logical :: dynamic real (kind=r_k) :: vnull real (kind=r_k) :: vthres integer (kind=i_k) :: facevar end type fd4_vartabComponents:
name | descriptive name of the variable |
nbins | number of bins of the variable |
nsteps | number of time steps for this variable |
dynamic | allocate data field dynamical? |
vnull | initialization value of this variable |
vthres | threshold to trigger block creation/removal |
facevar | indicator whether this variable is a face variable |
Currently, cell-centered and face-centered variables are supported.
public type fd4_varinfo integer (kind=i_k), pointer, dimension (:,:,:) :: fields integer (kind=i_k) :: maxnsteps integer (kind=i_k), dimension (0:3) :: field_len logical :: all_vars_same_vnull logical :: vthres_mode end type fd4_varinfoComponents:
fields | start and end indices of static fields for fd4_block |
maxnsteps | maximal number of time steps in vartab |
field_len | sum of all bins of all variables for cell-centered and facevars |
all_vars_same_vnull | true if all variables have the same vnull |
vthres_mode | true if any variable has a vthres /= FD4_NOTHRES |
Use fd4_vartab_create_varinfo to create this info from the vartab.
public subroutine fd4_vartab_create_varinfo (vartab, varinfo, err) type (fd4_vartab), intent(in), dimension (:) :: vartab type (fd4_varinfo), intent(inout) :: varinfo integer (kind=i_k), intent(out) :: err end subroutine fd4_vartab_create_varinfoParameters:
vartab | The variable table |
varinfo | The variable table info |
err | error status, 0 if ok (always 0 at error level < L3) |
public subroutine fd4_vartab_check (vartab, err) type (fd4_vartab), intent(in), dimension (:) :: vartab integer (kind=i_k), intent(out) :: err end subroutine fd4_vartab_checkParameters:
vartab | The variable table |
err | error status, 0 if table is ok, else index of failed variable |
Returns when the first error is found. Checks for: