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 12919 for NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icethd.F90 – NEMO

Ignore:
Timestamp:
2020-05-13T14:49:18+02:00 (4 years ago)
Author:
clem
Message:

finish implementing convergence check on heat diffusion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icethd.F90

    r12915 r12919  
    5454   LOGICAL ::   ln_leadhfx       !  heat in the leads is used to melt sea-ice before warming the ocean 
    5555 
     56   !! for convergence tests 
     57   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztice_cvgerr, ztice_cvgstp 
     58 
    5659   !! * Substitutions 
    5760#  include "vectopt_loop_substitute.h90" 
     
    104107         WRITE(numout,*) '~~~~~~~' 
    105108      ENDIF 
     109 
     110      ! convergence tests 
     111      IF( ln_zdf_chkcvg ) THEN 
     112         ALLOCATE( ztice_cvgerr(jpi,jpj,jpl) , ztice_cvgstp(jpi,jpj,jpl) ) 
     113         ztice_cvgerr = 0._wp ; ztice_cvgstp = 0._wp 
     114      ENDIF 
    106115       
    107116      !---------------------------------------------! 
     
    220229            !                                                       ! --- & Change units of e_i, e_s from J/m2 to J/m3 --- ! 
    221230            ! 
    222             s_i_new   (1:npti) = 0._wp ; dh_s_tot(1:npti) = 0._wp  ! --- some init --- !  (important to have them here)  
     231            s_i_new   (1:npti) = 0._wp ; dh_s_tot(1:npti) = 0._wp   ! --- some init --- !  (important to have them here)  
    223232            dh_i_sum  (1:npti) = 0._wp ; dh_i_bom(1:npti) = 0._wp ; dh_i_itm  (1:npti) = 0._wp  
    224233            dh_i_sub  (1:npti) = 0._wp ; dh_i_bog(1:npti) = 0._wp 
     
    254263      IF( ln_icedO )          CALL ice_thd_do                       ! --- Frazil ice growth in leads --- ! 
    255264      ! 
     265      ! convergence tests 
     266      IF( ln_zdf_chkcvg ) THEN 
     267         CALL iom_put( 'tice_cvgerr', ztice_cvgerr ) ; DEALLOCATE( ztice_cvgerr ) 
     268         CALL iom_put( 'tice_cvgstp', ztice_cvgstp ) ; DEALLOCATE( ztice_cvgstp ) 
     269      ENDIF 
     270      ! 
    256271      ! controls 
    257       IF( ln_zdf_chkcvg .AND. iom_use('tice_cvg') )  CALL iom_put( 'tice_cvg', tice_cvg ) ! convergence of zdf scheme 
    258272      IF( ln_icectl )   CALL ice_prt    (kt, iiceprt, jiceprt, 1, ' - ice thermodyn. - ') ! prints 
    259273      IF( ln_ctl    )   CALL ice_prt3D  ('icethd')                                        ! prints 
     
    523537         ! check convergence of heat diffusion scheme 
    524538         IF( ln_zdf_chkcvg ) THEN 
    525             CALL tab_1d_2d( npti, nptidx(1:npti), tice_cvg_1d(1:npti), tice_cvg(:,:,kl) ) 
     539            CALL tab_1d_2d( npti, nptidx(1:npti), tice_cvgerr_1d(1:npti), ztice_cvgerr(:,:,kl) ) 
     540            CALL tab_1d_2d( npti, nptidx(1:npti), tice_cvgstp_1d(1:npti), ztice_cvgstp(:,:,kl) ) 
    526541         ENDIF 
    527542         ! 
Note: See TracChangeset for help on using the changeset viewer.