-
Notifications
You must be signed in to change notification settings - Fork 322
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
Make sure FORTRAN code properly aborts when fire-emission is asked for and it can't be provided #2844
base: cesm3_0_beta04_changes
Are you sure you want to change the base?
Conversation
…y fail as expected
…FATES, and also off when coupled to CAM
… initialization of the CNFireNorFire class
… initialization of the CNFireNorFire class
…lude tests that test that fire emission on with nofire or SP fail, which right now they don't as expected
…endrun calls for unit testing
…hat checks that fire-emission is off for fire_method==nofire
This helps with ESCOMP#2643
This also helps with ESCOMP#2643 [ Description of the changes in this commit. It should be enough information for someone not following this development to understand. Lines should be wrapped at about 72 characters. ]
…me time, die with an error
…te to NOT call ESMF_Finalize, see ESCOMP#3015 and ESCOMP#3017
<!--- All versions with CAM - turn off sending test drv_flds_in namelists from CTSM --> | ||
<value compset="CAM[^_]*_CLM[^_]*%SP" >--bgc sp --no-megan --no-drydep --no-fire_emiss</value> | ||
<value compset="CAM[^_]*_CLM[^_]*BGC" >--bgc bgc --no-megan --no-drydep --no-fire_emiss</value> | ||
<value compset="CAM[^_]*_CLM[^_]*BGC-CROP" >--bgc bgc --crop --no-megan --no-drydep --no-fire_emiss</value> |
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.
Make a note about what issue this resolves.
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.
Also remove the extra "s" at the end of "fire-emiss"
bld/CLMBuildNamelist.pm
Outdated
} elsif ( ! &value_is_true( $nl_flags->{'use_cn'} ) ) { | ||
$log->fatal_error("Fire emission option $var can NOT be on BGC SP Satellite Phenology.\n" . | ||
" DON'T use the '--fire_emis' option when '--bgc sp' is activated"); |
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.
Is this doing the right thing here? Is this for both fire_emis on and off?
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.
On review this looks correct.
But, I see a slight tweak of wording that would be useful.
@@ -103,7 +107,6 @@ subroutine create_cnfire_method( NLFilename, cnfire_method ) | |||
class(fire_method_type), allocatable, intent(inout) :: cnfire_method | |||
! | |||
! !LOCAL VARIABLES: | |||
character(len=*), parameter :: subname = 'create_cnfire_method' |
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 implementing the modernization asked for in #1452
|
||
end select | ||
end select | ||
end if |
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.
For now we also need to add a check for FATES turned on at all, because until we bring in changes it can't handle fire-emis with FATES.
|
||
do i = scalar_lightning, noptions | ||
if ( i == successful_ignitions ) then | ||
cycle |
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.
Make sure there is a test for this fail?
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.
@slevis-lmwg and I went over this and realized some changes that should come in. Overall it's fine, but some details need to be handled.
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.
@ekluzek and I went over and discussed various points in this PR. Erik posted our notes.
…d FireReadNML is called seperate from FireInit
…s done as a loop. Also add a li2024crujra test, this is in response to code review
Description of changes
Changes in the FORTRAN code to properly abort when fire-emission is asked for it can't be provided.
To develop this a PF unit test for CNFireFactoryMod is added in.
Specific notes
Contributors other than yourself, if any:
CTSM Issues Fixed (include github issue #):
Fixes #2762
CTSM namelist checking for: NGEET/fates#1356
Some work on #2643
Are answers expected to change (and if so in what way)? No
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
Testing performed, if any: Currently just the PF unit tests will run regular testing when done.