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 13286 for NEMO/trunk/src/OFF – NEMO

Changeset 13286 for NEMO/trunk/src/OFF


Ignore:
Timestamp:
2020-07-09T17:48:29+02:00 (4 years ago)
Author:
smasson
Message:

trunk: merge extra halos branch in trunk, see #2366

Location:
NEMO/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • 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/r12931_sette_ticket2366@HEAD  sette 
  • NEMO/trunk/src/OFF/dtadyn.F90

    r13237 r13286  
    7171   INTEGER  , SAVE      ::   jf_uwd         ! index of u-transport 
    7272   INTEGER  , SAVE      ::   jf_vwd         ! index of v-transport 
    73    INTEGER  , SAVE      ::   jf_wwd         ! index of v-transport 
     73   INTEGER  , SAVE      ::   jf_wwd         ! index of w-transport 
    7474   INTEGER  , SAVE      ::   jf_avt         ! index of Kz 
    7575   INTEGER  , SAVE      ::   jf_mld         ! index of mixed layer deptht 
     
    128128      ! 
    129129      IF( kt == nit000 ) THEN    ;    nprevrec = 0 
    130       ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec_a(2) 
     130      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) 
    131131      ENDIF 
    132132      CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==! 
     
    294294      !                                         ! fill sf with slf_i and control print 
    295295      CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', 'namdta_dyn' ) 
     296      sf_dyn(jf_uwd)%cltype = 'U'   ;   sf_dyn(jf_uwd)%zsgn = -1._wp   
     297      sf_dyn(jf_vwd)%cltype = 'V'   ;   sf_dyn(jf_vwd)%zsgn = -1._wp   
     298      sf_dyn(jf_ubl)%cltype = 'U'   ;   sf_dyn(jf_ubl)%zsgn =  1._wp   
     299      sf_dyn(jf_vbl)%cltype = 'V'   ;   sf_dyn(jf_vbl)%zsgn =  1._wp   
    296300      ! 
    297301      ! Open file for each variable to get his number of dimension 
     
    330334           iom_varid( numrtr, 'sshn', ldstop = .FALSE. ) > 0 ) THEN 
    331335           IF(lwp) WRITE(numout,*) ' ssh(:,:,Kmm) forcing fields read in the restart file for initialisation' 
    332            CALL iom_get( numrtr, jpdom_autoglo, 'sshn', ssh(:,:,Kmm)   ) 
    333            CALL iom_get( numrtr, jpdom_autoglo, 'sshb', ssh(:,:,Kbb)   ) 
     336           CALL iom_get( numrtr, jpdom_auto, 'sshn', ssh(:,:,Kmm)   ) 
     337           CALL iom_get( numrtr, jpdom_auto, 'sshb', ssh(:,:,Kbb)   ) 
    334338        ELSE 
    335339           IF(lwp) WRITE(numout,*) ' ssh(:,:,Kmm) forcing fields read in the restart file for initialisation' 
    336340           CALL iom_open( 'restart', inum ) 
    337            CALL iom_get( inum, jpdom_autoglo, 'sshn', ssh(:,:,Kmm)   ) 
    338            CALL iom_get( inum, jpdom_autoglo, 'sshb', ssh(:,:,Kbb)   ) 
     341           CALL iom_get( inum, jpdom_auto, 'sshn', ssh(:,:,Kmm)   ) 
     342           CALL iom_get( inum, jpdom_auto, 'sshb', ssh(:,:,Kbb)   ) 
    339343           CALL iom_close( inum )                                        ! close file 
    340344        ENDIF 
     
    388392         IF(lwp) WRITE(numout,*) ' read in the file depht over which runoffs are distributed' 
    389393         CALL iom_open ( "runoffs", inum )                           ! open file 
    390          CALL iom_get  ( inum, jpdom_data, 'rodepth', h_rnf )   ! read the river mouth array 
     394         CALL iom_get  ( inum, jpdom_global, 'rodepth', h_rnf )   ! read the river mouth array 
    391395         CALL iom_close( inum )                                        ! close file 
    392396         ! 
     
    452456      ! 
    453457      IF( kt == nit000 ) THEN    ;    nprevrec = 0 
    454       ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec_a(2) 
     458      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) 
    455459      ENDIF 
    456460      CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==! 
     
    711715      !!--------------------------------------------------------------------- 
    712716      ! 
    713       IF( sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)                        
     717      IF( sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace) 
     718         ! 
    714719         IF( kt == nit000 ) THEN 
    715720            IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt 
    716             zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,1) * tmask(:,:,:)   ! temperature 
    717             zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,1) * tmask(:,:,:)   ! salinity  
    718             avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,1) * tmask(:,:,:)   ! vertical diffusive coef. 
     721            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%nbb) * tmask(:,:,:)   ! temperature 
     722            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%nbb) * tmask(:,:,:)   ! salinity  
     723            avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%nbb) * tmask(:,:,:)   ! vertical diffusive coef. 
    719724            CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm ) 
    720725            uslpdta (:,:,:,1) = zuslp (:,:,:)  
     
    723728            wslpjdta(:,:,:,1) = zwslpj(:,:,:)  
    724729            ! 
    725             zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,2) * tmask(:,:,:)   ! temperature 
    726             zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,2) * tmask(:,:,:)   ! salinity  
    727             avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,2) * tmask(:,:,:)   ! vertical diffusive coef. 
     730            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%naa) * tmask(:,:,:)   ! temperature 
     731            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%naa) * tmask(:,:,:)   ! salinity  
     732            avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%naa) * tmask(:,:,:)   ! vertical diffusive coef. 
    728733            CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm ) 
    729734            uslpdta (:,:,:,2) = zuslp (:,:,:)  
     
    734739           !  
    735740           iswap = 0 
    736            IF( sf_dyn(jf_tem)%nrec_a(2) - nprevrec /= 0 )  iswap = 1 
    737            IF( nsecdyn > sf_dyn(jf_tem)%nrec_b(2) .AND. iswap == 1 )  THEN    ! read/update the after data 
     741           IF( sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) - nprevrec /= 0 )  iswap = 1 
     742           IF( nsecdyn > sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb) .AND. iswap == 1 )  THEN    ! read/update the after data 
    738743              IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt 
    739744              uslpdta (:,:,:,1) =  uslpdta (:,:,:,2)         ! swap the data 
     
    742747              wslpjdta(:,:,:,1) =  wslpjdta(:,:,:,2)  
    743748              ! 
    744               zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,2) * tmask(:,:,:)   ! temperature 
    745               zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,2) * tmask(:,:,:)   ! salinity  
    746               avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,2) * tmask(:,:,:)   ! vertical diffusive coef. 
     749              zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%naa) * tmask(:,:,:)   ! temperature 
     750              zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%naa) * tmask(:,:,:)   ! salinity  
     751              avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%naa) * tmask(:,:,:)   ! vertical diffusive coef. 
    747752              CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm ) 
    748753              ! 
     
    756761      ! 
    757762      IF( sf_dyn(jf_tem)%ln_tint )  THEN 
    758          ztinta =  REAL( nsecdyn - sf_dyn(jf_tem)%nrec_b(2), wp )  & 
    759             &    / REAL( sf_dyn(jf_tem)%nrec_a(2) - sf_dyn(jf_tem)%nrec_b(2), wp ) 
     763         ztinta =  REAL( nsecdyn - sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb), wp )  & 
     764            &    / REAL( sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) - sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb), wp ) 
    760765         ztintb =  1. - ztinta 
    761766         IF( l_ldfslp .AND. .NOT.lk_c1d ) THEN    ! Computes slopes (here avt is used as workspace) 
  • NEMO/trunk/src/OFF/nemogcm.F90

    r13237 r13286  
    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) 
     
    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 
     
    193193      INTEGER ::   ios, ilocal_comm   ! local integers 
    194194      !! 
    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 
     195      NAMELIST/namctl/ sn_cfctl, ln_timing, ln_diacfl,                                & 
     196         &             nn_isplt,  nn_jsplt,  nn_ictls, nn_ictle, nn_jctls, nn_jctle 
    198197      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr 
    199198      !!---------------------------------------------------------------------- 
    200199      ! 
    201200      cxios_context = 'nemo' 
     201      nn_hls = 1 
    202202      ! 
    203203      !                             !-------------------------------------------------! 
     
    292292      ! 
    293293      IF( ln_read_cfg ) THEN              ! Read sizes in domain configuration file 
    294          CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     294         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
    295295      ELSE                                ! user-defined namelist 
    296          CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
     296         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
    297297      ENDIF 
    298298      ! 
     
    306306      CALL mpp_init 
    307307 
     308      CALL halo_mng_init() 
    308309      ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 
    309310      CALL nemo_alloc() 
     
    386387         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
    387388         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 
    395389         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
    396390         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
    397391      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  
     392 
     393      IF( .NOT.ln_read_cfg )   ln_closea = .false.   ! dealing possible only with a domcfg file 
    407394      IF(lwp) THEN                  ! control print 
    408395         WRITE(numout,*) 
     
    414401         WRITE(numout,*) '         filename to be written                      cn_domcfg_out = ', TRIM(cn_domcfg_out) 
    415402         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 
    456403      ENDIF 
    457404      ! 
Note: See TracChangeset for help on using the changeset viewer.