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.
Changeset 13899 for NEMO/branches/2020/tickets_icb_1900/src/OFF/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2020-11-27T17:26:33+01:00 (4 years ago)
Author:
mathiot
Message:

ticket #1900: update branch to trunk and add ICB test case

Location:
NEMO/branches/2020/tickets_icb_1900
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/tickets_icb_1900

    • Property svn:externals
      •  

        old new  
        22^/utils/build/makenemo@HEAD   makenemo 
        33^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools/@HEAD           tools 
         4^/utils/tools@HEAD            tools 
        55^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
         
        88 
        99# SETTE 
        10 ^/utils/CI/sette@12931        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/tickets_icb_1900/src/OFF/nemogcm.F90

    r13237 r13899  
    3131   USE domqco         ! tools for scale factor         (dom_qco_r3c  routine) 
    3232#endif 
    33    USE bdy_oce,  ONLY : ln_bdy 
    34    USE bdyini         ! open boundary cond. setting       (bdy_init routine) 
     33   USE bdyini         ! open boundary cond. setting        (bdy_init routine) 
    3534   !              ! ocean physics 
    3635   USE ldftra         ! lateral diffusivity setting    (ldf_tra_init routine) 
     
    4140   USE sbcmod         ! surface boundary condition     (sbc_init     routine) 
    4241   USE phycst         ! physical constant                   (par_cst routine) 
     42   USE zdfphy         ! vertical physics manager       (zdf_phy_init routine) 
    4343   USE dtadyn         ! Lecture and Interpolation of the dynamical fields 
    4444   USE trcini         ! Initilization of the passive tracers 
     
    5050   USE trcnam         ! passive tracer : namelist 
    5151   USE trcrst         ! passive tracer restart 
    52    USE diaptr         ! Need to initialise this as some variables are used in if statements later 
    5352   USE sbc_oce , ONLY : ln_rnf 
    5453   USE sbcrnf         ! surface boundary condition : runoffs 
     
    6463   USE timing         ! Timing 
    6564   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    66    USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges 
     65   USE lbcnfd  , ONLY : isendto, nsndto   ! Setup of north fold exchanges 
    6766   USE step, ONLY : Nbb, Nnn, Naa, Nrhs   ! time level indices 
     67   USE halo_mng 
    6868 
    6969   IMPLICIT NONE 
     
    7373 
    7474   CHARACTER (len=64) ::   cform_aaa="( /, 'AAAAAAAA', / ) "   ! flag for output listing 
     75#if defined key_mpp_mpi 
     76   ! need MPI_Wtime 
     77   INCLUDE 'mpif.h' 
     78#endif 
    7579 
    7680   !!---------------------------------------------------------------------- 
     
    96100      !!---------------------------------------------------------------------- 
    97101      INTEGER :: istp       ! time step index 
     102      REAL(wp)::   zstptiming   ! elapsed time for 1 time step 
    98103      !!---------------------------------------------------------------------- 
    99104 
     
    114119      !  
    115120      DO WHILE ( istp <= nitend .AND. nstop == 0 )    !==  OFF time-stepping  ==! 
     121 
     122         IF( ln_timing ) THEN 
     123            zstptiming = MPI_Wtime() 
     124            IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming 
     125            IF ( istp ==         nitend ) elapsed_time = zstptiming - elapsed_time 
     126         ENDIF 
    116127         ! 
    117128         IF( istp /= nit000 )   CALL day        ( istp )         ! Calendar (day was already called at nit000 in day_init) 
     
    147158#endif 
    148159#endif          
    149                                 CALL stp_ctl    ( istp )             ! Time loop: control and print 
     160         CALL stp_ctl    ( istp )             ! Time loop: control and print 
    150161         istp = istp + 1 
     162 
     163         IF( lwp .AND. ln_timing )   WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming 
     164 
    151165      END DO 
    152166      ! 
     
    193207      INTEGER ::   ios, ilocal_comm   ! local integers 
    194208      !! 
    195       NAMELIST/namctl/ sn_cfctl, nn_print, nn_ictls, nn_ictle,              & 
    196          &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,             & 
    197          &             ln_timing, ln_diacfl 
     209      NAMELIST/namctl/ sn_cfctl, ln_timing, ln_diacfl,                                & 
     210         &             nn_isplt,  nn_jsplt,  nn_ictls, nn_ictle, nn_jctls, nn_jctle 
    198211      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr 
    199212      !!---------------------------------------------------------------------- 
    200213      ! 
    201214      cxios_context = 'nemo' 
     215      nn_hls = 1 
    202216      ! 
    203217      !                             !-------------------------------------------------! 
     
    292306      ! 
    293307      IF( ln_read_cfg ) THEN              ! Read sizes in domain configuration file 
    294          CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     308         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
    295309      ELSE                                ! user-defined namelist 
    296          CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     310         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
    297311      ENDIF 
    298312      ! 
     
    306320      CALL mpp_init 
    307321 
     322      CALL halo_mng_init() 
    308323      ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 
    309324      CALL nemo_alloc() 
     
    332347 
    333348                           CALL     sbc_init( Nbb, Nnn, Naa )    ! Forcings : surface module 
    334                            CALL     bdy_init    ! Open boundaries initialisation     
     349                           CALL     bdy_init    ! Open boundaries initialisation 
     350                            
     351                           CALL zdf_phy_init( Nnn )    ! Vertical physics 
    335352 
    336353      !                                      ! Tracer physics 
    337354                           CALL ldf_tra_init    ! Lateral ocean tracer physics 
    338                            CALL ldf_eiv_init    ! Eddy induced velocity param 
     355                           CALL ldf_eiv_init    ! Eddy induced velocity param. must be done after ldf_tra_init 
    339356                           CALL tra_ldf_init    ! lateral mixing 
    340357      IF( l_ldfslp     )   CALL ldf_slp_init    ! slope of lateral mixing 
     
    350367                           CALL dta_dyn_init( Nbb, Nnn, Naa )        ! Initialization for the dynamics 
    351368#endif 
    352  
    353369                           CALL     trc_init( Nbb, Nnn, Naa )        ! Passive tracers initialization 
    354                            CALL dia_ptr_init   ! Poleward TRansports initialization 
    355370                            
    356371      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA 
     
    386401         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
    387402         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr  
    388          WRITE(numout,*) '      level of print                  nn_print   = ', nn_print 
    389          WRITE(numout,*) '      Start i indice for SUM control  nn_ictls   = ', nn_ictls 
    390          WRITE(numout,*) '      End i indice for SUM control    nn_ictle   = ', nn_ictle 
    391          WRITE(numout,*) '      Start j indice for SUM control  nn_jctls   = ', nn_jctls 
    392          WRITE(numout,*) '      End j indice for SUM control    nn_jctle   = ', nn_jctle 
    393          WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt 
    394          WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt 
    395403         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
    396404         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
    397405      ENDIF 
    398       ! 
    399       nprint    = nn_print          ! convert DOCTOR namelist names into OLD names 
    400       nictls    = nn_ictls 
    401       nictle    = nn_ictle 
    402       njctls    = nn_jctls 
    403       njctle    = nn_jctle 
    404       isplt     = nn_isplt 
    405       jsplt     = nn_jsplt 
    406  
     406 
     407      IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file 
    407408      IF(lwp) THEN                  ! control print 
    408409         WRITE(numout,*) 
     
    414415         WRITE(numout,*) '         filename to be written                      cn_domcfg_out = ', TRIM(cn_domcfg_out) 
    415416         WRITE(numout,*) '      use file attribute if exists as i/p j-start ln_use_jattr     = ', ln_use_jattr 
    416       ENDIF 
    417       IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file 
    418       ! 
    419       !                             ! Parameter control 
    420       ! 
    421       IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN              ! sub-domain area indices for the control prints 
    422          IF( lk_mpp .AND. jpnij > 1 ) THEN 
    423             isplt = jpni   ;   jsplt = jpnj   ;   ijsplt = jpni*jpnj   ! the domain is forced to the real split domain 
    424          ELSE 
    425             IF( isplt == 1 .AND. jsplt == 1  ) THEN 
    426                CALL ctl_warn( ' - isplt & jsplt are equal to 1',   & 
    427                   &           ' - the print control will be done over the whole domain' ) 
    428             ENDIF 
    429             ijsplt = isplt * jsplt            ! total number of processors ijsplt 
    430          ENDIF 
    431          IF(lwp) WRITE(numout,*)'          - The total number of processors over which the' 
    432          IF(lwp) WRITE(numout,*)'            print control will be done is ijsplt : ', ijsplt 
    433          ! 
    434          !                              ! indices used for the SUM control 
    435          IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area 
    436             lsp_area = .FALSE. 
    437          ELSE                                             ! print control done over a specific  area 
    438             lsp_area = .TRUE. 
    439             IF( nictls < 1 .OR. nictls > jpiglo )   THEN 
    440                CALL ctl_warn( '          - nictls must be 1<=nictls>=jpiglo, it is forced to 1' ) 
    441                nictls = 1 
    442             ENDIF 
    443             IF( nictle < 1 .OR. nictle > jpiglo )   THEN 
    444                CALL ctl_warn( '          - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' ) 
    445                nictle = jpiglo 
    446             ENDIF 
    447             IF( njctls < 1 .OR. njctls > jpjglo )   THEN 
    448                CALL ctl_warn( '          - njctls must be 1<=njctls>=jpjglo, it is forced to 1' ) 
    449                njctls = 1 
    450             ENDIF 
    451             IF( njctle < 1 .OR. njctle > jpjglo )   THEN 
    452                CALL ctl_warn( '          - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' ) 
    453                njctle = jpjglo 
    454             ENDIF 
    455          ENDIF 
    456417      ENDIF 
    457418      ! 
Note: See TracChangeset for help on using the changeset viewer.