MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
SimStages.f90
Go to the documentation of this file.
2  use kindmodule, only: i4b
3  implicit none
4  private
5 
6  public :: stg_to_str
7 
8  ! stages for synchronization
9  integer(I4B), public, parameter :: stg_never = 0 !< never
10  integer(I4B), public, parameter :: stg_bfr_mdl_df = 1 !< before model define
11  integer(I4B), public, parameter :: stg_aft_mdl_df = 2 !< after model define
12  integer(I4B), public, parameter :: stg_aft_exg_df = 3 !< after exchange define
13  integer(I4B), public, parameter :: stg_aft_con_cr = 4 !< after connection create
14  integer(I4B), public, parameter :: stg_bfr_con_df = 5 !< before connection define
15  integer(I4B), public, parameter :: stg_aft_con_df = 6 !< after connection define
16  integer(I4B), public, parameter :: stg_bfr_exg_ac = 7 !< before exchange add connections (per solution)
17  integer(I4B), public, parameter :: stg_bfr_con_ar = 8 !< before connection allocate read
18  integer(I4B), public, parameter :: stg_aft_con_ar = 9 !< afterr connection allocate read
19  integer(I4B), public, parameter :: stg_bfr_exg_rp = 10 !< before exchange read prepare
20  integer(I4B), public, parameter :: stg_aft_con_rp = 11 !< after connection read prepare
21  integer(I4B), public, parameter :: stg_bfr_exg_ad = 12 !< before exchange advance (per solution)
22  integer(I4B), public, parameter :: stg_bfr_exg_cf = 13 !< before exchange calculate (per solution)
23  integer(I4B), public, parameter :: stg_bfr_exg_fc = 14 !< before exchange formulate (per solution)
24  integer(I4B), public, parameter :: nr_sim_stages = 14 !< before exchange formulate (per solution)
25 
26 contains
27 
28  !> @brief Converts a stage to its string representation
29  !<
30  function stg_to_str(stage) result(stg_str)
31  integer(I4B) :: stage
32  character(len=24) :: stg_str
33 
34  if (stage == stg_never) then; stg_str = "STG_NEVER"
35  else if (stage == stg_bfr_mdl_df) then; stg_str = "STG_BFR_MDL_DF"
36  else if (stage == stg_aft_mdl_df) then; stg_str = "STG_AFT_MDL_DF"
37  else if (stage == stg_aft_exg_df) then; stg_str = "STG_AFT_EXG_DF"
38  else if (stage == stg_aft_con_cr) then; stg_str = "STG_AFT_CON_CR"
39  else if (stage == stg_bfr_con_df) then; stg_str = "STG_BFR_CON_DF"
40  else if (stage == stg_aft_con_df) then; stg_str = "STG_AFT_CON_DF"
41  else if (stage == stg_bfr_exg_ac) then; stg_str = "STG_BFR_EXG_AC"
42  else if (stage == stg_bfr_con_ar) then; stg_str = "STG_BFR_CON_AR"
43  else if (stage == stg_aft_con_ar) then; stg_str = "STG_AFT_CON_AR"
44  else if (stage == stg_bfr_exg_rp) then; stg_str = "STG_BFR_EXG_RP"
45  else if (stage == stg_aft_con_rp) then; stg_str = "STG_AFT_CON_RP"
46  else if (stage == stg_bfr_exg_ad) then; stg_str = "STG_BFR_EXG_AD"
47  else if (stage == stg_bfr_exg_cf) then; stg_str = "STG_BFR_EXG_CF"
48  else if (stage == stg_bfr_exg_fc) then; stg_str = "STG_BFR_EXG_FC"
49  else; stg_str = "UNKNOWN"
50  end if
51 
52  end function stg_to_str
53 
54 end module simstagesmodule
This module defines variable data types.
Definition: kind.f90:8
integer(i4b), parameter, public stg_aft_con_ar
afterr connection allocate read
Definition: SimStages.f90:18
integer(i4b), parameter, public stg_aft_con_df
after connection define
Definition: SimStages.f90:15
integer(i4b), parameter, public nr_sim_stages
before exchange formulate (per solution)
Definition: SimStages.f90:24
integer(i4b), parameter, public stg_aft_mdl_df
after model define
Definition: SimStages.f90:11
integer(i4b), parameter, public stg_bfr_mdl_df
before model define
Definition: SimStages.f90:10
integer(i4b), parameter, public stg_aft_exg_df
after exchange define
Definition: SimStages.f90:12
integer(i4b), parameter, public stg_bfr_exg_ad
before exchange advance (per solution)
Definition: SimStages.f90:21
integer(i4b), parameter, public stg_bfr_exg_cf
before exchange calculate (per solution)
Definition: SimStages.f90:22
integer(i4b), parameter, public stg_never
never
Definition: SimStages.f90:9
character(len=24) function, public stg_to_str(stage)
Converts a stage to its string representation.
Definition: SimStages.f90:31
integer(i4b), parameter, public stg_aft_con_cr
after connection create
Definition: SimStages.f90:13
integer(i4b), parameter, public stg_bfr_exg_fc
before exchange formulate (per solution)
Definition: SimStages.f90:23
integer(i4b), parameter, public stg_bfr_exg_rp
before exchange read prepare
Definition: SimStages.f90:19
integer(i4b), parameter, public stg_bfr_exg_ac
before exchange add connections (per solution)
Definition: SimStages.f90:16
integer(i4b), parameter, public stg_bfr_con_ar
before connection allocate read
Definition: SimStages.f90:17
integer(i4b), parameter, public stg_aft_con_rp
after connection read prepare
Definition: SimStages.f90:20
integer(i4b), parameter, public stg_bfr_con_df
before connection define
Definition: SimStages.f90:14