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

In transient pft simulations with use_crop=.false., %crop does not advance from 1850 values #538

Closed
slevis-lmwg opened this issue Oct 18, 2018 · 12 comments
Assignees
Labels
tag: bug - critical big problems in important configurations

Comments

@slevis-lmwg
Copy link
Contributor

Brief summary of bug

In traditional transient pft simulations with use_crop = .false., %crop does not advance from 1850 values.

General bug information

CTSM version you are using:
ctsm1.0.dev012-4-ga344044

Does this bug cause significantly incorrect results in the model's science?
Yes.

Configurations affected:

  • IHist with create_crop_landunit = .true. and use_crop = .false. (which requires do_transient_crops = .false.)
  • All transient pft configurations with create_crop_landunit = .true. and use_crop = .false.

Details of bug

Relevant code:
in subgridMod.F90, function crop_patch_exists

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

Test that revealed the problem when I ran it twice:

  1. in /glade/work/slevis/git/ctsm1.0.dev012/cime/scripts (baseline master)
  2. in /glade/work/slevis/git/collapse_pfts/cime/scripts (branch collapse2gencrop: Collapse2gencrop branch: Allow the model to not need to read 16-pft datasets and rather read 78-pft datasets #483)

ERP_D.f10_f10_musgs.IHistClm50Bgc.cheyenne_gnu.clm-decStart

In the test's 2002 history files I found %crop from 2002 in the branch and from 1850 in the baseline.

@billsacks
Copy link
Member

@dlawrenncar @olyson - Sam discovered this and has been in communication with @ekluzek and myself. I want to let you know about it in case it affects any recent simulations.

slevis-lmwg added a commit to slevis-lmwg/ctsm that referenced this issue Oct 19, 2018
Fix associated with issue ESCOMP#538.
Minor code mods that allow %cft to advance beyond 1850 in transient pft
simulations.
@wwieder
Copy link
Contributor

wwieder commented Oct 19, 2018 via email

@billsacks
Copy link
Member

@wwieder @danicalombardozzi - @slevisconsulting can probably answer better than me, but I think you can do a check similar to what he did:

In the test's 2002 history files I found %crop from 2002 in the branch and from 1850 in the baseline.

@wwieder
Copy link
Contributor

wwieder commented Oct 19, 2018 via email

@danicalombardozzi
Copy link
Contributor

danicalombardozzi commented Oct 19, 2018 via email

@billsacks
Copy link
Member

I have been looking through the ChangeLog and diffs to try to determine how long this has been broken. My best guess is that this has been broken since clm4_5_15_r236 (May 1, 2017): that's when CLM switched to having create_crop_landunit almost always true.

Another slightly relevant tag seems to be clm4_5_14_r228 (March, 2017), which had a change in initGridCellsMod.F90 that started to pave the way for the changes in r236. But, based on my understanding of the problem and the changes in that tag, this problem wouldn't have shown up for out-of-the-box namelist settings until r236. However, the problem may have shown up earlier than r236 for cases using custom namelist settings for create_crop_landunit along with non-default surface datasets / flanduse_timeseries files.

@ekluzek
Copy link
Contributor

ekluzek commented Oct 23, 2018

I also asked @wwieder @danicalombardozzi and @olyson if there would ever be a reason you'd want this behavior on purpose (so transient natural PFT's, but fixed crops), and they all agreed (separately) that they couldn't see a reason for that. So I'll put into place a mechanism that will make sure the two are linked and die if they aren't. There's always ways to get around these mechanisms, but it will prevent you from accidentally setting it up in a screwy way.

@billsacks
Copy link
Member

@ekluzek - Then should we simply collapse do_transient_crops and do_transient_pfts into a single namelist flag, and then go with something like @slevisconsulting 's first implementation of the fix?

@ekluzek
Copy link
Contributor

ekluzek commented Oct 23, 2018

Hmm. I was really envisioning to leave the namelist items do_transient_pfts and do_transient_crops in place, but just prevent them from being different in the namelist. The first implementation had the following on a call to a function, which I think is bad coding "do_transient_crops = do_transient_pfts". If we did a clean removal of do_transient_crops, and only use do_transient_pfts, that would be fine. The problem with that in the function call is that looking at it -- you most likely will think it's setting it to itself, and not realize it's changing it on the call. You could add a comment noting this, but I think it's clearer just to not allow the two namelist items to differ.

I think it would be best to have the build-namelist handling ensure they agree with each other for now. In the long run we could remove do_transient_crops as a cleanup step that would be bit-for-bit.

@billsacks
Copy link
Member

Sorry, my comment was misleading: I was envisioning something like what you said, where we'd do a clean removal of do_transient_crops. But I'm fine with your plan of doing this in two steps.

ekluzek added a commit that referenced this issue Oct 26, 2018
ekluzek pushed a commit to ekluzek/CTSM that referenced this issue Oct 29, 2018
Fix associated with issue ESCOMP#538.
Minor code mods that allow %cft to advance beyond 1850 in transient pft
simulations.
@ekluzek
Copy link
Contributor

ekluzek commented Oct 29, 2018

This is fixed on master, about to move the same fix to release-clm5.0 branch.

@billsacks
Copy link
Member

Fixed on master with #540

billsacks pushed a commit to billsacks/ctsm that referenced this issue Feb 22, 2019
Fix associated with issue ESCOMP#538.
Minor code mods that allow %cft to advance beyond 1850 in transient pft
simulations.
billsacks pushed a commit to billsacks/ctsm that referenced this issue Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: bug - critical big problems in important configurations
Projects
None yet
Development

No branches or pull requests

5 participants