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 8341 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 – NEMO

Ignore:
Timestamp:
2017-07-15T13:00:17+02:00 (7 years ago)
Author:
clem
Message:

correct the heat conservation (all fine except limthd_da for a reason I do not understand)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r8324 r8341  
    163163            qns(ji,jj) = hfx_out(ji,jj) - zqsr               
    164164 
    165             !------------------------------------------! 
    166             !      mass flux at the ocean surface      ! 
    167             !------------------------------------------! 
     165            ! Mass flux at the atm. surface        
     166            !----------------------------------- 
     167            wfx_sub(ji,jj) = wfx_snw_sub(ji,jj) + wfx_ice_sub(ji,jj) 
     168 
     169            ! Mass flux at the ocean surface       
     170            !------------------------------------ 
    168171            !  case of realistic freshwater flux (Tartinville et al., 2001) (presently ACTIVATED) 
    169172            !  -------------------------------------------------------------------------------------  
     
    178181                           + wfx_opw(ji,jj) + wfx_dyn(ji,jj) + wfx_res(ji,jj) + wfx_lam(ji,jj)  
    179182 
    180             IF ( ln_pnd_fw ) & 
    181                wfx_ice(ji,jj) = wfx_ice(ji,jj) + wfx_pnd(ji,jj) 
     183            IF ( ln_pnd_fw )   wfx_ice(ji,jj) = wfx_ice(ji,jj) + wfx_pnd(ji,jj) 
    182184 
    183185            ! add the snow melt water to snow mass flux to the ocean 
    184             wfx_snw(ji,jj) = wfx_snw(ji,jj) + wfx_snw_sum(ji,jj)  
     186            wfx_snw(ji,jj) = wfx_snw_sni(ji,jj) + wfx_snw_dyn(ji,jj) + wfx_snw_sum(ji,jj) 
    185187 
    186188            ! mass flux at the ocean/ice interface 
    187189            fmmflx(ji,jj) = - ( wfx_ice(ji,jj) + wfx_snw(ji,jj) + wfx_err_sub(ji,jj) )              ! F/M mass flux save at least for biogeochemical model 
    188190            emp(ji,jj)    = emp_oce(ji,jj) - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_err_sub(ji,jj)   ! mass flux + F/M mass flux (always ice/ocean mass exchange) 
     191 
     192 
     193            ! Salt flux at the ocean surface       
     194            !------------------------------------------ 
     195            sfx(ji,jj) = sfx_bog(ji,jj) + sfx_bom(ji,jj) + sfx_sum(ji,jj) + sfx_sni(ji,jj) + sfx_opw(ji,jj)   & 
     196               &       + sfx_res(ji,jj) + sfx_dyn(ji,jj) + sfx_bri(ji,jj) + sfx_sub(ji,jj) + sfx_lam(ji,jj) 
     197             
     198            ! Mass of snow and ice per unit area    
     199            !---------------------------------------- 
     200            ! save mass from the previous ice time step 
     201            snwice_mass_b(ji,jj) = snwice_mass(ji,jj)                   
     202            ! new mass per unit area 
     203            snwice_mass  (ji,jj) = tmask(ji,jj,1) * ( rhosn * vt_s(ji,jj) + rhoic * vt_i(ji,jj)  )  
     204            ! time evolution of snow+ice mass 
     205            snwice_fmass (ji,jj) = ( snwice_mass(ji,jj) - snwice_mass_b(ji,jj) ) * r1_rdtice 
     206             
    189207         END DO 
    190208      END DO 
    191  
    192       !------------------------------------------! 
    193       !      salt flux at the ocean surface      ! 
    194       !------------------------------------------! 
    195       sfx(:,:) = sfx_bog(:,:) + sfx_bom(:,:) + sfx_sum(:,:) + sfx_sni(:,:) + sfx_opw(:,:)   & 
    196          &     + sfx_res(:,:) + sfx_dyn(:,:) + sfx_bri(:,:) + sfx_sub(:,:) + sfx_lam(:,:) 
    197  
    198       !----------------------------------------! 
    199       !   mass of snow and ice per unit area   ! 
    200       !----------------------------------------! 
    201       ! save mass from the previous ice time step 
    202       snwice_mass_b(:,:) = snwice_mass(:,:)                   
    203       ! new mass per unit area 
    204       snwice_mass  (:,:) = tmask(:,:,1) * ( rhosn * vt_s(:,:) + rhoic * vt_i(:,:)  )  
    205       ! time evolution of snow+ice mass 
    206       snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) * r1_rdtice 
    207209 
    208210      !-----------------------------------------------! 
Note: See TracChangeset for help on using the changeset viewer.