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

Extend CNFireMethodMod with a FATESFireData class #991

Merged
merged 34 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
51f3107
Extend CNFireMethodMod with a FATESFireData class
slevis-lmwg Apr 24, 2020
af1f812
Revisions based on code review by @ekluzek
slevis-lmwg Apr 27, 2020
4e7a95a
Revisions part 2 based on comments by @ekluzek @jkshuman @lmkueppers
slevis-lmwg Apr 29, 2020
fb2119b
Revisions part 3 based on @ekluzek's review
slevis-lmwg Apr 29, 2020
78fb2db
Move InterpFileInputs and Init2 to clmfates_interfaceMod
slevis-lmwg May 7, 2020
67b82a1
Added if (use_cn) around reading/interpolating population density
slevis-lmwg May 7, 2020
2fc0ede
Corrections that reduce the number of compilation errors to two
slevis-lmwg May 8, 2020
49d2ee6
Corrections for the code to compile
slevis-lmwg May 8, 2020
c6fdf8c
Changes needed so that fates_fire_data_method is local to clmfates_in…
ekluzek May 8, 2020
261a01c
Update to Sam's FATES branch for the lightning reading
ekluzek May 8, 2020
35ec07f
Make lnfm24 data private add an get method for it
ekluzek May 8, 2020
9866d97
Get everything consistent and building
ekluzek May 29, 2020
8446296
Use integer value for use_fates_spitfire now
ekluzek May 29, 2020
f530c99
Add FATES fire base class
ekluzek May 29, 2020
754b1dc
Minor corrections for clm-fates to run with a lightning dataset
slevis-lmwg Jun 4, 2020
3f643ef
Merge branch 'fates_next_api' into lightning_v2_ctsm
slevis-lmwg Jun 5, 2020
e3c4bc7
Additional conflicts resolved; revisions in response to rgknox's review
slevis-lmwg Jun 5, 2020
d6c9b70
Merge branch 'fates_next_api' into lightning_v2_ctsm
slevis-lmwg Jun 6, 2020
0629073
Correction to part of a previous conflict resolution
slevis-lmwg Jun 6, 2020
e542dfe
Added new FATES test that exercises the lightning dataset code
slevis-lmwg Jun 7, 2020
ffd5edb
Minor corrections from self-reviewing the PR
slevis-lmwg Jun 8, 2020
e011c10
Reassigned expected test fail to issue #667
slevis-lmwg Jun 8, 2020
35c9b8a
Updates needed for anthropogenic ignitions in FATES-SPITFIRE
slevis-lmwg Jul 11, 2020
ee8a91d
Minor clean-up
slevis-lmwg Jul 11, 2020
e125730
Small corrections to get test simulation to run
slevis-lmwg Jul 12, 2020
b583b4f
Added some comments to the code
slevis-lmwg Jul 12, 2020
3a08127
Changed walltime on new test to avoid timeout
slevis-lmwg Jul 12, 2020
4cd75f6
Update bld/namelist_files/namelist_definition_clm4_5.xml
slevis-lmwg Jul 14, 2020
d1b7f16
Update cime_config/testdefs/testmods_dirs/clm/Fates_nat_and_anthro_ig…
slevis-lmwg Jul 14, 2020
f68ac40
Update src/main/clm_varctl.F90
slevis-lmwg Jul 14, 2020
89cdc67
Update src/main/clm_varctl.F90
slevis-lmwg Jul 15, 2020
8f3d430
Made spitfire_mode flags public for use throughout CTSM-FATES
slevis-lmwg Jul 18, 2020
4596717
updating externals_clm configuration
glemieux Jul 22, 2020
4bed6e2
Merge pull request #2 from glemieux/lightning_v2_ctsm-externals
slevis-lmwg Jul 23, 2020
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
10 changes: 2 additions & 8 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -945,18 +945,12 @@ sub setup_cmdl_fire_light_res {
}
if ( defined($fire_method) && $fire_method eq "nofire" ) {
$nl_flags->{$var} = ".false.";
} elsif ( &value_is_true($nl->get_value('use_cn')) ) {
# } elsif ( &value_is_true($nl->get_value('use_cn')) || $nl_flags->{'fates_spitfire_mode'} > 1 ) {
} elsif ( &value_is_true($nl->get_value('use_cn')) || &value_is_true($nl->get_value('use_fates')) ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New line 949 works

    } elsif ( &value_is_true($nl->get_value('use_cn')) || &value_is_true($nl->get_value('use_fates')) ) {

However, I wish the commented-out line above it would work because it would narrow things down, but it doesn't work. The run proceeds to the next else and sets cnfireson = .false..

@ekluzek do you see an obvious problem with new line 948?

$nl_flags->{$var} = ".true.";
} else {
$nl_flags->{$var} = ".false.";
}
# fates_spitfire_mode = 0 for no_fire
# fates_spitfire_mode = 1 for global const. lightning from fates_params
# fates_spitfire_mode > 1 for ignitions from datasets as explained
# in namelist_definition_clm4_5.xml
if ( $nl_flags->{'fates_spitfire_mode'} > 1 ) {
$nl_flags->{$var} = ".true.";
}
}
}

Expand Down
9 changes: 7 additions & 2 deletions src/biogeochem/CNFireFactoryMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,21 @@ subroutine create_fates_fire_data_method( fates_fire_data_method )
!
! !LOCAL VARIABLES:
integer :: current_case
integer, parameter :: no_fire = 0 ! value of no_fire mode
integer, parameter :: scalar_lightning = 1 ! value of scalar_lightning mode
integer, parameter :: lightning_data = 2 ! value of lightning_data mode
integer, parameter :: anthro_ignitions = 4 ! value of anthro_ignitions mode

character(len=*), parameter :: subname = 'create_fates_fire_data_method'
!-----------------------------------------------------------------------

current_case = fates_spitfire_mode

select case (current_case)

case (0:1)
case (no_fire:scalar_lightning)
allocate(fates_fire_no_data_type :: fates_fire_data_method)
case (2:3)
case (lightning_data:anthro_ignitions)
allocate(fates_fire_data_type :: fates_fire_data_method)

case default
Expand Down