- Timestamp:
- 2015-07-10T13:28:53+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r4982 r5581 42 42 !!---------------------------------------------------------------------- 43 43 USE step_oce ! module used in the ocean time stepping module 44 USE sbc_oce ! surface boundary condition: ocean45 44 USE cla ! cross land advection (tra_cla routine) 46 45 USE domcfg ! domain configuration (dom_cfg routine) … … 51 50 #endif 52 51 USE tideini ! tidal components initialization (tide_ini routine) 53 USE bdyini ! open boundary cond. initialization(bdy_init routine)54 USE bdydta ! open boundary cond. initialization(bdy_dta_init routine)55 USE bdytides ! open boundary cond. initialization(bdytide_init routine)52 USE bdyini ! open boundary cond. setting (bdy_init routine) 53 USE bdydta ! open boundary cond. setting (bdy_dta_init routine) 54 USE bdytides ! open boundary cond. setting (bdytide_init routine) 56 55 USE istate ! initial state setting (istate_init routine) 57 56 USE ldfdyn ! lateral viscosity setting (ldfdyn_init routine) … … 59 58 USE zdfini ! vertical physics setting (zdf_init routine) 60 59 USE phycst ! physical constant (par_cst routine) 61 USE trd mod ! momentum/tracers trends (trd_mod_init routine)60 USE trdini ! dyn/tra trends initialization (trd_init routine) 62 61 USE asminc ! assimilation increments 63 62 USE asmbkg ! writing out state trajectory … … 69 68 USE icbini ! handle bergs, initialisation 70 69 USE icbstp ! handle bergs, calving, themodynamics and transport 71 #if defined key_oasis372 70 USE cpl_oasis3 ! OASIS3 coupling 73 #elif defined key_oasis474 USE cpl_oasis4 ! OASIS4 coupling (not working)75 #endif76 71 USE c1d ! 1D configuration 77 72 USE step_c1d ! Time stepping loop for the 1D configuration … … 87 82 USE crsini ! initialise grid coarsening utility 88 83 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 84 USE sbc_oce, ONLY: lk_oasis 85 USE stopar 86 USE stopts 89 87 90 88 IMPLICIT NONE … … 121 119 !!---------------------------------------------------------------------- 122 120 ! 123 124 121 #if defined key_agrif 125 122 CALL Agrif_Init_Grids() ! AGRIF: set the meshes … … 139 136 # endif 140 137 #endif 141 142 138 ! check that all process are still there... If some process have an error, 143 139 ! they will never enter in step and other processes will wait until the end of the cpu time! … … 170 166 171 167 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 172 173 168 #if defined key_agrif 174 169 CALL stp ! AGRIF: time stepping … … 176 171 CALL stp( istp ) ! standard time stepping 177 172 #endif 178 179 173 istp = istp + 1 180 174 IF( lk_mpp ) CALL mpp_max( nstop ) … … 207 201 ! 208 202 CALL nemo_closefile 203 ! 209 204 #if defined key_iomput 210 205 CALL xios_finalize ! end mpp communications with xios 211 # if defined key_oasis3 || defined key_oasis4 212 CALL cpl_prism_finalize ! end coupling and mpp communications with OASIS 213 # endif 206 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 214 207 #else 215 # if defined key_oasis3 || defined key_oasis4 216 CALL cpl_prism_finalize! end coupling and mpp communications with OASIS217 # else 218 IF( lk_mpp ) CALL mppstop! end mpp communications219 # endif 208 IF( lk_oasis ) THEN 209 CALL cpl_finalize ! end coupling and mpp communications with OASIS 210 ELSE 211 IF( lk_mpp ) CALL mppstop ! end mpp communications 212 ENDIF 220 213 #endif 221 214 ! … … 233 226 INTEGER :: ios 234 227 CHARACTER(len=80), DIMENSION(16) :: cltxt 235 ! !236 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, &228 ! 229 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 237 230 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 238 231 & nn_bench, nn_timing 239 232 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 240 & jpizoom, jpjzoom, jperio 233 & jpizoom, jpjzoom, jperio, ln_use_jattr 241 234 !!---------------------------------------------------------------------- 242 235 ! 243 236 cltxt = '' 237 cxios_context = 'nemo' 244 238 ! 245 239 ! ! Open reference namelist and configuration namelist files … … 277 271 nperio = 0 278 272 jperio = 0 273 ln_use_jattr = .false. 279 274 ENDIF 280 275 #endif … … 287 282 #if defined key_iomput 288 283 IF( Agrif_Root() ) THEN 289 # if defined key_oasis3 || defined key_oasis4 290 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 291 CALL xios_initialize( "oceanx",local_comm=ilocal_comm ) 292 # else 293 CALL xios_initialize( "nemo",return_comm=ilocal_comm ) 294 # endif 295 ENDIF 296 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 284 IF( lk_oasis ) THEN 285 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 286 CALL xios_initialize( "not used",local_comm=ilocal_comm ) ! send nemo communicator to xios 287 ELSE 288 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) ! nemo local communicator given by xios 289 ENDIF 290 ENDIF 291 ! Nodes selection (control print return in cltxt) 292 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 297 293 #else 298 # if defined key_oasis3 || defined key_oasis4 299 IF( Agrif_Root() ) THEN 300 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 301 ENDIF 302 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) 303 # else 304 ilocal_comm = 0 305 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) 306 # endif 294 IF( lk_oasis ) THEN 295 IF( Agrif_Root() ) THEN 296 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 297 ENDIF 298 ! Nodes selection (control print return in cltxt) 299 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 300 ELSE 301 ilocal_comm = 0 302 ! Nodes selection (control print return in cltxt) 303 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop ) 304 ENDIF 307 305 #endif 308 306 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) … … 365 363 WRITE(numout,*) ' NEMO team' 366 364 WRITE(numout,*) ' Ocean General Circulation Model' 367 WRITE(numout,*) ' version 3. 4 (2011) '365 WRITE(numout,*) ' version 3.6 (2015) ' 368 366 WRITE(numout,*) 369 367 WRITE(numout,*) … … 407 405 IF( lk_tide ) CALL tide_init( nit000 ) ! Initialisation of the tidal harmonics 408 406 409 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 410 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 407 CALL sbc_init ! Forcings : surface module (clem: moved here for bdy purpose) 408 409 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 410 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 411 411 IF( lk_bdy .AND. lk_tide ) & 412 & CALL bdytide_init! Open boundaries initialisation of tidal harmonic forcing412 & CALL bdytide_init ! Open boundaries initialisation of tidal harmonic forcing 413 413 414 414 CALL dyn_nept_init ! simplified form of Neptune effect 415 416 415 ! 417 416 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 418 417 ! 419 418 ! Ocean physics 420 CALL sbc_init ! Forcings : surface module421 419 ! ! Vertical physics 422 423 420 CALL zdf_init ! namelist read 424 425 421 CALL zdf_bfr_init ! bottom friction 426 427 422 IF( lk_zdfric ) CALL zdf_ric_init ! Richardson number dependent Kz 428 423 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme … … 458 453 IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 ) CALL cla_init ! Cross Land Advection 459 454 CALL icb_init( rdt, nit000) ! initialise icebergs instance 455 CALL sto_par_init ! Stochastic parametrization 456 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 460 457 461 458 #if defined key_top … … 463 460 CALL trc_init 464 461 #endif 465 ! 466 467 ! Diagnostics 462 ! ! Diagnostics 468 463 IF( lk_floats ) CALL flo_init ! drifting Floats 469 464 IF( lk_diaar5 ) CALL dia_ar5_init ! ar5 diag … … 471 466 IF( lk_diadct ) CALL dia_dct_init ! Sections tranports 472 467 CALL dia_hsb_init ! heat content, salt content and volume budgets 473 CALL trd_mod_init ! Mixed-layer/Vorticity/Integral constraints trends468 CALL trd_init ! Mixed-layer/Vorticity/Integral constraints trends 474 469 IF( lk_diaobs ) THEN ! Observation & model comparison 475 470 CALL dia_obs_init ! Initialize observational data 476 471 CALL dia_obs( nit000 - 1 ) ! Observation operator for restart 477 472 ENDIF 473 478 474 ! ! Assimilation increments 479 475 IF( lk_asminc ) CALL asm_inc_init ! Initialize assimilation increments … … 534 530 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 535 531 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 532 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 536 533 ENDIF 537 534 ! ! Parameter control … … 673 670 !! ** Method : 674 671 !!---------------------------------------------------------------------- 675 INTEGER, INTENT(in) :: num_pes! The number of MPI processes we have672 INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have 676 673 ! 677 674 INTEGER, PARAMETER :: nfactmax = 20 … … 682 679 INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors 683 680 !!---------------------------------------------------------------------- 684 681 ! 685 682 ierr = 0 686 683 ! 687 684 CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) 688 685 ! 689 686 IF( nfact <= 1 ) THEN 690 687 WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' … … 777 774 778 775 #if defined key_mpp_mpi 776 779 777 SUBROUTINE nemo_northcomms 780 778 !!====================================================================== … … 851 849 END SUBROUTINE nemo_northcomms 852 850 #endif 851 853 852 !!====================================================================== 854 853 END MODULE nemogcm
Note: See TracChangeset
for help on using the changeset viewer.