WAVEWATCH III  beta 0.0.1
w3nmlboundmd Module Reference

Data Types

type  nml_bound_t
 

Functions/Subroutines

subroutine w3nmlbound (NDSI, INFILE, NML_BOUND, IERR)
 
subroutine read_bound_nml (NDSI, NML_BOUND)
 
subroutine report_bound_nml (NML_BOUND)
 

Variables

character(256) msg
 report message More...
 
integer ndsn
 namelist file unit More...
 

Function/Subroutine Documentation

◆ read_bound_nml()

subroutine w3nmlboundmd::read_bound_nml ( integer, intent(in)  NDSI,
type(nml_bound_t), intent(inout)  NML_BOUND 
)
Parameters
[in]ndsinamelist file unit
[in,out]nml_boundbound structure

Definition at line 154 of file w3nmlboundmd.F90.

154  !/
155  !/ +-----------------------------------+
156  !/ | WAVEWATCH III NOAA/NCEP |
157  !/ | M. Accensi |
158  !/ | |
159  !/ | FORTRAN 90 |
160  !/ | Last update : 27-May-2021 |
161  !/ +-----------------------------------+
162  !/
163  ! 1. Purpose :
164  !
165  !
166  ! 2. Method :
167  !
168  ! See source term routines.
169  !
170  ! 3. Parameters :
171  !
172  ! Parameter list
173  ! ----------------------------------------------------------------
174  ! NDSI Int.
175  ! NML_BOUND Type.
176  ! ----------------------------------------------------------------
177  !
178  ! 4. Subroutines used :
179  !
180  ! Name TYPE Module Description
181  ! ----------------------------------------------------------------
182  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
183  ! ----------------------------------------------------------------
184  !
185  ! 5. Called by :
186  !
187  ! Name TYPE Module Description
188  ! ----------------------------------------------------------------
189  ! W3NMLBOUND Subr. N/A Namelist configuration routine.
190  ! ----------------------------------------------------------------
191  !
192  ! 6. Error messages :
193  !
194  ! None.
195  !
196  ! 7. Remarks :
197  !
198  ! 8. Structure :
199  !
200  ! See source code.
201  !
202  ! 9. Switches :
203  !
204  ! 10. Source code :
205  !
206  !/ ------------------------------------------------------------------- /
207 
208  USE w3odatmd, ONLY: ndse
209  USE w3servmd, ONLY: extcde
210  !/S USE W3SERVMD, ONLY: STRACE
211 
212  IMPLICIT NONE
213 
214  INTEGER, INTENT(IN) :: NDSI
215  TYPE(NML_BOUND_T), INTENT(INOUT) :: NML_BOUND
216 
217  ! locals
218  INTEGER :: IERR
219  TYPE(NML_BOUND_T) :: BOUND
220  namelist /bound_nml/ bound
221  !/S INTEGER, SAVE :: IENT = 0 !< strace error code
222 
223  ierr = 0
224  !/S CALL STRACE (IENT, 'READ_BOUND_NML')
225 
226  ! set default values for track structure
227  bound%MODE = 'WRITE'
228  bound%INTERP = 2
229  bound%VERBOSE = 1
230  bound%FILE = 'spec.list'
231 
232  ! read bound namelist
233  rewind(ndsi)
234  READ (ndsi, nml=bound_nml, iostat=ierr, iomsg=msg)
235  IF (ierr.GT.0) THEN
236  WRITE (ndse,'(A,/A)') &
237  'ERROR: READ_BOUND_NML: namelist read error', &
238  'ERROR: '//trim(msg)
239  CALL extcde (1)
240  END IF
241 
242  ! save namelist
243  nml_bound = bound
244 

References w3servmd::extcde(), msg, and w3odatmd::ndse.

Referenced by w3nmlbound().

◆ report_bound_nml()

subroutine w3nmlboundmd::report_bound_nml ( type(nml_bound_t), intent(in)  NML_BOUND)
Parameters
[in]nml_boundbound structure

Definition at line 259 of file w3nmlboundmd.F90.

259  !/
260  !/ +-----------------------------------+
261  !/ | WAVEWATCH III NOAA/NCEP |
262  !/ | M. Accensi |
263  !/ | FORTRAN 90 |
264  !/ | Last update : 27-May-2021 |
265  !/ +-----------------------------------+
266  !/
267  !/
268  ! 1. Purpose :
269  !
270  !
271  ! 2. Method :
272  !
273  ! See source term routines.
274  !
275  ! 3. Parameters :
276  !
277  ! Parameter list
278  ! ----------------------------------------------------------------
279  ! NML_BOUND Type.
280  ! ----------------------------------------------------------------
281  !
282  ! 4. Subroutines used :
283  !
284  ! Name TYPE Module Description
285  ! ----------------------------------------------------------------
286  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
287  ! ----------------------------------------------------------------
288  !
289  ! 5. Called by :
290  !
291  ! Name TYPE Module Description
292  ! ----------------------------------------------------------------
293  ! W3NMLBOUND Subr. N/A Namelist configuration routine.
294  ! ----------------------------------------------------------------
295  !
296  ! 6. Error messages :
297  !
298  ! None.
299  !
300  ! 7. Remarks :
301  !
302  ! 8. Structure :
303  !
304  ! See source code.
305  !
306  ! 9. Switches :
307  !
308  ! 10. Source code :
309  !
310  !/ ------------------------------------------------------------------- /
311 
312  !/S USE W3SERVMD, ONLY: STRACE
313 
314  IMPLICIT NONE
315 
316  TYPE(NML_BOUND_T), INTENT(IN) :: NML_BOUND
317  !/S INTEGER, SAVE :: IENT = 0 ! strace error code
318 
319  !/S CALL STRACE (IENT, 'REPORT_BOUND_NML')
320 
321  WRITE (msg,'(A)') 'BOUND % '
322  WRITE (ndsn,'(A)')
323  WRITE (ndsn,10) trim(msg),'MODE = ', trim(nml_bound%MODE)
324  WRITE (ndsn,11) trim(msg),'INTERP = ', nml_bound%INTERP
325  WRITE (ndsn,11) trim(msg),'VERBOSE = ', nml_bound%VERBOSE
326  WRITE (ndsn,10) trim(msg),'FILE = ', trim(nml_bound%FILE)
327 
328 
329 10 FORMAT (a,2x,a,a)
330 11 FORMAT (a,2x,a,i8)
331 

References msg, and ndsn.

Referenced by w3nmlbound().

◆ w3nmlbound()

subroutine w3nmlboundmd::w3nmlbound ( integer, intent(in)  NDSI,
character*(*), intent(in)  INFILE,
type(nml_bound_t), intent(inout)  NML_BOUND,
integer, intent(out)  IERR 
)
Parameters
[in]ndsiinput file unit
[in]infileinput file name
[in,out]nml_boundbound structure
[out]ierrerror code

Definition at line 45 of file w3nmlboundmd.F90.

45  !/
46  !/ +-----------------------------------+
47  !/ | WAVEWATCH III NOAA/NCEP |
48  !/ | M. Accensi |
49  !/ | |
50  !/ | FORTRAN 90 |
51  !/ | Last update : 27-May-2021 |
52  !/ +-----------------------------------+
53  !/
54  !
55  ! 1. Purpose :
56  !
57  ! Reads all the namelist to define the input boundary
58  !
59  ! 2. Method :
60  !
61  ! See source term routines.
62  !
63  ! 3. Parameters :
64  !
65  ! Parameter list
66  ! ----------------------------------------------------------------
67  ! NDSI Int.
68  ! INFILE Char.
69  ! NML_BOUND type.
70  ! IERR Int.
71  ! ----------------------------------------------------------------
72  !
73  ! 4. Subroutines used :
74  !
75  ! Name TYPE Module Description
76  ! ----------------------------------------------------------------
77  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
78  ! READ_BOUND_NML
79  ! ----------------------------------------------------------------
80  !
81  ! 5. Called by :
82  !
83  ! Name TYPE Module Description
84  ! ----------------------------------------------------------------
85  ! WW3_BOUND Prog. N/A Preprocess input boundaries.
86  ! ----------------------------------------------------------------
87  !
88  ! 6. Error messages :
89  !
90  ! None.
91  !
92  ! 7. Remarks :
93  !
94  ! 8. Structure :
95  !
96  ! See source code.
97  !
98  ! 9. Switches :
99  !
100  ! 10. Source code :
101  !
102  !/ ------------------------------------------------------------------- /
103 
104  USE w3odatmd, ONLY: ndse
105  !/S USE W3SERVMD, ONLY: STRACE
106 
107  IMPLICIT NONE
108 
109  INTEGER, INTENT(IN) :: NDSI
110  CHARACTER*(*), INTENT(IN) :: INFILE
111  TYPE(NML_BOUND_T), INTENT(INOUT) :: NML_BOUND
112  INTEGER, INTENT(OUT) :: IERR
113  !/S INTEGER, SAVE :: IENT = 0 !< strace error code
114 
115  ierr = 0
116  !/S CALL STRACE (IENT, 'W3NMLBOUND')
117 
118  ! open namelist log file
119  ndsn = 3
120  OPEN (ndsn, file=trim(infile)//'.log', form='formatted', iostat=ierr)
121  IF (ierr.NE.0) THEN
122  WRITE (ndse,'(A)') 'ERROR: open full nml file '//trim(infile)//'.log failed'
123  RETURN
124  END IF
125 
126  ! open input file
127  OPEN (ndsi, file=trim(infile), form='formatted', status='old', iostat=ierr)
128  IF (ierr.NE.0) THEN
129  WRITE (ndse,'(A)') 'ERROR: open input file '//trim(infile)//' failed'
130  RETURN
131  END IF
132 
133  ! read bound namelist
134  CALL read_bound_nml (ndsi, nml_bound)
135  CALL report_bound_nml (nml_bound)
136 
137  ! close namelist files
138  CLOSE (ndsi)
139  CLOSE (ndsn)
140 

References file(), w3odatmd::ndse, ndsn, read_bound_nml(), and report_bound_nml().

Referenced by w3bound().

Variable Documentation

◆ msg

character(256) w3nmlboundmd::msg

report message

Definition at line 36 of file w3nmlboundmd.F90.

36  CHARACTER(256) :: MSG

Referenced by read_bound_nml(), and report_bound_nml().

◆ ndsn

integer w3nmlboundmd::ndsn

namelist file unit

Definition at line 37 of file w3nmlboundmd.F90.

37  INTEGER :: NDSN

Referenced by report_bound_nml(), and w3nmlbound().

scrip_timers::status
character(len=8), dimension(max_timers), save status
Definition: scrip_timers.f:63
w3odatmd::ndse
integer, pointer ndse
Definition: w3odatmd.F90:456
w3servmd
Definition: w3servmd.F90:3
w3odatmd
Definition: w3odatmd.F90:3
file
file(STRINGS ${CMAKE_BINARY_DIR}/switch switch_strings) separate_arguments(switches UNIX_COMMAND $
Definition: CMakeLists.txt:3