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 8965 – NEMO

Changeset 8965


Ignore:
Timestamp:
2017-12-08T17:42:49+01:00 (6 years ago)
Author:
jchanut
Message:

Add zoom capability in default Gyre, remove bcs velocity update (non reproducible), add option to set clamped obcs - #1965

Location:
branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/NST_SRC/agrif_oce.F90

    r8901 r8965  
    2424   REAL(wp), PUBLIC ::   rn_sponge_dyn = 2800.     !: sponge coeff. for dynamics 
    2525   LOGICAL , PUBLIC ::   ln_chk_bathy  = .FALSE.   !: check of parent bathymetry  
     26   LOGICAL , PUBLIC ::   lk_agrif_clp  = .FALSE.   !: Flag to retrieve clamped open boundaries 
    2627 
    2728   !                                              !!! OLD namelist names 
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90

    r8741 r8965  
    117117         ENDIF 
    118118         ! 
    119          DO jk=1,jpkm1                 ! Smooth 
    120             DO jj=j1,j2 
    121                ua(2,jj,jk) = 0.25_wp*(ua(1,jj,jk)+2._wp*ua(2,jj,jk)+ua(3,jj,jk)) 
    122                ua(2,jj,jk) = ua(2,jj,jk) * umask(2,jj,jk) 
    123             END DO 
    124          END DO 
     119         IF (.NOT.lk_agrif_clp) THEN 
     120            DO jk=1,jpkm1              ! Smooth 
     121               DO jj=j1,j2 
     122                  ua(2,jj,jk) = 0.25_wp*(ua(1,jj,jk)+2._wp*ua(2,jj,jk)+ua(3,jj,jk)) 
     123                  ua(2,jj,jk) = ua(2,jj,jk) * umask(2,jj,jk) 
     124               END DO 
     125            END DO 
     126         END IF 
    125127         ! 
    126128         zub(2,:) = 0._wp              ! Correct transport 
     
    186188         ENDIF 
    187189 
    188          DO jk = 1, jpkm1              ! Smooth 
    189             DO jj = j1, j2 
    190                ua(nlci-2,jj,jk) = 0.25_wp * umask(nlci-2,jj,jk)      & 
    191                   &             * ( ua(nlci-3,jj,jk) + 2._wp*ua(nlci-2,jj,jk) + ua(nlci-1,jj,jk) ) 
    192             END DO 
    193          END DO 
     190         IF (.NOT.lk_agrif_clp) THEN 
     191            DO jk = 1, jpkm1           ! Smooth 
     192               DO jj = j1, j2 
     193                  ua(nlci-2,jj,jk) = 0.25_wp * umask(nlci-2,jj,jk)      & 
     194                     &             * ( ua(nlci-3,jj,jk) + 2._wp*ua(nlci-2,jj,jk) + ua(nlci-1,jj,jk) ) 
     195               END DO 
     196            END DO 
     197         ENDIF 
    194198 
    195199         zub(nlci-2,:) = 0._wp        ! Correct transport 
     
    255259         ENDIF 
    256260         ! 
    257          DO jk = 1, jpkm1              ! Smooth 
    258             DO ji = i1, i2 
    259                va(ji,2,jk) = 0.25_wp * vmask(ji,2,jk)    & 
    260                   &        * ( va(ji,1,jk) + 2._wp*va(ji,2,jk) + va(ji,3,jk) ) 
    261             END DO 
    262          END DO 
     261         IF (.NOT.lk_agrif_clp) THEN 
     262            DO jk = 1, jpkm1              ! Smooth 
     263               DO ji = i1, i2 
     264                  va(ji,2,jk) = 0.25_wp * vmask(ji,2,jk)    & 
     265                     &        * ( va(ji,1,jk) + 2._wp*va(ji,2,jk) + va(ji,3,jk) ) 
     266               END DO 
     267            END DO 
     268         ENDIF 
    263269         ! 
    264270         zvb(:,2) = 0._wp              ! Correct transport 
     
    324330         ENDIF 
    325331         ! 
    326          DO jk = 1, jpkm1              ! Smooth 
    327             DO ji = i1, i2 
    328                va(ji,nlcj-2,jk) = 0.25_wp * vmask(ji,nlcj-2,jk)   & 
    329                   &             * ( va(ji,nlcj-3,jk) + 2._wp * va(ji,nlcj-2,jk) + va(ji,nlcj-1,jk) ) 
    330             END DO 
    331          END DO 
     332         IF (.NOT.lk_agrif_clp) THEN 
     333            DO jk = 1, jpkm1           ! Smooth 
     334               DO ji = i1, i2 
     335                  va(ji,nlcj-2,jk) = 0.25_wp * vmask(ji,nlcj-2,jk)   & 
     336                     &             * ( va(ji,nlcj-3,jk) + 2._wp * va(ji,nlcj-2,jk) + va(ji,nlcj-1,jk) ) 
     337               END DO 
     338            END DO 
     339         ENDIF 
    332340         ! 
    333341         zvb(:,nlcj-2) = 0._wp         ! Correct transport 
     
    616624         ptab(i1:i2,j1:j2,k1:k2,n1:n2) = tsn(i1:i2,j1:j2,k1:k2,n1:n2) 
    617625      ELSE 
     626         IF (lk_agrif_clp) THEN 
     627            DO jn = 1, jpts 
     628               DO jk = 1, jpkm1 
     629                  DO ji = i1,i2 
     630                     DO jj = j1,j2 
     631                        tsa(ji,jj,jk,jn) = ptab(ji,jj,jk,jn) 
     632                     END DO 
     633                  END DO 
     634               END DO 
     635            END DO            
     636            return 
     637         ENDIF 
    618638         ! 
    619639         western_side  = (nb == 1).AND.(ndir == 1) 
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_sponge.F90

    r8762 r8965  
    280280      ! 
    281281      IF( before ) THEN 
    282          tabres = un(i1:i2,j1:j2,:) 
     282         tabres = ub(i1:i2,j1:j2,:) 
    283283      ELSE 
    284284         ubdiff(i1:i2,j1:j2,:) = (ub(i1:i2,j1:j2,:) - tabres(:,:,:))*umask(i1:i2,j1:j2,:) 
     
    377377 
    378378      IF( before ) THEN  
    379          tabres = vn(i1:i2,j1:j2,:) 
     379         tabres = vb(i1:i2,j1:j2,:) 
    380380      ELSE 
    381381         ! 
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90

    r8901 r8965  
    9797      ! Account for updated thicknesses at boundary edges 
    9898      IF (.NOT.ln_linssh) THEN 
    99          CALL Agrif_Update_Variable(un_update_id,locupdate1=(/0,0/),locupdate2=(/0,0/),procname = correct_u_bdy) 
    100          CALL Agrif_Update_Variable(vn_update_id,locupdate1=(/0,0/),locupdate2=(/0,0/),procname = correct_v_bdy) 
     99! For the time being calls below do not ensure reproducible results  
     100!         CALL Agrif_Update_Variable(un_update_id,locupdate1=(/0,0/),locupdate2=(/0,0/),procname = correct_u_bdy) 
     101!         CALL Agrif_Update_Variable(vn_update_id,locupdate1=(/0,0/),locupdate2=(/0,0/),procname = correct_v_bdy) 
    101102      ENDIF 
    102103# endif 
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_hgr.F90

    r7753 r8965  
    9393      zlam0 = zlam1 + zcos_alpha * ze1deg * REAL( jpjglo-2 , wp ) 
    9494      zphi0 = zphi1 + zsin_alpha * ze1deg * REAL( jpjglo-2 , wp ) 
     95 
     96#if defined key_agrif 
     97      ! ! Upper left longitude and latitude from parent: 
     98      IF (.NOT.Agrif_root()) THEN 
     99         zlam0 = zlam1 + Agrif_irhox() * REAL(Agrif_Parent(jpjglo)-2 , wp) * ze1deg * zcos_alpha  & 
     100                   &   + ( Agrif_Ix()*Agrif_irhox()-(0.5_wp+nbghostcells)) * ze1deg * zcos_alpha  & 
     101                   &   + ( Agrif_Iy()*Agrif_irhoy()-(0.5_wp+nbghostcells)) * ze1deg * zsin_alpha 
     102         zphi0 = zphi1 + Agrif_irhoy() * REAL(Agrif_Parent(jpjglo)-2 , wp) * ze1deg * zsin_alpha  & 
     103                   &   - ( Agrif_Ix()*Agrif_irhox()-nbghostcells )         * ze1deg * zsin_alpha  & 
     104                   &   + ( Agrif_Iy()*Agrif_irhoy()-nbghostcells )         * ze1deg * zcos_alpha 
     105      ENDIF  
     106#endif 
    95107      !    
    96108      IF( ln_bench ) THEN     ! benchmark: forced the resolution to be 106 km  
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_nam.F90

    r7715 r8965  
    7070      ! 
    7171      cd_cfg = 'GYRE'               ! name & resolution (not used) 
     72#if defined key_agrif 
     73      IF (.NOT.Agrif_root()) nn_GYRE = Agrif_parent(nn_GYRE) * Agrif_irhox() 
     74#endif 
    7275      kk_cfg = nn_GYRE 
    7376      ! 
    7477      kpi = 30 * nn_GYRE + 2        ! Global Domain size 
    7578      kpj = 20 * nn_GYRE + 2 
     79#if defined key_agrif 
     80      IF( .NOT. Agrif_Root() ) THEN 
     81         kpi  = nbcellsx + 2 + 2*nbghostcells 
     82         kpj  = nbcellsy + 2 + 2*nbghostcells 
     83      ENDIF 
     84#endif 
    7685      kpk = jpkglo 
    7786      ! 
     
    8392      WRITE(ldtxt(ii),*) '      GYRE used as Benchmark (=T)                      ln_bench  = ', ln_bench  ;   ii = ii + 1 
    8493      WRITE(ldtxt(ii),*) '      inverse resolution & implied domain size         nn_GYRE   = ', nn_GYRE   ;   ii = ii + 1 
     94#if defined key_agrif 
     95      IF( Agrif_Root() ) THEN 
     96#endif 
    8597      WRITE(ldtxt(ii),*) '         jpiglo = 30*nn_GYRE+2                            jpiglo = ', kpi       ;   ii = ii + 1 
    8698      WRITE(ldtxt(ii),*) '         jpjglo = 20*nn_GYRE+2                            jpjglo = ', kpj       ;   ii = ii + 1 
     99#if defined key_agrif 
     100      ENDIF 
     101#endif 
    87102      WRITE(ldtxt(ii),*) '      number of model levels                              jpkglo = ', kpk       ;   ii = ii + 1 
    88103      ! 
Note: See TracChangeset for help on using the changeset viewer.