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

Changeset 8829


Ignore:
Timestamp:
2017-11-28T10:50:49+01:00 (6 years ago)
Author:
charris
Message:

First set of modifications following (p)review.

Location:
branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r8552 r8829  
    2020   !!   dyn_asm_inc    : Apply the dynamic (u and v) increments 
    2121   !!   ssh_asm_inc    : Apply the SSH increment 
     22   !!   ssh_asm_div    : Apply divergence associated with SSH increment 
    2223   !!   seaice_asm_inc : Apply the seaice increment 
    2324   !!---------------------------------------------------------------------- 
     
    798799   END SUBROUTINE ssh_asm_inc 
    799800 
     801   SUBROUTINE ssh_asm_div( kt, phdivn ) 
     802      !!---------------------------------------------------------------------- 
     803      !!                  ***  ROUTINE ssh_asm_div  *** 
     804      !! 
     805      !! ** Purpose :   ssh increment with z* is incorporated via a correction of the local divergence           
     806      !!                across all the water column 
     807      !! 
     808      !! ** Method  : 
     809      !!                CAUTION : sshiau is positive (inflow) decreasing the 
     810      !!                          divergence and expressed in m/s 
     811      !! 
     812      !! ** Action  :   phdivn   decreased by the ssh increment 
     813      !!---------------------------------------------------------------------- 
     814      INTEGER, INTENT(IN) :: kt                               ! ocean time-step index 
     815      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   phdivn   ! horizontal divergence 
     816      !! 
     817      INTEGER  ::   jk                                        ! dummy loop index 
     818      REAL(wp), DIMENSION(:,:)  , POINTER       ::   ztim     ! local array 
     819      !!---------------------------------------------------------------------- 
     820      !  
     821      CALL ssh_asm_inc( kt ) !==   (calculate increments) 
     822      ! 
     823      IF( ln_linssh ) THEN  
     824         phdivn(:,:,1) = phdivn(:,:,1) - ssh_iau(:,:) / e3t_n(:,:,1) * tmask(:,:,1) 
     825      ELSE  
     826         CALL wrk_alloc( jpi,jpj, ztim) 
     827         ztim(:,:) = ssh_iau(:,:) / ( ht_n(:,:) + 1.0 - ssmask(:,:) ) 
     828         DO jk = 1, jpkm1                                  
     829            phdivn(:,:,jk) = phdivn(:,:,jk) - ztim(:,:) * tmask(:,:,jk)  
     830         END DO 
     831         ! 
     832         CALL wrk_dealloc( jpi,jpj, ztim) 
     833      ENDIF 
     834      ! 
     835   END SUBROUTINE ssh_asm_div 
    800836 
    801837   SUBROUTINE seaice_asm_inc( kt, kindic ) 
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90

    r7753 r8829  
    2525   USE iscplhsb        ! ice sheet / ocean coupling 
    2626   USE iscplini        ! ice sheet / ocean coupling 
     27#if defined key_asminc    
     28   USE asminc          ! Assimilation increment 
     29#endif 
    2730   ! 
    2831   USE in_out_manager  ! I/O manager 
     
    9295      IF( ln_rnf )   CALL sbc_rnf_div( hdivn )      !==  runoffs    ==!   (update hdivn field) 
    9396      ! 
     97#if defined key_asminc  
     98      IF( ln_sshinc .AND. ln_asmiau )   CALL ssh_asm_div( kt, hdivn )   !==  SSH assimilation  ==!   (update hdivn field) 
     99      !  
     100#endif 
    94101      IF( ln_isf )   CALL sbc_isf_div( hdivn )      !==  ice shelf  ==!   (update hdivn field) 
    95102      ! 
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r8795 r8829  
    2727   USE agrif_opa_interp 
    2828#endif 
    29 #if defined key_asminc    
    30    USE   asminc       ! Assimilation increment 
    31 #endif 
    3229   ! 
    3330   USE in_out_manager ! I/O manager 
     
    9996 
    10097      CALL div_hor( kt )                               ! Horizontal divergence 
    101       ! 
    102 #if defined key_asminc 
    103       !                                                ! Include the IAU weighted SSH increment 
    104       IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN 
    105          CALL ssh_asm_inc( kt ) 
    106          IF ( ln_linssh ) THEN 
    107             ! Adjust sea surface height directly 
    108             ! (note that qns/sfx are not modified to take into account heat/salt content added as effect would  
    109             ! just need to be removed by concentration / dilution effect in trasbc) 
    110             ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:) 
    111          ELSE 
    112             ! Don't directly adjust sea surface height but change horizontal divergence at all levels instead 
    113             ! (in trasbc the heat and salt content associated with these changes are also taken into account) 
    114             DO jk = 1, jpkm1                                  
    115                hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) )   & 
    116                                                * ( e3t_0(:,:,jk) / e3t_n(:,:,jk) ) * tmask(:,:,jk)  
    117             END DO 
    118             CALL lbc_lnk( hdivn, 'T', 1. ) 
    119          ENDIF 
    120       ENDIF 
    121       ! 
    122 #endif 
    12398      ! 
    12499      zhdiv(:,:) = 0._wp 
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r8794 r8829  
    7575      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7676      ! 
    77       INTEGER  ::   ji, jj, jk, jn        ! dummy loop indices   
    78       INTEGER  ::   ikt, ikb              ! local integers 
    79       REAL(wp) ::   zfact, z1_e3t, zdep   ! local scalar 
     77      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices   
     78      INTEGER  ::   ikt, ikb                    ! local integers 
     79      REAL(wp) ::   zfact, z1_e3t, zdep, ztim   ! local scalar 
    8080      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    8181      !!---------------------------------------------------------------------- 
     
    219219      IF( ln_sshinc ) THEN         ! input of heat and salt due to assimilation 
    220220          ! 
    221          ! Only required for vvl case (without vvl all the ssh increment is added to the surface layer and because the extra 
    222          ! water added by assimilation is always assumed to have the same T/S as the layer it is added to, and no additional T/S  
    223          ! content is explicitly added into qns/sfx due to ssh_iau, there is no need to include a compensating term to adjust  
    224          ! for it here) 
    225          ! 
    226          IF( .NOT. ln_linssh ) THEN  
     221         IF( ln_linssh ) THEN  
    227222            DO jj = 2, jpj  
    228223               DO ji = fs_2, fs_jpim1 
    229                   zdep = ssh_iau(ji,jj) / ( ht_0(ji,jj) + 1.0 - ssmask(ji, jj) ) 
    230                   DO jk = 1, jpkm1 
    231                      tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)   & 
    232                                            &            + tsn(ji,jj,jk,jp_tem) * zdep * ( e3t_0(ji,jj,jk) / e3t_n(ji,jj,jk) ) 
    233                      tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal)   & 
    234                                            &            + tsn(ji,jj,jk,jp_sal) * zdep * ( e3t_0(ji,jj,jk) / e3t_n(ji,jj,jk) ) 
    235                   END DO 
     224                  ztim = ssh_iau(ji,jj) / e3t_n(ji,jj,1) 
     225                  tsa(ji,jj,1,jp_tem) = tsa(ji,jj,1,jp_tem) + tsn(ji,jj,1,jp_tem) * ztim 
     226                  tsa(ji,jj,1,jp_sal) = tsa(ji,jj,1,jp_sal) + tsn(ji,jj,1,jp_sal) * ztim 
     227               END DO 
     228            END DO 
     229         ELSE 
     230            DO jj = 2, jpj  
     231               DO ji = fs_2, fs_jpim1 
     232                  ztim = ssh_iau(ji,jj) / ( ht_n(ji,jj) + 1. - ssmask(ji, jj) ) 
     233                  tsa(ji,jj,:,jp_tem) = tsa(ji,jj,:,jp_tem) + tsn(ji,jj,:,jp_tem) * ztim 
     234                  tsa(ji,jj,:,jp_sal) = tsa(ji,jj,:,jp_sal) + tsn(ji,jj,:,jp_sal) * ztim 
    236235               END DO   
    237236            END DO   
     
    239238         ! 
    240239      ENDIF 
     240      ! 
    241241#endif 
    242242 
Note: See TracChangeset for help on using the changeset viewer.