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

change the order of passing the "use_fates_luh" flag #2898

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rgknox
Copy link
Collaborator

@rgknox rgknox commented Dec 4, 2024

Description of changes

The flag that specifies using LUH datasets is passed earlier in the call sequence so that it can be used to guide memory allocations. If landuse is turned on, particularly in fates nocomp mode, then the space required for patch allocations changes. Therefore this flag has to be passed earlier, before these allocations are decided on.

Specific notes

This PR does not need to be synchronized with, but does need to precede: NGEET/fates#1226

Contributors other than yourself, if any: @ckoven

CTSM Issues Fixed (include github issue #):

Are answers expected to change (and if so in what way)? none, b4b

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 need

Testing performed, if any:

TBD, but some tests with the FATES test suite so far

@rgknox rgknox changed the title change the order of passing of the fates_use_luh flag change the order of passing the "use_fates_luh" flag Dec 4, 2024
@rgknox rgknox added FATES A change needed for FATES that doesn't require a FATES API update. blocker another issue/PR depends on this one bfb bit-for-bit labels Dec 4, 2024
@@ -305,6 +305,7 @@ subroutine CLMFatesGlobals1(surf_numpft,surf_numcft,maxsoil_patches)
integer :: pass_nocomp
integer :: pass_sp
integer :: pass_masterproc
integer :: pass_luh
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could the existing pass_use_luh not be used for consistency in terms of naming (i.e., with pass_use_potentialveg)? If not, pass_use_luh seems to not be used anymore, so it should be deleted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, i can change it. There are other flags in ClmFatesGlobals1 that dropped the "use" in the local variable, I can add those back in too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

One concern I have is with the use of the term potentialveg in FATES code. FATES is using it with one specific meaning, but in CTSM we use PotentialVeg to mean a surface dataset that doesn't have anthropogenic changes. There are similarities, but I'm concerned this might create confusion in CTSM.

As such I'd prefer pass_use_luh for now...

Should we maybe talk about this tomorrow to make sure the use of potentialveg in FATES isn't conflicting with how CTSM uses it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@rgknox I would throw in for adding the "use" back in, because it's a convention we use in CTSM, so just looking at the variable name I know it's a logical variable. And I like that.

But, if we removed the "use" previously -- maybe there was a reason for it that we should look up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I previously removed the "use" just to be less verbose, nothing more. I'm fine with adding it back in.
@ekluzek, the pass_use_potentialveg is a separate flag from pass_use_luh, I think @samsrabin was pointing it out as an example of convention.
I'm happy to expand this PR though if you would like to update the name of that flag to something less "overlappy" with native ctsm. @ckoven, could you weigh in here on potential alternative names for use_fates_potentialveg.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi All -- My preference is to use "Potential Veg" or similar, rather than "Spinup". The reason is that potential vegetation is a more accurate description of what the relevant code does. Spinup is more of a workflow concept; a user might use potential vegetation apart from spinup, and might do spinup without using potential vegetation mode. It also might make it sound to a user like potential veg has something to do with AD spinup, which it doesn't. In terms of the conceptual overlap of how the phrase is used in non-FATES CTSM, I think that it makes sense that both vegetation models might use the same vocabulary for something that is conceptually similar? I guess I don't see why that is a problem. It seems sort of analogous to how both models have stomatal conductance switches that share names. But I guess another possibility would be to call it something like "All Primary Land Mode"? But I feel like that is more verbose.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm fine with sticking with use_fates_potentialveg

Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on what Charlie says above I'd prefer moving to something like say...

use_fates_all_primary_land

just 4 characters longer.

The usage is different enough to be sure to distinguish them. For Medlyn stomatal conductance the FATES implementation is slightly different than CTSM-BGC, but it using the same paper for the scientific reference. In. this case I'd say it's much different. In FATES you could use a potential-veg surface dataset for example and then there becomes the confusion of if you HAVE to do that for this mode in FATES, and what the impact of each is on simulations. I suppose the potential vegetation surface dataset is similar in that it's constructed without human disturbance, so it's all primary land. For CTSM we also currently ONLY use the potential vegetation surface dataset for a paleo setup turning off human influences. So I tend to think of the potential vegetation surface dataset as the Paleo dataset. And the FATES all primary land mode is doing something very distinct from a paleo mode.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @ekluzek and all, apologies, but I've sort of lost track of what the discussion here is really about, I feel like the potentialveg terminology question is somewhat decoupled from the specific line of code under discussion here or even this PR? Is the proposal to change every instance of the phrase potentialveg across FATES, CTSM, and ELM code? Or is it more limited, and if so, what exactly is it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, let's move this discussion outside of this PR. And let this PR come in pretty much as is. Then if we decide on a terminology change it can be done later and won't hold this one up.

So I'll open a discussion about this. In terms of scope I'm thinking mainly FATES. But, the FATES use of it in CTSM would also need to change. I'm not really thinking about ELM, but maybe it would for consistency. And if the phrase is used extensively the change might not be worth it. I was thinking it's use in FATES is new and as such figured it might be limited.

@samsrabin
Copy link
Collaborator

If tests reveal this to be b4b, then it should probably be merged into b4b-dev instead of master, no?

@ekluzek
Copy link
Collaborator

ekluzek commented Dec 5, 2024

Absolutely merge to b4b if it is so. It's just that FATES updates almost always bring in answer changes. I don't remember the last one that was...

@rgknox
Copy link
Collaborator Author

rgknox commented Dec 5, 2024

I just discussed this PR with @ckoven. There is a good chance we do not need this PR anymore, so don't sink any time into it. I will close when I can confirm it is unnecessary.

@rgknox
Copy link
Collaborator Author

rgknox commented Dec 6, 2024

Please disregard my last message. This PR does have useful content.

@ekluzek ekluzek added this to the CESM3 Answer changing freeze milestone Jan 15, 2025
@ekluzek ekluzek added the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jan 15, 2025
@ekluzek ekluzek changed the title change the order of passing the "use_fates_luh" flag b4b-dev: change the order of passing the "use_fates_luh" flag Jan 16, 2025
@ekluzek ekluzek changed the base branch from master to b4b-dev January 16, 2025 17:27
@ekluzek ekluzek changed the base branch from b4b-dev to master January 16, 2025 17:28
@samsrabin
Copy link
Collaborator

Not doing this on b4b-dev because FATES team wants it in CTSM master sooner than today + 2 weeks.

@wwieder wwieder removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Jan 16, 2025
@ekluzek ekluzek changed the title b4b-dev: change the order of passing the "use_fates_luh" flag change the order of passing the "use_fates_luh" flag Jan 23, 2025
@glemieux
Copy link
Collaborator

glemieux commented Jan 28, 2025

Preliminary regression testing on derecho underway. Note this is being tested prior to merging into #2934.

@glemieux
Copy link
Collaborator

glemieux commented Jan 29, 2025

Initial aux_clm regression tests against ctsm5.3.020 are showing B4B results, with the exception of the following that I think are due to other issues:

    FAIL RXCROPMATURITYSKIPGEN_Ld1097.f10_f10_mg37.IHistClm60BgcCrop.derecho_intel.clm-cropMonthOutput RUN time=1357
    FAIL SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop RUN time=30

results: /glade/u/home/glemieux/scratch/ctsm-tests/tests_pr2898-aux_clm

Running prelim fates tests next.

@glemieux
Copy link
Collaborator

Prelim fates regression tests are B4B against fates-sci.1.80.4_api.37.0.0-ctsm5.3.020 as expected.

Results: /glade/u/home/glemieux/scratch/ctsm-tests/tests_pr2898-fates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit blocker another issue/PR depends on this one FATES A change needed for FATES that doesn't require a FATES API update.
Projects
Status: In progress - master/b4b-dev
Development

Successfully merging this pull request may close these issues.

6 participants