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

Create driver data structure for SP mode #2952

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

Conversation

adrifoster
Copy link
Collaborator

Description of changes

Creates a new data structure for htop, tlai, and tsai that is just driver data.

Specific notes

Previously, fates used htop_patch (etc.) as a driver data, but we also needed to update it and set set htop_hist_patch. This htop_hist_patch was inconsistently used throughout the CLM code, resulting in mis-matches between the PFT structures that we actually were trying to run (see #2945).

Now we have the SP driver data as a separate data structure, and methods to set it. FATES sets it and passes it back to CLM through the bc_out struct, CLM just sets it in a 1:1 call.

Contributors other than yourself, if any:

@ekluzek @rgknox @rosiealice

CTSM Issues Fixed (include github issue #): Closes #2945

Are answers expected to change (and if so in what way)? Yes - because we were incorrectly using it before, all FATES-SP compsets should change.

ALL OTHER COMPSETS SHOULD BE 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? N/A

Testing performed, if any:

Will test

@adrifoster
Copy link
Collaborator Author

Testing aux_clm on derecho:

Removed expected fails...

0206-092821de_gnu: 65 tests
FAIL SMS_D.1x1_brazil.I2000Clm60FatesSpCruRsGs.derecho_gnu.clm-FatesColdDryDepSatPhen BASELINE ctsm5.3.021: DIFF
FAIL SMS_D.1x1_brazil.I2000Clm60FatesSpCruRsGs.derecho_gnu.clm-FatesColdMeganSatPhen BASELINE ctsm5.3.021: DIFF

0206-092821de_int: 167 tests
FAIL ERP_P128x2_Ld30.f45_f45_mg37.I2000Clm60FatesSpCruRsGs.derecho_intel.clm-FatesColdSatPhen COMPARE_base_rest
FAIL ERP_P128x2_Ld30.f45_f45_mg37.I2000Clm60FatesSpCruRsGs.derecho_intel.clm-FatesColdSatPhen BASELINE ctsm5.3.021: DIFF

0206-092821de_nvh
FAIL SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop RUN time=35
FAIL SMS.f45_f45_mg37.I2000Clm60FatesSpRsGs.derecho_nvhpc.clm-FatesColdSatPhen BASELINE ctsm5.3.021: DIFF

Does anyone (@samsrabin?) know why SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop RUN time=35 ? The log files don't really show anything at all. Only the med.log and cesm.log have anything in them at all.

@ekluzek
Copy link
Collaborator

ekluzek commented Feb 7, 2025

Does anyone (@samsrabin?) know why SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop RUN time=35 ? The log files don't really show anything at all. Only the med.log and cesm.log have anything in them at all.

Check the baseline and see if it died as well and didn't get put into expected fails.

We've been having problems with the nvhpc compiler, so personally I'm not too inclined to make sure it works if everything else is OK. But, always good to spend some time looking at it...

Copy link
Collaborator

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

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

This is great, this improves the current code structure and removes some problematic logic in the code. I have a few questions on names, that we can discuss.

As a separate thing I'd like us to be thinking about what kind of design we'd like to have for FATES-SP that we can work towards. If we do some thinking there we can make sure steps like this are moving us toward what we think the end design goal might be. I think that should probably be an issue itself, where we put some design thinking in. So we should open that and reference here. This would just be thought of as a step toward that, and not doing everything desired there.

Happy to discuss and do more thinking about naming and a design goal to work towards.

But, thanks for the work here, I like that you are both fixing an immediate problem and improving the code. That's the golden thing to try to do when we can.

src/biogeochem/SatellitePhenologyMod.F90 Outdated Show resolved Hide resolved
src/biogeochem/SatellitePhenologyMod.F90 Outdated Show resolved Hide resolved
src/biogeochem/SatellitePhenologyMod.F90 Outdated Show resolved Hide resolved
real(r8) , pointer :: tlai_hist_patch (:) ! patch canopy one-sided leaf area index, for SP mode
real(r8) , pointer :: tsai_hist_patch (:) ! patch canopy one-sided stem area index, for SP mode
real(r8) , pointer :: htop_hist_patch (:) ! patch canopy height, for SP mode
real(r8) , pointer :: tlai_input_patch (:) ! patch canopy one-sided leaf area index driver data for SP mode (no burying by snow)
Copy link
Collaborator

Choose a reason for hiding this comment

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

hist was a confusing suffix to have here, so I'm glad you are changing it. So input again means it's the value from the dataset?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well yes, input, plus interpolated?

src/utils/clmfates_interfaceMod.F90 Show resolved Hide resolved
@adrifoster
Copy link
Collaborator Author

Does anyone (@samsrabin?) know why SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop RUN time=35 ? The log files don't really show anything at all. Only the med.log and cesm.log have anything in them at all.

Check the baseline and see if it died as well and didn't get put into expected fails.

We've been having problems with the nvhpc compiler, so personally I'm not too inclined to make sure it works if everything else is OK. But, always good to spend some time looking at it...

There is no baseline for this because it was not supposed to pass SHAREDLIB_BUILD (has an expected fail for that), but somehow it passed that stage but died in RUN

@adrifoster adrifoster changed the title [WIP] Create driver data structure for SP mode Create driver data structure for SP mode Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

htop_patch is being incorrectly used in FATES compsets
3 participants