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 3962 for branches/2013/dev_r3406_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 – NEMO

Ignore:
Timestamp:
2013-07-09T14:22:30+02:00 (11 years ago)
Author:
gm
Message:

dev_r3406_CNRS_LIM3: fix a bug in the freshwater budget correction, see ticket #1116

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r3406_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r3938 r3962  
    99   !!            3.3  ! 2010-05 (G. Madec) decrease ocean & ice reference salinities in the Baltic sea 
    1010   !!                 !                  + simplification of the ice-ocean stress calculation 
    11    !!            4.0  ! 2011-02 (G. Madec) dynamical allocation 
     11   !!            3.4  ! 2011-02 (G. Madec) dynamical allocation 
    1212   !!             -   ! 2012    (D. Iovino) salt flux change 
    1313   !!             -   ! 2012-05 (C. Rousset) add penetration solar flux 
     14   !!            3.5  ! 2012-10 (A. Coward, G. Madec) salt fluxes ; ice+snow mass 
    1415   !!---------------------------------------------------------------------- 
    1516#if defined key_lim3 
     
    3738   USE cpl_oasis3, ONLY : lk_cpl 
    3839   USE traqsr           ! clem: add penetration of solar flux into the calculation of heat budget 
    39    USE lib_fortran      ! to use key_nosignedzero 
     40   USE oce,        ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass, sshu_b, sshv_b, sshu_n, sshv_n, sshf_n 
     41   USE dom_ice,    ONLY : tms 
     42   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    4043 
    4144   IMPLICIT NONE 
     
    173176            ! qdtcn Energy from the turbulent oceanic heat flux heat flux coming in the lead 
    174177 
    175             IF ( num_sal == 2 ) zfcm2(ji,jj) = zfcm2(ji,jj) + & 
    176                fhbri(ji,jj) ! new contribution due to brine drainage  
     178            IF ( num_sal == 2 ) zfcm2(ji,jj) = zfcm2(ji,jj) + fhbri(ji,jj) ! new contribution due to brine drainage  
    177179 
    178180            ! bottom radiative component is sent to the computation of the 
     
    281283      ENDIF 
    282284 
     285      !-----------------------------------------------! 
     286      !   mass of snow and ice per unit area          ! 
     287      !-----------------------------------------------! 
     288      IF( nn_ice_embd /= 0 ) THEN                               ! embedded sea-ice (mass required) 
     289         snwice_mass_b(:,:) = snwice_mass(:,:)                  ! save mass from the previous ice time step 
     290         !                                                      ! new mass per unit area 
     291         snwice_mass  (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  )  
     292         !                                                      ! time evolution of snow+ice mass 
     293         snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice 
     294      ENDIF 
    283295 
    284296      !-----------------------------------------------! 
     
    420432      oatte(:,:) = 1._wp 
    421433      ! 
     434      !                                      ! sea ice  with mass exchange 
     435         snwice_mass  (:,:) = tms(:,:) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  ) 
     436         snwice_mass_b(:,:) = snwice_mass(:,:) 
     437      ! 
     438      ! 
    422439   END SUBROUTINE lim_sbc_init 
    423440 
Note: See TracChangeset for help on using the changeset viewer.