Changeset 5837 for branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
- Timestamp:
- 2015-10-26T15:59:39+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r4645 r5837 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 … … 86 81 USE sbctide, ONLY: lk_tide 87 82 USE crsini ! initialise grid coarsening utility 88 USE lbcnfd, ONLY: isendto, nsndto ! Setup of north fold exchanges 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! … … 166 162 167 163 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 168 169 164 #if defined key_agrif 170 165 CALL Agrif_Step( stp ) ! AGRIF: time stepping … … 172 167 CALL stp( istp ) ! standard time stepping 173 168 #endif 174 175 169 istp = istp + 1 176 170 IF( lk_mpp ) CALL mpp_max( nstop ) … … 201 195 ! 202 196 CALL nemo_closefile 197 ! 203 198 #if defined key_iomput 204 199 CALL xios_finalize ! end mpp communications with xios 205 # if defined key_oasis3 || defined key_oasis4 206 CALL cpl_prism_finalize ! end coupling and mpp communications with OASIS 207 # endif 200 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 208 201 #else 209 # if defined key_oasis3 || defined key_oasis4 210 CALL cpl_prism_finalize! end coupling and mpp communications with OASIS211 # else 212 IF( lk_mpp ) CALL mppstop! end mpp communications213 # endif 202 IF( lk_oasis ) THEN 203 CALL cpl_finalize ! end coupling and mpp communications with OASIS 204 ELSE 205 IF( lk_mpp ) CALL mppstop ! end mpp communications 206 ENDIF 214 207 #endif 215 208 ! … … 227 220 INTEGER :: ios 228 221 CHARACTER(len=80), DIMENSION(16) :: cltxt 229 ! !230 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, &222 ! 223 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 231 224 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 232 225 & nn_bench, nn_timing 233 226 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 234 & jpizoom, jpjzoom, jperio 227 & jpizoom, jpjzoom, jperio, ln_use_jattr 235 228 !!---------------------------------------------------------------------- 236 229 ! 237 230 cltxt = '' 231 cxios_context = 'nemo' 238 232 ! 239 233 ! ! Open reference namelist and configuration namelist files … … 271 265 nperio = 0 272 266 jperio = 0 267 ln_use_jattr = .false. 273 268 ENDIF 274 269 #endif … … 281 276 #if defined key_iomput 282 277 IF( Agrif_Root() ) THEN 283 # if defined key_oasis3 || defined key_oasis4 284 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 285 CALL xios_initialize( "oceanx",local_comm=ilocal_comm ) 286 # else 287 CALL xios_initialize( "nemo",return_comm=ilocal_comm ) 288 # endif 289 ENDIF 290 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 278 IF( lk_oasis ) THEN 279 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 280 CALL xios_initialize( "not used",local_comm=ilocal_comm ) ! send nemo communicator to xios 281 ELSE 282 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) ! nemo local communicator given by xios 283 ENDIF 284 ENDIF 285 ! Nodes selection (control print return in cltxt) 286 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 291 287 #else 292 # if defined key_oasis3 || defined key_oasis4 293 IF( Agrif_Root() ) THEN 294 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 295 ENDIF 296 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) 297 # else 298 ilocal_comm = 0 299 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) 300 # endif 288 IF( lk_oasis ) THEN 289 IF( Agrif_Root() ) THEN 290 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 291 ENDIF 292 ! Nodes selection (control print return in cltxt) 293 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 294 ELSE 295 ilocal_comm = 0 296 ! Nodes selection (control print return in cltxt) 297 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop ) 298 ENDIF 301 299 #endif 302 300 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) … … 351 349 WRITE(numout,*) ' NEMO team' 352 350 WRITE(numout,*) ' Ocean General Circulation Model' 353 WRITE(numout,*) ' version 3. 4 (2011) '351 WRITE(numout,*) ' version 3.6 (2015) ' 354 352 WRITE(numout,*) 355 353 WRITE(numout,*) … … 393 391 IF( lk_tide ) CALL tide_init( nit000 ) ! Initialisation of the tidal harmonics 394 392 395 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 396 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 393 CALL sbc_init ! Forcings : surface module (clem: moved here for bdy purpose) 394 395 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 396 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 397 397 IF( lk_bdy .AND. lk_tide ) & 398 & CALL bdytide_init! Open boundaries initialisation of tidal harmonic forcing398 & CALL bdytide_init ! Open boundaries initialisation of tidal harmonic forcing 399 399 400 400 CALL dyn_nept_init ! simplified form of Neptune effect 401 402 401 ! 403 402 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 404 403 ! 405 404 ! Ocean physics 406 CALL sbc_init ! Forcings : surface module407 405 ! ! Vertical physics 408 409 406 CALL zdf_init ! namelist read 410 411 407 CALL zdf_bfr_init ! bottom friction 412 413 408 IF( lk_zdfric ) CALL zdf_ric_init ! Richardson number dependent Kz 414 409 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme … … 444 439 IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 ) CALL cla_init ! Cross Land Advection 445 440 CALL icb_init( rdt, nit000) ! initialise icebergs instance 441 CALL sto_par_init ! Stochastic parametrization 442 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 446 443 447 444 #if defined key_top … … 449 446 CALL trc_init 450 447 #endif 451 ! 452 453 ! Diagnostics 448 ! ! Diagnostics 454 449 IF( lk_floats ) CALL flo_init ! drifting Floats 455 450 IF( lk_diaar5 ) CALL dia_ar5_init ! ar5 diag … … 457 452 IF( lk_diadct ) CALL dia_dct_init ! Sections tranports 458 453 CALL dia_hsb_init ! heat content, salt content and volume budgets 459 CALL trd_mod_init ! Mixed-layer/Vorticity/Integral constraints trends454 CALL trd_init ! Mixed-layer/Vorticity/Integral constraints trends 460 455 IF( lk_diaobs ) THEN ! Observation & model comparison 461 456 CALL dia_obs_init ! Initialize observational data 462 457 CALL dia_obs( nit000 - 1 ) ! Observation operator for restart 463 458 ENDIF 459 464 460 ! ! Assimilation increments 465 461 IF( lk_asminc ) CALL asm_inc_init ! Initialize assimilation increments … … 520 516 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 521 517 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 518 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 522 519 ENDIF 523 520 ! ! Parameter control … … 568 565 ENDIF 569 566 ! 570 IF( lk_c1d .AND. .NOT.lk_iomput ) CALL ctl_stop( 'nemo_ctl: The 1D configuration must be used ', &571 & 'with the IOM Input/Output manager. ' , &572 & 'Compile with key_iomput enabled' )573 !574 567 IF( 1_wp /= SIGN(1._wp,-0._wp) ) CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows ', & 575 568 & 'f2003 standard. ' , & … … 663 656 !! ** Method : 664 657 !!---------------------------------------------------------------------- 665 INTEGER, INTENT(in) :: num_pes! The number of MPI processes we have658 INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have 666 659 ! 667 660 INTEGER, PARAMETER :: nfactmax = 20 … … 672 665 INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors 673 666 !!---------------------------------------------------------------------- 674 667 ! 675 668 ierr = 0 676 669 ! 677 670 CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) 678 671 ! 679 672 IF( nfact <= 1 ) THEN 680 673 WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' … … 718 711 INTEGER, PARAMETER :: ntest = 14 719 712 INTEGER :: ilfax(ntest) 720 713 ! 721 714 ! lfax contains the set of allowed factors. 722 715 data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256, & … … 769 762 770 763 #if defined key_mpp_mpi 764 771 765 SUBROUTINE nemo_northcomms 772 766 !!====================================================================== … … 803 797 !loop over the other north-fold processes to find the processes 804 798 !managing the points belonging to the sxT-dxT range 805 DO jn = jpnij - jpni +1, jpnij806 IF ( njmppt(jn) == njmppmax ) THEN799 800 DO jn = 1, jpni 807 801 !sxT is the first point (in the global domain) of the jn 808 802 !process 809 sxT = n imppt(jn)803 sxT = nfiimpp(jn, jpnj) 810 804 !dxT is the last point (in the global domain) of the jn 811 805 !process 812 dxT = n imppt(jn) + nlcit(jn) - 1806 dxT = nfiimpp(jn, jpnj) + nfilcit(jn, jpnj) - 1 813 807 IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 814 808 nsndto = nsndto + 1 815 isendto(nsndto) = jn809 isendto(nsndto) = jn 816 810 ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 817 811 nsndto = nsndto + 1 818 isendto(nsndto) = jn812 isendto(nsndto) = jn 819 813 ELSEIF ((dxM .lt. dxT) .AND. (sxT .lt. dxM)) THEN 820 814 nsndto = nsndto + 1 821 isendto(nsndto) = jn815 isendto(nsndto) = jn 822 816 END IF 823 END IF824 817 END DO 818 nfsloop = 1 819 nfeloop = nlci 820 DO jn = 2,jpni-1 821 IF(nfipproc(jn,jpnj) .eq. (narea - 1)) THEN 822 IF (nfipproc(jn - 1 ,jpnj) .eq. -1) THEN 823 nfsloop = nldi 824 ENDIF 825 IF (nfipproc(jn + 1,jpnj) .eq. -1) THEN 826 nfeloop = nlei 827 ENDIF 828 ENDIF 829 END DO 830 825 831 ENDIF 826 832 l_north_nogather = .TRUE. … … 831 837 END SUBROUTINE nemo_northcomms 832 838 #endif 839 833 840 !!====================================================================== 834 841 END MODULE nemogcm
Note: See TracChangeset
for help on using the changeset viewer.