Skip to content

megan coefs fix #3065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

megan coefs fix #3065

wants to merge 1 commit into from

Conversation

fvitt
Copy link
Contributor

@fvitt fvitt commented Apr 10, 2025

Description of changes

Corrections on how MEGAN coefficients are applied.

Depends on ESCOMP/CMEPS#557

Specific notes

Contributors other than yourself, if any:

CTSM Issues Fixed (include github issue #):
Fixes #3016

Are answers expected to change (and if so in what way)? Yes, for MEGAN fields

Any User Interface Changes (namelist or namelist defaults changes)? No

Does this create a need to change or add documentation? Did you do so? No

Testing performed, if any: scientific testing is underway

@ekluzek ekluzek self-assigned this Apr 11, 2025
@ekluzek ekluzek added next this should get some attention in the next week or two. Normally each Thursday SE meeting. science Enhancement to or bug impacting science non-bfb Changes answers (incl. adding tests) labels Apr 11, 2025
@github-project-automation github-project-automation bot moved this to Ready to start (or start again) in CTSM: Upcoming tags Apr 11, 2025
@ekluzek ekluzek added this to the CESM3 Answer changing freeze milestone Apr 11, 2025
@fvitt fvitt marked this pull request as ready for review April 11, 2025 21:36
@wwieder
Copy link
Contributor

wwieder commented Apr 15, 2025

@ekluzek is this something your can review and merge?

@fvitt what timeline is this needed on the for the CAM-Chem group?

Copy link
Contributor

@wwieder wwieder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like lots of trailing white space cleanup with a few answer changing modifications. Thanks for opening up this PR.

@github-project-automation github-project-automation bot moved this from Ready to start (or start again) to In progress - master/b4b-dev in CTSM: Upcoming tags Apr 15, 2025
@wwieder
Copy link
Contributor

wwieder commented Apr 15, 2025

One more question, in #3016 there was a suggestion to set gamma_sm = 1., but I asked for one more science test to evaluate BVOC emissions with an updated CLM parameter file that reduces water stress in tropical forests.

A few questions / options to consider:

  • Do we want to add as a namelist option for this to be under user control at run time? Alternatively,
  • Should we go ahead and manually turn off the soil moisture control on isoprene emissions with this PR?
  • Should either option above be linked with this PR to make a single MEGAN_updates tag?

@tilmes, @HuiWangWanderInGitHub, @lkemmons, @rosiealice can you weigh in here?

@ekluzek
Copy link
Collaborator

ekluzek commented Apr 15, 2025

@wwieder yes, I'm planning on doing the testing and the merge, when we get the go ahead from @fvitt and Simone and Louisa.

@lkemmons
Copy link

I think it would be great to have the soil moisture (drought) impact on MEGAN emissions be a namelist option (on/off).
Maybe also with the option to provide an overall scaling factor to the new gamma_sm calculation, which I think Rosie suggested.

@wwieder
Copy link
Contributor

wwieder commented Apr 15, 2025

I like that Idea too, @lkemmons, but would ask if @fvitt could create this capability, either on this PR or by opening a new one when it's ready?

@fvitt
Copy link
Contributor Author

fvitt commented Apr 15, 2025

I like that Idea too, @lkemmons, but would ask if @fvitt could create this capability, either on this PR or by opening a new one when it's ready?

I will look into it.

@fvitt
Copy link
Contributor Author

fvitt commented Apr 15, 2025

I think it would be great to have the soil moisture (drought) impact on MEGAN emissions be a namelist option (on/off). Maybe also with the option to provide an overall scaling factor to the new gamma_sm calculation, which I think Rosie suggested.

@lkemmons Do you have source mods where these changes at least hacked in?

@lkemmons
Copy link

lkemmons commented Apr 15, 2025 via email

@fvitt
Copy link
Contributor Author

fvitt commented Apr 15, 2025

No, sorry, I have not implemented a namelist option.

I was referring to changes to the code for "the soil moisture (drought) impact on MEGAN emissions" and "overall scaling factor to the new gamma_sm calculation"

@lkemmons
Copy link

lkemmons commented Apr 15, 2025 via email

@wwieder
Copy link
Contributor

wwieder commented Apr 15, 2025

As @HuiWangWanderInGitHub noted in #3016 around line 568 in clm/src/biogeochem/VOCEmissionMod.F90

if (use_megan_gamma_sm = true):
    gamma_sm = get_gamma_SM(btran(p)) 
else:
   gamma_sm = 1.0_r8.

where use_megan_gamma_sm is a namelist parameter.

I'm less confident in how to apply the idea of gamma_sm_scale_factor, but suggest this could be handled in the get_gamma_SM subroutine? Maybe @HuiWangWanderInGitHub or @rosiealice has an idea here? Simple ideas are below:

  • blue = default parameterization for gamma_sm
  • orange = add a min. value to gamma_sm (here 0.6 for example).
  • green = modify the parameter values some other way, (here with btran_threshold) con: this changes the shape of the function.

If we add a modifier into gamma_sm I suggest it go on the CLM parameter file.

image

my hacky python code for this example is below:

# Default parameterization
a1 = -7.4463
b1 = 3.2552
btran_threshold = 0.2
btran_in = np.arange(0, 1.01, 0.01)
get_gamma_SM = 1. / (1. + b1**(a1 * (btran_in - btran_threshold)))
plt.plot(btran_in, get_gamma_SM, label='btran_threshold = 0.2')

# add a min value, keep function the same
get_gamma_SM = np.where(get_gamma_SM>0.6,get_gamma_SM,0.6)
plt.plot(btran_in, get_gamma_SM, label='gamma_SM min = 0.6')

# modify the function, here with btran_threshold = 0.1
btran_threshold = 0.1
get_gamma_SM = 1. / (1. + b1**(a1 * (btran_in - btran_threshold)))
plt.plot(btran_in, get_gamma_SM, label = 'btran_threshold = 0.1')
plt.xlabel('soil moisture (btran)')
plt.ylabel('gamma SM')
plt.legend()

Hope this helps.

@wwieder
Copy link
Contributor

wwieder commented Apr 15, 2025

I guess if we like the used of min_megan_gamma_sm (orange line above) this could be the single namelist change that goes into the get_gamma_SM function, where min_megan_gamm_sm = 1 effectively shuts off gamma_sm and no changes to the paramter file needs to occur? e.g.

get_gamma_SM = max(get_gamma_SM, min_megan_gamma_sm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next this should get some attention in the next week or two. Normally each Thursday SE meeting. non-bfb Changes answers (incl. adding tests) science Enhancement to or bug impacting science
Projects
Status: In progress - master/b4b-dev
Status: Todo
Development

Successfully merging this pull request may close these issues.

Low MEGAN emissions in CESM3
4 participants