Hi, How could I get the “Heat Balance” equations in the new version of EFDC? I have the “calheat.for” file for the EPA version, but I assume there are some changes in the computation method used in EFDC Explorer. I am especially looking for light attenuation through layers while the water quality mode is inactive.Thanks,

Please have a look at the following page on the EFDC_Explorer knowledge base for details on how solar radiation is distributed in the water column: https://eemodelingsystem.atlassian.net/wiki/spaces/ETG/pages/2367774/4.3.3+Solar+Radiation

Thanks Tom. I understand the concept, but cannot see the effects of the light extinction on my current model setup. That’s why I want to see the “calheat.for” file to see how the code handles the light extinction coefficient in different heat exchange options. Maybe, I need to activate a module to bring the extinction coefficient into calculations.

The Temperature Module will definitely need to be activated to see any impact of solar radiation on the water column.Here is the subroutine you are curious about:SUBROUTINE SET_LIGHT(L) ! *** SETS THE LIGHT EXCTINCTION FACTORS AND SOLAR RADIATION FOR EACH LAYER ! *** RADBOT - SOLAR RADIATION AT THE BOTTOM OF THE LAYER (W/M2) ! *** RADNET - NET SOLAR RADIATION ABSORBED IN THE LAYER (W/M2) ! *** RADTOP - SOLAR RADIATION AT THE TOP OF THE LAYER (W/M2) ! *** RADKE - EXTINCTION COEFFICIENT AT THE MIDPOINT OF THE LAYER INTEGER, INTENT(IN) :: L INTEGER :: K REAL :: WCKESS, BOT, FRACLAYER, SOLBOT ! *** INITIALIZE CELL ! *** SOLSWRT HAS BEEN ADJUSTED BEFORE HERE TO INCLUDE REFLECTANCE AND ICE (IF ANY) IF( ICECELL(L) )THEN ! *** ADJUST INCIDENT SOLAR RADIATION AT THE TOP OF THE WATER DUE TO ICE SOLBOT = EXP(-GAMMAI*ICETHICK(L)) BETAI = 1.0 - SOLBOT REFICE = (1. - ALBEDOI)/(1.-REFL)*SOLBOT RADTOP(L,KC) = SOLSWRT(L)*REFICE ELSE RADTOP(L,KC) = SOLSWRT(L) ENDIF ! *** LOOP OVER THE LAYERS IF( ISTOPT(2) == 4 )THEN ! *** EQUILIBRIUM TEMP APPROACH DO K = KC,KSZ(L),-1 ! *** Extinction Coefficient WCKESS = GET_EXT_COEFF(L,K) ! *** FRACTION OF LIGHT AT THE BOTTOM OF THE CURRENT LAYER BOT=MAX(-WCKESS*HPK(L,K),-40.0) FRACLAYER=EXP(BOT) IF( K == KC )THEN ! *** ENSURE AT LEAST THE FSWRATF FRACTION OF SRO IS ATTENUATED IN THE TOP LAYER IF( FRACLAYER > (1.-FSWRATF) .AND. HP(L) > 2.*HDRY ) FRACLAYER = 1.-FSWRATF ENDIF RADBOT(L,K) = RADTOP(L,K)*FRACLAYER ! *** Compute Net Energy (W/M2) RADNET(L,K) = RADTOP(L,K) - RADBOT(L,K) ! *** UPDATE LAYER VARIABLES RADTOP(L,K-1) = RADBOT(L,K) ENDDO ELSEIF( ISTOPT(2) == 5 )THEN ! *** FULL HEAT BALANCE APPROACH DO K = KC,KSZ(L),-1 ! *** Extinction Coefficient WCKESS = GET_EXT_COEFF(L,K) ! *** FRACTION OF LIGHT AT THE BOTTOM OF THE CURRENT LAYER BOT=MAX(-WCKESS*HPK(L,K),-40.0) FRACLAYER=EXP(BOT) RADBOT(L,K) = RADTOP(L,K)*FRACLAYER ! *** Compute Net Energy (W/M2) RADNET(L,K) = RADTOP(L,K) - RADBOT(L,K) ! *** UPDATE LAYER VARIABLES RADTOP(L,K-1) = RADBOT(L,K) ENDDO ENDIF END SUBROUTINE

This is awesome. Thanks a lot. Can I also get the part of the code for the function “GET_EXT_COEFF” please?! *** Extinction CoefficientWCKESS = GET_EXT_COEFF(L,K)

REAL FUNCTION GET_EXT_COEFF(L,K) ! *** COMPUTE THE LIGHT EXTINCTION COEFFICIENT INTEGER, INTENT(IN) :: L, K REAL :: WCKESS, CHLKE, TSS IF( ISTRAN(6) > 0 .OR. ISTRAN(7) > 0 )THEN TSS = SEDT(L,K)+SNDT(L,K) ELSE TSS = 0. ENDIF IF( ISTRAN(8) > 0 )THEN ! *** If using WQ then use the WQ Coefficients WCKESS = WQKEB(IWQZMAP(L,K)) ! *** BACKGROUND EXTINCTION (BY WQ ZONE) WCKESS = WCKESS + WQKETSS*TSS ! *** INORGANIC SOLIDS COMPONENT WCKESS = WCKESS + WQKEPOC*(WQV(L,K,4)+WQV(L,K,5)) ! *** PARTICULATE ORGANIC MATTER WCKESS = WCKESS + WQKEDOM*WQV(L,K,6) ! *** DISSOLVED ORGANIC MATTER IF( WQKECHL < 0.0 )THEN ! *** CHLOROPHYLL ! *** Compute Extinction Factor as a fn(Chla) CHLKE = 0.054*WQCHL(L,K)**0.6667 + 0.0088*WQCHL(L,K) ELSE CHLKE = WQKECHL*WQCHL(L,K)**WQKECHLE ENDIF WCKESS = WCKESS + CHLKE ELSE WCKESS = SVKEBACK(L) + WQKETSS*TSS ENDIF RADKE(L,K) = WCKESS GET_EXT_COEFF = WCKESS END FUNCTION GET_EXT_COEFF

This is super, thank you Tom.Now, the code means when the WQ module is off [ISTRAN(8)=0], the Extinction coefficients equation is :WCKESS = SVKEBACK(L) + WQKETSS*TSSAt the same time when the sediment modules are off the equation is:WCKESS = SVKEBACK(L)SVKEBACK is the WQKEB (BACKGROUND LIGHT EXTINCTION) which is defined inside the EFDC explorer, correct?