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 5146 for trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90 – NEMO

Ignore:
Timestamp:
2015-03-11T18:30:22+01:00 (9 years ago)
Author:
vancop
Message:

Fixes on the LIM3 coupled interface (important for ESMs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_dif.F90

    r5128 r5146  
    120120      REAL(wp), POINTER, DIMENSION(:)     ::   zh_s        ! snow layer thickness 
    121121      REAL(wp), POINTER, DIMENSION(:)     ::   zfsw        ! solar radiation absorbed at the surface 
     122      REAL(wp), POINTER, DIMENSION(:)     ::   zqns_ice_b  ! solar radiation absorbed at the surface 
    122123      REAL(wp), POINTER, DIMENSION(:)     ::   zf          ! surface flux function 
    123124      REAL(wp), POINTER, DIMENSION(:)     ::   dzf         ! derivative of the surface flux function 
     
    168169      CALL wrk_alloc( jpij, numeqmin, numeqmax ) 
    169170      CALL wrk_alloc( jpij, isnow, ztsub, ztsubit, zh_i, zh_s, zfsw ) 
    170       CALL wrk_alloc( jpij, zf, dzf, zerrit, zdifcase, zftrice, zihic, zghe ) 
     171      CALL wrk_alloc( jpij, zf, dzf, zqns_ice_b, zerrit, zdifcase, zftrice, zihic, zghe ) 
    171172      CALL wrk_alloc( jpij, nlay_i+1, ztcond_i, zradtr_i, zradab_i, zkappa_i, ztib, zeta_i, ztitemp, z_i, zspeche_i, kjstart=0) 
    172173      CALL wrk_alloc( jpij, nlay_s+1,           zradtr_s, zradab_s, zkappa_s, ztsb, zeta_s, ztstemp, z_s, kjstart=0) 
     
    242243      !------------------------------------------------------- 
    243244      DO ji = kideb , kiut 
    244          zfsw   (ji) =  qsr_ice_1d(ji) * ( 1 - i0(ji) )   ! Shortwave radiation absorbed at surface 
    245          zftrice(ji) =  qsr_ice_1d(ji) *       i0(ji)     ! Solar radiation transmitted below the surface layer 
    246          dzf    (ji) = dqns_ice_1d(ji)                    ! derivative of incoming nonsolar flux  
     245         zfsw   (ji)    =  qsr_ice_1d(ji) * ( 1 - i0(ji) )   ! Shortwave radiation absorbed at surface 
     246         zftrice(ji)    =  qsr_ice_1d(ji) *       i0(ji)     ! Solar radiation transmitted below the surface layer 
     247         dzf    (ji)    = dqns_ice_1d(ji)                    ! derivative of incoming nonsolar flux  
     248         zqns_ice_b(ji) = qns_ice_1d(ji)                     ! store previous qns_ice_1d value 
    247249      END DO 
    248250 
     
    452454         !------------------------------------------------------------------------------| 
    453455         ! 
    454          IF( .NOT. lk_cpl ) THEN   !--- forced atmosphere case 
     456         IF ( ln_it_qnsice ) THEN  
    455457            DO ji = kideb , kiut 
    456458               ! update of the non solar flux according to the update in T_su 
     
    757759      CALL lim_thd_enmelt( kideb, kiut ) 
    758760 
     761      ! --- diagnose the change in non-solar flux due to surface temperature change --- ! 
     762      IF ( ln_it_qnsice ) hfx_err_dif_1d(:) = hfx_err_dif_1d(:) - ( qns_ice_1d(:)  - zqns_ice_b(:) ) * a_i_1d(:)  
    759763 
    760764      ! --- diag conservation imbalance on heat diffusion - PART 2 --- ! 
     
    770774      END DO  
    771775 
    772       ! diagnose external surface (forced case) or bottom (forced case) from heat conservation 
    773       IF( .NOT. lk_cpl ) THEN   ! --- forced case: qns_ice and fc_su are diagnosed 
    774          ! 
    775          DO ji = kideb, kiut 
    776             qns_ice_1d(ji) = qns_ice_1d(ji) - zhfx_err(ji) 
    777             fc_su     (ji) = fc_su(ji)      - zhfx_err(ji) 
    778          END DO 
    779          ! 
    780       ELSE                      ! --- coupled case: ocean turbulent heat flux is diagnosed 
    781          ! 
    782          DO ji = kideb, kiut 
    783             fhtur_1d  (ji) = fhtur_1d(ji)   - zhfx_err(ji) 
    784          END DO 
    785          ! 
    786       ENDIF 
     776      hfx_err_dif_1d(:) = hfx_err_dif_1d(:) - zhfx_err(:) * a_i_1d(:) 
    787777 
    788778      !----------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.