WAVEWATCH III  beta 0.0.1
wmfinlmd Module Reference

Finalization of the multi-grid wave model. More...

Functions/Subroutines

subroutine wmfinl
 Initialize multi-grid version of WAVEWATCH III. More...
 

Detailed Description

Finalization of the multi-grid wave model.

Author
H. L. Tolman
Date
04-Feb-2014

Function/Subroutine Documentation

◆ wmfinl()

subroutine wmfinlmd::wmfinl

Initialize multi-grid version of WAVEWATCH III.

Author
H. L. Tolman
Date
28-Jan-2014

Definition at line 75 of file wmfinlmd.F90.

75  !/
76  !/ +-----------------------------------+
77  !/ | WAVEWATCH III NOAA/NCEP |
78  !/ | H. L. Tolman |
79  !/ | FORTRAN 90 |
80  !/ | Last update : 28-Jan-2014 |
81  !/ +-----------------------------------+
82  !/
83  !/ 06-May-2005 : Origination. ( version 3.07 )
84  !/ 03-Sep-2012 : Output of initilization time. ( version 4.10 )
85  !/ 28-Jan-2014 : Add memory hwm to profiling. ( version 5.00 )
86  !/
87  ! 1. Purpose :
88  !
89  ! Initialize multi-grid version of WAVEWATCH III.
90  !
91  ! 2. Method :
92  !
93  ! 3. Parameters :
94  !
95  ! Parameter list
96  ! ----------------------------------------------------------------
97  ! ----------------------------------------------------------------
98  !
99  ! 4. Subroutines used :
100  !
101  ! Name Type Module Description
102  ! ----------------------------------------------------------------
103  ! PRTIME Subr. W3SERVMD Profiling routine ( !/MPRF )
104  ! MPI_BARRIER
105  ! Subr. Standard MPI routines.
106  ! ----------------------------------------------------------------
107  !
108  ! 5. Called by :
109  !
110  ! Name Type Module Description
111  ! ----------------------------------------------------------------
112  ! WW3_MULTI Prog. N/A Multi-grid model driver.
113  ! .... Any coupled model.
114  ! ----------------------------------------------------------------
115  !
116  ! 6. Error messages :
117  !
118  ! 7. Remarks :
119  !
120  ! 8. Structure :
121  !
122  ! See source code.
123  !
124  ! 9. Switches :
125  !
126  ! !/MPI MPI routines.
127  !
128  ! !/O10 Enable output identifying start and end of routine
129  !
130  ! !/S Enable subroutine tracing.
131  ! !/T Enable test output
132  ! !/MPRF Profiling.
133  !
134  ! 10. Source code :
135  !
136  !/ ------------------------------------------------------------------- /
137 #ifdef W3_MPRF
138  ! use w3getmem ; fake use statement for make_makefile.sh
139  !
140 #endif
141  USE w3timemd, ONLY: tdiff
142  USE wmmdatmd, ONLY: mdss, mdso, nmpscr, nmplog, improc
143  USE wmmdatmd, ONLY: clkdt1, clkdt2, clkdt3, clkfin
144 #ifdef W3_MPRF
145  USE wmmdatmd, ONLY: mdsp
146 #endif
147 #ifdef W3_MPI
148  USE wmmdatmd, ONLY: mpi_comm_mwave
149 #endif
150  !/
151 #ifdef W3_S
152  USE w3servmd, ONLY: strace
153 #endif
154 #ifdef W3_MPRF
155  USE w3timemd, ONLY: prtime
156 #endif
157  !/
158  IMPLICIT NONE
159  !
160 #ifdef W3_MPI
161  include "mpif.h"
162 #endif
163  !/
164  !/ ------------------------------------------------------------------- /
165  !/ Parameter list
166  !/
167  !/ ------------------------------------------------------------------- /
168  !/ Local parameters
169  !/
170 #ifdef W3_MPI
171  INTEGER :: IERR_MPI
172 #endif
173 #ifdef W3_MPRF
174  REAL :: PRFT0, PRFTN
175  REAL(KIND=8) :: get_memory
176 #endif
177 #ifdef W3_S
178  INTEGER, SAVE :: IENT = 0
179 #endif
180  !/
181  !/ ------------------------------------------------------------------- /
182  ! 1. Identification at start
183  !
184 #ifdef W3_S
185  CALL strace (ient, 'WMFINL')
186 #endif
187 #ifdef W3_MPRF
188  CALL prtime ( prft0 )
189 #endif
190  !
191 #ifdef W3_O10
192  IF ( mdss.NE.mdso .AND. nmpscr.EQ.improc ) WRITE (mdss,900)
193 #endif
194  !
195  !/ ------------------------------------------------------------------- /
196  ! 2. Finalization
197  !
198 #ifdef W3_MPI
199  CALL mpi_barrier ( mpi_comm_mwave, ierr_mpi )
200 #endif
201  !
202  IF ( mdss.NE.mdso .AND. nmpscr.EQ.improc ) &
203  WRITE (mdss,920) clkfin
204  IF ( nmplog.EQ.improc ) WRITE (mdso,920) clkfin
205 
206  CALL date_and_time ( values=clkdt3 )
207 
208  clkfin = tdiff( clkdt1,clkdt3 )
209  IF ( mdss.NE.mdso .AND. nmpscr.EQ.improc ) &
210  WRITE (mdss,921) clkfin
211  IF ( nmplog.EQ.improc ) WRITE (mdso,921) clkfin
212  !
213  !/ ------------------------------------------------------------------- /
214  ! 3. Identification at end
215  !
216 #ifdef W3_O10
217  IF ( mdss.NE.mdso .AND. nmpscr.EQ.improc ) WRITE (mdss,999)
218 #endif
219  !
220 #ifdef W3_MPRF
221  CALL prtime ( prftn )
222  WRITE (mdsp,990) prft0, prftn, get_memory()
223 #endif
224  !
225  RETURN
226  !
227  ! Formats
228  !
229 900 FORMAT ( ' ========== STARTING MWW3 FINALIZATION (WMFINL) ===', &
230  '============================' )
231 920 FORMAT (/' Initialization time :',f10.2,' s')
232 921 FORMAT ( ' Elapsed time :',f10.2,' s')
233 
234  !
235 #ifdef W3_MPRF
236 990 FORMAT (1x,3f12.3,' WMFINL')
237 #endif
238  !
239 999 FORMAT (/' ========== END OF MWW3 INITIALIZATION (WMFINL) ===', &
240  '============================'/)
241  !/
242  !/ End of WMFINL ----------------------------------------------------- /
243  !/

References wmmdatmd::clkdt1, wmmdatmd::clkdt2, wmmdatmd::clkdt3, wmmdatmd::clkfin, wmmdatmd::improc, include(), wmmdatmd::mdso, wmmdatmd::mdsp, wmmdatmd::mdss, wmmdatmd::mpi_comm_mwave, wmmdatmd::nmplog, wmmdatmd::nmpscr, w3timemd::prtime(), w3servmd::strace(), and w3timemd::tdiff().

Referenced by w3mlti(), and w3sbs1().

include
cmake src_list cmake include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) check_switches("$
Definition: CMakeLists.txt:15
wmmdatmd::clkdt3
integer, dimension(8) clkdt3
CLKDT3.
Definition: wmmdatmd.F90:338
w3timemd::tdiff
real function tdiff(T1, T2)
Definition: w3timemd.F90:576
wmmdatmd::clkfin
real clkfin
CLKFIN.
Definition: wmmdatmd.F90:376
wmmdatmd::nmpscr
integer nmpscr
NMPSCR.
Definition: wmmdatmd.F90:324
wmmdatmd::mdso
integer mdso
MDSO.
Definition: wmmdatmd.F90:313
wmmdatmd::mdss
integer mdss
MDSS.
Definition: wmmdatmd.F90:314
wmmdatmd::nmplog
integer nmplog
NMPLOG.
Definition: wmmdatmd.F90:323
wmmdatmd::improc
integer improc
IMPROC.
Definition: wmmdatmd.F90:322
wmmdatmd::mdsp
integer mdsp
MDSP.
Definition: wmmdatmd.F90:341
w3servmd
Definition: w3servmd.F90:3
w3timemd::prtime
subroutine prtime(PTIME)
Definition: w3timemd.F90:990
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148
wmmdatmd::clkdt2
integer, dimension(8) clkdt2
CLKDT2.
Definition: wmmdatmd.F90:337
wmmdatmd
Define data structures to set up wave model dynamic data for several models simultaneously.
Definition: wmmdatmd.F90:16
w3timemd
Definition: w3timemd.F90:3
wmmdatmd::clkdt1
integer, dimension(8) clkdt1
CLKDT1.
Definition: wmmdatmd.F90:336
wmmdatmd::mpi_comm_mwave
integer mpi_comm_mwave
MPI_COMM_MWAVE.
Definition: wmmdatmd.F90:344