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 7947 for branches/UKMO/dev_r5518_GO6_package_inc_asm/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90 – NEMO

Ignore:
Timestamp:
2017-04-21T16:04:15+02:00 (7 years ago)
Author:
jwhile
Message:

Merged in dev_r5518_sshinc_with_VVL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_inc_asm/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90

    r6793 r7947  
    3333   USE timing          ! Timing 
    3434   USE eosbn2 
     35#if defined key_asminc    
     36   USE asminc          ! Assimilation increment 
     37#endif 
    3538 
    3639   IMPLICIT NONE 
     
    120123      REAL(wp) ::   zfact, z1_e3t, zdep 
    121124      REAL(wp) ::   zalpha, zhk 
     125      REAL(wp) ::  zt_frz, zpress 
    122126      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    123127      !!---------------------------------------------------------------------- 
     
    232236               DO jk = ikt, ikb - 1 
    233237               ! compute tfreez for the temperature correction (we add water at freezing temperature) 
     238!                  zpress = grav*rau0*fsdept(ji,jj,jk)*1.e-04 
     239                  zt_frz = -1.9 !eos_fzp( tsn(ji,jj,jk,jp_sal), zpress ) 
    234240               ! compute trend 
    235241                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)                                          & 
    236                      &           + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem)) * r1_hisf_tbl(ji,jj) 
     242                     &           + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem)          & 
     243                     &               - rdivisf * (fwfisf(ji,jj) + fwfisf_b(ji,jj)) * zt_frz * r1_rau0) & 
     244                     &           * r1_hisf_tbl(ji,jj) 
    237245                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal)                                          & 
    238246                     &           + zfact * (risf_tsc_b(ji,jj,jp_sal) + risf_tsc(ji,jj,jp_sal)) * r1_hisf_tbl(ji,jj) 
     
    241249               ! level partially include in ice shelf boundary layer  
    242250               ! compute tfreez for the temperature correction (we add water at freezing temperature) 
     251!               zpress = grav*rau0*fsdept(ji,jj,ikb)*1.e-04 
     252               zt_frz = -1.9 !eos_fzp( tsn(ji,jj,ikb,jp_sal), zpress ) 
    243253               ! compute trend 
    244254               tsa(ji,jj,ikb,jp_tem) = tsa(ji,jj,ikb,jp_tem)                                           & 
    245                   &              + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem)) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 
     255                  &              + zfact * (risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem)          & 
     256                  &                  - rdivisf * (fwfisf(ji,jj) + fwfisf_b(ji,jj)) * zt_frz * r1_rau0) &  
     257                  &              * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 
    246258               tsa(ji,jj,ikb,jp_sal) = tsa(ji,jj,ikb,jp_sal)                                           & 
    247259                  &              + zfact * (risf_tsc_b(ji,jj,jp_sal) + risf_tsc(ji,jj,jp_sal)) * r1_hisf_tbl(ji,jj) * ralpha(ji,jj)  
     
    279291         END DO   
    280292      ENDIF 
     293 
     294#if defined key_asminc 
     295! WARNING: THIS MAY WELL NOT BE REQUIRED - WE DON'T WANT TO CHANGE T&S BUT THIS MAY COMPENSATE ANOTHER TERM... 
     296! Rate of change in e3t for each level is ssh_iau*e3t_0/ht_0 
     297! Contribution to tsa should be rate of change in level / per m of ocean? (hence the division by fse3t_n) 
     298      IF( ln_sshinc ) THEN         ! input of heat and salt due to assimilation 
     299         DO jj = 2, jpj  
     300            DO ji = fs_2, fs_jpim1 
     301               zdep = ssh_iau(ji,jj) / ( ht_0(ji,jj) + 1.0 - ssmask(ji, jj) ) 
     302               DO jk = 1, jpkm1 
     303                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)   & 
     304                                        &            + tsn(ji,jj,jk,jp_tem) * zdep * ( e3t_0(ji,jj,jk) / fse3t_n(ji,jj,jk) ) 
     305                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal)   & 
     306                                        &            + tsn(ji,jj,jk,jp_sal) * zdep * ( e3t_0(ji,jj,jk) / fse3t_n(ji,jj,jk) ) 
     307               END DO 
     308            END DO   
     309         END DO   
     310      ENDIF 
     311#endif 
    281312  
    282313      IF( l_trdtra )   THEN                      ! send trends for further diagnostics 
Note: See TracChangeset for help on using the changeset viewer.