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 13248 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OFF/dtadyn.F90 – NEMO

Ignore:
Timestamp:
2020-07-03T20:46:53+02:00 (4 years ago)
Author:
francesca
Message:

dev_r12558_HPC-08_epico_Extra_Halo: merge with trunk@13237, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OFF/dtadyn.F90

    r12960 r13248  
    2323   USE c1d             ! 1D configuration: lk_c1d 
    2424   USE dom_oce         ! ocean domain: variables 
     25#if ! defined key_qco  
    2526   USE domvvl          ! variable volume 
     27#else 
     28   USE domqco 
     29#endif 
    2630   USE zdf_oce         ! ocean vertical physics: variables 
    2731   USE sbc_oce         ! surface module: variables 
     
    5256   PUBLIC   dta_dyn_sed        ! called by nemo_gcm 
    5357   PUBLIC   dta_dyn_atf        ! called by nemo_gcm 
     58#if ! defined key_qco 
    5459   PUBLIC   dta_dyn_sf_interp  ! called by nemo_gcm 
     60#endif 
    5561 
    5662   CHARACTER(len=100) ::   cn_dir          !: Root directory for location of ssr files 
     
    149155         emp_b  (:,:)   = sf_dyn(jf_empb)%fnow(:,:,1) * tmask(:,:,1)    ! E-P 
    150156         zemp   (:,:)   = ( 0.5_wp * ( emp(:,:) + emp_b(:,:) ) + rnf(:,:) + fwbcorr ) * tmask(:,:,1) 
    151          CALL dta_dyn_ssh( kt, zhdivtr, ssh(:,:,Kbb), zemp, ssh(:,:,Kaa), e3t(:,:,:,Kaa) )  !=  ssh, vertical scale factor & vertical transport 
     157#if defined key_qco 
     158         CALL dta_dyn_ssh( kt, zhdivtr, ssh(:,:,Kbb), zemp, ssh(:,:,Kaa) ) 
     159         CALL dom_qco_r3c( ssh(:,:,Kaa), r3t(:,:,Kaa), r3u(:,:,Kaa), r3v(:,:,Kaa) ) 
     160#else 
     161         CALL dta_dyn_ssh( kt, zhdivtr, ssh(:,:,Kbb), zemp, ssh(:,:,Kaa), e3t(:,:,:,Kaa) )  !=  ssh, vertical scale factor 
     162#endif 
    152163         DEALLOCATE( zemp , zhdivtr ) 
    153164         !                                           Write in the tracer restart file 
     
    333344        ENDIF 
    334345        ! 
     346#if defined key_qco 
     347        CALL dom_qco_r3c( ssh(:,:,Kbb), r3t(:,:,Kbb), r3u(:,:,Kbb), r3v(:,:,Kbb) ) 
     348        CALL dom_qco_r3c( ssh(:,:,Kmm), r3t(:,:,Kmm), r3u(:,:,Kmm), r3v(:,:,Kmm) ) 
     349#else 
    335350        DO jk = 1, jpkm1 
    336            e3t(:,:,jk,Kmm) = e3t_0(:,:,jk) * ( 1._wp + ssh(:,:,Kmm) * tmask(:,:,1) / ( ht_0(:,:) + 1.0 - tmask(:,:,1) ) ) 
     351           e3t(:,:,jk,Kmm) = e3t_0(:,:,jk) * ( 1._wp + ssh(:,:,Kmm) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
    337352        ENDDO 
    338353        e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk) 
     
    346361        ! ------------------------------------ 
    347362        CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w(:,:,:,Kmm), 'W' ) 
    348    
     363!!gm this should be computed from ssh(Kbb)   
    349364        e3t(:,:,:,Kbb)  = e3t(:,:,:,Kmm) 
    350365        e3u(:,:,:,Kbb)  = e3u(:,:,:,Kmm) 
     
    371386        ! 
    372387      ENDIF 
     388#endif 
    373389      ! 
    374390      IF( ln_dynrnf .AND. ln_dynrnf_depth ) THEN       ! read depht over which runoffs are distributed 
     
    393409            ENDIF 
    394410         END_2D 
     411!!st pourquoi on n'utilise pas le gde3w ici plutôt que de faire une boucle ?  
    395412         DO_2D_11_11 
    396413            h_rnf(ji,jj) = 0._wp 
     
    417434   END SUBROUTINE dta_dyn_init 
    418435 
     436    
    419437   SUBROUTINE dta_dyn_sed( kt, Kmm ) 
    420438      !!---------------------------------------------------------------------- 
     
    533551   END SUBROUTINE dta_dyn_sed_init 
    534552 
     553    
    535554   SUBROUTINE dta_dyn_atf( kt, Kbb, Kmm, Kaa ) 
    536555     !!--------------------------------------------------------------------- 
     
    556575   END SUBROUTINE dta_dyn_atf 
    557576    
     577    
     578#if ! defined key_qco     
    558579   SUBROUTINE dta_dyn_sf_interp( kt, Kmm ) 
    559580      !!--------------------------------------------------------------------- 
     
    592613      ! 
    593614   END SUBROUTINE dta_dyn_sf_interp 
     615#endif 
     616 
    594617 
    595618   SUBROUTINE dta_dyn_ssh( kt, phdivtr, psshb,  pemp, pssha, pe3ta ) 
     
    610633      !!          The boundary conditions are w=0 at the bottom (no flux) 
    611634      !! 
    612       !! ** action  :   ssh(:,:,Kaa) / e3t(:,:,:,Kaa) / ww 
     635      !! ** action  :   ssh(:,:,Kaa) / e3t(:,:,k,Kaa) / ww 
    613636      !! 
    614637      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
     
    634657      !                                                ! Sea surface  elevation time-stepping 
    635658      pssha(:,:) = ( psshb(:,:) - z2dt * ( r1_rho0 * pemp(:,:)  + zhdiv(:,:) ) ) * ssmask(:,:) 
    636       !                                                 !  
    637       !                                                 ! After acale factors at t-points ( z_star coordinate ) 
     659      ! 
     660      IF( PRESENT( pe3ta ) ) THEN                      ! After acale factors at t-points ( z_star coordinate ) 
    638661      DO jk = 1, jpkm1 
    639         pe3ta(:,:,jk) = e3t_0(:,:,jk) * ( 1._wp + pssha(:,:) * tmask(:,:,1) / ( ht_0(:,:) + 1.0 - tmask(:,:,1) ) ) 
     662            pe3ta(:,:,jk) = e3t_0(:,:,jk) * ( 1._wp + pssha(:,:) * r1_ht_0(:,:) * tmask(:,:,jk) ) 
    640663      END DO 
     664      ENDIF 
    641665      ! 
    642666   END SUBROUTINE dta_dyn_ssh 
     
    661685      !!---------------------------------------------------------------------- 
    662686      ! 
     687!!st code dupliqué même remarque que plus haut pourquoi ne pas utiliser gdepw ? 
    663688      DO_2D_11_11 
    664689         h_rnf(ji,jj) = 0._wp 
Note: See TracChangeset for help on using the changeset viewer.