ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
309 stars 313 forks source link

Problems about the soil gas diffusivity in methane code and nitrification-denitrification mod #1990

Closed jinmuluo closed 1 year ago

jinmuluo commented 1 year ago

Hi CTSM community,

I and my advisor have found some potential scientific problems in CLM and we hope to discuss these issues with you here.

(1) The formulation for diffusion appears incorrect in the methane code. This diffusion parameter taken from the methane code: (src/biogeochem/ch4Mod.F90, line 3872) and explained in section 2.25.7.3. of the CLM tech note.

https://escomp.github.io/ctsm-docs/versions/release-clm5.0/html/tech_note/Methane/CLM50_Tech_Note_Methane.html#aqueous-and-gaseous-diffusion

image

This appears to be coded incorrectly. The diffusion coefficient here is given as a linear combination of two terms weighted by (om_frac) and (1-om_frac) in the equation above. The equations for these terms are correctly given in the tech note. From the code:

eps=theta_a fa=theta_a/theta_s

where theta_a is the air-filled pore space and theta_s is the total porosity. The code should be eps(10./3.) instead of f_a(10./3.) in the second line. See 2.25.13 in the tech note.

(2) Correction to the nitrification, denitrification code. nitri-denitri code (src/soilbiogeochem/SoilBiogeochemNitrifDenitrifMod.F90, line 283). There are 2 corrections to how the diffusion is specified here to obtain the correct N2O emissions: (i) In the Parton formulation it is the normalized diffusion parameterization that is used (see Parsons et al., 1996): D/D_o. The specification for the diffusion used presently, src/soilbiogeochem/SoilBiogeochemNitrifDenitrifMod.F90, line 283 is taken from the CH4 code. However, the diffusion coefficient is not normalized here as it should be to give D/D_o Thus, (d_const_g(s,1) + d_const_g(s,2)^t_soisno_c)^1.e-4 should be omitted in the specification for diffusion only in the Nitrif-Denitrif module. (ii) The remainder of the equation should be corrected as detailed in (1) above in the Nitrif-DenitrifMod.

(3) CLM5 tech note correction. Table 25.2 gives the gas diffusivity in air in units of "m2 s-1". This should be “cm2 s-1”. For example, if the temperature is 273K, the O2 diffusivity in air is around 0.4762 m2 s-1 from the table. Standard values are about 10^-4 smaller. Values of these constants in the code seem to be correct so this only applies to the tech note.

Best,

Jinmu Luo

samsrabin commented 1 year ago

Hi Jinmu,

Thanks for this bug report! Seems like some very simple but important fixes. I'll have a go at implementing them sometime in the next few weeks.

Do you happen to have done any tests to see what effects these changes cause in simulation results?

jinmuluo commented 1 year ago

Hi Sam,

This mistake pushes more nitrogen loss to N2 when denitrification happens, but not changes the denitrification rate. Because I'm interested in N gas emission, so I guess the old method underestimates the N2O emission of 2 Tg every year.

Best,

samsrabin commented 1 year ago

Okay, thanks! It's on my list of things to work on; should be sometime in the next few weeks.

samsrabin commented 1 year ago

@jinmuluo Could you explain exactly what (d_con_g(2,1) + d_con_g(2,2)*t_soisno(c,j)) * 1.e-4_r8 is doing in the methane code, and why that shouldn't happen in the nitrification/denitrification code? I do see that diffus in the methane code has units m2/s whereas it's unitless in the nitrification/denitrification code, but I'm having trouble figuring out what this expression (some kind of linear regression against soil temperature?) is doing.

jinmuluo commented 1 year ago

@samsrabin Hi Sam, This function is the empirical expression of the gaseous diffusivity in soil which determined by the soil temperature, we called it D0 (m2/s). I guess Methane code use the De(effective diffusivity, m2/s) as a critical parameter to estimate the CH4 diffusivity in soil, where we can estimate the De from D0 and some soil properties. See the equation 2.25.12 https://escomp.github.io/ctsm-docs/versions/release-clm5.0/html/tech_note/Methane/CLM50_Tech_Note_Methane.html#aqueous-and-gaseous-diffusion

In "hole-in-the-pipe" model also called nitrificaition/denitrification module in CLM, Dr Parton used De/D0 which is a unitless, normalized parameter as its core parameter to calculate the gas ratio, they called it soil gas diffusivity. Please check this paper, there has some descriptions of the "soil gas diffusivity" above the equation 4. https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2001JD900101

samsrabin commented 1 year ago

Thanks for the pointers! Indeed, it looks like where diffus is used in this subroutine it should be unitless. However, the output history field diffus, which refers to this, does specify units of m2/s. I will thus have to divide by D0 in the place where diffus is used in this subroutine.

samsrabin commented 1 year ago

Well, wait. @jinmuluo, if we want to get diffusivity in terms of m2/s (for outputs only), are the oxygen coefficients the correct ones to use here?

jinmuluo commented 1 year ago

@samsrabin I guess it's correct to divide the diffus with D0 in nitrification/denitrification module, then the diffus is only related to water information in this module. Every gas has its own diffusivity, if you want to output the NO or N2O's diffusivity, you should change the coefficients.

samsrabin commented 1 year ago

Okay, makes sense. Do you happen to know of any studies where we'd be able to find those coefficients for NO or N2O?

jinmuluo commented 1 year ago

Sorry, I don't know any studies can provided such information.

wwieder commented 1 year ago

Thanks for helping here, @jinmuluo .

@samsrabin I'd suggest using the same values as for CH4 here, but noting in the code and a new (low priority) issue that this is a simplifying assumption, which can be addressed with future work.

Alternatively, there may be published literature values that make sense to plug in here, likely starting with references from the methane code

A quick google search led me here, although I'm not sure the data are readily transferable.

One more question: Is this fD0, from Table 2.25.1 in the tech note, or D0 from Table 2.25.2. I'm assuming it's the later, which seems to come from papers focuses on CH4, not N-gasses.