Skip to content
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

Switched parameters for non-mycorrhizal N uptake costs in FUN #2120

Closed
ecaas opened this issue Aug 23, 2023 · 12 comments · Fixed by #2258
Closed

Switched parameters for non-mycorrhizal N uptake costs in FUN #2120

ecaas opened this issue Aug 23, 2023 · 12 comments · Fixed by #2258
Assignees
Labels
bug something is working incorrectly science Enhancement to or bug impacting science

Comments

@ecaas
Copy link

ecaas commented Aug 23, 2023

Brief summary of bug

Switched parameters for non-mycorrhizal N uptake costs in FUN

General bug information

CTSM version you are using: ctsm5.1.dev113-1-g979c71f
Does this bug cause significantly incorrect results in the model's science? No

Configurations affected: Configurations with use_fun = true

Details of bug

As mentioned in discussion #2098 I found that most active N uptake happens through the non-mycorrhizal pathway in FUN in my single-site runs, even at sites where EcM uptake is expected to dominate. It seems like the cost of the non-mycorrhizal pathway is too cheap compared to the mycorrhizal pathways.

I suspect that the reason is a mix-up of the parameters "kn_nonmyc" and "kc_nonmyc" in the parameter file. Switching them seems to give higher cost for the non-mycorrhizal pathway, more in line with what is reported in literature. A quick test run with a single site setup (input data produced with the subset_data script) using a modified parameter file where the values of kn_nonmyc were switched with the values of kc_nonmyc gave dominance of the EcM pathway, as expected. However, I have not tested this on global scales, so I don't know what consequences this will have on larger scales, and if it in fact is the solution to the problem.

Important details of your setup / configuration so we can reproduce the bug

Parameter file: ctsm51_params.c211112.nc (stored on the Norwegian cluster FRAM)

@wwieder
Copy link
Contributor

wwieder commented Aug 23, 2023

Thanks for filing this bug report @ecaas . Could you list here what the default parameter were and what you switched them too. I also wonder if you can let us know more about the simulation you ran. Notably,

  • Did you run a full spinup from a cold-start?
  • I'm assuming the relative costs of EcM vs. non_myc look more appropriate, but what about other carbon fluxes and states (e.g. GPP, AR, NPP, LAI, and TOTVEGC)?

We may want to explore this more broadly with a variant of the PPE infrastructure to start understanding potential global impacts of this change.

@ecaas
Copy link
Author

ecaas commented Aug 24, 2023

Hi,

Sorry, here is some more information about the simulation:

I did not run a full spinup, just an 1850-2014 historical simulation starting from a restart file (the restart file was created from a cold start using the default parameters, let me know if you want this file). The site is located at Hidden Lake, Canada, and is one of the sites included in the CIDET decomposition experiment.

The default parameters are:
kc_nonmyc = 0, 0.72, 0.72, 0.72, 0.72, 0.72, 0.072, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 7.2, 0.72, 0.72, 7.2, 7.2, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 7.2, 7.2, 0.72, 0.72,
0.72, 0.72, 7.2, 7.2, 7.2, 7.2, 0.72, 0.72 ;

kn_nonmyc = 0, 0.012, 0.012, 0.0012, 0.012, 0.012, 0.0012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.12, 0.012, 0.012, 0.12, 0.12, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.12, 0.12, 0.012,
0.012, 0.012, 0.012, 0.12, 0.12, 0.12, 0.12, 0.012, 0.012 ;


The modified parameters are:

kn_nonmyc = 0, 0.72, 0.72, 0.72, 0.72, 0.72, 0.072, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 7.2, 0.72, 0.72, 7.2, 7.2, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72,
0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 0.72, 7.2, 7.2, 0.72, 0.72,
0.72, 0.72, 7.2, 7.2, 7.2, 7.2, 0.72, 0.72 ;

kc_nonmyc = 0, 0.012, 0.012, 0.0012, 0.012, 0.012, 0.0012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.12, 0.012, 0.012, 0.12, 0.12, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012,
0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.012, 0.12, 0.12, 0.012,
0.012, 0.012, 0.012, 0.12, 0.12, 0.12, 0.12, 0.012, 0.012 ;


Attached is a figure with panels of different pools and fluxes (yearly means). The green lines are from the simulation with modified parameters, while the blue lines are from a simulation with default parameters. Let me know if I can provide anything else to help!

mod_params_variables2

@wwieder wwieder added bug something is working incorrectly tag: bug - impacts science labels Sep 5, 2023
@wwieder
Copy link
Contributor

wwieder commented Sep 5, 2023

@rosiealice confirmed through an email exchange with the FUN developers that values for these parameters were inadvertently switched in the FUN2.0 (Brzostek et al., Table S2; see #2098).

To start quantifying the effects of this bug on our results, I wanted to follow up here and ask @linniahawkins to run a sparse grid simulation in 1850 from a cold start that flips the values of kn_nonmyc and kc_nonmyc for spinup and a transient-20th Century simulation?

I'd assume this bug will increase total AR fluxes from FUN, with downstream impacts on the rest of the C-cycle, but hopefully the impact is relatively minimal? If that's the case with sparse grid simulations, we should likely try with a full 1-degree run and correct this on the default parameter file...

@linniahawkins
Copy link

FUNbug_CLM-PPE.pdf
@djk2120 and I ran a sparse grid simulation using the CLM5.1 PPE branch with the kn_nonmyc and kc_nonmyc parameter settings switched. These were not initiated from a cold start, but from an existing restart spun up using the default parameter settings. We performed 140 years of additional spinup with the modified parameter settings before the start of the transient period (1850-2014). The global results seem to comport with what @ecaas found at the site level. Daniel is running additional tests using the OAAT PPE framework.

@wwieder
Copy link
Contributor

wwieder commented Sep 8, 2023

Thanks to @ecaas for digging into this issue and @rosiealice for following up with FUN developers.
Huge thanks for @linniahawkins and @djk2120 and the PPE team too for making this so quick!

I'm including the global time series of states & fluxes that Linnia generated here.

image

My assessment from this plot is that N uptake is higher after fixing the FUN parameter bug for non-mycorrhizal uptake, which reduces global C stocks and GPP. The bug doesn't seem to influence global trajectories over the historical period, just the initial conditions.

I'd be interested to see how our spatial patterns of C fluxes and pools change with the bug fix? This isn't something you can easly assess with the sparse grid, is it? If not, maybe it's worth doing a full global spinup @olyson or @slevis-lmwg, with a new issue on the LMWG-dev repository?

@rosiealice
Copy link
Contributor

Looks good. In the sense that the main output are broadly similar but the N uptake fluxes are switched round. Nice find @ecaas!

@linniahawkins
Copy link

linniahawkins commented Sep 8, 2023

Annual average (1985-2014), modified-default FUN parameters:
FUNbug_transient_maps_1985-2014(1)

Note these maps are projected from the sparse grid to the full grid.

@djk2120
Copy link
Contributor

djk2120 commented Oct 6, 2023

I ran a small parameter sensitivity experiment with the FUN parameters after swapping the kc_nonmyc and kn_nonmyc parameter values. The perturbations were large: divide by 10 (min) and multiply by ten (max). Most simulations were performed changing parameters one at a time, except for 'KCN' where I perturbed all of the FUN parameters in tandem. With the corrected parameter values, sensitivity to KCN perturbation is larger. Also the most influential FUN parameters have changed from kn_nonmyc (buggy version) to akn_active and ekn_active (fixed version). As mentioned before the corrected version reduced default GPP by ~5%

analysis code: https://github.com/djk2120/oaat_clm5_ppe/blob/main/pyth/FUNbug.ipynb

@wwieder
Copy link
Contributor

wwieder commented Oct 6, 2023

this is excellent. Thanks Daniel. I can't remember if you included KCN in your Latin-hypercube experiments before? Will you now?

@wwieder
Copy link
Contributor

wwieder commented Oct 20, 2023

Given plots above, and the simulations done by @slevis-lmwg it seems like we need to fix this bug and move forward with evaluating / calibrating the model. It's still worth looking at PFT survival as we move forward with PPE calibration, but may as well get this bug fix into the default parameter files. @slevis-lmwg or @olyson can you open a PR to do this?

@slevis-lmwg
Copy link
Contributor

@wwieder
This is just a params file change, right? If so, I suggest that we slide it in with the "upcoming tags" card that handles a few other answer-changing params file changes. If you agree, then I will link this issue to the card, and I suggest that we do not need a PR.

@slevis-lmwg
Copy link
Contributor

The param file change in my directory
/glade/u/home/slevis/cases_LMWG_dev/ctsm51d130_ne30pg3_GSWP3V1_LMWG_dev8_1850AD/inputs
can be viewed by typing
diff ctsm51_params.LMWG_dev8.c230911.asc ctsm51_params.c211112.asc

samsrabin added a commit to samsrabin/CTSM that referenced this issue Nov 27, 2023
New params files for Meier roughness, MIMICS, SNICAR, and with changes to leafcn and k*_nonmyc

1) Start using existing new params file for Meier roughness:
/glade/campaign/cesm/cesmdata/inputdata/lnd/clm2/paramdata/ctsm51_params.RMz0.c231011.nc
and include bug-fix ESCOMP#2219
2) Update forcing heights per ESCOMP#2071.
3) Update params file for MIMICS per ESCOMP#1845.
4) Make leafcn for pfts 15 and 16 the same per ESCOMP#2184.
5) Switch the values of params kc_nonmyc and kn_nonmyc per ESCOMP#2120.
6) Move SNICAR parameters to params file per ESCOMP#2247.

Changes answers. Details in PR ESCOMP#2258 and in the ChangeLog.
@samsrabin samsrabin added the science Enhancement to or bug impacting science label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is working incorrectly science Enhancement to or bug impacting science
Projects
Status: Ready to eat (Done!)
8 participants