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 branches/UKMO/dev_merge_2017_GC_couple_pkg/NEMOGCM/NEMO/SAS_SRC – NEMO

source: branches/UKMO/dev_merge_2017_GC_couple_pkg/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90 @ 9677

Last change on this file since 9677 was 9677, checked in by dancopsey, 6 years ago

Strip out SVN keywords.

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