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 – NEMO

Changeset 12919 for NEMO/branches/2020


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

finish implementing convergence check on heat diffusion

Location:
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/cfgs/SHARED/field_def_nemo-ice.xml

    r12916 r12919  
    308308 
    309309          <!-- heat diffusion convergence tests --> 
    310           <field id="tice_cvg"   long_name="sea ice temperature convergence"   standard_name="sea_ice_temperature_convergence"   unit="K" /> 
     310          <field id="tice_cvgerr" long_name="sea ice temperature convergence error"      standard_name="sea_ice_temperature_convergence_err" unit="K" /> 
     311          <field id="tice_cvgstp" long_name="sea ice temperature convergence iterations" standard_name="sea_ice_temperature_convergence_stp" unit=""  /> 
    311312 
    312313   </field_group> <!-- SBC_3D --> 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/cfgs/SHARED/namelist_ice_ref

    r12915 r12919  
    149149   rn_kappa_smlt    =   7.0           !  nn_qtrice = 1: radiation attenuation coefficient in melting snow [1/m] 
    150150   rn_kappa_sdry    =  10.0           !                 radiation attenuation coefficient in dry snow     [1/m] 
    151    ln_zdf_chkcvg    = .false.         !  check convergence of heat diffusion scheme (output variable: tice_cvg) 
     151   ln_zdf_chkcvg    = .false.         !  check convergence of heat diffusion scheme (outputs: tice_cvgerr, tice_cvgstp) 
    152152/ 
    153153!------------------------------------------------------------------------------ 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/ice.F90

    r12915 r12919  
    417417   ! 
    418418   !!---------------------------------------------------------------------- 
    419    !! * Check convergence 
    420    !!---------------------------------------------------------------------- 
    421    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tice_cvg        !: convergence of ice/snow temperature (dT in K) 
    422    ! 
    423    !!---------------------------------------------------------------------- 
    424419   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
    425420   !! $Id$ 
     
    434429      INTEGER :: ice_alloc 
    435430      ! 
    436       INTEGER :: ierr(18), ii 
     431      INTEGER :: ierr(17), ii 
    437432      !!----------------------------------------------------------------- 
    438433      ierr(:) = 0 
     
    520515      ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(ii) ) 
    521516 
    522       ! * Check convergence 
    523       ii = ii + 1 
    524       ALLOCATE( tice_cvg(jpi,jpj,jpl) , STAT=ierr(ii) ) 
    525  
    526517      ice_alloc = MAXVAL( ierr(:) ) 
    527518      IF( ice_alloc /= 0 )   CALL ctl_stop( 'STOP', 'ice_alloc: failed to allocate arrays.' ) 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/ice1d.F90

    r12915 r12919  
    147147 
    148148   ! convergence check 
    149    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   tice_cvg_1d   !: convergence of ice/snow temperature (dT) [K] 
     149   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   tice_cvgerr_1d   !: convergence of ice/snow temp (dT)          [K] 
     150   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   tice_cvgstp_1d   !: convergence of ice/snow temp (subtimestep) [-] 
    150151   !  
    151152   !!---------------------- 
     
    227228      ! 
    228229      ii = ii + 1 
    229       ALLOCATE( tice_cvg_1d(jpij) , STAT=ierr(ii) ) 
     230      ALLOCATE( tice_cvgerr_1d(jpij) , tice_cvgstp_1d(jpij) , STAT=ierr(ii) ) 
    230231      ! 
    231232      ii = ii + 1 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icestp.F90

    r12915 r12919  
    435435      diag_trp_ei(:,:) = 0._wp   ;   diag_trp_es(:,:) = 0._wp 
    436436      diag_trp_sv(:,:) = 0._wp 
    437  
    438       ! for convergence check 
    439       IF( ln_zdf_chkcvg )   tice_cvg(:,:,:) = 0._wp 
    440437       
    441438   END SUBROUTINE diag_set0 
  • 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         ! 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icethd_zdf_bl99.F90

    r12915 r12919  
    586586                     zdti_max      =  MAX( zdti_max, ABS( t_i_1d(ji,jk) - ztib(ji,jk) ) ) 
    587587                  END DO 
    588  
    589                   IF ( zdti_max < zdti_bnd ) l_T_converged(ji) = .TRUE. 
     588                  ! convergence test 
     589                  IF( ln_zdf_chkcvg ) THEN 
     590                     tice_cvgerr_1d(ji) = zdti_max 
     591                     tice_cvgstp_1d(ji) = REAL(iconv) 
     592                  ENDIF 
     593 
     594                  IF( zdti_max < zdti_bnd )   l_T_converged(ji) = .TRUE. 
    590595 
    591596               ENDIF 
     
    761766                     zdti_max      =  MAX ( zdti_max, ABS( t_i_1d(ji,jk) - ztib(ji,jk) ) ) 
    762767                  END DO 
    763  
    764                   IF ( zdti_max < zdti_bnd ) l_T_converged(ji) = .TRUE. 
     768                  ! convergence test 
     769                  IF( ln_zdf_chkcvg ) THEN 
     770                     tice_cvgerr_1d(ji) = zdti_max 
     771                     tice_cvgstp_1d(ji) = REAL(iconv) 
     772                  ENDIF 
     773 
     774                  IF( zdti_max < zdti_bnd )   l_T_converged(ji) = .TRUE. 
    765775 
    766776               ENDIF 
     
    769779 
    770780         ENDIF ! k_cnd 
    771           
     781 
    772782      END DO  ! End of the do while iterative procedure 
    773       ! 
    774       ! convergence tests (only for output) 
    775       IF( ln_zdf_chkcvg ) THEN 
    776          tice_cvg_1d(1:npti) = 0._wp 
    777          DO jk = 1, nlay_s          ! snow temperature 
    778             DO ji = 1, npti 
    779                tice_cvg_1d(ji) = MAX( tice_cvg_1d(ji), ABS( t_s_1d(ji,jk) - ztsb(ji,jk) ) ) 
    780             ENDDO 
    781          ENDDO 
    782          DO jk = 1, nlay_i          ! ice temperature 
    783             DO ji = 1, npti 
    784                tice_cvg_1d(ji) = MAX( tice_cvg_1d(ji), ABS( t_i_1d(ji,jk) - ztib(ji,jk) ) ) 
    785             ENDDO 
    786          ENDDO 
    787          IF( k_cnd == np_cnd_OFF .OR. k_cnd == np_cnd_EMU ) THEN 
    788             DO ji = 1, npti         ! surface temperature 
    789                tice_cvg_1d(ji) = MAX( tice_cvg_1d(ji), ABS( t_su_1d(ji) - ztsub(ji) ) ) 
    790             ENDDO 
    791          ENDIF 
    792       ENDIF 
    793783      ! 
    794784      !----------------------------- 
Note: See TracChangeset for help on using the changeset viewer.