Changeset 8794


Ignore:
Timestamp:
2017-11-23T13:41:43+01:00 (3 years ago)
Author:
charris
Message:

Changes to correctly deal with sea surface height increments both with and without vvl.

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

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r7753 r8794  
    100100      CALL div_hor( kt )                               ! Horizontal divergence 
    101101      ! 
     102if 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 
     123      ! 
    102124      zhdiv(:,:) = 0._wp 
    103125      DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports 
     
    121143         ENDIF 
    122144      ENDIF 
    123  
    124 #if defined key_asminc 
    125       IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN     ! Include the IAU weighted SSH increment 
    126          CALL ssh_asm_inc( kt ) 
    127          ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:) 
    128       ENDIF 
    129 #endif 
    130145      !                                           !------------------------------! 
    131146      !                                           !           outputs            ! 
  • branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r7788 r8794  
    2727   USE trd_oce        ! trends: ocean variables 
    2828   USE trdtra         ! trends manager: tracers  
     29#if defined key_asminc    
     30   USE asminc         ! Assimilation increment 
     31#endif 
    2932   ! 
    3033   USE in_out_manager ! I/O manager 
     
    208211      IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*tsn(:,:,1,jp_sal) )   ! runoff term on sss 
    209212 
     213#if defined key_asminc 
     214      ! 
     215      !---------------------------------------- 
     216      !        Assmilation effects 
     217      !---------------------------------------- 
     218      ! 
     219      IF( ln_sshinc ) THEN         ! input of heat and salt due to assimilation 
     220          ! 
     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  
     227            DO jj = 2, jpj  
     228               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 
     236               END DO   
     237            END DO   
     238         ENDIF 
     239         ! 
     240      ENDIF 
     241#endif 
     242 
    210243      ! 
    211244      !---------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.