[3324] | 1 | MODULE nemogcm |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE nemogcm *** |
---|
[7646] | 4 | !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats |
---|
[3324] | 5 | !!====================================================================== |
---|
[7646] | 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 |
---|
[3324] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
[7646] | 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 | !! nemo_partition: calculate MPP domain decomposition |
---|
| 19 | !! factorise : calculate the factors of the no. of MPI processes |
---|
[9213] | 20 | !! nemo_nfdcom : Setup for north fold exchanges with explicit point-to-point messaging |
---|
[3324] | 21 | !!---------------------------------------------------------------------- |
---|
[7646] | 22 | USE step_oce ! module used in the ocean time stepping module |
---|
| 23 | USE sbc_oce ! surface boundary condition: ocean |
---|
| 24 | USE phycst ! physical constant (par_cst routine) |
---|
| 25 | USE domain ! domain initialization (dom_init & dom_cfg routines) |
---|
[9200] | 26 | USE closea ! treatment of closed seas (for ln_closea) |
---|
[7646] | 27 | USE usrdef_nam ! user defined configuration |
---|
| 28 | USE daymod ! calendar |
---|
[8583] | 29 | USE restart ! open restart file |
---|
[7646] | 30 | USE step ! NEMO time-stepping (stp routine) |
---|
| 31 | USE cpl_oasis3 ! |
---|
| 32 | USE sbcssm ! |
---|
| 33 | USE icbini ! handle bergs, initialisation |
---|
| 34 | USE icbstp ! handle bergs, calving, themodynamics and transport |
---|
[9019] | 35 | USE bdyini ! open boundary cond. setting (bdy_init routine). mandatory for sea-ice |
---|
| 36 | USE bdydta ! open boundary cond. setting (bdy_dta_init routine). mandatory for sea-ice |
---|
[7646] | 37 | ! |
---|
| 38 | USE lib_mpp ! distributed memory computing |
---|
| 39 | USE mppini ! shared/distributed memory setting (mpp_init routine) |
---|
[9213] | 40 | USE lbcnfd , ONLY : isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges |
---|
[7646] | 41 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[3324] | 42 | #if defined key_iomput |
---|
[7646] | 43 | USE xios ! xIOserver |
---|
[3324] | 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 | !!---------------------------------------------------------------------- |
---|
[9213] | 55 | !! NEMO/OPA 4.0 , NEMO Consortium (2018) |
---|
[5215] | 56 | !! $Id$ |
---|
[3324] | 57 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 58 | !!---------------------------------------------------------------------- |
---|
| 59 | CONTAINS |
---|
| 60 | |
---|
| 61 | SUBROUTINE nemo_gcm |
---|
| 62 | !!---------------------------------------------------------------------- |
---|
| 63 | !! *** ROUTINE nemo_gcm *** |
---|
| 64 | !! |
---|
[7646] | 65 | !! ** Purpose : NEMO solves the primitive equations on an orthogonal |
---|
[3324] | 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 | !!---------------------------------------------------------------------- |
---|
[7646] | 75 | INTEGER :: istp ! time step index |
---|
[3324] | 76 | !!---------------------------------------------------------------------- |
---|
| 77 | ! |
---|
| 78 | #if defined key_agrif |
---|
[9213] | 79 | CALL Agrif_Init_Grids() ! AGRIF: set the meshes |
---|
[3324] | 80 | #endif |
---|
| 81 | ! !-----------------------! |
---|
| 82 | CALL nemo_init !== Initialisations ==! |
---|
| 83 | ! !-----------------------! |
---|
| 84 | #if defined key_agrif |
---|
[5407] | 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 |
---|
[7646] | 90 | # if defined key_lim3 |
---|
| 91 | CALL Agrif_Declare_Var_lim3 ! " " " " " LIM3 |
---|
| 92 | # endif |
---|
[3324] | 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( nstop ) |
---|
| 97 | |
---|
| 98 | IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
| 99 | |
---|
| 100 | ! !-----------------------! |
---|
| 101 | ! !== time stepping ==! |
---|
| 102 | ! !-----------------------! |
---|
| 103 | istp = nit000 |
---|
[9213] | 104 | ! |
---|
[7646] | 105 | #if defined key_agrif |
---|
[9213] | 106 | ! !== AGRIF time-stepping ==! |
---|
[7646] | 107 | CALL Agrif_Regrid() |
---|
[9213] | 108 | ! |
---|
| 109 | DO WHILE( istp <= nitend .AND. nstop == 0 ) |
---|
| 110 | CALL stp |
---|
| 111 | istp = istp + 1 |
---|
| 112 | END DO |
---|
| 113 | ! |
---|
| 114 | IF( .NOT. Agrif_Root() ) THEN |
---|
| 115 | CALL Agrif_ParentGrid_To_ChildGrid() |
---|
| 116 | IF( ln_timing ) CALL timing_finalize |
---|
| 117 | CALL Agrif_ChildGrid_To_ParentGrid() |
---|
| 118 | ENDIF |
---|
| 119 | ! |
---|
[3324] | 120 | #else |
---|
[9213] | 121 | ! |
---|
| 122 | IF( .NOT.ln_diurnal_only ) THEN !== Standard time-stepping ==! |
---|
| 123 | ! |
---|
| 124 | DO WHILE( istp <= nitend .AND. nstop == 0 ) |
---|
| 125 | CALL stp ( istp ) |
---|
| 126 | istp = istp + 1 |
---|
[7646] | 127 | END DO |
---|
[9213] | 128 | ! |
---|
| 129 | ELSE !== diurnal SST time-steeping only ==! |
---|
| 130 | ! |
---|
| 131 | DO WHILE( istp <= nitend .AND. nstop == 0 ) |
---|
| 132 | CALL stp_diurnal( istp ) ! time step only the diurnal SST |
---|
| 133 | istp = istp + 1 |
---|
| 134 | END DO |
---|
| 135 | ! |
---|
| 136 | ENDIF |
---|
[5407] | 137 | ! |
---|
[9213] | 138 | #endif |
---|
| 139 | ! |
---|
[5407] | 140 | IF( ln_icebergs ) CALL icb_end( nitend ) |
---|
| 141 | |
---|
[3324] | 142 | ! !------------------------! |
---|
| 143 | ! !== finalize the run ==! |
---|
| 144 | ! !------------------------! |
---|
[7646] | 145 | IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
[3324] | 146 | ! |
---|
[7646] | 147 | IF( nstop /= 0 .AND. lwp ) THEN ! error print |
---|
[3324] | 148 | WRITE(numout,cform_err) |
---|
[9213] | 149 | WRITE(numout,*) ' ==>>> nemo_gcm: a total of ', nstop, ' errors have been found' |
---|
| 150 | WRITE(numout,*) |
---|
[3324] | 151 | ENDIF |
---|
| 152 | ! |
---|
[9019] | 153 | IF( ln_timing ) CALL timing_finalize |
---|
[3324] | 154 | ! |
---|
| 155 | CALL nemo_closefile |
---|
[5407] | 156 | ! |
---|
[3769] | 157 | #if defined key_iomput |
---|
[9213] | 158 | CALL xios_finalize ! end mpp communications with xios |
---|
| 159 | IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS |
---|
[3769] | 160 | #else |
---|
[9213] | 161 | IF ( lk_oasis ) THEN ; CALL cpl_finalize ! end coupling and mpp communications with OASIS |
---|
| 162 | ELSEIF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications |
---|
[5407] | 163 | ENDIF |
---|
[3769] | 164 | #endif |
---|
[3324] | 165 | ! |
---|
| 166 | END SUBROUTINE nemo_gcm |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | SUBROUTINE nemo_init |
---|
| 170 | !!---------------------------------------------------------------------- |
---|
| 171 | !! *** ROUTINE nemo_init *** |
---|
| 172 | !! |
---|
| 173 | !! ** Purpose : initialization of the NEMO GCM |
---|
| 174 | !!---------------------------------------------------------------------- |
---|
[9213] | 175 | INTEGER :: ji ! dummy loop indices |
---|
| 176 | INTEGER :: ios, ilocal_comm ! local integers |
---|
| 177 | INTEGER :: iiarea, ijarea ! - - |
---|
| 178 | INTEGER :: iirest, ijrest ! - - |
---|
[7646] | 179 | CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam |
---|
| 180 | CHARACTER(len=80) :: clname |
---|
[9213] | 181 | !! |
---|
[7646] | 182 | NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & |
---|
| 183 | & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & |
---|
[9019] | 184 | & ln_timing, ln_diacfl |
---|
[9213] | 185 | NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr |
---|
[3324] | 186 | !!---------------------------------------------------------------------- |
---|
[5407] | 187 | ! |
---|
[7646] | 188 | cltxt = '' |
---|
| 189 | cltxt2 = '' |
---|
| 190 | clnam = '' |
---|
| 191 | cxios_context = 'nemo' |
---|
[3324] | 192 | ! |
---|
[4147] | 193 | ! ! Open reference namelist and configuration namelist files |
---|
[5407] | 194 | IF( lk_oasis ) THEN |
---|
| 195 | CALL ctl_opn( numnam_ref, 'namelist_sas_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) |
---|
| 196 | CALL ctl_opn( numnam_cfg, 'namelist_sas_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) |
---|
| 197 | cxios_context = 'sas' |
---|
| 198 | clname = 'output.namelist_sas.dyn' |
---|
| 199 | ELSE |
---|
| 200 | CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) |
---|
| 201 | CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) |
---|
| 202 | cxios_context = 'nemo' |
---|
| 203 | clname = 'output.namelist.dyn' |
---|
| 204 | ENDIF |
---|
[3324] | 205 | ! |
---|
[9213] | 206 | REWIND( numnam_ref ) ! Namelist namctl in reference namelist |
---|
[4147] | 207 | READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) |
---|
[9169] | 208 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) |
---|
[7646] | 209 | REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist |
---|
[4147] | 210 | READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) |
---|
[9169] | 211 | 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) |
---|
[3324] | 212 | ! |
---|
[9213] | 213 | REWIND( numnam_ref ) ! Namelist namcfg in reference namelist |
---|
[4147] | 214 | READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) |
---|
[9169] | 215 | 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) |
---|
[9213] | 216 | REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist |
---|
[4147] | 217 | READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) |
---|
[9169] | 218 | 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) |
---|
[4290] | 219 | |
---|
[7646] | 220 | ! !--------------------------! |
---|
| 221 | ! ! Set global domain size ! (control print return in cltxt2) |
---|
| 222 | ! !--------------------------! |
---|
| 223 | IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file |
---|
| 224 | CALL domain_cfg ( cltxt2, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) |
---|
| 225 | ! |
---|
| 226 | ELSE ! user-defined namelist |
---|
| 227 | CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) |
---|
| 228 | ENDIF |
---|
| 229 | ! |
---|
| 230 | ! |
---|
[3324] | 231 | ! !--------------------------------------------! |
---|
| 232 | ! ! set communicator & select the local node ! |
---|
[4624] | 233 | ! ! NB: mynode also opens output.namelist.dyn ! |
---|
| 234 | ! ! on unit number numond on first proc ! |
---|
[3324] | 235 | ! !--------------------------------------------! |
---|
| 236 | #if defined key_iomput |
---|
| 237 | IF( Agrif_Root() ) THEN |
---|
[5407] | 238 | IF( lk_oasis ) THEN |
---|
| 239 | CALL cpl_init( "sas", ilocal_comm ) ! nemo local communicator given by oasis |
---|
| 240 | CALL xios_initialize( "not used",local_comm=ilocal_comm ) ! send nemo communicator to xios |
---|
| 241 | ELSE |
---|
[7646] | 242 | CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) ! nemo local communicator given by xios |
---|
[5407] | 243 | ENDIF |
---|
[3324] | 244 | ENDIF |
---|
[5407] | 245 | narea = mynode ( cltxt, clname, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection |
---|
[3324] | 246 | #else |
---|
[5407] | 247 | IF( lk_oasis ) THEN |
---|
| 248 | IF( Agrif_Root() ) THEN |
---|
| 249 | CALL cpl_init( "sas", ilocal_comm ) ! nemo local communicator given by oasis |
---|
| 250 | ENDIF |
---|
| 251 | narea = mynode( cltxt, clname, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) |
---|
| 252 | ELSE |
---|
| 253 | ilocal_comm = 0 |
---|
| 254 | narea = mynode( cltxt, clname, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) |
---|
| 255 | ENDIF |
---|
[3324] | 256 | #endif |
---|
[7646] | 257 | |
---|
[3324] | 258 | narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) |
---|
| 259 | |
---|
[4624] | 260 | lwm = (narea == 1) ! control of output namelists |
---|
[3324] | 261 | lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print |
---|
| 262 | |
---|
[7646] | 263 | IF(lwm) THEN ! write merged namelists from earlier to output namelist |
---|
| 264 | ! ! now that the file has been opened in call to mynode. |
---|
| 265 | ! ! NB: nammpp has already been written in mynode (if lk_mpp_mpi) |
---|
[4624] | 266 | WRITE( numond, namctl ) |
---|
| 267 | WRITE( numond, namcfg ) |
---|
[7646] | 268 | IF( .NOT.ln_read_cfg ) THEN |
---|
| 269 | DO ji = 1, SIZE(clnam) |
---|
| 270 | IF( TRIM(clnam(ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print |
---|
| 271 | END DO |
---|
| 272 | ENDIF |
---|
[4624] | 273 | ENDIF |
---|
| 274 | |
---|
[7646] | 275 | ! If dimensions of processor grid weren't specified in the namelist file |
---|
[3324] | 276 | ! then we calculate them here now that we have our communicator size |
---|
[7646] | 277 | IF( jpni < 1 .OR. jpnj < 1 ) THEN |
---|
[3324] | 278 | #if defined key_mpp_mpi |
---|
[7646] | 279 | IF( Agrif_Root() ) CALL nemo_partition( mppsize ) |
---|
[3324] | 280 | #else |
---|
| 281 | jpni = 1 |
---|
| 282 | jpnj = 1 |
---|
| 283 | jpnij = jpni*jpnj |
---|
| 284 | #endif |
---|
[7646] | 285 | ENDIF |
---|
[9019] | 286 | ! |
---|
| 287 | #if defined key_agrif |
---|
| 288 | IF( .NOT. Agrif_Root() ) THEN ! AGRIF children: specific setting (cf. agrif_user.F90) |
---|
| 289 | jpiglo = nbcellsx + 2 + 2*nbghostcells |
---|
| 290 | jpjglo = nbcellsy + 2 + 2*nbghostcells |
---|
| 291 | jpi = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls |
---|
| 292 | jpj = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls |
---|
| 293 | jpimax = jpi |
---|
| 294 | jpjmax = jpj |
---|
| 295 | nperio = 0 |
---|
| 296 | jperio = 0 |
---|
| 297 | ln_use_jattr = .false. |
---|
| 298 | ENDIF |
---|
| 299 | #endif |
---|
[3324] | 300 | |
---|
[7646] | 301 | IF( Agrif_Root() ) THEN ! AGRIF mother: specific setting from jpni and jpnj |
---|
[9019] | 302 | iiarea = 1 + MOD( narea - 1 , jpni ) |
---|
| 303 | ijarea = 1 + ( narea - 1 ) / jpni |
---|
| 304 | iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) |
---|
| 305 | ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) |
---|
[3324] | 306 | #if defined key_nemocice_decomp |
---|
[9019] | 307 | jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. |
---|
| 308 | jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. |
---|
| 309 | jpimax = jpi |
---|
| 310 | jpjmax = jpj |
---|
| 311 | IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) |
---|
| 312 | IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) |
---|
[3324] | 313 | #else |
---|
[9019] | 314 | jpi = ( jpiglo -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. |
---|
| 315 | jpj = ( jpjglo -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. |
---|
| 316 | jpimax = jpi |
---|
| 317 | jpjmax = jpj |
---|
| 318 | IF( iiarea > iirest ) jpi = jpi - 1 |
---|
| 319 | IF( ijarea > ijrest ) jpj = jpj - 1 |
---|
[3324] | 320 | #endif |
---|
[5407] | 321 | ENDIF |
---|
[3324] | 322 | |
---|
[9019] | 323 | jpk = jpkglo ! third dim |
---|
| 324 | |
---|
[7646] | 325 | #if defined key_agrif |
---|
| 326 | ! simple trick to use same vertical grid as parent but different number of levels: |
---|
| 327 | ! Save maximum number of levels in jpkglo, then define all vertical grids with this number. |
---|
| 328 | ! Suppress once vertical online interpolation is ok |
---|
| 329 | IF(.NOT.Agrif_Root()) jpkglo = Agrif_Parent( jpkglo ) |
---|
| 330 | #endif |
---|
| 331 | jpim1 = jpi-1 ! inner domain indices |
---|
| 332 | jpjm1 = jpj-1 ! " " |
---|
[7761] | 333 | jpkm1 = MAX( 1, jpk-1 ) ! " " |
---|
[7646] | 334 | jpij = jpi*jpj ! jpi x j |
---|
| 335 | |
---|
[3324] | 336 | IF(lwp) THEN ! open listing units |
---|
| 337 | ! |
---|
[9213] | 338 | IF( lk_oasis ) THEN ; CALL ctl_opn( numout, 'sas.output', 'REPLACE','FORMATTED','SEQUENTIAL', -1, 6, .FALSE., narea ) |
---|
| 339 | ELSE ; CALL ctl_opn( numout, 'ocean.output', 'REPLACE','FORMATTED','SEQUENTIAL', -1, 6, .FALSE., narea ) |
---|
[5407] | 340 | ENDIF |
---|
[3324] | 341 | ! |
---|
| 342 | WRITE(numout,*) |
---|
| 343 | WRITE(numout,*) ' CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV - CMCC' |
---|
| 344 | WRITE(numout,*) ' NEMO team' |
---|
| 345 | WRITE(numout,*) ' Ocean General Circulation Model' |
---|
[9213] | 346 | WRITE(numout,*) ' NEMO version 4.0 (2017) ' |
---|
[3331] | 347 | WRITE(numout,*) ' StandAlone Surface version (SAS) ' |
---|
[3324] | 348 | WRITE(numout,*) |
---|
| 349 | WRITE(numout,*) |
---|
[7646] | 350 | DO ji = 1, SIZE(cltxt) |
---|
| 351 | IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) cltxt(ji) ! control print of mynode |
---|
[3324] | 352 | END DO |
---|
[7646] | 353 | WRITE(numout,*) |
---|
| 354 | WRITE(numout,*) |
---|
| 355 | DO ji = 1, SIZE(cltxt2) |
---|
| 356 | IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) cltxt2(ji) ! control print of domain size |
---|
| 357 | END DO |
---|
[3324] | 358 | ! |
---|
[7646] | 359 | WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
| 360 | ! |
---|
[3324] | 361 | ENDIF |
---|
| 362 | |
---|
[7646] | 363 | ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays |
---|
[3324] | 364 | CALL nemo_alloc() |
---|
[9213] | 365 | |
---|
[3324] | 366 | ! !-------------------------------! |
---|
| 367 | ! ! NEMO general initialization ! |
---|
| 368 | ! !-------------------------------! |
---|
| 369 | |
---|
[7646] | 370 | CALL nemo_ctl ! Control prints |
---|
[3324] | 371 | |
---|
| 372 | ! ! Domain decomposition |
---|
[9213] | 373 | CALL mpp_init ! MPP |
---|
| 374 | IF( ln_nnogather ) CALL nemo_nfdcom ! northfold neighbour lists |
---|
[3324] | 375 | ! |
---|
| 376 | ! |
---|
[9213] | 377 | ! ! General initialization |
---|
| 378 | IF( ln_timing ) CALL timing_init ! timing |
---|
| 379 | IF( ln_timing ) CALL timing_start( 'nemo_init') |
---|
[3324] | 380 | |
---|
[9213] | 381 | CALL phy_cst ! Physical constants |
---|
| 382 | CALL eos_init ! Equation of seawater |
---|
| 383 | CALL dom_init ! Domain |
---|
| 384 | IF( ln_ctl ) CALL prt_ctl_init ! Print control |
---|
| 385 | |
---|
| 386 | CALL day_init ! model calendar (using both namelist and restart infos) |
---|
| 387 | IF( ln_rstart ) CALL rst_read_open |
---|
[3324] | 388 | |
---|
[9213] | 389 | ! ! external forcing |
---|
| 390 | CALL sbc_init ! Forcings : surface module |
---|
[3324] | 391 | |
---|
[9019] | 392 | ! ==> clem: open boundaries init. is mandatory for sea-ice because ice BDY is not decoupled from |
---|
[5510] | 393 | ! the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules. |
---|
| 394 | ! This is not clean and should be changed in the future. |
---|
[9019] | 395 | CALL bdy_init |
---|
[5510] | 396 | ! ==> |
---|
[9019] | 397 | CALL icb_init( rdt, nit000) ! initialise icebergs instance |
---|
[3324] | 398 | ! |
---|
[9213] | 399 | IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
| 400 | ! |
---|
| 401 | IF( ln_timing ) CALL timing_stop( 'nemo_init') |
---|
| 402 | ! |
---|
[3324] | 403 | END SUBROUTINE nemo_init |
---|
| 404 | |
---|
| 405 | |
---|
| 406 | SUBROUTINE nemo_ctl |
---|
| 407 | !!---------------------------------------------------------------------- |
---|
| 408 | !! *** ROUTINE nemo_ctl *** |
---|
| 409 | !! |
---|
[9213] | 410 | !! ** Purpose : control print setting |
---|
[3324] | 411 | !! |
---|
| 412 | !! ** Method : - print namctl information and check some consistencies |
---|
| 413 | !!---------------------------------------------------------------------- |
---|
| 414 | ! |
---|
| 415 | IF(lwp) THEN ! control print |
---|
| 416 | WRITE(numout,*) |
---|
[7646] | 417 | WRITE(numout,*) 'nemo_ctl: Control prints' |
---|
[9213] | 418 | WRITE(numout,*) '~~~~~~~~' |
---|
[3324] | 419 | WRITE(numout,*) ' Namelist namctl' |
---|
| 420 | WRITE(numout,*) ' run control (for debugging) ln_ctl = ', ln_ctl |
---|
| 421 | WRITE(numout,*) ' level of print nn_print = ', nn_print |
---|
| 422 | WRITE(numout,*) ' Start i indice for SUM control nn_ictls = ', nn_ictls |
---|
| 423 | WRITE(numout,*) ' End i indice for SUM control nn_ictle = ', nn_ictle |
---|
| 424 | WRITE(numout,*) ' Start j indice for SUM control nn_jctls = ', nn_jctls |
---|
| 425 | WRITE(numout,*) ' End j indice for SUM control nn_jctle = ', nn_jctle |
---|
| 426 | WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt |
---|
| 427 | WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt |
---|
[9019] | 428 | WRITE(numout,*) ' timing by routine ln_timing = ', ln_timing |
---|
| 429 | WRITE(numout,*) ' CFL diagnostics ln_diacfl = ', ln_diacfl |
---|
[3324] | 430 | ENDIF |
---|
| 431 | ! |
---|
| 432 | nprint = nn_print ! convert DOCTOR namelist names into OLD names |
---|
| 433 | nictls = nn_ictls |
---|
| 434 | nictle = nn_ictle |
---|
| 435 | njctls = nn_jctls |
---|
| 436 | njctle = nn_jctle |
---|
| 437 | isplt = nn_isplt |
---|
| 438 | jsplt = nn_jsplt |
---|
[4147] | 439 | |
---|
| 440 | IF(lwp) THEN ! control print |
---|
| 441 | WRITE(numout,*) |
---|
| 442 | WRITE(numout,*) ' Namelist namcfg' |
---|
[9213] | 443 | WRITE(numout,*) ' read domain configuration file ln_read_cfg = ', ln_read_cfg |
---|
[7646] | 444 | WRITE(numout,*) ' filename to be read cn_domcfg = ', TRIM(cn_domcfg) |
---|
[9213] | 445 | WRITE(numout,*) ' keep closed seas in the domain (if exist) ln_closea = ', ln_closea |
---|
| 446 | WRITE(numout,*) ' create a configuration definition file ln_write_cfg = ', ln_write_cfg |
---|
[7646] | 447 | WRITE(numout,*) ' filename to be written cn_domcfg_out = ', TRIM(cn_domcfg_out) |
---|
| 448 | WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr |
---|
[4147] | 449 | ENDIF |
---|
[9213] | 450 | IF( .NOT.ln_read_cfg ) ln_closea = .false. ! dealing possible only with a domcfg file |
---|
| 451 | ! |
---|
[3324] | 452 | ! ! Parameter control |
---|
| 453 | ! |
---|
| 454 | IF( ln_ctl ) THEN ! sub-domain area indices for the control prints |
---|
| 455 | IF( lk_mpp .AND. jpnij > 1 ) THEN |
---|
| 456 | isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split domain |
---|
| 457 | ELSE |
---|
| 458 | IF( isplt == 1 .AND. jsplt == 1 ) THEN |
---|
| 459 | CALL ctl_warn( ' - isplt & jsplt are equal to 1', & |
---|
| 460 | & ' - the print control will be done over the whole domain' ) |
---|
| 461 | ENDIF |
---|
| 462 | ijsplt = isplt * jsplt ! total number of processors ijsplt |
---|
| 463 | ENDIF |
---|
| 464 | IF(lwp) WRITE(numout,*)' - The total number of processors over which the' |
---|
| 465 | IF(lwp) WRITE(numout,*)' print control will be done is ijsplt : ', ijsplt |
---|
| 466 | ! |
---|
| 467 | ! ! indices used for the SUM control |
---|
| 468 | IF( nictls+nictle+njctls+njctle == 0 ) THEN ! print control done over the default area |
---|
[7646] | 469 | lsp_area = .FALSE. |
---|
[3324] | 470 | ELSE ! print control done over a specific area |
---|
| 471 | lsp_area = .TRUE. |
---|
| 472 | IF( nictls < 1 .OR. nictls > jpiglo ) THEN |
---|
| 473 | CALL ctl_warn( ' - nictls must be 1<=nictls>=jpiglo, it is forced to 1' ) |
---|
| 474 | nictls = 1 |
---|
| 475 | ENDIF |
---|
| 476 | IF( nictle < 1 .OR. nictle > jpiglo ) THEN |
---|
| 477 | CALL ctl_warn( ' - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' ) |
---|
| 478 | nictle = jpiglo |
---|
| 479 | ENDIF |
---|
| 480 | IF( njctls < 1 .OR. njctls > jpjglo ) THEN |
---|
| 481 | CALL ctl_warn( ' - njctls must be 1<=njctls>=jpjglo, it is forced to 1' ) |
---|
| 482 | njctls = 1 |
---|
| 483 | ENDIF |
---|
| 484 | IF( njctle < 1 .OR. njctle > jpjglo ) THEN |
---|
| 485 | CALL ctl_warn( ' - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' ) |
---|
| 486 | njctle = jpjglo |
---|
| 487 | ENDIF |
---|
| 488 | ENDIF |
---|
| 489 | ENDIF |
---|
| 490 | ! |
---|
[9213] | 491 | IF( 1._wp /= SIGN(1._wp,-0._wp) ) CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows f2003 standard.', & |
---|
| 492 | & 'Compile with key_nosignedzero enabled' ) |
---|
[5407] | 493 | ! |
---|
[9213] | 494 | #if defined key_agrif |
---|
| 495 | IF( ln_timing ) CALL ctl_stop( 'AGRIF not implemented with ln_timing = true') |
---|
| 496 | #endif |
---|
| 497 | ! |
---|
[3324] | 498 | END SUBROUTINE nemo_ctl |
---|
| 499 | |
---|
| 500 | |
---|
| 501 | SUBROUTINE nemo_closefile |
---|
| 502 | !!---------------------------------------------------------------------- |
---|
| 503 | !! *** ROUTINE nemo_closefile *** |
---|
| 504 | !! |
---|
| 505 | !! ** Purpose : Close the files |
---|
| 506 | !!---------------------------------------------------------------------- |
---|
| 507 | ! |
---|
| 508 | IF( lk_mpp ) CALL mppsync |
---|
| 509 | ! |
---|
| 510 | CALL iom_close ! close all input/output files managed by iom_* |
---|
| 511 | ! |
---|
[9213] | 512 | IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file |
---|
[9267] | 513 | IF( numrun /= -1 ) CLOSE( numrun ) ! run statistics file |
---|
[4147] | 514 | IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist |
---|
| 515 | IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist |
---|
[4624] | 516 | IF( lwm.AND.numond /= -1 ) CLOSE( numond ) ! oce output namelist |
---|
[4147] | 517 | IF( numnam_ice_ref /= -1 ) CLOSE( numnam_ice_ref ) ! ice reference namelist |
---|
| 518 | IF( numnam_ice_cfg /= -1 ) CLOSE( numnam_ice_cfg ) ! ice configuration namelist |
---|
[4624] | 519 | IF( lwm.AND.numoni /= -1 ) CLOSE( numoni ) ! ice output namelist |
---|
[9213] | 520 | IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) |
---|
| 521 | IF( numout /= 6 ) CLOSE( numout ) ! standard model output file |
---|
[3324] | 522 | ! |
---|
| 523 | numout = 6 ! redefine numout in case it is used after this point... |
---|
| 524 | ! |
---|
| 525 | END SUBROUTINE nemo_closefile |
---|
| 526 | |
---|
| 527 | |
---|
| 528 | SUBROUTINE nemo_alloc |
---|
| 529 | !!---------------------------------------------------------------------- |
---|
| 530 | !! *** ROUTINE nemo_alloc *** |
---|
| 531 | !! |
---|
| 532 | !! ** Purpose : Allocate all the dynamic arrays of the OPA modules |
---|
| 533 | !! |
---|
| 534 | !! ** Method : |
---|
| 535 | !!---------------------------------------------------------------------- |
---|
[9213] | 536 | USE diawri , ONLY : dia_wri_alloc |
---|
| 537 | USE dom_oce , ONLY : dom_oce_alloc |
---|
| 538 | USE bdy_oce , ONLY : ln_bdy, bdy_oce_alloc |
---|
[9019] | 539 | USE oce ! mandatory for sea-ice because needed for bdy arrays |
---|
[3324] | 540 | ! |
---|
[7646] | 541 | INTEGER :: ierr |
---|
[3324] | 542 | !!---------------------------------------------------------------------- |
---|
| 543 | ! |
---|
[9213] | 544 | ierr = dia_wri_alloc() |
---|
| 545 | ierr = ierr + dom_oce_alloc() ! ocean domain |
---|
| 546 | ierr = ierr + oce_alloc () ! (tsn...) needed for agrif and/or ESIM and bdy |
---|
| 547 | ierr = ierr + bdy_oce_alloc() ! bdy masks (incl. initialization) |
---|
[3324] | 548 | ! |
---|
| 549 | IF( lk_mpp ) CALL mpp_sum( ierr ) |
---|
[9213] | 550 | IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'nemo_alloc: unable to allocate standard ocean arrays' ) |
---|
[3324] | 551 | ! |
---|
| 552 | END SUBROUTINE nemo_alloc |
---|
| 553 | |
---|
| 554 | |
---|
| 555 | SUBROUTINE nemo_partition( num_pes ) |
---|
| 556 | !!---------------------------------------------------------------------- |
---|
| 557 | !! *** ROUTINE nemo_partition *** |
---|
| 558 | !! |
---|
[9213] | 559 | !! ** Purpose : |
---|
[3324] | 560 | !! |
---|
| 561 | !! ** Method : |
---|
| 562 | !!---------------------------------------------------------------------- |
---|
[7646] | 563 | INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have |
---|
[3324] | 564 | ! |
---|
| 565 | INTEGER, PARAMETER :: nfactmax = 20 |
---|
| 566 | INTEGER :: nfact ! The no. of factors returned |
---|
| 567 | INTEGER :: ierr ! Error flag |
---|
| 568 | INTEGER :: ji |
---|
| 569 | INTEGER :: idiff, mindiff, imin ! For choosing pair of factors that are closest in value |
---|
| 570 | INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors |
---|
| 571 | !!---------------------------------------------------------------------- |
---|
[5407] | 572 | ! |
---|
[3324] | 573 | ierr = 0 |
---|
[5407] | 574 | ! |
---|
[3324] | 575 | CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) |
---|
[5407] | 576 | ! |
---|
[3324] | 577 | IF( nfact <= 1 ) THEN |
---|
| 578 | WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' |
---|
| 579 | WRITE (numout, *) ' : using grid of ',num_pes,' x 1' |
---|
| 580 | jpnj = 1 |
---|
| 581 | jpni = num_pes |
---|
| 582 | ELSE |
---|
| 583 | ! Search through factors for the pair that are closest in value |
---|
| 584 | mindiff = 1000000 |
---|
| 585 | imin = 1 |
---|
| 586 | DO ji = 1, nfact-1, 2 |
---|
| 587 | idiff = ABS( ifact(ji) - ifact(ji+1) ) |
---|
| 588 | IF( idiff < mindiff ) THEN |
---|
| 589 | mindiff = idiff |
---|
| 590 | imin = ji |
---|
| 591 | ENDIF |
---|
| 592 | END DO |
---|
| 593 | jpnj = ifact(imin) |
---|
| 594 | jpni = ifact(imin + 1) |
---|
| 595 | ENDIF |
---|
| 596 | ! |
---|
| 597 | jpnij = jpni*jpnj |
---|
| 598 | ! |
---|
| 599 | END SUBROUTINE nemo_partition |
---|
| 600 | |
---|
| 601 | |
---|
| 602 | SUBROUTINE factorise( kfax, kmaxfax, knfax, kn, kerr ) |
---|
| 603 | !!---------------------------------------------------------------------- |
---|
| 604 | !! *** ROUTINE factorise *** |
---|
| 605 | !! |
---|
| 606 | !! ** Purpose : return the prime factors of n. |
---|
[7646] | 607 | !! knfax factors are returned in array kfax which is of |
---|
[3324] | 608 | !! maximum dimension kmaxfax. |
---|
| 609 | !! ** Method : |
---|
| 610 | !!---------------------------------------------------------------------- |
---|
| 611 | INTEGER , INTENT(in ) :: kn, kmaxfax |
---|
| 612 | INTEGER , INTENT( out) :: kerr, knfax |
---|
| 613 | INTEGER, DIMENSION(kmaxfax), INTENT( out) :: kfax |
---|
| 614 | ! |
---|
| 615 | INTEGER :: ifac, jl, inu |
---|
| 616 | INTEGER, PARAMETER :: ntest = 14 |
---|
[7646] | 617 | INTEGER, DIMENSION(ntest) :: ilfax |
---|
| 618 | !!---------------------------------------------------------------------- |
---|
[5407] | 619 | ! |
---|
[3324] | 620 | ! lfax contains the set of allowed factors. |
---|
[7646] | 621 | ilfax(:) = (/(2**jl,jl=ntest,1,-1)/) |
---|
| 622 | ! |
---|
[3324] | 623 | ! Clear the error flag and initialise output vars |
---|
[7646] | 624 | kerr = 0 |
---|
| 625 | kfax = 1 |
---|
[3324] | 626 | knfax = 0 |
---|
[7646] | 627 | ! |
---|
[9213] | 628 | IF( kn /= 1 ) THEN ! Find the factors of n |
---|
| 629 | ! |
---|
[8528] | 630 | ! nu holds the unfactorised part of the number. |
---|
| 631 | ! knfax holds the number of factors found. |
---|
| 632 | ! l points to the allowed factor list. |
---|
| 633 | ! ifac holds the current factor. |
---|
[3324] | 634 | ! |
---|
[8528] | 635 | inu = kn |
---|
| 636 | knfax = 0 |
---|
| 637 | ! |
---|
| 638 | DO jl = ntest, 1, -1 |
---|
[3324] | 639 | ! |
---|
[8528] | 640 | ifac = ilfax(jl) |
---|
| 641 | IF( ifac > inu ) CYCLE |
---|
[9213] | 642 | ! |
---|
[8528] | 643 | ! Test whether the factor will divide. |
---|
[9213] | 644 | ! |
---|
[8528] | 645 | IF( MOD(inu,ifac) == 0 ) THEN |
---|
| 646 | ! |
---|
| 647 | knfax = knfax + 1 ! Add the factor to the list |
---|
| 648 | IF( knfax > kmaxfax ) THEN |
---|
| 649 | kerr = 6 |
---|
| 650 | write (*,*) 'FACTOR: insufficient space in factor array ', knfax |
---|
| 651 | return |
---|
| 652 | ENDIF |
---|
| 653 | kfax(knfax) = ifac |
---|
| 654 | ! Store the other factor that goes with this one |
---|
| 655 | knfax = knfax + 1 |
---|
| 656 | kfax(knfax) = inu / ifac |
---|
| 657 | !WRITE (*,*) 'ARPDBG, factors ',knfax-1,' & ',knfax,' are ', kfax(knfax-1),' and ',kfax(knfax) |
---|
[3324] | 658 | ENDIF |
---|
[8528] | 659 | ! |
---|
| 660 | END DO |
---|
[3324] | 661 | ! |
---|
[8528] | 662 | ENDIF |
---|
[7646] | 663 | ! |
---|
[3324] | 664 | END SUBROUTINE factorise |
---|
| 665 | |
---|
| 666 | #if defined key_mpp_mpi |
---|
[7646] | 667 | |
---|
[9213] | 668 | SUBROUTINE nemo_nfdcom |
---|
[7646] | 669 | !!---------------------------------------------------------------------- |
---|
[9213] | 670 | !! *** ROUTINE nemo_nfdcom *** |
---|
[7646] | 671 | !! ** Purpose : Setup for north fold exchanges with explicit |
---|
| 672 | !! point-to-point messaging |
---|
[4232] | 673 | !! |
---|
[7646] | 674 | !! ** Method : Initialization of the northern neighbours lists. |
---|
[3324] | 675 | !!---------------------------------------------------------------------- |
---|
[4232] | 676 | !! 1.0 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) |
---|
| 677 | !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) |
---|
[3324] | 678 | !!---------------------------------------------------------------------- |
---|
[4232] | 679 | INTEGER :: sxM, dxM, sxT, dxT, jn |
---|
| 680 | INTEGER :: njmppmax |
---|
[7646] | 681 | !!---------------------------------------------------------------------- |
---|
| 682 | ! |
---|
[4232] | 683 | njmppmax = MAXVAL( njmppt ) |
---|
[7646] | 684 | ! |
---|
[4232] | 685 | !initializes the north-fold communication variables |
---|
| 686 | isendto(:) = 0 |
---|
[7646] | 687 | nsndto = 0 |
---|
| 688 | ! |
---|
[9213] | 689 | IF ( njmpp == njmppmax ) THEN ! if I am a process in the north |
---|
| 690 | ! |
---|
| 691 | !sxM is the first point (in the global domain) needed to compute the north-fold for the current process |
---|
| 692 | sxM = jpiglo - nimppt(narea) - nlcit(narea) + 1 |
---|
| 693 | !dxM is the last point (in the global domain) needed to compute the north-fold for the current process |
---|
| 694 | dxM = jpiglo - nimppt(narea) + 2 |
---|
| 695 | ! |
---|
| 696 | ! loop over the other north-fold processes to find the processes |
---|
| 697 | ! managing the points belonging to the sxT-dxT range |
---|
| 698 | ! |
---|
| 699 | DO jn = 1, jpni |
---|
| 700 | ! |
---|
| 701 | sxT = nfiimpp(jn, jpnj) ! sxT = 1st point (in the global domain) of the jn process |
---|
| 702 | dxT = nfiimpp(jn, jpnj) + nfilcit(jn, jpnj) - 1 ! dxT = last point (in the global domain) of the jn process |
---|
| 703 | ! |
---|
| 704 | IF ( sxT < sxM .AND. sxM < dxT ) THEN |
---|
| 705 | nsndto = nsndto + 1 |
---|
| 706 | isendto(nsndto) = jn |
---|
| 707 | ELSEIF( sxM <= sxT .AND. dxM >= dxT ) THEN |
---|
| 708 | nsndto = nsndto + 1 |
---|
| 709 | isendto(nsndto) = jn |
---|
| 710 | ELSEIF( dxM < dxT .AND. sxT < dxM ) THEN |
---|
| 711 | nsndto = nsndto + 1 |
---|
| 712 | isendto(nsndto) = jn |
---|
| 713 | ENDIF |
---|
| 714 | ! |
---|
| 715 | END DO |
---|
| 716 | nfsloop = 1 |
---|
| 717 | nfeloop = nlci |
---|
| 718 | DO jn = 2,jpni-1 |
---|
| 719 | IF( nfipproc(jn,jpnj) == (narea - 1) ) THEN |
---|
| 720 | IF( nfipproc(jn-1,jpnj) == -1 ) nfsloop = nldi |
---|
| 721 | IF( nfipproc(jn+1,jpnj) == -1 ) nfeloop = nlei |
---|
| 722 | ENDIF |
---|
| 723 | END DO |
---|
| 724 | ! |
---|
[3324] | 725 | ENDIF |
---|
[4232] | 726 | l_north_nogather = .TRUE. |
---|
[9213] | 727 | ! |
---|
| 728 | END SUBROUTINE nemo_nfdcom |
---|
[3324] | 729 | |
---|
| 730 | #else |
---|
[9213] | 731 | SUBROUTINE nemo_nfdcom ! Dummy routine |
---|
| 732 | WRITE(*,*) 'nemo_nfdcom: You should not have seen this print! error?' |
---|
| 733 | END SUBROUTINE nemo_nfdcom |
---|
[3324] | 734 | #endif |
---|
[7646] | 735 | |
---|
[3324] | 736 | !!====================================================================== |
---|
| 737 | END MODULE nemogcm |
---|
[9213] | 738 | |
---|