In my experiment, I want to hold the solar radiation using external data. So I plan to use downloaded shortwave (solar radiation) data to overide the model calculation sw value in CESM2 coupler. I found the coupler sw calculation process in subroutine seq_flux_ocnalb_mct in the file /my_cesm_sandbox/cime/src/drivers/mct/main/seq_flux_mct.F90.
To realize my plan, is the code above the right place to modify?
Should I change the right side of the last two lines of the code above to my downloaded data?!--- flux_atmocn needs swdn & swup = swdn*(-albedo)
!--- swdn & albedos are time-aligned BEFORE albedos get updated below ---
do n=1,nloc_o
avsdr = xao_o%rAttr(index_xao_So_avsdr,n)
anidr = xao_o%rAttr(index_xao_So_anidr,n)
avsdf = xao_o%rAttr(index_xao_So_avsdf,n)
anidf = xao_o%rAttr(index_xao_So_anidf,n)
swupc = a2x_o%rAttr(index_a2x_Faxa_swndr,n)*(-anidr) &
& + a2x_o%rAttr(index_a2x_Faxa_swndf,n)*(-anidf) &
& + a2x_o%rAttr(index_a2x_Faxa_swvdr,n)*(-avsdr) &
& + a2x_o%rAttr(index_a2x_Faxa_swvdf,n)*(-avsdf)
swdnc = a2x_o%rAttr(index_a2x_Faxa_swndr,n) &
& + a2x_o%rAttr(index_a2x_Faxa_swndf,n) &
& + a2x_o%rAttr(index_a2x_Faxa_swvdr,n) &
& + a2x_o%rAttr(index_a2x_Faxa_swvdf,n)
if ( anidr == 1.0_r8 ) then ! dark side of earth
swupc = 0.0_r8
swdnc = 0.0_r8
end if
xao_o%rAttr(index_xao_Faox_swdn,n) = swdnc
xao_o%rAttr(index_xao_Faox_swup,n) = swupc
To realize my plan, is the code above the right place to modify?