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

Bug fix for izumi nag tests to pass (PR into tmp-241219) #2925

Merged
merged 6 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cime_config/testdefs/ExpectedTestFails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</test>

<test name="SMS_D.f10_f10_mg37.I2000Clm60BgcCrop.derecho_nvhpc.clm-crop">
<phase name="BUILD">
<phase name="SHAREDLIB_BUILD">
<status>FAIL</status>
<issue>#1733</issue>
</phase>
Expand Down
9 changes: 9 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,15 @@
<option name="comment" >Science support for I1850Clm50BgcCropCru at f19</option>
</options>
</test>
<test name="ERP_D_Ld5_P48x1" grid="f10_f10_mg37" compset="I2000Clm50BgcCru" testmods="clm/flexCN_FUN_BNF">
<machines>
<machine name="derecho" compiler="intel" category="aux_clm"/>
<machine name="izumi" compiler="nag" category="aux_clm"/>
</machines>
<options>
<option name="wallclock">00:20:00</option>
</options>
</test>
<test name="ERP_D_Ld5_P48x1" grid="f10_f10_mg37" compset="I2000Clm50BgcCru" testmods="clm/flexCN_FUN">
<machines>
<machine name="izumi" compiler="nag" category="aux_clm"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../flexCN_FUN
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nfix_method = 'Bytnerowicz'

70 changes: 70 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,74 @@
===============================================================
Tag name: tmp-241219.n03.ctsm5.3.016
Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310)
Date: Wed 08 Jan 2025 06:09:41 PM MST
One-line Summary: Bug fix for izumi nag tests to pass

Purpose and description of changes
----------------------------------

Allocation statements should have been (0:mxpft) instead of (mxpft).
I introduced the bug in a small refactor requested in #2917.

Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm6_0

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Bugs fixed
----------
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
Fixes #2924

Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
Added tests that I should have added in the tmp-241219.n01.ctsm5.3.016 tag:
ERP_D_Ld5_P48x1.f10_f10_mg37.I2000Clm50BgcCru.izumi_nag.clm-flexCN_FUN_BNF
ERP_D_Ld5_P48x1.f10_f10_mg37.I2000Clm50BgcCru.derecho_intel.clm-flexCN_FUN_BNF

Testing summary:
----------------
[PASS means all tests PASS; OK means tests PASS other than expected fails.]

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK

If the tag used for baseline comparisons was NOT the previous tag, note that here:
derecho used tmp-241219.n02.ctsm5.3.016
izumi used ctsm5.3.016 because it was the best available baseline

Answer changes
--------------

Changes answers relative to baseline: No but read caveat.

Summarize any changes to answers, i.e.,
- what code configurations: a few Fates cases
- what platforms/compilers: izumi; only because I compared to ctsm5.3.016
- nature of change: same as in the tmp-241219.n02.ctsm5.3.016 tag

Other details
-------------
Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/2925

===============================================================
===============================================================
Tag name: tmp-241219.n02.ctsm5.3.016
Originator(s): glemieux (Gregory Lemieux, LBNL, [email protected])
Date: Wed 08 Jan 2025 10:52:49 AM MST
Expand Down
5 changes: 3 additions & 2 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Tag Who Date Summary
============================================================================================================================
tmp-241219.n02.ctsm5.3.016 01/08/2025 FATES hydro test update
tmp-241219.n01.ctsm5.3.016 12/24/2024 Merge b4b-dev
tmp-241219.n03.ctsm5.3.016 01/09/2025 Bug fix for izumi nag tests to pass (slevis)
tmp-241219.n02.ctsm5.3.016 01/08/2025 FATES hydro test update (glemieux)
tmp-241219.n01.ctsm5.3.016 12/24/2024 Merge b4b-dev (slevis)
ctsm5.3.016 erik 12/19/2024 Rpointer files for restart now have the simulation date in the filename
ctsm5.3.015 erik 12/18/2024 Update cdeps with cam7 nextsw cday changes
ctsm5.3.014 erik 12/03/2024 Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags
Expand Down
20 changes: 10 additions & 10 deletions src/biogeochem/CNFUNMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,17 @@ subroutine readParams ( ncid )
if ( .not. readv ) call endrun( msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))
params_inst%ndays_off=tempr

allocate(params_inst%nfix_tmin(mxpft))
allocate(params_inst%nfix_tmin(0:mxpft))
tString='nfix_tmin'
call ncd_io(trim(tString), params_inst%nfix_tmin(:), 'read', ncid, readvar=readv)
if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))

allocate(params_inst%nfix_topt(mxpft))
allocate(params_inst%nfix_topt(0:mxpft))
tString='nfix_topt'
call ncd_io(trim(tString), params_inst%nfix_topt(:), 'read', ncid, readvar=readv)
if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))

allocate(params_inst%nfix_tmax(mxpft))
allocate(params_inst%nfix_tmax(0:mxpft))
tString='nfix_tmax'
call ncd_io(trim(tString), params_inst%nfix_tmax(:), 'read', ncid, readvar=readv)
if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__))
Expand Down Expand Up @@ -535,7 +535,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&
real(r8) :: total_N_resistance ! C to of N for whole soil -leaf
! pathway
real(r8) :: free_RT_frac=0.0_r8 !fraction of N retranslocation which is automatic/free.
! SHould be made into a PFT parameter.
! Should be made into a PFT parameter.

real(r8) :: paid_for_n_retrans
real(r8) :: free_n_retrans
Expand Down Expand Up @@ -1136,13 +1136,13 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp&

select case (nfix_method)
case ('Houlton')
costNit(j,icostFix) = fun_cost_fix(fixer,&
a_fix(ivt(p)),b_fix(ivt(p)),c_fix(ivt(p)),&
big_cost,crootfr(p,j),s_fix(ivt(p)),tc_soisno(c,j))
costNit(j,icostFix) = fun_cost_fix(fixer, &
a_fix(ivt(p)), b_fix(ivt(p)), c_fix(ivt(p)), &
big_cost, crootfr(p,j), s_fix(ivt(p)), tc_soisno(c,j))
case ('Bytnerowicz') ! no acclimation calculation
costNit(j,icostFix) = fun_cost_fix_Bytnerowicz_noAcc(fixer, &
params_inst%nfix_tmin(ivt(p)), params_inst%nfix_topt(ivt(p)), params_inst%nfix_tmax(ivt(p)), &
big_cost,crootfr(p,j),s_fix(ivt(p)),tc_soisno(c,j))
costNit(j,icostFix) = fun_cost_fix_Bytnerowicz_noAcc(fixer, &
params_inst%nfix_tmin(ivt(p)), params_inst%nfix_topt(ivt(p)), params_inst%nfix_tmax(ivt(p)), &
big_cost,crootfr(p,j), s_fix(ivt(p)), tc_soisno(c,j))
case default
errCode = ' ERROR: unknown nfix_method value: ' // nfix_method
call endrun( msg=trim(errCode) // errMsg(sourcefile, __LINE__))
Expand Down
Loading