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 2578 for branches/TAM_V3_2_2/NEMO/OPA_SRC/DYN – NEMO

Ignore:
Timestamp:
2011-02-03T19:33:40+01:00 (13 years ago)
Author:
rblod
Message:

first import of NEMOTAM 3.2.2

Location:
branches/TAM_V3_2_2/NEMO/OPA_SRC/DYN
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/TAM_V3_2_2/NEMO/OPA_SRC/DYN/dynadv.F90

    r1601 r2578  
    2323 
    2424   PUBLIC dyn_adv     ! routine called by step module 
     25   PUBLIC dyn_adv_ctl ! routine called by dynadv_tam module 
    2526  
    2627   LOGICAL, PUBLIC ::   ln_dynadv_vec  = .TRUE.    ! vector form flag 
  • branches/TAM_V3_2_2/NEMO/OPA_SRC/DYN/dynhpg.F90

    r1601 r2578  
    5151   REAL(wp), PUBLIC ::   rn_gamma      = 0.e0      !: weighting coefficient 
    5252   LOGICAL , PUBLIC ::   ln_dynhpg_imp = .FALSE.   !: semi-implicite hpg flag 
    53    INTEGER , PUBLIC ::   nn_dynhpg_rst = 0         !: add dynhpg implicit variables in restart ot not 
    54  
    55    INTEGER  ::   nhpg  =  0   ! = 0 to 6, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags) 
     53 
     54   INTEGER , PUBLIC ::   nhpg  =  0   ! = 0 to 6, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags) 
    5655 
    5756   !! * Substitutions 
     
    124123!     NAMELIST/namdyn_hpg/ ln_hpg_zco   , ln_hpg_zps   , ln_hpg_sco, ln_hpg_hel,   & 
    125124!        &                 ln_hpg_wdj   , ln_hpg_djc   , ln_hpg_rot, rn_gamma  ,   & 
    126 !        &                 ln_dynhpg_imp, nn_dynhpg_rst 
     125!        &                 ln_dynhpg_imp 
    127126      !!---------------------------------------------------------------------- 
    128127 
     
    144143         WRITE(numout,*) '      weighting coeff. (wdj scheme)                     rn_gamma      = ', rn_gamma 
    145144         WRITE(numout,*) '      time stepping: centered (F) or semi-implicit (T)  ln_dynhpg_imp = ', ln_dynhpg_imp 
    146          WRITE(numout,*) '      add in restart dynhpg semi-implicit variable      nn_dynhpg_rst = ', nn_dynhpg_rst 
    147145      ENDIF 
    148  
    149       IF( .NOT. ln_dynhpg_imp )   nn_dynhpg_rst = 0      ! force no adding dynhpg implicit variables in restart 
    150146 
    151147      IF( lk_vvl .AND. .NOT. ln_hpg_sco )   THEN 
  • branches/TAM_V3_2_2/NEMO/OPA_SRC/DYN/sshwzv.F90

    r1756 r2578  
    2727   USE diaar5, ONLY :   lk_diaar5 
    2828   USE iom 
     29   USE agrif_opa_interp 
     30   USE agrif_opa_update 
    2931 
    3032   IMPLICIT NONE 
     
    137139 
    138140                         CALL div_cur( kt )            ! Horizontal divergence & Relative vorticity 
    139       IF( n_cla == 1 )   CALL div_cla( kt )            ! Cross Land Advection (Update Hor. divergence) 
     141         IF( n_cla == 1 )   CALL div_cla( kt )            ! Cross Land Advection (Update Hor. divergence) 
    140142 
    141143      ! set time step size (Euler/Leapfrog) 
     
    145147      zraur = 1. / rau0 
    146148 
    147       !                                           !------------------------------! 
    148       !                                           !   After Sea Surface Height   ! 
    149       !                                           !------------------------------! 
    150       zhdiv(:,:) = 0.e0 
    151       DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports 
    152         zhdiv(:,:) = zhdiv(:,:) + fse3t(:,:,jk) * hdivn(:,:,jk) 
    153       END DO 
    154  
    155       !                                                ! Sea surface elevation time stepping 
    156       ssha(:,:) = (  sshb(:,:) - z2dt * ( zraur * emp(:,:) + zhdiv(:,:) )  ) * tmask(:,:,1) 
    157  
     149         !                                           !------------------------------! 
     150         !                                           !   After Sea Surface Height   ! 
     151         !                                           !------------------------------! 
     152         zhdiv(:,:) = 0.e0 
     153         DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports 
     154            zhdiv(:,:) = zhdiv(:,:) + fse3t(:,:,jk) * hdivn(:,:,jk) 
     155         END DO 
     156 
     157         !                                                ! Sea surface elevation time stepping 
     158         ssha(:,:) = (  sshb(:,:) - z2dt * ( zraur * emp(:,:) + zhdiv(:,:) )  ) * tmask(:,:,1) 
     159 
     160# if defined key_agrif 
     161      CALL agrif_ssh(kt) 
     162# endif 
    158163#if defined key_obc 
    159 # if defined key_agrif 
    160164      IF ( Agrif_Root() ) THEN  
     165            ssha(:,:) = ssha(:,:) * obctmsk(:,:) 
     166            CALL lbc_lnk( ssha, 'T', 1. )  ! absolutly compulsory !! (jmm) 
     167         ENDIF 
    161168# endif 
    162          ssha(:,:) = ssha(:,:) * obctmsk(:,:) 
    163          CALL lbc_lnk( ssha, 'T', 1. )  ! absolutly compulsory !! (jmm) 
    164 # if defined key_agrif 
    165       ENDIF 
    166 # endif 
    167 #endif 
    168  
    169       !                                                ! Sea Surface Height at u-,v- and f-points (vvl case only) 
    170       IF( lk_vvl ) THEN                                ! (required only in key_vvl case) 
    171          DO jj = 1, jpjm1 
    172             DO ji = 1, jpim1      ! NO Vector Opt. 
    173                sshu_a(ji,jj) = 0.5  * umask(ji,jj,1) / ( e1u(ji  ,jj) * e2u(ji  ,jj) )                   & 
    174                   &                                  * ( e1t(ji  ,jj) * e2t(ji  ,jj) * ssha(ji  ,jj)     & 
    175                   &                                    + e1t(ji+1,jj) * e2t(ji+1,jj) * ssha(ji+1,jj) ) 
    176                sshv_a(ji,jj) = 0.5  * vmask(ji,jj,1) / ( e1v(ji,jj  ) * e2v(ji,jj  ) )                   & 
    177                   &                                  * ( e1t(ji,jj  ) * e2t(ji,jj  ) * ssha(ji,jj  )     & 
    178                   &                                    + e1t(ji,jj+1) * e2t(ji,jj+1) * ssha(ji,jj+1) ) 
    179                sshf_a(ji,jj) = 0.25 * umask(ji,jj,1) * umask (ji,jj+1,1)                                 &  
    180                   &                                  * ( ssha(ji  ,jj) + ssha(ji  ,jj+1)                 & 
    181                   &                                    + ssha(ji+1,jj) + ssha(ji+1,jj+1) ) 
    182             END DO 
    183          END DO 
    184          CALL lbc_lnk( sshu_a, 'U', 1. )               ! Boundaries conditions 
    185          CALL lbc_lnk( sshv_a, 'V', 1. ) 
    186          CALL lbc_lnk( sshf_a, 'F', 1. ) 
    187       ENDIF 
     169 
     170         !                                                ! Sea Surface Height at u-,v- and f-points (vvl case only) 
     171         IF( lk_vvl ) THEN                                ! (required only in key_vvl case) 
     172            DO jj = 1, jpjm1 
     173               DO ji = 1, jpim1      ! NO Vector Opt. 
     174                  sshu_a(ji,jj) = 0.5  * umask(ji,jj,1) / ( e1u(ji  ,jj) * e2u(ji  ,jj) )                   & 
     175                       &                                  * ( e1t(ji  ,jj) * e2t(ji  ,jj) * ssha(ji  ,jj)     & 
     176                       &                                    + e1t(ji+1,jj) * e2t(ji+1,jj) * ssha(ji+1,jj) ) 
     177                  sshv_a(ji,jj) = 0.5  * vmask(ji,jj,1) / ( e1v(ji,jj  ) * e2v(ji,jj  ) )                   & 
     178                       &                                  * ( e1t(ji,jj  ) * e2t(ji,jj  ) * ssha(ji,jj  )     & 
     179                       &                                    + e1t(ji,jj+1) * e2t(ji,jj+1) * ssha(ji,jj+1) ) 
     180                  sshf_a(ji,jj) = 0.25 * umask(ji,jj,1) * umask (ji,jj+1,1)                                 &  
     181                       &                                  * ( ssha(ji  ,jj) + ssha(ji  ,jj+1)                 & 
     182                       &                                    + ssha(ji+1,jj) + ssha(ji+1,jj+1) ) 
     183               END DO 
     184            END DO 
     185            CALL lbc_lnk( sshu_a, 'U', 1. )               ! Boundaries conditions 
     186            CALL lbc_lnk( sshv_a, 'V', 1. ) 
     187            CALL lbc_lnk( sshf_a, 'F', 1. ) 
     188         ENDIF 
    188189 
    189190      !                                           !------------------------------! 
     
    197198      END DO 
    198199      ! 
    199       CALL iom_put( "woce", wn                    )   ! vertical velocity 
    200       CALL iom_put( "ssh" , sshn                  )   ! sea surface height 
    201       CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
    202       IF( lk_diaar5 ) THEN 
    203          z2d(:,:) = rau0 * e1t(:,:) * e2t(:,:) 
    204          DO jk = 1, jpk 
    205             z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 
    206          END DO 
    207          CALL iom_put( "w_masstr" , z3d                     )   !           vertical mass transport 
    208          CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) )   ! square of vertical mass transport 
    209       ENDIF 
     200         CALL iom_put( "woce", wn                    )   ! vertical velocity 
     201         CALL iom_put( "ssh" , sshn                  )   ! sea surface height 
     202         CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
     203         IF( lk_diaar5 ) THEN 
     204            z2d(:,:) = rau0 * e1t(:,:) * e2t(:,:) 
     205            DO jk = 1, jpk 
     206               z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 
     207            END DO 
     208            CALL iom_put( "w_masstr" , z3d                     )   !           vertical mass transport 
     209            CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) )   ! square of vertical mass transport 
     210         ENDIF 
    210211      ! 
    211212   END SUBROUTINE ssh_wzv 
     
    279280      ENDIF 
    280281      ! 
     282#if defined key_agrif 
     283      ! Update velocity at AGRIF zoom boundaries 
     284      IF (.NOT.Agrif_Root())    CALL Agrif_Update_Dyn( kt ) 
     285#endif 
     286 
    281287      IF(ln_ctl)   CALL prt_ctl(tab2d_1=sshb    , clinfo1=' sshb  - : ', mask1=tmask, ovlap=1 ) 
    282288      ! 
Note: See TracChangeset for help on using the changeset viewer.