WAVEWATCH III  beta 0.0.1
w3nmltrncmd Module Reference

Data Types

type  nml_file_t
 
type  nml_track_t
 

Functions/Subroutines

subroutine w3nmltrnc (NDSI, INFILE, NML_TRACK, NML_FILE, IERR)
 
subroutine read_track_nml (NDSI, NML_TRACK)
 
subroutine read_file_nml (NDSI, NML_FILE)
 
subroutine report_track_nml (NML_TRACK)
 
subroutine report_file_nml (NML_FILE)
 

Variables

character(256) msg
 
integer ndsn
 

Function/Subroutine Documentation

◆ read_file_nml()

subroutine w3nmltrncmd::read_file_nml ( integer, intent(in)  NDSI,
type(nml_file_t), intent(inout)  NML_FILE 
)

Definition at line 277 of file w3nmltrncmd.F90.

277  !/
278  !/ +-----------------------------------+
279  !/ | WAVEWATCH III NOAA/NCEP |
280  !/ | M. Accensi |
281  !/ | |
282  !/ | FORTRAN 90 |
283  !/ | Last update : 15-May-2018 |
284  !/ +-----------------------------------+
285  !/
286  ! 1. Purpose :
287  !
288  !
289  ! 2. Method :
290  !
291  ! See source term routines.
292  !
293  ! 3. Parameters :
294  !
295  ! Parameter list
296  ! ----------------------------------------------------------------
297  ! NDSI Int.
298  ! NML_FILE Type.
299  ! ----------------------------------------------------------------
300  !
301  ! 4. Subroutines used :
302  !
303  ! Name TYPE Module Description
304  ! ----------------------------------------------------------------
305  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
306  ! ----------------------------------------------------------------
307  !
308  ! 5. Called by :
309  !
310  ! Name TYPE Module Description
311  ! ----------------------------------------------------------------
312  ! W3NMLTRNC Subr. N/A Namelist configuration routine.
313  ! ----------------------------------------------------------------
314  !
315  ! 6. Error messages :
316  !
317  ! None.
318  !
319  ! 7. Remarks :
320  !
321  ! 8. Structure :
322  !
323  ! See source code.
324  !
325  ! 9. Switches :
326  !
327  ! 10. Source code :
328  !
329  !/ ------------------------------------------------------------------- /
330 
331  USE w3odatmd, ONLY: ndse
332  USE w3servmd, ONLY: extcde
333 #ifdef W3_S
334  USE w3servmd, ONLY: strace
335 #endif
336 
337  IMPLICIT NONE
338 
339  INTEGER, INTENT(IN) :: NDSI
340  TYPE(NML_FILE_T), INTENT(INOUT) :: NML_FILE
341  INTEGER :: IERR
342 
343  ! locals
344  TYPE(NML_FILE_T) :: FILE
345  namelist /file_nml/ file
346 #ifdef W3_S
347  INTEGER, SAVE :: IENT = 0
348 #endif
349 
350  ierr = 0
351 #ifdef W3_S
352  CALL strace (ient, 'READ_FILE_NML')
353 #endif
354 
355  ! set default values for file structure
356  file%PREFIX = 'ww3.'
357  file%NETCDF = 3
358 
359  ! read file namelist
360  rewind(ndsi)
361  READ (ndsi, nml=file_nml, iostat=ierr, iomsg=msg)
362  IF (ierr.GT.0) THEN
363  WRITE (ndse,'(A,/A)') &
364  'ERROR: READ_FILE_NML: namelist read error', &
365  'ERROR: '//trim(msg)
366  CALL extcde (2)
367  END IF
368 
369  ! save namelist
370  nml_file = file
371 

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

Referenced by w3nmltrnc().

◆ read_track_nml()

subroutine w3nmltrncmd::read_track_nml ( integer, intent(in)  NDSI,
type(nml_track_t), intent(inout)  NML_TRACK 
)

Definition at line 171 of file w3nmltrncmd.F90.

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

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

Referenced by w3nmltrnc().

◆ report_file_nml()

subroutine w3nmltrncmd::report_file_nml ( type(nml_file_t), intent(in)  NML_FILE)

Definition at line 477 of file w3nmltrncmd.F90.

477  !/
478  !/ +-----------------------------------+
479  !/ | WAVEWATCH III NOAA/NCEP |
480  !/ | M. Accensi |
481  !/ | FORTRAN 90 |
482  !/ | Last update : 15-May-2018 |
483  !/ +-----------------------------------+
484  !/
485  !/
486  ! 1. Purpose :
487  !
488  !
489  ! 2. Method :
490  !
491  ! See source term routines.
492  !
493  ! 3. Parameters :
494  !
495  ! Parameter list
496  ! ----------------------------------------------------------------
497  ! NML_FILE Type.
498  ! ----------------------------------------------------------------
499  !
500  ! 4. Subroutines used :
501  !
502  ! Name TYPE Module Description
503  ! ----------------------------------------------------------------
504  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
505  ! ----------------------------------------------------------------
506  !
507  ! 5. Called by :
508  !
509  ! Name TYPE Module Description
510  ! ----------------------------------------------------------------
511  ! W3NMLTRNC Subr. N/A Namelist configuration routine.
512  ! ----------------------------------------------------------------
513  !
514  ! 6. Error messages :
515  !
516  ! None.
517  !
518  ! 7. Remarks :
519  !
520  ! 8. Structure :
521  !
522  ! See source code.
523  !
524  ! 9. Switches :
525  !
526  ! 10. Source code :
527  !
528  !/ ------------------------------------------------------------------- /
529 
530 #ifdef W3_S
531  USE w3servmd, ONLY: strace
532 #endif
533 
534  IMPLICIT NONE
535 
536  TYPE(NML_FILE_T), INTENT(IN) :: NML_FILE
537 #ifdef W3_S
538  INTEGER, SAVE :: IENT = 0
539 #endif
540 
541 #ifdef W3_S
542  CALL strace (ient, 'REPORT_FILE_NML')
543 #endif
544 
545  WRITE (msg,'(A)') 'FILE % '
546  WRITE (ndsn,'(A)')
547  WRITE (ndsn,10) trim(msg),'PREFIX = ', trim(nml_file%PREFIX)
548  WRITE (ndsn,11) trim(msg),'NETCDF = ', nml_file%NETCDF
549 
550 
551 10 FORMAT (a,2x,a,a)
552 11 FORMAT (a,2x,a,i8)
553 

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

Referenced by w3nmltrnc().

◆ report_track_nml()

subroutine w3nmltrncmd::report_track_nml ( type(nml_track_t), intent(in)  NML_TRACK)

Definition at line 385 of file w3nmltrncmd.F90.

385  !/
386  !/ +-----------------------------------+
387  !/ | WAVEWATCH III NOAA/NCEP |
388  !/ | M. Accensi |
389  !/ | FORTRAN 90 |
390  !/ | Last update : 15-May-2018 |
391  !/ +-----------------------------------+
392  !/
393  !/
394  ! 1. Purpose :
395  !
396  !
397  ! 2. Method :
398  !
399  ! See source term routines.
400  !
401  ! 3. Parameters :
402  !
403  ! Parameter list
404  ! ----------------------------------------------------------------
405  ! NML_TRACK Type.
406  ! ----------------------------------------------------------------
407  !
408  ! 4. Subroutines used :
409  !
410  ! Name TYPE Module Description
411  ! ----------------------------------------------------------------
412  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
413  ! ----------------------------------------------------------------
414  !
415  ! 5. Called by :
416  !
417  ! Name TYPE Module Description
418  ! ----------------------------------------------------------------
419  ! W3NMLTRNC Subr. N/A Namelist configuration routine.
420  ! ----------------------------------------------------------------
421  !
422  ! 6. Error messages :
423  !
424  ! None.
425  !
426  ! 7. Remarks :
427  !
428  ! 8. Structure :
429  !
430  ! See source code.
431  !
432  ! 9. Switches :
433  !
434  ! 10. Source code :
435  !
436  !/ ------------------------------------------------------------------- /
437 
438 #ifdef W3_S
439  USE w3servmd, ONLY: strace
440 #endif
441 
442  IMPLICIT NONE
443 
444  TYPE(NML_TRACK_T), INTENT(IN) :: NML_TRACK
445 #ifdef W3_S
446  INTEGER, SAVE :: IENT = 0
447 #endif
448 
449 #ifdef W3_S
450  CALL strace (ient, 'REPORT_TRACK_NML')
451 #endif
452 
453  WRITE (msg,'(A)') 'TRACK % '
454  WRITE (ndsn,'(A)')
455  WRITE (ndsn,10) trim(msg),'TIMESTART = ', trim(nml_track%TIMESTART)
456  WRITE (ndsn,10) trim(msg),'TIMESTRIDE = ', trim(nml_track%TIMESTRIDE)
457  WRITE (ndsn,10) trim(msg),'TIMECOUNT = ', trim(nml_track%TIMECOUNT)
458 
459  WRITE (ndsn,11) trim(msg),'TIMESPLIT = ', nml_track%TIMESPLIT
460 
461 
462 10 FORMAT (a,2x,a,a)
463 11 FORMAT (a,2x,a,i8)
464 

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

Referenced by w3nmltrnc().

◆ w3nmltrnc()

subroutine w3nmltrncmd::w3nmltrnc ( integer, intent(in)  NDSI,
character*(*), intent(in)  INFILE,
type(nml_track_t), intent(inout)  NML_TRACK,
type(nml_file_t), intent(inout)  NML_FILE,
integer, intent(out)  IERR 
)

Definition at line 50 of file w3nmltrncmd.F90.

50  !/
51  !/ +-----------------------------------+
52  !/ | WAVEWATCH III NOAA/NCEP |
53  !/ | M. Accensi |
54  !/ | |
55  !/ | FORTRAN 90 |
56  !/ | Last update : 15-May-2018 |
57  !/ +-----------------------------------+
58  !/
59  !
60  ! 1. Purpose :
61  !
62  ! Reads all the namelist to define the output track
63  !
64  ! 2. Method :
65  !
66  ! See source term routines.
67  !
68  ! 3. Parameters :
69  !
70  ! Parameter list
71  ! ----------------------------------------------------------------
72  ! NDSI Int.
73  ! INFILE Char.
74  ! NML_TRACK type.
75  ! NML_FILE type.
76  ! IERR Int.
77  ! ----------------------------------------------------------------
78  !
79  ! 4. Subroutines used :
80  !
81  ! Name TYPE Module Description
82  ! ----------------------------------------------------------------
83  ! STRACE Subr. W3SERVMD SUBROUTINE tracing.
84  ! READ_TRACK_NML
85  ! ----------------------------------------------------------------
86  !
87  ! 5. Called by :
88  !
89  ! Name TYPE Module Description
90  ! ----------------------------------------------------------------
91  ! WW3_TRNC Prog. N/A Postprocess output tracks.
92  ! ----------------------------------------------------------------
93  !
94  ! 6. Error messages :
95  !
96  ! None.
97  !
98  ! 7. Remarks :
99  !
100  ! 8. Structure :
101  !
102  ! See source code.
103  !
104  ! 9. Switches :
105  !
106  ! 10. Source code :
107  !
108  !/ ------------------------------------------------------------------- /
109 
110  USE w3odatmd, ONLY: ndse
111 #ifdef W3_S
112  USE w3servmd, ONLY: strace
113 #endif
114 
115  IMPLICIT NONE
116 
117  INTEGER, INTENT(IN) :: NDSI
118  CHARACTER*(*), INTENT(IN) :: INFILE
119  TYPE(NML_TRACK_T), INTENT(INOUT) :: NML_TRACK
120  TYPE(NML_FILE_T), INTENT(INOUT) :: NML_FILE
121  INTEGER, INTENT(OUT) :: IERR
122 #ifdef W3_S
123  INTEGER, SAVE :: IENT = 0
124 #endif
125 
126  ierr = 0
127 #ifdef W3_S
128  CALL strace (ient, 'W3NMLTRNC')
129 #endif
130 
131  ! open namelist log file
132  ndsn = 3
133  OPEN (ndsn, file=trim(infile)//'.log', form='formatted', iostat=ierr)
134  IF (ierr.NE.0) THEN
135  WRITE (ndse,'(A)') 'ERROR: open full nml file '//trim(infile)//'.log failed'
136  RETURN
137  END IF
138 
139  ! open input file
140  OPEN (ndsi, file=trim(infile), form='formatted', status='old', iostat=ierr)
141  IF (ierr.NE.0) THEN
142  WRITE (ndse,'(A)') 'ERROR: open input file '//trim(infile)//' failed'
143  RETURN
144  END IF
145 
146  ! read track namelist
147  CALL read_track_nml (ndsi, nml_track)
148  CALL report_track_nml (nml_track)
149 
150  ! read file namelist
151  CALL read_file_nml (ndsi, nml_file)
152  CALL report_file_nml (nml_file)
153 
154  ! close namelist files
155  CLOSE (ndsi)
156  CLOSE (ndsn)
157 

References file(), w3odatmd::ndse, ndsn, read_file_nml(), read_track_nml(), report_file_nml(), report_track_nml(), and w3servmd::strace().

Referenced by w3trnc().

Variable Documentation

◆ msg

character(256) w3nmltrncmd::msg

Definition at line 41 of file w3nmltrncmd.F90.

41  CHARACTER(256) :: MSG

Referenced by read_file_nml(), read_track_nml(), report_file_nml(), and report_track_nml().

◆ ndsn

integer w3nmltrncmd::ndsn

Definition at line 42 of file w3nmltrncmd.F90.

42  INTEGER :: NDSN

Referenced by report_file_nml(), report_track_nml(), and w3nmltrnc().

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