Dear CESM team,
Hello, I want to modify the source code of ocean surface albedo using a new calculation method for one of my Ph.D. research topics.
In CESM 2.1.3, the source code of ocean surface albedo is in the subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o ) of seq_flux_mct.F90 (source code path: ./cime/src/drivers/mct/main/seq_flux_mct.F90):
There are two chooses for calculating the ocean surface albedo:
1. one is daily mean without considering the zenith angle dependence (line 821-843 in seq_flux_mct.F90):
2. the other one is instantaneous with the zenith angle dependence (line 876 - 901 in seq_flux_mct.F90):
By default, the Coupler uses the second one, i.e., daily mean downward solar radiation * instantaneous surface albedo. On the dark side, there is no solar absorption, so the net solar radiation send to the ocean components is much smaller than that expected.
I write a simple subroutine that ocean surface albedo is parameterized as function of four variables:
Inputs:
Cosine of solar zenith angle: cosz
ocean surface chlorophyll concentration: chl (unit: mg/m-3); total chlorophyll
0meter wind speed: wspd10 (unit: m/s);
wind direction:wspd_dir (unit: degree);
wavelength start: wl_s (unit: nm);
wavelength end: wl_e (unit: nm);
outputs:
direct albedo: adr
diffuse albedo: adf
The subroutine looks like this: call osa_para(cosz, chl, wspd10, wspd_dir, wl_s, wl_e, adr, adf)
I want to replace the second option of ocean surface albedo calculation with my own subroutine osa_para,
(i.e., replaced
)
For instance, with the subroutine osa_para,
Parameters/availabilities for calling the osa_para(cosz, chl, wspd10, wspd_dir, wl_s, wl_e, adr, adf):
(1). ‘Cosz’ is provided directly in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(2). ‘chl’ is not available in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(3). ‘wspd10’ is the variable ‘duu10n’ in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(4). ‘wspd_dir’ can be calculated from varables ‘ubot ’ and ‘vbot’ in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(5) ‘wl_s’ and ‘wl_s’ are fixed integer values. (e.g., wl_s = 300, wl_e = 700)
Questions:
(1). How to add the ocean surface chlorophyll concentration ‘chl’ to the seq_flux_mct.F90 file (specifically, in the subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o))?
The subroutine seq_flux_ocnalb_mct in the seq_flux_mct.F90 is written as:
......
If ‘chl’ is added to this subroutine seq_flux_ocnalb_mct. The input parameters: infodata, ocn and a2x_o, need to be changed ?? how?
(2) If the 'chl' is provided by the pop, what additional process is needed (like CN_CHL_TYPE=diagnostic??? )?
What about if the monthly mean 'chl' are from Oceancolor satellite observation climatology dataset? what additional process is needed?
(3) So, the namlist of CIME is needed to be changed accordingly? how?
It will be very appreciated if anyone could guide me on how to implement modifications (mentioned above).
Thank you very much!
Best,
Johnny Wong
Hello, I want to modify the source code of ocean surface albedo using a new calculation method for one of my Ph.D. research topics.
In CESM 2.1.3, the source code of ocean surface albedo is in the subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o ) of seq_flux_mct.F90 (source code path: ./cime/src/drivers/mct/main/seq_flux_mct.F90):
There are two chooses for calculating the ocean surface albedo:
1. one is daily mean without considering the zenith angle dependence (line 821-843 in seq_flux_mct.F90):
if (flux_albav) then
do n=1,nloc_o
anidr = seq_flux_mct_albdir
avsdr = seq_flux_mct_albdir
anidf = seq_flux_mct_albdif
avsdf = seq_flux_mct_albdif
! Albedo is now function of latitude (will be new implementation)
!rlat = const_deg2rad * lats(n)
!anidr = 0.069_r8 - 0.011_r8 * cos(2._r8 * rlat)
!avsdr = anidr
!anidf = anidr
!avsdf = anidr
xao_o%rAttr(index_xao_So_avsdr,n) = avsdr
xao_o%rAttr(index_xao_So_anidr,n) = anidr
xao_o%rAttr(index_xao_So_avsdf,n) = avsdf
xao_o%rAttr(index_xao_So_anidf,n) = anidf
end do
update_alb = .true.
else
2. the other one is instantaneous with the zenith angle dependence (line 876 - 901 in seq_flux_mct.F90):
! Compute albedos
do n=1,nloc_o
rlat = const_deg2rad * lats(n)
rlon = const_deg2rad * lons(n)
cosz = shr_orb_cosz( calday, rlat, rlon, delta )
if (cosz > 0.0_r8) then !--- sun hit --
anidr = (.026_r8/(cosz**1.7_r8 + 0.065_r8)) + &
(.150_r8*(cosz - 0.100_r8 ) * &
(cosz - 0.500_r8 ) * &
(cosz - 1.000_r8 ) )
avsdr = anidr
anidf = seq_flux_mct_albdif
avsdf = seq_flux_mct_albdif
else !--- dark side of earth ---
anidr = 1.0_r8
avsdr = 1.0_r8
anidf = 1.0_r8
avsdf = 1.0_r8
end if
xao_o%rAttr(index_xao_So_avsdr,n) = avsdr
xao_o%rAttr(index_xao_So_anidr,n) = anidr
xao_o%rAttr(index_xao_So_avsdf,n) = avsdf
xao_o%rAttr(index_xao_So_anidf,n) = anidf
end do ! nloc_o
By default, the Coupler uses the second one, i.e., daily mean downward solar radiation * instantaneous surface albedo. On the dark side, there is no solar absorption, so the net solar radiation send to the ocean components is much smaller than that expected.
I write a simple subroutine that ocean surface albedo is parameterized as function of four variables:
Inputs:
Cosine of solar zenith angle: cosz
ocean surface chlorophyll concentration: chl (unit: mg/m-3); total chlorophyll
0meter wind speed: wspd10 (unit: m/s);
wind direction:wspd_dir (unit: degree);
wavelength start: wl_s (unit: nm);
wavelength end: wl_e (unit: nm);
outputs:
direct albedo: adr
diffuse albedo: adf
The subroutine looks like this: call osa_para(cosz, chl, wspd10, wspd_dir, wl_s, wl_e, adr, adf)
I want to replace the second option of ocean surface albedo calculation with my own subroutine osa_para,
(i.e., replaced
anidr = (.026_r8/(cosz**1.7_r8 + 0.065_r8)) + &
(.150_r8*(cosz - 0.100_r8 ) * &
(cosz - 0.500_r8 ) * &
(cosz - 1.000_r8 ) )
avsdr = anidr
anidf = seq_flux_mct_albdif
avsdf = seq_flux_mct_albdif
)
For instance, with the subroutine osa_para,
all osa_para(cosz, chl, wspd10, wspd_dir, 400, 700, avsdr, avsdf)
Parameters/availabilities for calling the osa_para(cosz, chl, wspd10, wspd_dir, wl_s, wl_e, adr, adf):
(1). ‘Cosz’ is provided directly in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(2). ‘chl’ is not available in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(3). ‘wspd10’ is the variable ‘duu10n’ in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(4). ‘wspd_dir’ can be calculated from varables ‘ubot ’ and ‘vbot’ in .//cime/src/drivers/mct/main/seq_flux_mct.F90.
(5) ‘wl_s’ and ‘wl_s’ are fixed integer values. (e.g., wl_s = 300, wl_e = 700)
Questions:
(1). How to add the ocean surface chlorophyll concentration ‘chl’ to the seq_flux_mct.F90 file (specifically, in the subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o))?
The subroutine seq_flux_ocnalb_mct in the seq_flux_mct.F90 is written as:
!===============================================================================
subroutine seq_flux_ocnalb_mct( infodata, ocn, a2x_o, fractions_o, xao_o )
!-----------------------------------------------------------------------
! Arguments
type(seq_infodata_type) , intent(in) :: infodata
type(component_type) , intent(in) :: ocn
type(mct_aVect) , intent(in) :: a2x_o
type(mct_aVect) , intent(inout) :: fractions_o
type(mct_aVect) , intent(inout) :: xao_o
......
If ‘chl’ is added to this subroutine seq_flux_ocnalb_mct. The input parameters: infodata, ocn and a2x_o, need to be changed ?? how?
(2) If the 'chl' is provided by the pop, what additional process is needed (like CN_CHL_TYPE=diagnostic??? )?
What about if the monthly mean 'chl' are from Oceancolor satellite observation climatology dataset? what additional process is needed?
(3) So, the namlist of CIME is needed to be changed accordingly? how?
It will be very appreciated if anyone could guide me on how to implement modifications (mentioned above).
Thank you very much!
Best,
Johnny Wong