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 4733 for branches/2014/dev_4728_CNRS04_coupled_interface/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90 – NEMO

Ignore:
Timestamp:
2014-07-30T15:52:48+02:00 (10 years ago)
Author:
vancop
Message:

Fix energy budget in coupled case

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_4728_CNRS04_coupled_interface/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90

    r4688 r4733  
    6868      !!                ***  ROUTINE lim_thd  ***        
    6969      !!   
    70       !! ** Purpose : This routine manages the ice thermodynamic. 
     70      !! ** Purpose : This routine manages ice thermodynamics 
    7171      !!          
    7272      !! ** Action : - Initialisation of some variables 
     
    7474      !!               at the ice base, snow acc.,heat budget of the leads) 
    7575      !!             - selection of the icy points and put them in an array 
    76       !!             - call lim_vert_ther for vert ice thermodynamic 
    77       !!             - back to the geographic grid 
    78       !!             - selection of points for lateral accretion 
    79       !!             - call lim_lat_acc  for the ice accretion 
     76      !!             - call lim_thd_dif  for vertical heat diffusion 
     77      !!             - call lim_thd_dh   for vertical ice growth and melt 
     78      !!             - call lim_thd_ent  for enthalpy remapping 
     79      !!             - call lim_thd_sal  for ice desalination 
     80      !!             - call lim_thd_temp to  retrieve temperature from ice enthalpy 
    8081      !!             - back to the geographic grid 
    8182      !!      
    82       !! ** References : H. Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90 
     83      !! ** References :  
    8384      !!--------------------------------------------------------------------- 
    8485      INTEGER, INTENT(in) ::   kt    ! number of iteration 
     
    9394      ! 
    9495      REAL(wp) :: zvi_b, zsmv_b, zei_b, zfs_b, zfw_b, zft_b  
     96      ! 
     97      REAL(wp), POINTER, DIMENSION(:,:) ::  zqsr, zqns 
    9598      !!------------------------------------------------------------------- 
     99      CALL wrk_alloc( jpi, jpj, zqsr, zqns ) 
     100 
    96101      IF( nn_timing == 1 )  CALL timing_start('limthd') 
    97102 
     
    137142      !-----------------------------------------------------------------------------! 
    138143 
     144      !--- Ocean solar and non solar fluxes to be used in zqld 
     145      IF ( .NOT. lk_cpl ) THEN   ! --- forced case, fluxes to the lead are the same as over the ocean 
     146         ! 
     147         zqsr(:,:) = qsr(:,:)      ; zqns(:,:) = qns(:,:) 
     148         ! 
     149      ELSE                       ! --- coupled case, fluxes to the lead are total - intercepted 
     150         ! 
     151         zqsr(:,:) = qsr_tot(:,:)  ; zqns(:,:) = qns_tot(:,:) 
     152         ! 
     153         DO jl = 1, jpl 
     154            DO jj = 1, jpj 
     155               DO ji = 1, jpi 
     156                  zqsr(ji,jj) = zqsr(ji,jj) - qsr_ice(ji,jj,jl) * old_a_i(ji,jj,jl) 
     157                  zqns(ji,jj) = zqns(ji,jj) - qns_ice(ji,jj,jl) * old_a_i(ji,jj,jl) 
     158               END DO 
     159            END DO 
     160         END DO 
     161         ! 
     162      ENDIF 
     163 
    139164!CDIR NOVERRCHK 
    140165      DO jj = 1, jpj 
     
    149174            !           !  temperature and turbulent mixing (McPhee, 1992) 
    150175            ! 
     176 
    151177            ! --- Energy received in the lead, zqld is defined everywhere (J.m-2) --- ! 
    152             zqld =  tms(ji,jj) * rdt_ice *                                       & 
    153                &  ( pfrld(ji,jj)         * ( qsr(ji,jj) * oatte(ji,jj)           &   ! solar heat + clem modif 
    154                &                           + qns(ji,jj) )                        &   ! non solar heat 
    155                ! latent heat of precip (note that precip is included in qns but not in qns_ice) 
    156                &    + ( pfrld(ji,jj)**betas - pfrld(ji,jj) ) * sprecip(ji,jj) * ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rtt ) - lfus )  & 
     178            zqld =  tms(ji,jj) * rdt_ice *                                          & 
     179               &  ( pfrld(ji,jj)         * ( zqsr(ji,jj) * oatte(ji,jj) + zqns(ji,jj) )  
     180               &    + ( pfrld(ji,jj)**betas - pfrld(ji,jj) ) * sprecip(ji,jj) *     & ! heat content of precip 
     181               &      ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rtt ) - lfus )  & 
    157182               &    + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rtt ) ) 
     183               ! REMARK valid at least in forced mode from clem 
     184               ! precip is included in qns but not in qns_ice 
    158185 
    159186            !-- Energy needed to bring ocean surface layer until its freezing (<0, J.m-2) --- ! 
     
    482509      ENDIF 
    483510      ! 
     511      ! 
     512      CALL wrk_dealloc( jpi, jpj, zqsr, zqns ) 
     513 
     514      ! 
    484515      ! conservation test 
    485516      IF( ln_limdiahsb ) CALL lim_cons_hsm(1, 'limthd', zvi_b, zsmv_b, zei_b, zfw_b, zfs_b, zft_b) 
    486517      ! 
    487518      IF( nn_timing == 1 )  CALL timing_stop('limthd') 
     519 
    488520   END SUBROUTINE lim_thd  
    489521 
Note: See TracChangeset for help on using the changeset viewer.