Changeset 5260 for branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
- Timestamp:
- 2015-05-12T12:37:15+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r4756 r5260 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 exchanges83 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 89 84 USE diatmb ! Top,middle,bottom output 90 85 USE dia25h ! 25h mean output … … 123 118 !!---------------------------------------------------------------------- 124 119 ! 125 126 120 #if defined key_agrif 127 121 CALL Agrif_Init_Grids() ! AGRIF: set the meshes … … 141 135 # endif 142 136 #endif 143 144 137 ! check that all process are still there... If some process have an error, 145 138 ! they will never enter in step and other processes will wait until the end of the cpu time! … … 168 161 169 162 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 170 171 163 #if defined key_agrif 172 164 CALL Agrif_Step( stp ) ! AGRIF: time stepping … … 174 166 CALL stp( istp ) ! standard time stepping 175 167 #endif 176 177 168 istp = istp + 1 178 169 IF( lk_mpp ) CALL mpp_max( nstop ) … … 203 194 ! 204 195 CALL nemo_closefile 196 ! 205 197 #if defined key_iomput 206 198 CALL xios_finalize ! end mpp communications with xios 207 # if defined key_oasis3 || defined key_oasis4 208 CALL cpl_prism_finalize ! end coupling and mpp communications with OASIS 209 # endif 199 IF( lk_cpl ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 210 200 #else 211 # if defined key_oasis3 || defined key_oasis4 212 CALL cpl_prism_finalize! end coupling and mpp communications with OASIS213 # else 214 IF( lk_mpp ) CALL mppstop! end mpp communications215 # endif 201 IF( lk_cpl ) THEN 202 CALL cpl_finalize ! end coupling and mpp communications with OASIS 203 ELSE 204 IF( lk_mpp ) CALL mppstop ! end mpp communications 205 ENDIF 216 206 #endif 217 207 ! … … 229 219 INTEGER :: ios 230 220 CHARACTER(len=80), DIMENSION(16) :: cltxt 231 ! !232 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, &221 ! 222 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 233 223 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 234 224 & nn_bench, nn_timing 235 225 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 236 & jpizoom, jpjzoom, jperio 226 & jpizoom, jpjzoom, jperio, ln_use_jattr 237 227 !!---------------------------------------------------------------------- 238 228 ! … … 273 263 nperio = 0 274 264 jperio = 0 265 ln_use_jattr = .false. 275 266 ENDIF 276 267 #endif … … 283 274 #if defined key_iomput 284 275 IF( Agrif_Root() ) THEN 285 # if defined key_oasis3 || defined key_oasis4 286 CALL cpl_prism_init( ilocal_comm )! nemo local communicator given by oasis287 CALL xios_initialize( "oceanx",local_comm=ilocal_comm )288 # else 289 CALL xios_initialize( "nemo",return_comm=ilocal_comm )290 # endif 276 IF( lk_cpl ) THEN 277 CALL cpl_init( ilocal_comm ) ! nemo local communicator given by oasis 278 CALL xios_initialize( "oceanx",local_comm=ilocal_comm ) ! send nemo communicator to xios 279 ELSE 280 CALL xios_initialize( "nemo",return_comm=ilocal_comm ) ! nemo local communicator given by xios 281 ENDIF 291 282 ENDIF 292 283 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 293 284 #else 294 # if defined key_oasis3 || defined key_oasis4 295 IF( Agrif_Root() ) THEN296 CALL cpl_prism_init( ilocal_comm )! nemo local communicator given by oasis297 ENDIF298 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt)299 # else 300 ilocal_comm = 0301 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop )! Nodes selection (control print return in cltxt)302 # endif 285 IF( lk_cpl ) THEN 286 IF( Agrif_Root() ) THEN 287 CALL cpl_init( ilocal_comm ) ! nemo local communicator given by oasis 288 ENDIF 289 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) 290 ELSE 291 ilocal_comm = 0 292 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) 293 ENDIF 303 294 #endif 304 295 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) … … 353 344 WRITE(numout,*) ' NEMO team' 354 345 WRITE(numout,*) ' Ocean General Circulation Model' 355 WRITE(numout,*) ' version 3. 4 (2011) '346 WRITE(numout,*) ' version 3.6 (2015) ' 356 347 WRITE(numout,*) 357 348 WRITE(numout,*) … … 395 386 IF( lk_tide ) CALL tide_init( nit000 ) ! Initialisation of the tidal harmonics 396 387 397 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 398 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 388 CALL sbc_init ! Forcings : surface module (clem: moved here for bdy purpose) 389 390 IF( lk_bdy ) CALL bdy_init ! Open boundaries initialisation 391 IF( lk_bdy ) CALL bdy_dta_init ! Open boundaries initialisation of external data arrays 399 392 IF( lk_bdy .AND. lk_tide ) & 400 & CALL bdytide_init! Open boundaries initialisation of tidal harmonic forcing393 & CALL bdytide_init ! Open boundaries initialisation of tidal harmonic forcing 401 394 402 395 CALL dyn_nept_init ! simplified form of Neptune effect 403 404 396 ! 405 397 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 406 398 ! 407 399 ! Ocean physics 408 CALL sbc_init ! Forcings : surface module409 400 ! ! Vertical physics 410 411 401 CALL zdf_init ! namelist read 412 413 402 CALL zdf_bfr_init ! bottom friction 414 415 403 IF( lk_zdfric ) CALL zdf_ric_init ! Richardson number dependent Kz 416 404 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme … … 451 439 CALL trc_init 452 440 #endif 453 ! 454 455 ! Diagnostics 441 ! ! Diagnostics 456 442 IF( lk_floats ) CALL flo_init ! drifting Floats 457 443 IF( lk_diaar5 ) CALL dia_ar5_init ! ar5 diag … … 459 445 IF( lk_diadct ) CALL dia_dct_init ! Sections tranports 460 446 CALL dia_hsb_init ! heat content, salt content and volume budgets 461 CALL trd_mod_init ! Mixed-layer/Vorticity/Integral constraints trends447 CALL trd_init ! Mixed-layer/Vorticity/Integral constraints trends 462 448 IF( lk_diaobs ) THEN ! Observation & model comparison 463 449 CALL dia_obs_init ! Initialize observational data 464 450 CALL dia_obs( nit000 - 1 ) ! Observation operator for restart 465 451 ENDIF 452 466 453 ! ! Assimilation increments 467 454 IF( lk_asminc ) CALL asm_inc_init ! Initialize assimilation increments … … 525 512 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 526 513 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 514 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 527 515 ENDIF 528 516 ! ! Parameter control … … 573 561 ENDIF 574 562 ! 575 IF( lk_c1d .AND. .NOT.lk_iomput ) CALL ctl_stop( 'nemo_ctl: The 1D configuration must be used ', &576 & 'with the IOM Input/Output manager. ' , &577 & 'Compile with key_iomput enabled' )578 !579 563 IF( 1_wp /= SIGN(1._wp,-0._wp) ) CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows ', & 580 564 & 'f2003 standard. ' , & … … 628 612 USE ldftra_oce, ONLY: ldftra_oce_alloc 629 613 USE trc_oce , ONLY: trc_oce_alloc 630 USE insitu_tem, ONLY: insitu_tem_alloc614 USE diainsitutem, ONLY: insitu_tem_alloc 631 615 #if defined key_diadct 632 616 USE diadct , ONLY: diadct_alloc … … 670 654 !! ** Method : 671 655 !!---------------------------------------------------------------------- 672 INTEGER, INTENT(in) :: num_pes! The number of MPI processes we have656 INTEGER, INTENT(in) :: num_pes ! The number of MPI processes we have 673 657 ! 674 658 INTEGER, PARAMETER :: nfactmax = 20 … … 679 663 INTEGER, DIMENSION(nfactmax) :: ifact ! Array of factors 680 664 !!---------------------------------------------------------------------- 681 665 ! 682 666 ierr = 0 683 667 ! 684 668 CALL factorise( ifact, nfactmax, nfact, num_pes, ierr ) 685 669 ! 686 670 IF( nfact <= 1 ) THEN 687 671 WRITE (numout, *) 'WARNING: factorisation of number of PEs failed' … … 725 709 INTEGER, PARAMETER :: ntest = 14 726 710 INTEGER :: ilfax(ntest) 727 711 ! 728 712 ! lfax contains the set of allowed factors. 729 713 data (ilfax(jl),jl=1,ntest) / 16384, 8192, 4096, 2048, 1024, 512, 256, & … … 776 760 777 761 #if defined key_mpp_mpi 762 778 763 SUBROUTINE nemo_northcomms 779 764 !!====================================================================== … … 810 795 !loop over the other north-fold processes to find the processes 811 796 !managing the points belonging to the sxT-dxT range 812 DO jn = jpnij - jpni +1, jpnij813 IF ( njmppt(jn) == njmppmax ) THEN797 798 DO jn = 1, jpni 814 799 !sxT is the first point (in the global domain) of the jn 815 800 !process 816 sxT = n imppt(jn)801 sxT = nfiimpp(jn, jpnj) 817 802 !dxT is the last point (in the global domain) of the jn 818 803 !process 819 dxT = n imppt(jn) + nlcit(jn) - 1804 dxT = nfiimpp(jn, jpnj) + nfilcit(jn, jpnj) - 1 820 805 IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 821 806 nsndto = nsndto + 1 822 isendto(nsndto) = jn807 isendto(nsndto) = jn 823 808 ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 824 809 nsndto = nsndto + 1 825 isendto(nsndto) = jn810 isendto(nsndto) = jn 826 811 ELSEIF ((dxM .lt. dxT) .AND. (sxT .lt. dxM)) THEN 827 812 nsndto = nsndto + 1 828 isendto(nsndto) = jn813 isendto(nsndto) = jn 829 814 END IF 830 END IF831 815 END DO 816 nfsloop = 1 817 nfeloop = nlci 818 DO jn = 2,jpni-1 819 IF(nfipproc(jn,jpnj) .eq. (narea - 1)) THEN 820 IF (nfipproc(jn - 1 ,jpnj) .eq. -1) THEN 821 nfsloop = nldi 822 ENDIF 823 IF (nfipproc(jn + 1,jpnj) .eq. -1) THEN 824 nfeloop = nlei 825 ENDIF 826 ENDIF 827 END DO 828 832 829 ENDIF 833 830 l_north_nogather = .TRUE. … … 838 835 END SUBROUTINE nemo_northcomms 839 836 #endif 837 840 838 !!====================================================================== 841 839 END MODULE nemogcm
Note: See TracChangeset
for help on using the changeset viewer.