MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
SimVariables.f90
Go to the documentation of this file.
1 !> @brief This module contains simulation variables
2 !!
3 !! This module contains simulation variables that are available to all
4 !! other modules. This variables in this module are defined at run time.
5 !! The module does not have any dependencies on models, exchanges, or
6 !! solutions in a simulation.
7 !!
8 !<
10  use, intrinsic :: iso_fortran_env, only: output_unit
11  use kindmodule, only: dp, i4b
14  public
15  character(len=LINELENGTH) :: simfile = 'mfsim.nam' !< simulation name file
16  character(len=LINELENGTH) :: simlstfile = 'mfsim.lst' !< simulation listing file name
17  character(len=LINELENGTH) :: simstdout = 'mfsim.stdout' !< name of standard out file if screen output is piped to a file
18  character(len=LINELENGTH) :: idm_context = '__INPUT__'
19 
20  ! for parallel development
21  character(len=LINELENGTH) :: simulation_mode = 'SEQUENTIAL'
22  integer(I4B) :: proc_id = 0
23  integer(I4B) :: nr_procs = 1
24  character(len=LENMODELNAME), dimension(:), allocatable :: model_names !< all model names in the (global) simulation
25  integer(I4B), dimension(:), pointer, contiguous :: model_ranks !< all model processor ids (ranks) in the (global) simulation
26  integer(I4B), dimension(:), allocatable :: model_loc_idx !< equals the local index into the basemodel list (-1 when not available)
27 
28  character(len=MAXCHARLEN) :: errmsg !< error message string
29  character(len=MAXCHARLEN) :: warnmsg !< warning message string
30  integer(I4B) :: istdout = output_unit !< unit number for stdout
31  integer(I4B) :: isim_level = vall !< simulation output level
32  integer(I4B) :: isim_mode = mnormal !< simulation mode
33  integer(I4B) :: iout !< file unit number for simulation output
34  integer(I4B) :: isimcnvg !< simulation convergence flag (1) if all objects have converged, (0) otherwise
35  integer(I4B) :: isimcontinue = 0 !< simulation continue flag (1) to continue if isimcnvg = 0, (0) to terminate
36  integer(I4B) :: isimcheck = 1 !< simulation input check flag (1) to check input, (0) to ignore checks
37  integer(I4B) :: numnoconverge = 0 !< number of times the simulation did not converge
38  integer(I4B) :: ireturnerr = 0 !< return code for program (0) successful, (1) non-convergence, (2) error
39  integer(I4B) :: iforcestop = 1 !< forced stop flag (1) forces a call to ustop(..) when the simulation has ended, (0) doesn't
40  integer(I4B) :: iunext = iustart !< next file unit number to assign
41  integer(I4B) :: laststepfailed = 0 !< flag indicating if the last step failed (1) if last step failed; (0) otherwise (set in converge_check)
42  integer(I4B) :: ifailedstepretry = 0 !< current retry for this time step
43  integer(I4B) :: iparamlog = 0 !< input (idm) parameter logging to simulation listing file
44 end module simvariablesmodule
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
@ mnormal
normal output mode
Definition: Constants.f90:206
integer(i4b), parameter lenmodelname
maximum length of the model name
Definition: Constants.f90:22
integer(i4b), parameter iustart
starting file unit number
Definition: Constants.f90:57
integer(i4b), parameter maxcharlen
maximum length of char string
Definition: Constants.f90:47
@ vall
write all simulation notes and warnings
Definition: Constants.f90:189
This module defines variable data types.
Definition: kind.f90:8
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=maxcharlen) errmsg
error message string
character(len=linelength) idm_context
integer(i4b) iforcestop
forced stop flag (1) forces a call to ustop(..) when the simulation has ended, (0) doesn't
integer(i4b) isimcheck
simulation input check flag (1) to check input, (0) to ignore checks
integer(i4b) ifailedstepretry
current retry for this time step
integer(i4b) isimcontinue
simulation continue flag (1) to continue if isimcnvg = 0, (0) to terminate
character(len=linelength) simulation_mode
integer(i4b) nr_procs
integer(i4b) isim_level
simulation output level
integer(i4b) ireturnerr
return code for program (0) successful, (1) non-convergence, (2) error
integer(i4b), dimension(:), allocatable model_loc_idx
equals the local index into the basemodel list (-1 when not available)
character(len=maxcharlen) warnmsg
warning message string
integer(i4b), dimension(:), pointer, contiguous model_ranks
all model processor ids (ranks) in the (global) simulation
integer(i4b) laststepfailed
flag indicating if the last step failed (1) if last step failed; (0) otherwise (set in converge_check...
character(len=linelength) simstdout
name of standard out file if screen output is piped to a file
integer(i4b) numnoconverge
number of times the simulation did not converge
integer(i4b) iout
file unit number for simulation output
character(len=linelength) simfile
simulation name file
character(len=lenmodelname), dimension(:), allocatable model_names
all model names in the (global) simulation
integer(i4b) iparamlog
input (idm) parameter logging to simulation listing file
character(len=linelength) simlstfile
simulation listing file name
integer(i4b) iunext
next file unit number to assign
integer(i4b) proc_id
integer(i4b) istdout
unit number for stdout
integer(i4b) isim_mode
simulation mode
integer(i4b) isimcnvg
simulation convergence flag (1) if all objects have converged, (0) otherwise