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/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS – NEMO

source: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/SAS/nemogcm.F90 @ 10314

Last change on this file since 10314 was 10297, checked in by smasson, 5 years ago

dev_r10164_HPC09_ESIWACE_PREP_MERGE: action 2a: add report calls of mppmin/max/sum, see #2133

  • Property svn:keywords set to Id
File size: 23.4 KB
Line 
1MODULE nemogcm
2   !!======================================================================
3   !!                       ***  MODULE nemogcm   ***
4   !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats
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   !!----------------------------------------------------------------------
11
12   !!----------------------------------------------------------------------
13   !!   nemo_gcm      : solve ocean dynamics, tracer, biogeochemistry and/or sea-ice
14   !!   nemo_init     : initialization of the NEMO system
15   !!   nemo_ctl      : initialisation of the contol print
16   !!   nemo_closefile: close remaining open files
17   !!   nemo_alloc    : dynamical allocation
18   !!----------------------------------------------------------------------
19   USE step_oce       ! module used in the ocean time stepping module
20   USE sbc_oce        ! surface boundary condition: ocean
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 daymod         ! calendar
26   USE restart        ! open  restart file
27   USE step           ! NEMO time-stepping                 (stp     routine)
28   USE cpl_oasis3     !
29   USE sbcssm         !
30   USE icbini         ! handle bergs, initialisation
31   USE icbstp         ! handle bergs, calving, themodynamics and transport
32   USE bdyini         ! open boundary cond. setting       (bdy_init routine). mandatory for sea-ice
33   USE bdydta         ! open boundary cond. setting   (bdy_dta_init routine). mandatory for sea-ice
34   !
35   USE lib_mpp        ! distributed memory computing
36   USE mppini         ! shared/distributed memory setting (mpp_init routine)
37   USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges
38   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
39#if defined key_iomput
40   USE xios           ! xIOserver
41#endif
42#if defined key_agrif && defined key_si3
43   USE agrif_ice_update ! ice update
44#endif
45
46   IMPLICIT NONE
47   PRIVATE
48
49   PUBLIC   nemo_gcm    ! called by model.F90
50   PUBLIC   nemo_init   ! needed by AGRIF
51
52   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing
53
54   !!----------------------------------------------------------------------
55   !! NEMO/SAS 4.0 , NEMO Consortium (2018)
56   !! $Id$
57   !! Software governed by the CeCILL license (see ./LICENSE)
58   !!----------------------------------------------------------------------
59CONTAINS
60
61   SUBROUTINE nemo_gcm
62      !!----------------------------------------------------------------------
63      !!                     ***  ROUTINE nemo_gcm  ***
64      !!
65      !! ** Purpose :   NEMO solves the primitive equations on an orthogonal
66      !!              curvilinear mesh on the sphere.
67      !!
68      !! ** Method  : - model general initialization
69      !!              - launch the time-stepping (stp routine)
70      !!              - finalize the run by closing files and communications
71      !!
72      !! References : Madec, Delecluse, Imbard, and Levy, 1997:  internal report, IPSL.
73      !!              Madec, 2008, internal report, IPSL.
74      !!----------------------------------------------------------------------
75      INTEGER ::   istp   ! time step index
76      !!----------------------------------------------------------------------
77      !
78#if defined key_agrif
79      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes
80#endif
81      !                            !-----------------------!
82      CALL nemo_init               !==  Initialisations  ==!
83      !                            !-----------------------!
84#if defined key_agrif
85      CALL Agrif_Declare_Var_dom   ! AGRIF: set the meshes for DOM
86      CALL Agrif_Declare_Var       !  "      "   "   "      "  DYN/TRA
87# if defined key_top
88      CALL Agrif_Declare_Var_top   !  "      "   "   "      "  TOP
89# endif
90# if defined key_si3
91      CALL Agrif_Declare_Var_ice   !  "      "   "   "      "  Sea ice
92# endif
93#endif
94      ! check that all process are still there... If some process have an error,
95      ! they will never enter in step and other processes will wait until the end of the cpu time!
96      IF( lk_mpp )   CALL mpp_max( 'nemogcm', nstop )
97
98      IF(lwp) WRITE(numout,cform_aaa)   ! Flag AAAAAAA
99
100      !                            !-----------------------!
101      !                            !==   time stepping   ==!
102      !                            !-----------------------!
103      istp = nit000
104      !
105#if defined key_agrif
106      !                                               !==  AGRIF time-stepping  ==!
107      CALL Agrif_Regrid()
108      !
109#if defined key_si3
110      ! Recursive update from highest nested level to lowest:
111      CALL Agrif_step_child_adj(Agrif_update_ice)
112#endif
113      !
114      DO WHILE( istp <= nitend .AND. nstop == 0 )
115         CALL stp
116         istp = istp + 1
117      END DO
118      !
119      IF( .NOT. Agrif_Root() ) THEN
120         CALL Agrif_ParentGrid_To_ChildGrid()
121         IF( ln_timing )   CALL timing_finalize
122         CALL Agrif_ChildGrid_To_ParentGrid()
123      ENDIF
124      !
125#else
126      !
127      IF( .NOT.ln_diurnal_only ) THEN                 !==  Standard time-stepping  ==!
128         !
129         DO WHILE( istp <= nitend .AND. nstop == 0 )
130            CALL stp        ( istp ) 
131            istp = istp + 1
132         END DO
133         !
134      ELSE                                            !==  diurnal SST time-steeping only  ==!
135         !
136         DO WHILE( istp <= nitend .AND. nstop == 0 )
137            CALL stp_diurnal( istp )   ! time step only the diurnal SST
138            istp = istp + 1
139         END DO
140         !
141      ENDIF
142      !
143#endif
144      !
145      IF( ln_icebergs )   CALL icb_end( nitend )
146
147      !                            !------------------------!
148      !                            !==  finalize the run  ==!
149      !                            !------------------------!
150      IF(lwp) WRITE(numout,cform_aaa)        ! Flag AAAAAAA
151      !
152      IF( nstop /= 0 .AND. lwp ) THEN        ! error print
153         WRITE(numout,cform_err)
154         WRITE(numout,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found'
155         WRITE(numout,*)
156      ENDIF
157      !
158      IF( ln_timing )   CALL timing_finalize
159      !
160      CALL nemo_closefile
161      !
162#if defined key_iomput
163                                    CALL xios_finalize  ! end mpp communications with xios
164      IF( lk_oasis     )            CALL cpl_finalize   ! end coupling and mpp communications with OASIS
165#else
166      IF    ( lk_oasis ) THEN   ;   CALL cpl_finalize   ! end coupling and mpp communications with OASIS
167      ELSEIF( lk_mpp   ) THEN   ;   CALL mppstop        ! end mpp communications
168      ENDIF
169#endif
170      !
171   END SUBROUTINE nemo_gcm
172
173
174   SUBROUTINE nemo_init
175      !!----------------------------------------------------------------------
176      !!                     ***  ROUTINE nemo_init  ***
177      !!
178      !! ** Purpose :   initialization of the NEMO GCM
179      !!----------------------------------------------------------------------
180      INTEGER  ::   ji                 ! dummy loop indices
181      INTEGER  ::   ios, ilocal_comm   ! local integers
182      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam
183      CHARACTER(len=80)                 ::   clname
184      !!
185      NAMELIST/namctl/ ln_ctl   , nn_print, nn_ictls, nn_ictle,   &
186         &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,   &
187         &             ln_timing, ln_diacfl
188      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr
189      !!----------------------------------------------------------------------
190      !
191      cltxt  = ''
192      cltxt2 = ''
193      clnam  = '' 
194      cxios_context = 'nemo'
195      !
196      !                             ! Open reference namelist and configuration namelist files
197      IF( lk_oasis ) THEN
198         CALL ctl_opn( numnam_ref, 'namelist_sas_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
199         CALL ctl_opn( numnam_cfg, 'namelist_sas_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
200         cxios_context = 'sas'
201         clname = 'output.namelist_sas.dyn'
202      ELSE
203         CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
204         CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
205         cxios_context = 'nemo'
206         clname = 'output.namelist.dyn'
207   ENDIF
208      !
209      REWIND( numnam_ref )              ! Namelist namctl in reference namelist
210      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 )
211901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. )
212      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist
213      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
214902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. )
215      !
216      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist
217      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 )
218903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. )
219      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist
220      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
221904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )   
222
223      !                             !--------------------------!
224      !                             !  Set global domain size  !   (control print return in cltxt2)
225      !                             !--------------------------!
226      IF( ln_read_cfg ) THEN              ! Read sizes in domain configuration file
227         CALL domain_cfg ( cltxt2,        cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio )
228         !
229      ELSE                                ! user-defined namelist
230         CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio )
231      ENDIF
232      !
233      !
234      !                             !--------------------------------------------!
235      !                             !  set communicator & select the local node  !
236      !                             !  NB: mynode also opens output.namelist.dyn !
237      !                             !      on unit number numond on first proc   !
238      !                             !--------------------------------------------!
239#if defined key_iomput
240      IF( Agrif_Root() ) THEN
241         IF( lk_oasis ) THEN
242            CALL cpl_init( "sas", ilocal_comm )                          ! nemo local communicator given by oasis
243            CALL xios_initialize( "not used",local_comm=ilocal_comm )    ! send nemo communicator to xios
244         ELSE
245            CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm )    ! nemo local communicator given by xios
246         ENDIF
247      ENDIF
248      narea = mynode ( cltxt, clname, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )  ! Nodes selection
249#else
250      IF( lk_oasis ) THEN
251         IF( Agrif_Root() ) THEN
252            CALL cpl_init( "sas", ilocal_comm )                          ! nemo local communicator given by oasis
253         ENDIF
254         narea = mynode( cltxt, clname, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt)
255      ELSE
256         ilocal_comm = 0
257         narea = mynode( cltxt, clname, numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt)
258      ENDIF
259#endif
260
261      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 )
262
263      lwm = (narea == 1)                                    ! control of output namelists
264      lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print
265
266      IF(lwm) THEN               ! write merged namelists from earlier to output namelist
267         !                       ! now that the file has been opened in call to mynode.
268         !                       ! NB: nammpp has already been written in mynode (if lk_mpp_mpi)
269         WRITE( numond, namctl )
270         WRITE( numond, namcfg )
271         IF( .NOT.ln_read_cfg ) THEN
272            DO ji = 1, SIZE(clnam)
273               IF( TRIM(clnam(ji)) /= '' )   WRITE(numond, * ) clnam(ji)     ! namusr_def print
274            END DO
275         ENDIF
276      ENDIF
277
278      IF(lwp) THEN                            ! open listing units
279         !
280         IF( lk_oasis ) THEN   ;   CALL ctl_opn( numout,   'sas.output', 'REPLACE','FORMATTED','SEQUENTIAL', -1, 6, .FALSE., narea )
281         ELSE                  ;   CALL ctl_opn( numout, 'ocean.output', 'REPLACE','FORMATTED','SEQUENTIAL', -1, 6, .FALSE., narea )
282         ENDIF
283         !
284         WRITE(numout,*)
285         WRITE(numout,*) '   CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV - CMCC'
286         WRITE(numout,*) '                       NEMO team'
287         WRITE(numout,*) '            Ocean General Circulation Model'
288         WRITE(numout,*) '                NEMO version 4.0  (2017) '
289         WRITE(numout,*) '             StandAlone Surface version (SAS) '
290         WRITE(numout,*)
291         WRITE(numout,*)
292         DO ji = 1, SIZE(cltxt)
293            IF( TRIM(cltxt (ji)) /= '' )   WRITE(numout,*) cltxt(ji)    ! control print of mynode
294         END DO
295         WRITE(numout,*)
296         WRITE(numout,*)
297         DO ji = 1, SIZE(cltxt2)
298            IF( TRIM(cltxt2(ji)) /= '' )   WRITE(numout,*) cltxt2(ji)   ! control print of domain size
299         END DO
300         !
301         WRITE(numout,cform_aaa)                                        ! Flag AAAAAAA
302         !
303      ENDIF
304      !                                      ! Domain decomposition
305      CALL mpp_init                          ! MPP
306
307      ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays
308      CALL nemo_alloc()
309
310      !                             !-------------------------------!
311      !                             !  NEMO general initialization  !
312      !                             !-------------------------------!
313
314      CALL nemo_ctl                          ! Control prints
315      !
316      !                                      ! General initialization
317      IF( ln_timing    )   CALL timing_init     ! timing
318      IF( ln_timing    )   CALL timing_start( 'nemo_init')
319
320                           CALL phy_cst         ! Physical constants
321                           CALL eos_init        ! Equation of seawater
322                           CALL dom_init('SAS') ! Domain
323      IF( ln_ctl      )    CALL prt_ctl_init    ! Print control
324     
325                           CALL day_init        ! model calendar (using both namelist and restart infos)
326      IF( ln_rstart )      CALL rst_read_open
327
328      !                                      ! external forcing
329                           CALL sbc_init        ! Forcings : surface module
330
331      ! ==> clem: open boundaries init. is mandatory for sea-ice because ice BDY is not decoupled from 
332      !           the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules.
333      !           This is not clean and should be changed in the future.
334                           CALL bdy_init
335      ! ==>
336                           CALL icb_init( rdt, nit000)   ! initialise icebergs instance
337      !
338      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA
339      !
340      IF( ln_timing    )   CALL timing_stop( 'nemo_init')
341      !
342   END SUBROUTINE nemo_init
343
344
345   SUBROUTINE nemo_ctl
346      !!----------------------------------------------------------------------
347      !!                     ***  ROUTINE nemo_ctl  ***
348      !!
349      !! ** Purpose :   control print setting
350      !!
351      !! ** Method  : - print namctl information and check some consistencies
352      !!----------------------------------------------------------------------
353      !
354      IF(lwp) THEN                  ! control print
355         WRITE(numout,*)
356         WRITE(numout,*) 'nemo_ctl: Control prints'
357         WRITE(numout,*) '~~~~~~~~'
358         WRITE(numout,*) '   Namelist namctl'
359         WRITE(numout,*) '      run control (for debugging)     ln_ctl     = ', ln_ctl
360         WRITE(numout,*) '      level of print                  nn_print   = ', nn_print
361         WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls
362         WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle
363         WRITE(numout,*) '      Start j indice for SUM control  nn_jctls   = ', nn_jctls
364         WRITE(numout,*) '      End j indice for SUM control    nn_jctle   = ', nn_jctle
365         WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt
366         WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt
367         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing
368         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl
369      ENDIF
370      !
371      nprint    = nn_print          ! convert DOCTOR namelist names into OLD names
372      nictls    = nn_ictls
373      nictle    = nn_ictle
374      njctls    = nn_jctls
375      njctle    = nn_jctle
376      isplt     = nn_isplt
377      jsplt     = nn_jsplt
378
379      IF(lwp) THEN                  ! control print
380         WRITE(numout,*)
381         WRITE(numout,*) '   Namelist namcfg'
382         WRITE(numout,*) '      read domain configuration file                ln_read_cfg      = ', ln_read_cfg
383         WRITE(numout,*) '         filename to be read                           cn_domcfg     = ', TRIM(cn_domcfg)
384         WRITE(numout,*) '         keep closed seas in the domain (if exist)     ln_closea     = ', ln_closea
385         WRITE(numout,*) '      create a configuration definition file        ln_write_cfg     = ', ln_write_cfg
386         WRITE(numout,*) '         filename to be written                        cn_domcfg_out = ', TRIM(cn_domcfg_out)
387         WRITE(numout,*) '      use file attribute if exists as i/p j-start   ln_use_jattr     = ', ln_use_jattr
388      ENDIF
389      IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file
390      !
391      !                             ! Parameter control
392      !
393      IF( ln_ctl ) THEN                 ! sub-domain area indices for the control prints
394         IF( lk_mpp .AND. jpnij > 1 ) THEN
395            isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain
396         ELSE
397            IF( isplt == 1 .AND. jsplt == 1  ) THEN
398               CALL ctl_warn( ' - isplt & jsplt are equal to 1',   &
399                  &           ' - the print control will be done over the whole domain' )
400            ENDIF
401            ijsplt = isplt * jsplt            ! total number of processors ijsplt
402         ENDIF
403         IF(lwp) WRITE(numout,*)'          - The total number of processors over which the'
404         IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt
405         !
406         !                              ! indices used for the SUM control
407         IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area
408            lsp_area = .FALSE.
409         ELSE                                             ! print control done over a specific  area
410            lsp_area = .TRUE.
411            IF( nictls < 1 .OR. nictls > jpiglo )   THEN
412               CALL ctl_warn( '          - nictls must be 1<=nictls>=jpiglo, it is forced to 1' )
413               nictls = 1
414            ENDIF
415            IF( nictle < 1 .OR. nictle > jpiglo )   THEN
416               CALL ctl_warn( '          - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' )
417               nictle = jpiglo
418            ENDIF
419            IF( njctls < 1 .OR. njctls > jpjglo )   THEN
420               CALL ctl_warn( '          - njctls must be 1<=njctls>=jpjglo, it is forced to 1' )
421               njctls = 1
422            ENDIF
423            IF( njctle < 1 .OR. njctle > jpjglo )   THEN
424               CALL ctl_warn( '          - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' )
425               njctle = jpjglo
426            ENDIF
427         ENDIF
428      ENDIF
429      !
430      IF( 1._wp /= SIGN(1._wp,-0._wp)  )   CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows f2003 standard.',  &
431         &                                                'Compile with key_nosignedzero enabled' )
432      !
433#if defined key_agrif
434      IF( ln_timing )   CALL ctl_stop( 'AGRIF not implemented with ln_timing = true')
435#endif
436      !
437   END SUBROUTINE nemo_ctl
438
439
440   SUBROUTINE nemo_closefile
441      !!----------------------------------------------------------------------
442      !!                     ***  ROUTINE nemo_closefile  ***
443      !!
444      !! ** Purpose :   Close the files
445      !!----------------------------------------------------------------------
446      !
447      IF( lk_mpp )   CALL mppsync
448      !
449      CALL iom_close                                 ! close all input/output files managed by iom_*
450      !
451      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file     
452      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file
453      IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist
454      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist
455      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist
456      IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist
457      IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist
458      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist
459      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution)
460      IF( numout          /=  6 )   CLOSE( numout          )   ! standard model output file
461      !
462      numout = 6                                     ! redefine numout in case it is used after this point...
463      !
464   END SUBROUTINE nemo_closefile
465
466
467   SUBROUTINE nemo_alloc
468      !!----------------------------------------------------------------------
469      !!                     ***  ROUTINE nemo_alloc  ***
470      !!
471      !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules
472      !!
473      !! ** Method  :
474      !!----------------------------------------------------------------------
475      USE diawri    , ONLY : dia_wri_alloc
476      USE dom_oce   , ONLY : dom_oce_alloc
477      USE bdy_oce   , ONLY : ln_bdy, bdy_oce_alloc
478      USE oce       ! mandatory for sea-ice because needed for bdy arrays
479      !
480      INTEGER :: ierr
481      !!----------------------------------------------------------------------
482      !
483      ierr =        dia_wri_alloc()
484      ierr = ierr + dom_oce_alloc()          ! ocean domain
485      ierr = ierr + oce_alloc    ()          ! (tsn...) needed for agrif and/or SI3 and bdy
486      ierr = ierr + bdy_oce_alloc()          ! bdy masks (incl. initialization)
487      !
488      IF( lk_mpp    )   CALL mpp_sum( 'nemogcm', ierr )
489      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' )
490      !
491   END SUBROUTINE nemo_alloc
492
493   !!======================================================================
494END MODULE nemogcm
495
Note: See TracBrowser for help on using the repository browser.