Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

How to change the incident radiation

jialiu

NJNU
Member
Dear all,
I would like to modify the band of incident solar radiation to be controlled between 400-700 nm, and the rest of the solar radiation is reflected into the atmosphere. I wonder if this can be achieved by CLM5? Where should I change the code?
Thanks very much
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Seems like you would have to set the direct and diffuse near-infrared albedos to 1.0. Probably easiest to let the model calculate those albedos and then overwrite them in the code. I suggest looking at the radiation chapter in the technical note:


Surface albedos for non-urban and urban columns are calculated in:

src/biogeophys/SurfaceAlbedoMod.F90
src/biogeophys/UrbanAlbedoMod.F90
 

jialiu

NJNU
Member
Seems like you would have to set the direct and diffuse near-infrared albedos to 1.0. Probably easiest to let the model calculate those albedos and then overwrite them in the code. I suggest looking at the radiation chapter in the technical note:


Surface albedos for non-urban and urban columns are calculated in:

src/biogeophys/SurfaceAlbedoMod.F90
src/biogeophys/UrbanAlbedoMod.F90
Thanks very much for your response. Let me make a supplement. I want to simulate the situation that change the incident radiation of the vegetation canopy without changing the scattered radiation. I checked the SurfaceAlbedoMod.F90 subroutine TwoStream. I found the var ftdd which means “down direct flux below canopy per unit direct flx”. Should I modify this variable. I didn't find out how to set a variable. Can you please suggest?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Sorry, I don't understand what you are trying to do. The term incident radiation to me means the radiation coming from the forcing (e.g., from an atmospheric model or reanalysis or tower measurements). Normally this is partitioned into visible and near-infrared and direct and diffuse. The radiation model then determines the amount of radiation absorbed or reflected by the surface. Are you trying to modify the incident radiation?
 

jialiu

NJNU
Member
Sorry, I don't understand what you are trying to do. The term incident radiation to me means the radiation coming from the forcing (e.g., from an atmospheric model or reanalysis or tower measurements). Normally this is partitioned into visible and near-infrared and direct and diffuse. The radiation model then determines the amount of radiation absorbed or reflected by the surface. Are you trying to modify the incident radiation?
Yes, I want to modify the visible and direct of incident radiation.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
If you are running with the data atmosphere model (datm; i.e., forcing CLM with reanalysis data (eg., GSWP3V1)) then it seems like you could just modify the incident solar radiation in this datm code (cime/src/components/data_comps/datm/datm_comp_mod.F90):

!--- shortwave radiation ---
if (sswdndf > 0 .and. sswdndr > 0) then
a2x%rAttr(kswndr,n) = avstrm%rAttr(sswdndr,n) * 0.50_R8
a2x%rAttr(kswvdr,n) = avstrm%rAttr(sswdndr,n) * 0.50_R8
a2x%rAttr(kswndf,n) = avstrm%rAttr(sswdndf,n) * 0.50_R8
a2x%rAttr(kswvdf,n) = avstrm%rAttr(sswdndf,n) * 0.50_R8
elseif (sswdn > 0) then
! relationship between incoming NIR or VIS radiation and ratio of
! direct to diffuse radiation calculated based on one year's worth of
! hourly CAM output from CAM version cam3_5_55
swndr = avstrm%rAttr(sswdn,n) * 0.50_R8
ratio_rvrf = min(0.99_R8,max(0.29548_R8 + 0.00504_R8*swndr &
-1.4957e-05_R8*swndr**2 + 1.4881e-08_R8*swndr**3,0.01_R8))
a2x%rAttr(kswndr,n) = ratio_rvrf*swndr
swndf = avstrm%rAttr(sswdn,n) * 0.50_R8
a2x%rAttr(kswndf,n) = (1._R8 - ratio_rvrf)*swndf

swvdr = avstrm%rAttr(sswdn,n) * 0.50_R8
ratio_rvrf = min(0.99_R8,max(0.17639_R8 + 0.00380_R8*swvdr &
-9.0039e-06_R8*swvdr**2 + 8.1351e-09_R8*swvdr**3,0.01_R8))
a2x%rAttr(kswvdr,n) = ratio_rvrf*swvdr
swvdf = avstrm%rAttr(sswdn,n) * 0.50_R8
a2x%rAttr(kswvdf,n) = (1._R8 - ratio_rvrf)*swvdf
else
call shr_sys_abort(subName//'ERROR: cannot compute short-wave down')
endif

As you stated in your initial post, if you wanted to only force the model with visible direct solar radiation, then you could set the other components to zero:

a2x%rAttr(kswndr,n) = 0 (near-infrared direct)
a2x%rAttr(kswndf,n) = 0 (near-infrared diffuse)
a2x%rAttr(kswvdf,n) = 0 (visible diffuse)

Alternatively, you could create your own datm forcing files.
Or you could zero out the forcing in the CLM code itself (components/clm/src/cpl/lnd_import_export.F90):

atm2lnd_inst%forc_solad_grc(g,2) = x2l(index_x2l_Faxa_swndr,i) ! forc_sollxy Atm flux W/m^2
atm2lnd_inst%forc_solad_grc(g,1) = x2l(index_x2l_Faxa_swvdr,i) ! forc_solsxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,2) = x2l(index_x2l_Faxa_swndf,i) ! forc_solldxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,1) = x2l(index_x2l_Faxa_swvdf,i) ! forc_solsdxy Atm flux W/m^2
 

jialiu

NJNU
Member
If you are running with the data atmosphere model (datm; i.e., forcing CLM with reanalysis data (eg., GSWP3V1)) then it seems like you could just modify the incident solar radiation in this datm code (cime/src/components/data_comps/datm/datm_comp_mod.F90):

!--- shortwave radiation ---
if (sswdndf > 0 .and. sswdndr > 0) then
a2x%rAttr(kswndr,n) = avstrm%rAttr(sswdndr,n) * 0.50_R8
a2x%rAttr(kswvdr,n) = avstrm%rAttr(sswdndr,n) * 0.50_R8
a2x%rAttr(kswndf,n) = avstrm%rAttr(sswdndf,n) * 0.50_R8
a2x%rAttr(kswvdf,n) = avstrm%rAttr(sswdndf,n) * 0.50_R8
elseif (sswdn > 0) then
! relationship between incoming NIR or VIS radiation and ratio of
! direct to diffuse radiation calculated based on one year's worth of
! hourly CAM output from CAM version cam3_5_55
swndr = avstrm%rAttr(sswdn,n) * 0.50_R8
ratio_rvrf = min(0.99_R8,max(0.29548_R8 + 0.00504_R8*swndr &
-1.4957e-05_R8*swndr**2 + 1.4881e-08_R8*swndr**3,0.01_R8))
a2x%rAttr(kswndr,n) = ratio_rvrf*swndr
swndf = avstrm%rAttr(sswdn,n) * 0.50_R8
a2x%rAttr(kswndf,n) = (1._R8 - ratio_rvrf)*swndf

swvdr = avstrm%rAttr(sswdn,n) * 0.50_R8
ratio_rvrf = min(0.99_R8,max(0.17639_R8 + 0.00380_R8*swvdr &
-9.0039e-06_R8*swvdr**2 + 8.1351e-09_R8*swvdr**3,0.01_R8))
a2x%rAttr(kswvdr,n) = ratio_rvrf*swvdr
swvdf = avstrm%rAttr(sswdn,n) * 0.50_R8
a2x%rAttr(kswvdf,n) = (1._R8 - ratio_rvrf)*swvdf
else
call shr_sys_abort(subName//'ERROR: cannot compute short-wave down')
endif

As you stated in your initial post, if you wanted to only force the model with visible direct solar radiation, then you could set the other components to zero:

a2x%rAttr(kswndr,n) = 0 (near-infrared direct)
a2x%rAttr(kswndf,n) = 0 (near-infrared diffuse)
a2x%rAttr(kswvdf,n) = 0 (visible diffuse)

Alternatively, you could create your own datm forcing files.
Or you could zero out the forcing in the CLM code itself (components/clm/src/cpl/lnd_import_export.F90):

atm2lnd_inst%forc_solad_grc(g,2) = x2l(index_x2l_Faxa_swndr,i) ! forc_sollxy Atm flux W/m^2
atm2lnd_inst%forc_solad_grc(g,1) = x2l(index_x2l_Faxa_swvdr,i) ! forc_solsxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,2) = x2l(index_x2l_Faxa_swndf,i) ! forc_solldxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,1) = x2l(index_x2l_Faxa_swvdf,i) ! forc_solsdxy Atm flux W/m^2
Thanks very much for your response. That's exactly what I want to do. I have an extra question. If I want to modify the Incident radiation in a specific area. Any suggestion here? Thanks again!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
There are latitude and longitude variables in the CLM code that you could use to constrain the area you want to change:

components/clm/src/GridcellType.F90:

real(r8), pointer :: latdeg (:) ! latitude (degrees)
real(r8), pointer :: londeg (:) ! longitude (degrees)
 

jialiu

NJNU
Member
If you are running with the data atmosphere model (datm; i.e., forcing CLM with reanalysis data (eg., GSWP3V1)) then it seems like you could just modify the incident solar radiation in this datm code (cime/src/components/data_comps/datm/datm_comp_mod.F90):

!--- shortwave radiation ---
if (sswdndf > 0 .and. sswdndr > 0) then
a2x%rAttr(kswndr,n) = avstrm%rAttr(sswdndr,n) * 0.50_R8
a2x%rAttr(kswvdr,n) = avstrm%rAttr(sswdndr,n) * 0.50_R8
a2x%rAttr(kswndf,n) = avstrm%rAttr(sswdndf,n) * 0.50_R8
a2x%rAttr(kswvdf,n) = avstrm%rAttr(sswdndf,n) * 0.50_R8
elseif (sswdn > 0) then
! relationship between incoming NIR or VIS radiation and ratio of
! direct to diffuse radiation calculated based on one year's worth of
! hourly CAM output from CAM version cam3_5_55
swndr = avstrm%rAttr(sswdn,n) * 0.50_R8
ratio_rvrf = min(0.99_R8,max(0.29548_R8 + 0.00504_R8*swndr &
-1.4957e-05_R8*swndr**2 + 1.4881e-08_R8*swndr**3,0.01_R8))
a2x%rAttr(kswndr,n) = ratio_rvrf*swndr
swndf = avstrm%rAttr(sswdn,n) * 0.50_R8
a2x%rAttr(kswndf,n) = (1._R8 - ratio_rvrf)*swndf

swvdr = avstrm%rAttr(sswdn,n) * 0.50_R8
ratio_rvrf = min(0.99_R8,max(0.17639_R8 + 0.00380_R8*swvdr &
-9.0039e-06_R8*swvdr**2 + 8.1351e-09_R8*swvdr**3,0.01_R8))
a2x%rAttr(kswvdr,n) = ratio_rvrf*swvdr
swvdf = avstrm%rAttr(sswdn,n) * 0.50_R8
a2x%rAttr(kswvdf,n) = (1._R8 - ratio_rvrf)*swvdf
else
call shr_sys_abort(subName//'ERROR: cannot compute short-wave down')
endif

As you stated in your initial post, if you wanted to only force the model with visible direct solar radiation, then you could set the other components to zero:

a2x%rAttr(kswndr,n) = 0 (near-infrared direct)
a2x%rAttr(kswndf,n) = 0 (near-infrared diffuse)
a2x%rAttr(kswvdf,n) = 0 (visible diffuse)

Alternatively, you could create your own datm forcing files.
Or you could zero out the forcing in the CLM code itself (components/clm/src/cpl/lnd_import_export.F90):

atm2lnd_inst%forc_solad_grc(g,2) = x2l(index_x2l_Faxa_swndr,i) ! forc_sollxy Atm flux W/m^2
atm2lnd_inst%forc_solad_grc(g,1) = x2l(index_x2l_Faxa_swvdr,i) ! forc_solsxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,2) = x2l(index_x2l_Faxa_swndf,i) ! forc_solldxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,1) = x2l(index_x2l_Faxa_swvdf,i) ! forc_solsdxy Atm flux W/m^2
Hi Olesen,
I just try to set zero in lnd_import_export.F90. And it's worked. I have an additional question that can I give a coefficient, such as:
atm2lnd_inst%forc_solad_grc(g,2) = x2l(index_x2l_Faxa_swndr,i) ! forc_sollxy Atm flux W/m^2
atm2lnd_inst%forc_solad_grc(g,1) = x2l(index_x2l_Faxa_swvdr,i)*0.8 ! forc_solsxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,2) = x2l(index_x2l_Faxa_swndf,i) ! forc_solldxy Atm flux W/m^2
atm2lnd_inst%forc_solai_grc(g,1) = x2l(index_x2l_Faxa_swvdf,i) ! forc_solsdxy Atm flux W/m^2
 
Top