From e7b1d12d101931fa72f12e6835b7eded216009c9 Mon Sep 17 00:00:00 2001 From: Stefan Poll Date: Thu, 29 Oct 2026 23:03:20 +0100 Subject: [PATCH 1/2] ICON-eCLM: compute albedo for ICONs radiation window - compute albedo every coupling step at the current time instead of datms nextsw_cday - average cosz over the coupling interval - avoids night-flag albedo (=1) sent to ICON while the sun is still up in its radiation window --- src/clm5/biogeophys/SurfaceAlbedoMod.F90 | 8 ++++++++ src/clm5/cpl/lnd_comp_mct.F90 | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/clm5/biogeophys/SurfaceAlbedoMod.F90 b/src/clm5/biogeophys/SurfaceAlbedoMod.F90 index 7d1763041f..ff74d56acd 100644 --- a/src/clm5/biogeophys/SurfaceAlbedoMod.F90 +++ b/src/clm5/biogeophys/SurfaceAlbedoMod.F90 @@ -205,6 +205,9 @@ subroutine SurfaceAlbedo(bounds,nc, & ! !USES: use shr_orb_mod use clm_time_manager , only : get_nstep +#ifdef COUP_OAS_ICON + use clm_time_manager , only : get_step_size +#endif use abortutils , only : endrun use clm_varctl , only : subgridflag, use_snicar_frc, use_fates use CLMFatesInterfaceMod, only : hlm_fates_interface_type @@ -356,7 +359,12 @@ subroutine SurfaceAlbedo(bounds,nc, & ! Cosine solar zenith angle for next time step do g = bounds%begg,bounds%endg +#ifdef COUP_OAS_ICON + coszen_gcell(g) = shr_orb_cosz (nextsw_cday, grc%lat(g), grc%lon(g), declinp1, & + dt_avg=real(get_step_size(), r8)) +#else coszen_gcell(g) = shr_orb_cosz (nextsw_cday, grc%lat(g), grc%lon(g), declinp1) +#endif end do do c = bounds%begc,bounds%endc g = col%gridcell(c) diff --git a/src/clm5/cpl/lnd_comp_mct.F90 b/src/clm5/cpl/lnd_comp_mct.F90 index 56179beab6..b2f21ce48e 100644 --- a/src/clm5/cpl/lnd_comp_mct.F90 +++ b/src/clm5/cpl/lnd_comp_mct.F90 @@ -452,6 +452,10 @@ subroutine lnd_run_mct(EClock, cdata_l, x2l_l, l2x_l) else doalb = (nextsw_cday >= -0.5_r8) end if +#ifdef COUP_OAS_ICON + doalb = (nstep > 0) + nextsw_cday = get_curr_calday() +#endif call update_rad_dtime(doalb) ! Determine if time to write cam restart and stop From dea5135a99ee9cc72c8623fea2b2f36e24f1dfa3 Mon Sep 17 00:00:00 2001 From: Stefan Poll Date: Mon, 16 Nov 2026 12:26:04 +0100 Subject: [PATCH 2/2] ICON-eCLM: use ICON's equation of time for the albedo zenith angle - shift the calendar day in shr_orb_cosz by the equation of time as computed in ICON (mo_radiation) - eCLM and ICON use the same solar hour angle --- src/clm5/biogeophys/SurfaceAlbedoMod.F90 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/clm5/biogeophys/SurfaceAlbedoMod.F90 b/src/clm5/biogeophys/SurfaceAlbedoMod.F90 index ff74d56acd..587a7bfaae 100644 --- a/src/clm5/biogeophys/SurfaceAlbedoMod.F90 +++ b/src/clm5/biogeophys/SurfaceAlbedoMod.F90 @@ -206,7 +206,8 @@ subroutine SurfaceAlbedo(bounds,nc, & use shr_orb_mod use clm_time_manager , only : get_nstep #ifdef COUP_OAS_ICON - use clm_time_manager , only : get_step_size + use clm_time_manager , only : get_step_size, get_curr_date + use shr_const_mod , only : SHR_CONST_PI #endif use abortutils , only : endrun use clm_varctl , only : subgridflag, use_snicar_frc, use_fates @@ -283,6 +284,11 @@ subroutine SurfaceAlbedo(bounds,nc, & real(r8) :: mss_cnc_aer_in_fdb (bounds%begc:bounds%endc,-nlevsno+1:0,sno_nbr_aer) ! mass concentration of all aerosol species for feedback calculation (col,lyr,aer) [kg kg-1] real(r8), parameter :: mpe = 1.e-06_r8 ! prevents overflow for division by zero integer , parameter :: nband =numrad ! number of solar radiation waveband classes +#ifdef COUP_OAS_ICON + integer :: yr, mon, day, tod ! current date + real(r8) :: ztwo, ztho ! helper variables for eot + real(r8) :: eot_cday ! equation of time in calendar days +#endif !----------------------------------------------------------------------- associate(& @@ -358,9 +364,17 @@ subroutine SurfaceAlbedo(bounds,nc, & ! Cosine solar zenith angle for next time step +#ifdef COUP_OAS_ICON + ! calculate equation of time as in ICON (mo_radiation.f90) to account for apparent vs mean solar time + call get_curr_date(yr, mon, day, tod) + ztwo = 0.681_r8 + 0.2422_r8*real(yr-1949, r8) - real((yr-1949)/4, r8) + ztho = 2._r8*SHR_CONST_PI*(real(floor(nextsw_cday), r8) - 1._r8 + ztwo)/365.2422_r8 + eot_cday = (0.000075_r8 + 0.001868_r8*cos(ztho) - 0.032077_r8*sin(ztho) & + - 0.014615_r8*cos(2._r8*ztho) - 0.040849_r8*sin(2._r8*ztho)) / (2._r8*SHR_CONST_PI) +#endif do g = bounds%begg,bounds%endg #ifdef COUP_OAS_ICON - coszen_gcell(g) = shr_orb_cosz (nextsw_cday, grc%lat(g), grc%lon(g), declinp1, & + coszen_gcell(g) = shr_orb_cosz (nextsw_cday + eot_cday, grc%lat(g), grc%lon(g), declinp1, & dt_avg=real(get_step_size(), r8)) #else coszen_gcell(g) = shr_orb_cosz (nextsw_cday, grc%lat(g), grc%lon(g), declinp1)