1
- !- ----------------------------------------------------------------------
2
- module write_internal_state
3
- !
4
- !- ----------------------------------------------------------------------
5
- ! *** the internal state of the write component.
6
- !- ----------------------------------------------------------------------
7
- ! ***
8
- ! *** revision history
9
- ! ***
10
- ! Feb 2017: J. Wang - Initial code
11
- !
12
- !- ----------------------------------------------------------------------
13
- !
1
+ ! > @file
2
+ ! > @brief The internal state of the write component.
3
+ ! > @author Jun Wang @date Feb, 2017
4
+
5
+ ! > @brief The internal state of the write component.
6
+ ! > @author Jun Wang @date Feb, 2017
7
+ module write_internal_state
14
8
use esmf
15
9
!
16
10
!- ----------------------------------------------------------------------
@@ -20,12 +14,27 @@ module write_internal_state
20
14
!- ----------------------------------------------------------------------
21
15
!
22
16
type output_grid_info
23
- integer :: im, jm, lm
24
- integer :: i_start,i_end, j_start,j_end
25
- real ,dimension (:,:),allocatable :: lonPtr, latPtr
26
- integer ,dimension (:),allocatable :: i_start_wrtgrp, i_end_wrtgrp, j_start_wrtgrp, j_end_wrtgrp
27
- real :: latse, latnw, lonse, lonnw
28
- real :: latstart, latlast, lonstart, lonlast
17
+ integer :: im ! < Output grid global I dimension size.
18
+ integer :: jm ! < Output grid global J dimension size.
19
+ integer :: lm ! < Output grid global L dimension size.
20
+ integer :: i_start ! < Output grid lower bound of I dimension on current PE.
21
+ integer :: i_end ! < Output grid upper bound of I dimension on current PE.
22
+ integer :: j_start ! < Output grid lower bound of J dimension on current PE.
23
+ integer :: j_end ! < Output grid upper bound of J dimension on current PE.
24
+ real ,dimension (:,:),allocatable :: lonPtr ! < Output grid longitudes.
25
+ real ,dimension (:,:),allocatable :: latPtr ! < Output grid latitudes.
26
+ integer ,dimension (:),allocatable :: i_start_wrtgrp ! < I dimension lower bound of all wrire groups.
27
+ integer ,dimension (:),allocatable :: i_end_wrtgrp ! < I dimension upper bound of all wrire groups.
28
+ integer ,dimension (:),allocatable :: j_start_wrtgrp ! < J dimension lower bound of all wrire groups.
29
+ integer ,dimension (:),allocatable :: j_end_wrtgrp ! < J dimension upper bound of all wrire groups.
30
+ real :: latse ! < Output grid South East corner latitude.
31
+ real :: latnw ! < Output grid North West corner latitude.
32
+ real :: lonse ! < Output grid South East corner longitude.
33
+ real :: lonnw ! < Output grid North West corner longitude.
34
+ real :: latstart ! < Output grid start latitude.
35
+ real :: latlast ! < Output grid last latitude.
36
+ real :: lonstart ! < Output grid start logitude.
37
+ real :: lonlast ! < Output grid last longitude.
29
38
end type output_grid_info
30
39
31
40
type wrt_internal_state
@@ -34,72 +43,73 @@ module write_internal_state
34
43
! pe information and task layout
35
44
!- -------------------------------
36
45
!
37
- integer :: mype
38
- integer :: petcount
46
+ integer :: mype ! < MPI rank.
47
+ integer :: petcount ! < Number of PEs.
39
48
!
40
49
!- -------------------
41
50
! *** grid information
42
51
!- -------------------
43
- type (esmf_grid) :: wrtgrid
52
+ type (esmf_grid) :: wrtgrid ! < ESMF output grid.
44
53
45
- type (output_grid_info) ,dimension (:), allocatable :: out_grid_info
54
+ ! > Array of output_grid_info for all domains.
55
+ type (output_grid_info) ,dimension (:), allocatable :: out_grid_info
46
56
!
47
57
!- -------------------------
48
58
! *** file bundle for output
49
59
!- -------------------------
50
- integer :: FBCount
60
+ integer :: FBCount ! < Numebr of output ESMF field bundles.
51
61
!
52
62
!- ----------------------------------------------------------------------
53
63
! *** THE OUTPUT FILE
54
64
!- ----------------------------------------------------------------------
55
65
!
56
- integer :: num_files
66
+ integer :: num_files ! < Number of output files.
57
67
!
58
68
!- ----------------------------------------------------------------------
59
69
! *** THE OUTPUT FILE
60
70
!- ----------------------------------------------------------------------
61
71
!
62
- type (ESMF_FieldBundle),dimension (:),allocatable :: wrtFB
72
+ ! > ESMF write field bundles.
73
+ type (ESMF_FieldBundle),dimension (:),allocatable :: wrtFB
63
74
!
64
75
!- ------------------------------------
65
76
! *** Times used in history filenames
66
77
!- ------------------------------------
67
78
!
68
- type (ESMF_Time) :: io_basetime
69
- integer :: idate(7 )
70
- integer :: fdate(7 )
79
+ type (ESMF_Time) :: io_basetime ! < ESMF clock's starting time.
80
+ integer :: idate(7 ) ! < Forecast initial time.
81
+ integer :: fdate(7 ) ! < Forecast current time.
71
82
!
72
83
!- ----------------------------------------
73
84
! *** I/O direction flags (Read or Write)
74
85
!- ----------------------------------------
75
86
!
76
- logical :: output_history
87
+ logical :: output_history ! < True if history output is requested.
77
88
!
78
89
!- ----------------------------------------
79
90
! *** POST flags and required variables
80
91
!- ----------------------------------------
81
92
!
82
- logical :: write_dopost
83
- character (80 ) :: post_namelist
84
- !
85
- integer :: fhzero
86
- integer :: ntrac
87
- integer :: ncld
88
- integer :: nsoil
89
- integer :: imp_physics
90
- integer :: dtp
91
- real ,dimension (:),allocatable :: ak,bk
93
+ logical :: write_dopost ! < True if inline post is requested.
94
+ character (80 ) :: post_namelist ! < File name of the inline post namelist.
95
+ !
96
+ integer :: fhzero ! < Hours between clearing of diagnostic buckets.
97
+ integer :: ntrac ! < Number of tracers.
98
+ integer :: ncld ! < Number of hydrometeors.
99
+ integer :: nsoil ! < Number of soil layers.
100
+ integer :: imp_physics ! < Choice of microphysics scheme.
101
+ integer :: dtp ! < Physics timestep.
102
+ real ,dimension (:),allocatable :: ak ! < a parameter for sigma pressure level calculations.
103
+ real ,dimension (:),allocatable :: bk ! < b parameter for sigma pressure level calculations.
92
104
!- ----------------------------------------------------------------------
93
105
!
94
106
end type wrt_internal_state
95
- !
96
- !- ----------------------------------------------------------------------
97
- ! *** THIS STATE IS SUPPORTED BY C POINTERS BUT NOT F90 POINTERS
98
- ! *** THEREFORE WE NEED THIS WRAP.
99
- !- ----------------------------------------------------------
100
- !
107
+
108
+ ! > This state is supported by c pointers but not f90 pointers
109
+ ! > therefore we need this wrap.
101
110
type write_wrap
102
- type (wrt_internal_state),pointer :: write_int_state
111
+ ! > Write grid component internal state.
112
+ type (wrt_internal_state),pointer :: write_int_state
103
113
end type write_wrap
104
114
105
115
!- ----------------------------------------------------------
0 commit comments