WAVEWATCH III  beta 0.0.1
w3nmlbouncmd Module Reference

Data Types

type  nml_bound_t
 

Functions/Subroutines

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

Variables

character(256) msg
 
integer ndsn
 

Function/Subroutine Documentation

◆ read_bound_nml()

subroutine w3nmlbouncmd::read_bound_nml ( integer, intent(in)  NDSI,
type(nml_bound_t), intent(inout)  NML_BOUND 
)

Definition at line 160 of file w3nmlbouncmd.F90.

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

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

Referenced by w3nmlbounc().

◆ report_bound_nml()

subroutine w3nmlbouncmd::report_bound_nml ( type(nml_bound_t), intent(in)  NML_BOUND)

Definition at line 271 of file w3nmlbouncmd.F90.

271  !/
272  !/ +-----------------------------------+
273  !/ | WAVEWATCH III NOAA/NCEP |
274  !/ | M. Accensi |
275  !/ | FORTRAN 90 |
276  !/ | Last update : 15-May-2018 |
277  !/ +-----------------------------------+
278  !/
279  !/
280  ! 1. Purpose :
281  !
282  !
283  ! 2. Method :
284  !
285  ! See source term routines.
286  !
287  ! 3. Parameters :
288  !
289  ! Parameter list
290  ! ----------------------------------------------------------------
291  ! NML_BOUND Type.
292  ! ----------------------------------------------------------------
293  !
294  ! 4. Subroutines used :
295  !
296  ! Name TYPE Module Description
297  ! ----------------------------------------------------------------
298  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
299  ! ----------------------------------------------------------------
300  !
301  ! 5. Called by :
302  !
303  ! Name TYPE Module Description
304  ! ----------------------------------------------------------------
305  ! W3NMLBOUNC Subr. N/A Namelist configuration routine.
306  ! ----------------------------------------------------------------
307  !
308  ! 6. Error messages :
309  !
310  ! None.
311  !
312  ! 7. Remarks :
313  !
314  ! 8. Structure :
315  !
316  ! See source code.
317  !
318  ! 9. Switches :
319  !
320  ! 10. Source code :
321  !
322  !/ ------------------------------------------------------------------- /
323 
324 #ifdef W3_S
325  USE w3servmd, ONLY: strace
326 #endif
327 
328  IMPLICIT NONE
329 
330  TYPE(NML_BOUND_T), INTENT(IN) :: NML_BOUND
331 #ifdef W3_S
332  INTEGER, SAVE :: IENT = 0
333 #endif
334 
335 #ifdef W3_S
336  CALL strace (ient, 'REPORT_BOUND_NML')
337 #endif
338 
339  WRITE (msg,'(A)') 'BOUND % '
340  WRITE (ndsn,'(A)')
341  WRITE (ndsn,10) trim(msg),'MODE = ', trim(nml_bound%MODE)
342  WRITE (ndsn,11) trim(msg),'INTERP = ', nml_bound%INTERP
343  WRITE (ndsn,11) trim(msg),'VERBOSE = ', nml_bound%VERBOSE
344  WRITE (ndsn,10) trim(msg),'FILE = ', trim(nml_bound%FILE)
345 
346 
347 10 FORMAT (a,2x,a,a)
348 11 FORMAT (a,2x,a,i8)
349 

References msg, ndsn, and w3servmd::strace().

Referenced by w3nmlbounc().

◆ w3nmlbounc()

subroutine w3nmlbouncmd::w3nmlbounc ( integer, intent(in)  NDSI,
character*(*), intent(in)  INFILE,
type(nml_bound_t), intent(inout)  NML_BOUND,
integer, intent(out)  IERR 
)

Definition at line 45 of file w3nmlbouncmd.F90.

45  !/
46  !/ +-----------------------------------+
47  !/ | WAVEWATCH III NOAA/NCEP |
48  !/ | M. Accensi |
49  !/ | |
50  !/ | FORTRAN 90 |
51  !/ | Last update : 15-May-2018 |
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_BOUNC 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 #ifdef W3_S
106  USE w3servmd, ONLY: strace
107 #endif
108 
109  IMPLICIT NONE
110 
111  INTEGER, INTENT(IN) :: NDSI
112  CHARACTER*(*), INTENT(IN) :: INFILE
113  TYPE(NML_BOUND_T), INTENT(INOUT) :: NML_BOUND
114  INTEGER, INTENT(OUT) :: IERR
115 #ifdef W3_S
116  INTEGER, SAVE :: IENT = 0
117 #endif
118 
119  ierr = 0
120 #ifdef W3_S
121  CALL strace (ient, 'W3NMLBOUNC')
122 #endif
123 
124  ! open namelist log file
125  ndsn = 3
126  OPEN (ndsn, file=trim(infile)//'.log', form='formatted', iostat=ierr)
127  IF (ierr.NE.0) THEN
128  WRITE (ndse,'(A)') 'ERROR: open full nml file '//trim(infile)//'.log failed'
129  RETURN
130  END IF
131 
132  ! open input file
133  OPEN (ndsi, file=trim(infile), form='formatted', status='old', iostat=ierr)
134  IF (ierr.NE.0) THEN
135  WRITE (ndse,'(A)') 'ERROR: open input file '//trim(infile)//' failed'
136  RETURN
137  END IF
138 
139  ! read bound namelist
140  CALL read_bound_nml (ndsi, nml_bound)
141  CALL report_bound_nml (nml_bound)
142 
143  ! close namelist files
144  CLOSE (ndsi)
145  CLOSE (ndsn)
146 

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

Referenced by w3bounc().

Variable Documentation

◆ msg

character(256) w3nmlbouncmd::msg

Definition at line 36 of file w3nmlbouncmd.F90.

36  CHARACTER(256) :: MSG

Referenced by read_bound_nml(), and report_bound_nml().

◆ ndsn

integer w3nmlbouncmd::ndsn

Definition at line 37 of file w3nmlbouncmd.F90.

37  INTEGER :: NDSN

Referenced by report_bound_nml(), and w3nmlbounc().

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
w3servmd::strace
subroutine strace(IENT, SNAME)
Definition: w3servmd.F90:148