New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
nemogcm.F90 in NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/tests/STATION_ASF/MY_SRC – NEMO

source: NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/tests/STATION_ASF/MY_SRC/nemogcm.F90 @ 12724

Last change on this file since 12724 was 12724, checked in by techene, 4 years ago

branch KERNEL-06 : merge with trunk@12698 #2385 - in duplcated files : changes to comply to the new trunk variables and some loop bug fixes

File size: 23.8 KB
Line 
1MODULE nemogcm
2   !!======================================================================
3   !!                       ***  MODULE nemogcm   ***
4   !!                      STATION_ASF (SAS meets C1D)
5   !!======================================================================
6   !! History :  3.6  ! 2011-11  (S. Alderson, G. Madec) original code
7   !!             -   ! 2013-06  (I. Epicoco, S. Mocavero, CMCC) nemo_northcomms: setup avoiding MPI communication
8   !!             -   ! 2014-12  (G. Madec) remove KPP scheme and cross-land advection (cla)
9   !!            4.0  ! 2016-10  (G. Madec, S. Flavoni)  domain configuration / user defined interface
10   !!            4.x  ! 2019-12  (L. Brodeau)  STATION_ASF test-case
11   !!----------------------------------------------------------------------
12
13   !!----------------------------------------------------------------------
14   !!   nemo_gcm      : solve ocean dynamics, tracer, biogeochemistry and/or sea-ice
15   !!   nemo_init     : initialization of the NEMO system
16   !!   nemo_ctl      : initialisation of the contol print
17   !!   nemo_closefile: close remaining open files
18   !!   nemo_alloc    : dynamical allocation
19   !!----------------------------------------------------------------------
20   USE step_oce       ! module used in the ocean time stepping module (step.F90)
21   USE phycst         ! physical constant                  (par_cst routine)
22   USE domain         ! domain initialization   (dom_init & dom_cfg routines)
23   USE closea         ! treatment of closed seas (for ln_closea)
24   USE usrdef_nam     ! user defined configuration
25   USE istate         ! initial state setting          (istate_init routine)
26   USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices
27   USE daymod         ! calendar
28   USE restart        ! open  restart file
29   USE c1d            ! 1D configuration
30   USE step_c1d       ! Time stepping loop for the 1D configuration
31   !
32   USE in_out_manager ! I/O manager
33   USE lib_mpp        ! distributed memory computing
34   USE mppini         ! shared/distributed memory setting (mpp_init routine)
35   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
36#if defined key_iomput
37   USE xios           ! xIOserver
38#endif
39
40   IMPLICIT NONE
41   PRIVATE
42
43   PUBLIC   nemo_gcm    ! called by model.F90
44   PUBLIC   nemo_init   ! needed by AGRIF
45
46   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing
47
48   !!----------------------------------------------------------------------
49   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
50   !! $Id: nemogcm.F90 12489 2020-02-28 15:55:11Z davestorkey $
51   !! Software governed by the CeCILL license (see ./LICENSE)
52   !!----------------------------------------------------------------------
53CONTAINS
54
55   SUBROUTINE nemo_gcm
56      !!----------------------------------------------------------------------
57      !!                     ***  ROUTINE nemo_gcm  ***
58      !!
59      !! ** Purpose :   NEMO solves the primitive equations on an orthogonal
60      !!              curvilinear mesh on the sphere.
61      !!
62      !! ** Method  : - model general initialization
63      !!              - launch the time-stepping (stp routine)
64      !!              - finalize the run by closing files and communications
65      !!
66      !! References : Madec, Delecluse, Imbard, and Levy, 1997:  internal report, IPSL.
67      !!              Madec, 2008, internal report, IPSL.
68      !!----------------------------------------------------------------------
69      INTEGER ::   istp   ! time step index
70      REAL(wp)::   zstptiming   ! elapsed time for 1 time step
71      !!----------------------------------------------------------------------
72      !
73      !                            !-----------------------!
74      CALL nemo_init               !==  Initialisations  ==!
75      !                            !-----------------------!
76      ! check that all process are still there... If some process have an error,
77      ! they will never enter in step and other processes will wait until the end of the cpu time!
78      CALL mpp_max( 'nemogcm', nstop )
79
80      IF(lwp) WRITE(numout,cform_aaa)   ! Flag AAAAAAA
81
82      !                            !-----------------------!
83      !                            !==   time stepping   ==!
84      !                            !-----------------------!
85      !
86      !                                               !== set the model time-step  ==!
87      !
88      istp = nit000
89      !
90      DO WHILE ( istp <= nitend .AND. nstop == 0 )    !==  C1D time-stepping  ==!
91         CALL stp_c1d( istp )
92         istp = istp + 1
93      END DO
94      !
95      !                            !------------------------!
96      !                            !==  finalize the run  ==!
97      !                            !------------------------!
98      IF(lwp) WRITE(numout,cform_aaa)        ! Flag AAAAAAA
99      !
100      IF( nstop /= 0 .AND. lwp ) THEN        ! error print
101         WRITE(ctmp1,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found'
102         CALL ctl_stop( ctmp1 )
103      ENDIF
104      !
105      IF( ln_timing )   CALL timing_finalize
106      !
107      CALL nemo_closefile
108      !
109#if defined key_iomput
110                                    CALL xios_finalize  ! end mpp communications with xios
111#else
112      IF( lk_mpp )                  CALL mppstop      ! end mpp communications
113#endif
114      !
115      IF(lwm) THEN
116         IF( nstop == 0 ) THEN   ;   STOP 0
117         ELSE                    ;   STOP 123
118         ENDIF
119      ENDIF
120      !
121   END SUBROUTINE nemo_gcm
122
123
124   SUBROUTINE nemo_init
125      !!----------------------------------------------------------------------
126      !!                     ***  ROUTINE nemo_init  ***
127      !!
128      !! ** Purpose :   initialization of the NEMO GCM
129      !!----------------------------------------------------------------------
130      INTEGER ::   ios, ilocal_comm   ! local integers
131      !!
132      NAMELIST/namctl/ sn_cfctl,  nn_print, nn_ictls, nn_ictle,             &
133         &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,             &
134         &             ln_timing, ln_diacfl
135      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr
136      !!----------------------------------------------------------------------
137      !
138      cxios_context = 'nemo'
139      !
140      !                             !-------------------------------------------------!
141      !                             !     set communicator & select the local rank    !
142      !                             !  must be done as soon as possible to get narea  !
143      !                             !-------------------------------------------------!
144      !
145#if defined key_iomput
146      IF( Agrif_Root() ) THEN
147            CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios
148      ENDIF
149      CALL mpp_start( ilocal_comm )
150#else
151         CALL mpp_start( )
152#endif
153      !
154      narea = mpprank + 1               ! mpprank: the rank of proc (0 --> mppsize -1 )
155      lwm = (narea == 1)                ! control of output namelists
156      !
157      !                             !---------------------------------------------------------------!
158      !                             ! Open output files, reference and configuration namelist files !
159      !                             !---------------------------------------------------------------!
160      !
161      ! open ocean.output as soon as possible to get all output prints (including errors messages)
162      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
163      ! open reference and configuration namelist files
164                  CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm )
165                  CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm )
166      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
167      ! open /dev/null file to be able to supress output write easily
168      IF( Agrif_Root() ) THEN
169                  CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. )
170#ifdef key_agrif
171      ELSE
172                  numnul = Agrif_Parent(numnul)   
173#endif
174      ENDIF
175      !
176      !                             !--------------------!
177      !                             ! Open listing units !  -> need sn_cfctl from namctl to define lwp
178      !                             !--------------------!
179      !
180      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 )
181901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist' )
182      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
183902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist' )
184      !
185      ! finalize the definition of namctl variables
186      IF( sn_cfctl%l_allon ) THEN
187         ! Turn on all options.
188         CALL nemo_set_cfctl( sn_cfctl, .TRUE., .TRUE. )
189         ! Ensure all processors are active
190         sn_cfctl%procmin = 0 ; sn_cfctl%procmax = 1000000 ; sn_cfctl%procincr = 1
191      ELSEIF( sn_cfctl%l_config ) THEN
192         ! Activate finer control of report outputs
193         ! optionally switch off output from selected areas (note this only
194         ! applies to output which does not involve global communications)
195         IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax  ) .OR. &
196           & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) )    &
197           &   CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. )
198      ELSE
199         ! turn off all options.
200         CALL nemo_set_cfctl( sn_cfctl, .FALSE., .TRUE. )
201      ENDIF
202      !
203      lwp = (narea == 1) .OR. sn_cfctl%l_oceout    ! control of all listing output print
204      !
205      IF(lwp) THEN                      ! open listing units
206         !
207         IF( .NOT. lwm )   &            ! alreay opened for narea == 1
208            &            CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea )
209         !
210         WRITE(numout,*)
211         WRITE(numout,*) '   CNRS - NERC - Met OFFICE - MERCATOR-ocean - CMCC'
212         WRITE(numout,*) '                       NEMO team'
213         WRITE(numout,*) '            Ocean General Circulation Model'
214         WRITE(numout,*) '                NEMO version 4.0  (2019) '
215         WRITE(numout,*) '                      STATION_ASF '
216         WRITE(numout,*) "           ._      ._      ._      ._      ._    "
217         WRITE(numout,*) "       _.-._)`\_.-._)`\_.-._)`\_.-._)`\_.-._)`\_ "
218         WRITE(numout,*)
219         WRITE(numout,*) "           o         _,           _,             "
220         WRITE(numout,*) "            o      .' (        .-' /             "
221         WRITE(numout,*) "           o     _/..._'.    .'   /              "
222         WRITE(numout,*) "      (    o .-'`      ` '-./  _.'               "
223         WRITE(numout,*) "       )    ( o)           ;= <_         (       "
224         WRITE(numout,*) "      (      '-.,\\__ __.-;`\   '.        )      "
225         WRITE(numout,*) "       )  )       \) |`\ \)  '.   \      (   (   "
226         WRITE(numout,*) "      (  (           \_/       '-._\      )   )  "
227         WRITE(numout,*) "       )  ) jgs                     `    (   (   "
228         WRITE(numout,*) "     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "
229         WRITE(numout,*)
230         !
231         WRITE(numout,cform_aaa)                                        ! Flag AAAAAAA
232         !
233      ENDIF
234      !
235      IF(lwm) WRITE( numond, namctl )
236      !
237      !                             !------------------------------------!
238      !                             !  Set global domain size parameters !
239      !                             !------------------------------------!
240      !
241      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 )
242903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' )
243      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
244904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )   
245      !
246      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
247         CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio )
248      ELSE                              ! user-defined namelist
249         CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio )
250      ENDIF
251      !
252      IF(lwm)   WRITE( numond, namcfg )
253      !
254      !                             !-----------------------------------------!
255      !                             ! mpp parameters and domain decomposition !
256      !                             !-----------------------------------------!
257      CALL mpp_init
258
259      ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays
260      CALL nemo_alloc()
261
262      ! Initialise time level indices
263      Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa
264
265      !                             !-------------------------------!
266      !                             !  NEMO general initialization  !
267      !                             !-------------------------------!
268
269      CALL nemo_ctl                          ! Control prints
270      !
271      !                                      ! General initialization
272      IF( ln_timing    )   CALL timing_init     ! timing
273      IF( ln_timing    )   CALL timing_start( 'nemo_init')
274      !
275                           CALL     phy_cst         ! Physical constants
276                           CALL     eos_init        ! Equation of state
277      IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration
278                           CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain
279      IF( sn_cfctl%l_prtctl )   &
280         &                 CALL prt_ctl_init        ! Print control
281      !
282     
283                           CALL  istate_init( Nbb, Nnn, Naa )    ! ocean initial state (Dynamics and tracers)
284
285      !                                      ! external forcing
286                           CALL     sbc_init( Nbb, Nnn, Naa )    ! surface boundary conditions (including sea-ice)
287
288      !
289      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA
290      !
291      IF( ln_timing    )   CALL timing_stop( 'nemo_init')
292      !
293   END SUBROUTINE nemo_init
294
295
296   SUBROUTINE nemo_ctl
297      !!----------------------------------------------------------------------
298      !!                     ***  ROUTINE nemo_ctl  ***
299      !!
300      !! ** Purpose :   control print setting
301      !!
302      !! ** Method  : - print namctl and namcfg information and check some consistencies
303      !!----------------------------------------------------------------------
304      !
305      IF(lwp) THEN                  ! control print
306         WRITE(numout,*)
307         WRITE(numout,*) 'nemo_ctl: Control prints'
308         WRITE(numout,*) '~~~~~~~~'
309         WRITE(numout,*) '   Namelist namctl'
310         WRITE(numout,*) '                              sn_cfctl%l_glochk  = ', sn_cfctl%l_glochk
311         WRITE(numout,*) '                              sn_cfctl%l_allon   = ', sn_cfctl%l_allon
312         WRITE(numout,*) '       finer control over o/p sn_cfctl%l_config  = ', sn_cfctl%l_config
313         WRITE(numout,*) '                              sn_cfctl%l_runstat = ', sn_cfctl%l_runstat
314         WRITE(numout,*) '                              sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat
315         WRITE(numout,*) '                              sn_cfctl%l_oceout  = ', sn_cfctl%l_oceout
316         WRITE(numout,*) '                              sn_cfctl%l_layout  = ', sn_cfctl%l_layout
317         WRITE(numout,*) '                              sn_cfctl%l_prtctl  = ', sn_cfctl%l_prtctl
318         WRITE(numout,*) '                              sn_cfctl%l_prttrc  = ', sn_cfctl%l_prttrc
319         WRITE(numout,*) '                              sn_cfctl%l_oasout  = ', sn_cfctl%l_oasout
320         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin 
321         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax 
322         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr 
323         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr 
324         WRITE(numout,*) '      level of print                  nn_print   = ', nn_print
325         WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls
326         WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle
327         WRITE(numout,*) '      Start j indice for SUM control  nn_jctls   = ', nn_jctls
328         WRITE(numout,*) '      End j indice for SUM control    nn_jctle   = ', nn_jctle
329         WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt
330         WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt
331         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing
332         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl
333      ENDIF
334      !
335      nprint    = nn_print          ! convert DOCTOR namelist names into OLD names
336      nictls    = nn_ictls
337      nictle    = nn_ictle
338      njctls    = nn_jctls
339      njctle    = nn_jctle
340      isplt     = nn_isplt
341      jsplt     = nn_jsplt
342
343      IF(lwp) THEN                  ! control print
344         WRITE(numout,*)
345         WRITE(numout,*) '   Namelist namcfg'
346         WRITE(numout,*) '      read domain configuration file                ln_read_cfg      = ', ln_read_cfg
347         WRITE(numout,*) '         filename to be read                           cn_domcfg     = ', TRIM(cn_domcfg)
348         WRITE(numout,*) '         keep closed seas in the domain (if exist)     ln_closea     = ', ln_closea
349         WRITE(numout,*) '      create a configuration definition file        ln_write_cfg     = ', ln_write_cfg
350         WRITE(numout,*) '         filename to be written                        cn_domcfg_out = ', TRIM(cn_domcfg_out)
351         WRITE(numout,*) '      use file attribute if exists as i/p j-start   ln_use_jattr     = ', ln_use_jattr
352      ENDIF
353      IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file
354      !
355      !                             ! Parameter control
356      !
357      IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN              ! sub-domain area indices for the control prints
358         IF( lk_mpp .AND. jpnij > 1 ) THEN
359            isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain
360         ELSE
361            IF( isplt == 1 .AND. jsplt == 1  ) THEN
362               CALL ctl_warn( ' - isplt & jsplt are equal to 1',   &
363                  &           ' - the print control will be done over the whole domain' )
364            ENDIF
365            ijsplt = isplt * jsplt            ! total number of processors ijsplt
366         ENDIF
367         IF(lwp) WRITE(numout,*)'          - The total number of processors over which the'
368         IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt
369         !
370         !                              ! indices used for the SUM control
371         IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area
372            lsp_area = .FALSE.
373         ELSE                                             ! print control done over a specific  area
374            lsp_area = .TRUE.
375            IF( nictls < 1 .OR. nictls > jpiglo )   THEN
376               CALL ctl_warn( '          - nictls must be 1<=nictls>=jpiglo, it is forced to 1' )
377               nictls = 1
378            ENDIF
379            IF( nictle < 1 .OR. nictle > jpiglo )   THEN
380               CALL ctl_warn( '          - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' )
381               nictle = jpiglo
382            ENDIF
383            IF( njctls < 1 .OR. njctls > jpjglo )   THEN
384               CALL ctl_warn( '          - njctls must be 1<=njctls>=jpjglo, it is forced to 1' )
385               njctls = 1
386            ENDIF
387            IF( njctle < 1 .OR. njctle > jpjglo )   THEN
388               CALL ctl_warn( '          - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' )
389               njctle = jpjglo
390            ENDIF
391         ENDIF
392      ENDIF
393      !
394      IF( 1._wp /= SIGN(1._wp,-0._wp)  )   CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows f2003 standard.',  &
395         &                                                'Compile with key_nosignedzero enabled:',   &
396         &                                                '--> add -Dkey_nosignedzero to the definition of %CPP in your arch file' )
397      !
398   END SUBROUTINE nemo_ctl
399
400
401   SUBROUTINE nemo_closefile
402      !!----------------------------------------------------------------------
403      !!                     ***  ROUTINE nemo_closefile  ***
404      !!
405      !! ** Purpose :   Close the files
406      !!----------------------------------------------------------------------
407      !
408      IF( lk_mpp )   CALL mppsync
409      !
410      CALL iom_close                                 ! close all input/output files managed by iom_*
411      !
412      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file
413      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file
414      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist
415      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist
416      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution)
417      IF( numout          /=  6 )   CLOSE( numout          )   ! standard model output file
418      !
419      numout = 6                                     ! redefine numout in case it is used after this point...
420      !
421   END SUBROUTINE nemo_closefile
422
423
424   SUBROUTINE nemo_alloc
425      !!----------------------------------------------------------------------
426      !!                     ***  ROUTINE nemo_alloc  ***
427      !!
428      !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules
429      !!
430      !! ** Method  :
431      !!----------------------------------------------------------------------
432      USE diawri    , ONLY : dia_wri_alloc
433      USE dom_oce   , ONLY : dom_oce_alloc
434      !
435      INTEGER :: ierr
436      !!----------------------------------------------------------------------
437      !
438      ierr =        oce_alloc    ()    ! ocean
439      ierr = ierr + dia_wri_alloc()
440      ierr = ierr + dom_oce_alloc()    ! ocean domain
441      !
442      CALL mpp_sum( 'nemogcm', ierr )
443      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' )
444      !
445   END SUBROUTINE nemo_alloc
446
447   
448   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all )
449      !!----------------------------------------------------------------------
450      !!                     ***  ROUTINE nemo_set_cfctl  ***
451      !!
452      !! ** Purpose :   Set elements of the output control structure to setto.
453      !!                for_all should be .false. unless all areas are to be
454      !!                treated identically.
455      !!
456      !! ** Method  :   Note this routine can be used to switch on/off some
457      !!                types of output for selected areas but any output types
458      !!                that involve global communications (e.g. mpp_max, glob_sum)
459      !!                should be protected from selective switching by the
460      !!                for_all argument
461      !!----------------------------------------------------------------------
462      LOGICAL :: setto, for_all
463      TYPE(sn_ctl) :: sn_cfctl
464      !!----------------------------------------------------------------------
465      IF( for_all ) THEN
466         sn_cfctl%l_runstat = setto
467         sn_cfctl%l_trcstat = setto
468      ENDIF
469      sn_cfctl%l_oceout  = setto
470      sn_cfctl%l_layout  = setto
471      sn_cfctl%l_prtctl  = setto
472      sn_cfctl%l_prttrc  = setto
473      sn_cfctl%l_oasout  = setto
474   END SUBROUTINE nemo_set_cfctl
475
476   !!======================================================================
477END MODULE nemogcm
478
Note: See TracBrowser for help on using the repository browser.