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 output ocean surface chlorophyll concentration, what configurations are needed in POP or MARBL?

anserwei

Johnny Wong
New Member
Dear community,


Hello, I want to analyze the time-series variations of ocean surface chlorophyll concentration.

(1) How do I configure POP or MARBL?
(2) If I'd like to use prescribed ocean surface chlorophyll concentration from Satellite observations to quantify the shortwave absorption in the ocean, how to configure POP or MARBL?

===============

By the wave, 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,

Call 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!
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
(1) What do you mean, "configure POP or MARBL"? If you run a compset that sets POP2%ECO, then MARBL will provide BGC tracers and diagnostics to POP (including chlorophyll). If there are specific changes to the default configuration you'd like to make, I'm happy to help. Also, if you say a little bit more about what else you want from the run I can help you choose an appropriate compset -- do you want to mimic a CMIP or OMIP run? Or do you have something else in mind? We might even be able to find output from an existing run for you to analyze rather than having you do the run yourself.

(2) Typically, if MARBL is enabled then the shortwave absorption module will use MARBL's chlorophyll values to determine how deep shortwave radiation gets in the ocean column but if MARBL is not present then it reads from a file. (There are some out-of-the-box configurations with MARBL that still rely on a file for chlorophyll; again, it depends on what compset you are running). By default, the file read in was generated based on SeaWIFS data, but if you have a different dataset you'd like to use then the requirements are:

* The data must be interpolated onto the POP grid
* If you are generated a netCDF file, the variable name must be CHL; if you are generated a binary file, the data must be double-precision floats written in big-endian

This isn't a well-tested portion of the code, so it's highly likely that there are other requirements that will only become apparent once you actually start running the code, but to read a netCDF file you would add the following to your user_nl_pop file:

Code:
chl_option = 'file'
chl_file_fmt = 'nc'
chl_filename = '/path/to/your/file.nc'

(3) I'll respond in detail in your other post about passing chlorophyll to the coupler. I can give you a basic outline, but there are a few steps where I'll need to find someone else to provide the details on how to actually modify the code.
 

anserwei

Johnny Wong
New Member
(1) What do you mean, "configure POP or MARBL"? If you run a compset that sets POP2%ECO, then MARBL will provide BGC tracers and diagnostics to POP (including chlorophyll). If there are specific changes to the default configuration you'd like to make, I'm happy to help. Also, if you say a little bit more about what else you want from the run I can help you choose an appropriate compset -- do you want to mimic a CMIP or OMIP run? Or do you have something else in mind? We might even be able to find output from an existing run for you to analyze rather than having you do the run yourself.

(2) Typically, if MARBL is enabled then the shortwave absorption module will use MARBL's chlorophyll values to determine how deep shortwave radiation gets in the ocean column but if MARBL is not present then it reads from a file. (There are some out-of-the-box configurations with MARBL that still rely on a file for chlorophyll; again, it depends on what compset you are running). By default, the file read in was generated based on SeaWIFS data, but if you have a different dataset you'd like to use then the requirements are:

* The data must be interpolated onto the POP grid
* If you are generated a netCDF file, the variable name must be CHL; if you are generated a binary file, the data must be double-precision floats written in big-endian

This isn't a well-tested portion of the code, so it's highly likely that there are other requirements that will only become apparent once you actually start running the code, but to read a netCDF file you would add the following to your user_nl_pop file:

Code:
chl_option = 'file'
chl_file_fmt = 'nc'
chl_filename = '/path/to/your/file.nc'

(3) I'll respond in detail in your other post about passing chlorophyll to the coupler. I can give you a basic outline, but there are a few steps where I'll need to find someone else to provide the details on how to actually modify the code.


Hi, Michael,

Thank you for your reply. I appreciate your help.

Recent researches show that ocean surface albedo is a process of quantifying light attenuation in the ocean. The ocean surface chlorophyll is the major contributor to light attenuation. Some studies have related ocean surface albedo (both direct & diffuse) to ocean surface chlorophyll concentration.

The motivations of my study (20 years GCM run):

(1) Plan to provide two options of chlorophyll concentration in the 'seq_flux_mct.F90': (1-1). the diagnostic (1-2). The prescribe.
(2) Modify the ocean surface albedo calculation in CESM using the new algorithm.
(3) Compare ocean surface albedo results of the new algorithm to the original algorithm in CESM, and analyze the influence of chlorophyll concentration on ocean surface albedo.
Specifically, run CESM twice: one outputs the ocean surface albedo of the new algorithm; another outputs the ocean surface albedo of the original algorithm.
(4) Run CESM twice: access changes of atmospheric parameters between the original and the new algorithm.
For instance, atmospheric parameters include air temperature, precipitation, specific humidity, aerosol optical depth, downward and upward radiation, etc.
(5) For ‘compsets’, I don’t have a preference yet. But, I think the selected ‘compset’ should be a coupled air-ocean-seaice-land ‘compset’. The changes in atmospheric parameters should not be limited to the atmosphere over the ocean.

Currently, my focus will be on modifying the code following your suggestion. I will post some updates once I have.

Thank you very much.
 
Top