-
Notifications
You must be signed in to change notification settings - Fork 321
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
base: master
Are you sure you want to change the base?
Conversation
Testing Removed expected fails... 0206-092821de_gnu: 65 tests 0206-092821de_int: 167 tests 0206-092821de_nvh Does anyone (@samsrabin?) know why |
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 was a problem hiding this 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.
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 |
@ekluzek, @rosiealice, or anyone... we have encountered some further issues. It seems that we will need some further refactoring to get this bug fixed. I spoke with @glemieux and he pointed out that Is this correct? |
Do you mean, not 'ever' get used, or just not get used until FATES is called at the end of the day? I guess either way this is problematic/will cause restart test failures. I guess somehow we need to pass through the SP code during initialization to fix this? |
@@ -24,7 +24,8 @@ module SatellitePhenologyMod | |||
private | |||
! | |||
! !PUBLIC MEMBER FUNCTIONS: | |||
public :: SatellitePhenology ! CLMSP Ecosystem dynamics: phenology, vegetation | |||
public :: GetSatellitePhenologyInputs ! put the data into the correct format | |||
public :: SetSatellitePhenologyBGCCanopyStructs ! CLM(BGC)-SP phenology and vegetation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just wondering about changing the name for the Set method to something like...
UpdateSatellitePhenologyCanopy
I think of Set methods as doing nothing outside of setting variables. This does a bit more than that.
I see what you are doing with adding BGC to distinguish it from FATES, but we've used BGC exclusively to refer to "use_cn==TRUE". So I'm not sure what to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compsets: Sp, Bgc, BgcCrop, Fates, FatesSp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrifoster thanks for your nice work here and the cleanup of the code calling structure. I just have some thoughts on names of things, which is always a hard thing to get right. I have some suggestions and we can talk about this a bit when we meet in a little bit.
real(r8) :: fb ! fraction of canopy layer covered by snow | ||
|
||
if (use_fates_sp) then | ||
write(iulog,*) 'SetSatellitePhenologyBGCCanopyStructs', 'should not be calling this method when use_fates_sp == .true.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the subroutine name. The errMsg serves this purpose. See #1452
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually for any FATES simulation, so maybe should be use_fates?
And actually maybe this check should just be done at initialization? But, since it's a subroutine call -- there isn't a way to do that. Hmmm.... A single check like this is fine
@@ -24,7 +24,8 @@ module SatellitePhenologyMod | |||
private | |||
! | |||
! !PUBLIC MEMBER FUNCTIONS: | |||
public :: SatellitePhenology ! CLMSP Ecosystem dynamics: phenology, vegetation | |||
public :: GetSatellitePhenologyInputs ! put the data into the correct format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of think of a method with Get in the title as a getter method. And this is more than that. We tend to use Calc or Update for something more extensive. This is really where the interpolation is applied though.
So maybe something like...
CalcSatellitePhenologyTimeInterp?
Description of changes
Creates a new data structure for
htop
,tlai
, andtsai
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 sethtop_hist_patch
. Thishtop_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