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/limthd.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/limthd.F90

    r8332 r8341  
    279279         ENDIF 
    280280         ! 
    281       END DO !jl 
    282  
    283       IF( ln_limdA)           CALL lim_thd_da                                ! --- lateral melting --- ! 
    284  
    285       at_i(:,:)    = SUM( a_i(:,:,:), dim=3 ) 
     281      END DO 
     282      at_i(:,:) = SUM( a_i(:,:,:), dim=3 ) 
    286283 
    287284      ! Change thickness to volume 
     
    289286      v_s(:,:,:)   = ht_s(:,:,:) * a_i(:,:,:) 
    290287      smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 
     288      IF( ln_limdiachk ) CALL lim_cons_hsm(1, 'limthd', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
     289 
     290      IF( ln_limdiachk ) CALL lim_cons_hsm(0, 'limitd_thd_da', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
     291      IF( ln_limdA)           CALL lim_thd_da                                ! --- lateral melting --- ! 
     292 
     293      ! Change thickness to volume 
     294      at_i(:,:)    = SUM( a_i(:,:,:), dim=3 ) 
     295      v_i(:,:,:)   = ht_i(:,:,:) * a_i(:,:,:) 
     296      v_s(:,:,:)   = ht_s(:,:,:) * a_i(:,:,:) 
     297      smv_i(:,:,:) = sm_i(:,:,:) * v_i(:,:,:) 
     298      IF( ln_limdiachk ) CALL lim_cons_hsm(1, 'limitd_thd_da', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
    291299 
    292300      ! update ice age (in case a_i changed, i.e. becomes 0 or lateral melting in monocat) 
     
    305313      IF( ln_limctl )    CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ' )   ! control print 
    306314      ! 
    307       IF( ln_limdiachk ) CALL lim_cons_hsm(1, 'limthd', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
    308315 
    309316      !------------------------------------------------! 
     
    454461         CALL tab_2d_1d( nidx, fhld_1d    (1:nidx), fhld            , jpi, jpj, idxice(1:nidx) ) 
    455462         ! 
    456          CALL tab_2d_1d( nidx, wfx_snw_1d (1:nidx), wfx_snw         , jpi, jpj, idxice(1:nidx) ) 
     463         CALL tab_2d_1d( nidx, wfx_snw_sni_1d(1:nidx), wfx_snw_sni  , jpi, jpj, idxice(1:nidx) ) 
    457464         CALL tab_2d_1d( nidx, wfx_snw_sum_1d(1:nidx), wfx_snw_sum  , jpi, jpj, idxice(1:nidx) ) 
    458465         CALL tab_2d_1d( nidx, wfx_sub_1d (1:nidx), wfx_sub         , jpi, jpj, idxice(1:nidx) ) 
     
    516523         END DO 
    517524         ! 
    518          CALL tab_1d_2d( nidx, wfx_snw       , idxice, wfx_snw_1d(1:nidx)   , jpi, jpj ) 
     525         CALL tab_1d_2d( nidx, wfx_snw_sni   , idxice, wfx_snw_sni_1d(1:nidx), jpi, jpj ) 
    519526         CALL tab_1d_2d( nidx, wfx_snw_sum   , idxice, wfx_snw_sum_1d(1:nidx),jpi, jpj ) 
    520527         CALL tab_1d_2d( nidx, wfx_sub       , idxice, wfx_sub_1d(1:nidx)   , jpi, jpj ) 
Note: See TracChangeset for help on using the changeset viewer.