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 14433 for NEMO/trunk/tests/CANAL/MY_SRC – NEMO

Ignore:
Timestamp:
2021-02-11T09:06:49+01:00 (3 years ago)
Author:
smasson
Message:

trunk: merge dev_r14312_MPI_Interface into the trunk, #2598

Location:
NEMO/trunk/tests/CANAL/MY_SRC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/CANAL/MY_SRC/usrdef_hgr.F90

    r14223 r14433  
    6464      ! 
    6565      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
     66      INTEGER  ::   ii0, ij0   ! dummy loop indices 
     67      REAL(wp) ::   zbeta, zf0 
    6768      REAL(wp) ::   zti, ztj   ! local scalars 
    6869      !!------------------------------------------------------------------------------- 
     
    7778      ! Position coordinates (in kilometers) 
    7879      !                          ========== 
    79       zlam0 = -REAL(Ni0glo, wp) * rn_0xratio * rn_dx 
    80       zphi0 = -REAL(Nj0glo, wp) * rn_0yratio * rn_dy 
     80      ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 
     81      ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 
    8182 
    8283#if defined key_agrif 
    8384      ! ! let lower left longitude and latitude from parent 
    8485      IF (.NOT.Agrif_root()) THEN 
    85           zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 
    86              &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 
    87           zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 
    88              &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 
     86          to be coded... 
    8987      ENDIF  
    9088#endif 
    9189          
    9290      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )          
    93          zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
    94          ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
     91         zti = REAL( mig0(ji)-ii0, wp )   ! =0 at i=ii0 in the global grid without halos 
     92         ztj = REAL( mjg0(jj)-ij0, wp )   ! =0 at i=ij0 in the global grid without halos 
    9593          
    96          plamt(ji,jj) = zlam0 + rn_dx *   zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * ( zti + 0.5_wp )  
     94         plamt(ji,jj) = rn_dx *   zti 
     95         plamu(ji,jj) = rn_dx * ( zti + 0.5_wp )  
    9896         plamv(ji,jj) = plamt(ji,jj)  
    9997         plamf(ji,jj) = plamu(ji,jj)  
    10098          
    101          pphit(ji,jj) = zphi0 + rn_dy *   ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * ( ztj + 0.5_wp )  
     99         pphit(ji,jj) = rn_dy *   ztj 
     100         pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp )  
    103101         pphiu(ji,jj) = pphit(ji,jj)  
    104102         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/trunk/tests/CANAL/MY_SRC/usrdef_istate.F90

    r14224 r14433  
    239239      ! 
    240240      CALL lbc_lnk( 'usrdef_istate', pts , 'T',  1. ) 
    241       CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
     241      CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
    242242 
    243243   END SUBROUTINE usr_def_istate 
  • NEMO/trunk/tests/CANAL/MY_SRC/usrdef_nam.F90

    r13472 r14433  
    5050   LOGICAL , PUBLIC ::   ln_sshnoise=.false. ! add random noise on initial ssh 
    5151   REAL(wp), PUBLIC ::   rn_lambda  = 50.    ! gaussian lambda 
    52    INTEGER , PUBLIC ::   nn_perio   =    0   ! periodicity of the channel (0=closed, 1=E-W) 
    5352 
    5453   !!---------------------------------------------------------------------- 
     
    5958CONTAINS 
    6059 
    61    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     60   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    6261      !!---------------------------------------------------------------------- 
    6362      !!                     ***  ROUTINE dom_nam  *** 
     
    7170      !! ** input   : - namusr_def namelist found in namelist_cfg 
    7271      !!---------------------------------------------------------------------- 
    73       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    74       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    75       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    76       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     72      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     73      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     74      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     75      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     76      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     77      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    7778      ! 
    7879      INTEGER ::   ios      ! Local integer 
    7980      REAL(wp)::   zh       ! Local scalars 
     81      LOGICAL ::   ln_Iperio, ln_Jperio 
    8082      !! 
    8183      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio   & 
    8284         &                 , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac   & 
    8385         &                 , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy  & 
    84          &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio 
     86         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, ln_Iperio, ln_Jperio 
    8587      !!---------------------------------------------------------------------- 
    8688      ! 
     
    102104#endif 
    103105      ! 
    104       IF(lwm)   WRITE( numond, namusr_def ) 
    105       ! 
    106106      cd_cfg = 'EW_CANAL'             ! name & resolution (not used) 
    107107      kk_cfg = INT( rn_dx ) 
     
    109109      IF( Agrif_Root() ) THEN        ! Global Domain size:  EW_CANAL global domain is  1800 km x 1800 Km x 5000 m 
    110110         kpi = NINT( rn_domszx / rn_dx ) + 1 
    111          kpj = NINT( rn_domszy / rn_dy ) + 3 
     111         kpj = NINT( rn_domszy / rn_dy ) + 1 
    112112      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    113113         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     
    117117      ! 
    118118      zh  = (kpk-1)*rn_dz 
    119       !                             ! Set the lateral boundary condition of the global domain 
    120       kperio = 1                    ! EW_CANAL configuration : closed basin 
    121119      !                             ! control print 
    122120      IF(lwp) THEN 
     
    149147         WRITE(numout,*) '      add random noise on initial ssh   ln_sshnoise= ', ln_sshnoise 
    150148         WRITE(numout,*) '      Gaussian lambda parameter          rn_lambda = ', rn_lambda 
    151          WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio 
     149         WRITE(numout,*) '      i and j Periodicity     ln_Iperio, ln_Jperio = ', ln_Iperio, ln_Jperio 
     150         WRITE(numout,*) '   ' 
    152151      ENDIF 
    153152      !                             ! Set the lateral boundary condition of the global domain 
    154       kperio = nn_perio                    ! EW_CANAL configuration : closed basin 
     153      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio   ! CANAL configuration 
     154      ldNFold  =  .FALSE.    ;   cdNFtype = '-' 
    155155      ! 
    156156   END SUBROUTINE usr_def_nam 
  • NEMO/trunk/tests/CANAL/MY_SRC/usrdef_zgr.F90

    r13472 r14433  
    202202      END SELECT 
    203203      ! 
    204       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     204      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
    205205      ! 
    206206      k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere 
Note: See TracChangeset for help on using the changeset viewer.