-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix mean vegetation temperature output for exact restarts #914
Conversation
main/FatesRestartInterfaceMod.F90
Outdated
do i_pft = 1,numpft | ||
sites(s)%use_this_pft(i_pft) = rio_use_this_pft_sift(io_idx_co_1st+i_pft-1) | ||
sites(s)%area_pft(i_pft) = rio_area_pft_sift(io_idx_co_1st+i_pft-1) | ||
enddo | ||
|
||
! calculate the bareground area for the pft in no competition modes | ||
if (hlm_use_nocomp .eq. itrue) then | ||
if (sum(sites(s)%area_pft(1:numpft)) .lt. area) then |
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.
should we compare this to a tolerance instead of having an exact match? like
abs(sum(x) - area) > nearzero
or if we are sure it will be less:
area-sum(x) > nearzero
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.
That's a good idea. I was lazy and basically copy/pasted this from EDInitMod. Looking back at the set_site_properties
procedure, I think we probably should add the check there to make sure the sum is not larger than area
.
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.
If I add a check to make sure the sum is never greater that area
during prior to the get_restart_vectors
, do you think that's sufficient since we don't update area_pft
after the initialization of the run?
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.
After reviewing the checks for the variables that set area_pft
. We check that hlm_pft_map
sums to unity in EDPftvarcon and that pft_areafrac
does the same in clmfates_interfacemod. So we shouldn't be able to get a value for sum of area_pft
greater than area
during set_site_properties
(and presumably during restart).
This reverts commit a28ca74.
I realized that the restart calculation check doesn't need to happen for all no comp modes; its restricted only to fixed biogeo + nocomp modes. Updated per 7ba71f5 |
Fates regression tests run against baseline Note that this |
Comparing the This PR should be good to go. |
Addresses #908 and addresses #911.
Description:
The
FATES_TVEG
andFATES_TVEG24
history output variables were found to have non-b4b restarts when testing theaux_clm
suite for ESCOMP/CTSM#1849. It was found that both had issues with satellite phenology restarts due to mishandling of the bareground patcharea_pft
and patch iteration during running means update, respectively. This pull request adds in the necessary checks for the bareground patch and conduct site-level calculations, as needed.Collaborators:
@rgknox
Expectation of Answer Changes:
Potentially, for satellite phenology ERS tests only
Checklist:
Test Results:
B4B aside from expected failures
CTSM (or) E3SM (specify which) test hash-tag: c6d8032c9
CTSM (or) E3SM (specify which) baseline hash-tag: c6d8032c9
FATES baseline hash-tag:
fates-sci.1.59.6_api.24.1.0-ctsm5.1.dev111
Test Output:
/glade/u/home/glemieux/scratch/ctsm-tests/tests_pr914-2