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 14976 for NEMO/trunk/tests/DOME – NEMO

Ignore:
Timestamp:
2021-06-11T11:14:27+02:00 (3 years ago)
Author:
jchanut
Message:

#2638, merge dev_14608_AGRIF_domcfg branch into trunk

Location:
NEMO/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         5^/vendors/AGRIF/dev_r14608_AGRIF_domcfg@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/tests/DOME/EXPREF/AGRIF_FixedGrids.in

    r14216 r14976  
    111 
    2 278 358 88 162 2 2 2    
     2281 361 91 169 2 2 2    
    330 
  • NEMO/trunk/tests/DOME/MY_SRC/usrdef_hgr.F90

    r14254 r14976  
    2323   IMPLICIT NONE 
    2424   PRIVATE 
     25 
     26   REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 
    2527 
    2628   PUBLIC   usr_def_hgr   ! called by domhgr.F90 
     
    6466      ! 
    6567      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0  
    6768      REAL(wp) ::   zti, ztj   ! local scalars 
    6869      !!------------------------------------------------------------------------------- 
     
    7778      ! Position coordinates (in kilometers) 
    7879      !                          ========== 
    79       zlam0 = -REAL( 0.5 + 1700._wp * 1.e3 / rn_dx) 
    80       zphi0 = -REAL( 0.5 +  800._wp * 1.e3 / rn_dy) 
     80      ! Offsets in km of the first south west f-point:  
     81      roffsetx = -1700._wp 
     82      roffsety =  -800._wp  
    8183#if defined key_agrif 
    82       IF( .NOT.Agrif_Root() ) THEN  
    83          zlam0 = - REAL( 0.5 + 1700._wp * 1.e3 / rn_dx + nbghostcells) & 
    84                & + REAL((nbghostcells + Agrif_Ix() - 1)*Agrif_irhox())   
    85          zphi0 = - REAL( 0.5 +  800._wp * 1.e3 / rn_dy + nbghostcells) & 
    86                & + REAL((nbghostcells + Agrif_Iy() - 1)*Agrif_irhoy())   
    87       ENDIF  
     84      IF( .NOT.Agrif_Root() ) THEN 
     85         ! deduce offset from parent: 
     86         roffsetx = Agrif_Parent(roffsetx) & 
     87              & + (-(nbghostcells_x   - 1) + (Agrif_Parent(nbghostcells_x  ) & 
     88              & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
     89         roffsety = Agrif_Parent(roffsety) & 
     90              & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) & 
     91              & + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 
     92      ENDIF 
    8893#endif 
    8994          
    90       DO_2D( 1, 1, 1, 1 ) 
    91          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    92          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     95      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     96         zti = REAL( mig0(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
     97         ztj = REAL( mjg0(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    9398          
    94          plamt(ji,jj) = rn_dx * 1.e-3 * ( zlam0 + zti ) 
    95          plamu(ji,jj) = rn_dx * 1.e-3 * ( zlam0 + zti + 0.5_wp ) 
     99         plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 
     100         plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 *   zti  
    96101         plamv(ji,jj) = plamt(ji,jj)  
    97102         plamf(ji,jj) = plamu(ji,jj)  
    98103          
    99          pphit(ji,jj) = rn_dy * 1.e-3 * ( zphi0 + ztj ) 
    100          pphiv(ji,jj) = rn_dy * 1.e-3 * ( zphi0 + ztj + 0.5_wp ) 
     104         pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 
     105         pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 *   ztj 
    101106         pphiu(ji,jj) = pphit(ji,jj)  
    102107         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/trunk/tests/DOME/MY_SRC/usrdef_nam.F90

    r14433 r14976  
    6060      ! 
    6161      INTEGER ::   ios          ! Local integer 
     62      INTEGER ::   ighost_w, ighost_e, ighost_s, ighost_n 
    6263      REAL(wp)::   zlx, zly, zh ! Local scalars 
    6364      !! 
     
    7475         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 
    7576         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 
    76          rn_dz = Agrif_Parent(rn_dz) 
    7777         rn_f0 = Agrif_Parent(rn_f0) 
    7878      ENDIF 
     
    8484      kk_cfg = nINT( rn_dx ) 
    8585      ! 
     86#if defined key_agrif  
    8687      IF( Agrif_Root() ) THEN       ! Global Domain size:  DOME  global domain is  2000 km x 850 Km x 3600 m 
     88#endif 
    8789         kpi = NINT( 2000.e3  / rn_dx ) + 2   
    8890         kpj = NINT(  850.e3  / rn_dy ) + 2 + 1  
     91#if defined key_agrif  
    8992      ELSE                          ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    90          kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
    91          kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
    92 !!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
    93 !!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
     93         ! At this stage, child ghosts have not been set 
     94         ighost_w = nbghostcells 
     95         ighost_e = nbghostcells 
     96         ighost_s = nbghostcells 
     97         ighost_n = nbghostcells 
     98 
     99         IF  ( Agrif_Ix() == 1 ) ighost_w = 1  
     100         IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo)-1 ) ighost_e = 1  
     101         IF  ( Agrif_Iy() == 1 ) ighost_s = 1  
     102         IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo)-1 ) ighost_n = 1  
     103         kpi  = nbcellsx + ighost_w + ighost_e 
     104         kpj  = nbcellsy + ighost_s + ighost_n 
     105!! JC: number of ghosts are unknown at this stage ! 
     106!!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x    
     107!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n  
    94108      ENDIF 
     109#endif 
    95110      kpk = NINT( 3600._wp / rn_dz ) + 1 
    96111      ! 
  • NEMO/trunk/tests/DOME/MY_SRC/usrdef_zgr.F90

    r14433 r14976  
    193193            pe3w (ji,jj,ik  ) = pdept(ji,jj,ik  ) - pdept(ji,jj,ik-1)            ! st caution ik > 1 
    194194         END_2D          
    195          !                                   ! bottom scale factors and depth at  U-, V-, UW and VW-points 
    196          !                                   ! usually Computed as the minimum of neighbooring scale factors 
    197          pe3u (:,:,:) = pe3t(:,:,:)          ! HERE DOME configuration :  
    198          pe3v (:,:,:) = pe3t(:,:,:)          !    e3 increases with i-index and identical with j-index 
    199          pe3f (:,:,:) = pe3t(:,:,:)          !    so e3 minimum of (i,i+1) points is (i) point 
    200          pe3uw(:,:,:) = pe3w(:,:,:)          !    in j-direction e3v=e3t and e3f=e3v 
    201          pe3vw(:,:,:) = pe3w(:,:,:)          !    ==>>  no need of lbc_lnk calls 
     195         ! 
     196         DO_3D( 0, 0, 0, 0, 1, jpk )  
     197               pe3u (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji+1,jj,jk) ) 
     198               pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) ) 
     199               pe3uw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji+1,jj,jk) ) 
     200               pe3vw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji,jj+1,jk) ) 
     201         END_3D  
     202         ! 
     203         CALL lbc_lnk('usrdef_zgr', pe3u , 'U', 1._wp, pe3uw, 'U', 1._wp )    
     204         CALL lbc_lnk('usrdef_zgr', pe3v , 'V', 1._wp, pe3vw, 'V', 1._wp )  
     205         ! 
     206         DO jk = 1, jpk                  
     207            WHERE( pe3u (:,:,jk) == 0._wp )   pe3u (:,:,jk) = pe3t_1d(jk) 
     208            WHERE( pe3v (:,:,jk) == 0._wp )   pe3v (:,:,jk) = pe3t_1d(jk) 
     209            WHERE( pe3uw(:,:,jk) == 0._wp )   pe3uw(:,:,jk) = pe3w_1d(jk) 
     210            WHERE( pe3vw(:,:,jk) == 0._wp )   pe3vw(:,:,jk) = pe3w_1d(jk) 
     211         END DO 
     212 
     213         DO_3D( 0, 0, 0, 0, 1, jpk ) 
     214               pe3f(ji,jj,jk) = MIN( pe3v(ji,jj,jk), pe3v(ji+1,jj,jk) ) 
     215         END_3D 
     216         CALL lbc_lnk('usrdef_zgr', pe3f, 'F', 1._wp )       
    202217         !       
    203218      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.