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

New fsufdat and landuse time series files for ne grids #1038

Merged
merged 43 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
67ff176
Add new SE grids
fischer-ncar Jun 5, 2020
3be13ef
Add var-res grids needed for CAM.
fischer-ncar Jun 9, 2020
3013af3
Rename aux_clm1 back to aux_clm
fischer-ncar Jun 11, 2020
92314ec
Add mapping files for ARCTIC, ARCTICGRIS, ne30np4.pg2, ne30pg3, ne120…
fischer-ncar Jun 17, 2020
1715f57
Merge tag 'ctsm1.0.dev101' into new_se_grids
ekluzek Jun 18, 2020
7219faf
Update standard list of resolutions to make
ekluzek Jun 18, 2020
fe509cc
Update cime to latest tag that has updated grid names, and uses PIO1
ekluzek Jun 23, 2020
b2ea3fe
Rename ne30pg3 to ne30np4.pg3
fischer-ncar Jun 23, 2020
5297a11
Update to cime version with corrected mapping files for the new SE grids
ekluzek Jul 1, 2020
e4d3c1d
Add 1979 and 1982 as possible sim_year settings for finidat files, ad…
ekluzek Jul 1, 2020
e3f0d5a
Increase number of tests because of increase in number of grids
ekluzek Jul 1, 2020
9381a6b
Get build-namelist working when multiple finidat files could match
ekluzek Jul 9, 2020
6a2d9fa
Character comparison needed to be used rather than numeric one
ekluzek Jul 9, 2020
786792f
Get the unit tester working so that it agrees with the baseline version
ekluzek Jul 9, 2020
418e41a
Merge tag 'ctsm1.0.dev104' into new_se_grids
ekluzek Jul 10, 2020
667c0df
Add ARTICGRIS finidat file for 1982, and get it and the ARCTIC grid w…
ekluzek Jul 11, 2020
939aabd
Make sure finidat files for clm5_cam6 get matched
ekluzek Jul 12, 2020
602657a
Rename the new finidat files, and add some build-namelist tests for t…
ekluzek Jul 12, 2020
7d2ee8e
Add some tests for the new grids
ekluzek Jul 12, 2020
8c731f2
Add 2013 IC file for CONUS
ekluzek Jul 13, 2020
e732fc1
Use rcp landuse timeseries files for historical as well (for new SE g…
ekluzek Jul 13, 2020
090018c
Fix test list, remove previous new grid tests use the new ones, but a…
ekluzek Jul 13, 2020
575b496
Merge remote-tracking branch 'escomp/master' into new_se_grids
ekluzek Jul 13, 2020
74f137f
Update change files
ekluzek Jul 13, 2020
a0f1a46
Remove conus_30_x8 in light of new name ne0np4CONUS.ne30x8
ekluzek Jul 13, 2020
7493aa4
Merge branch 'new_se_grids' of github.com:fischer-ncar/CTSM into new_…
ekluzek Jul 13, 2020
88a7333
Change name for conus grid mapping files to ne0np4CONUS.ne30x8 and ad…
ekluzek Jul 13, 2020
3e4b3a9
Update on testing
ekluzek Jul 13, 2020
39a9954
Fix for #1010 #1074 and make sure use_crop is set for older datasets …
ekluzek Jul 14, 2020
6cc8d5b
Merge branch 'new_se_grids' of github.com:fischer-ncar/CTSM into new_…
ekluzek Jul 14, 2020
4e85121
Correct grid names for new tests
ekluzek Jul 15, 2020
bd9e44a
CONUS finidat file needs to be interpolated (since we are using the c…
ekluzek Jul 20, 2020
95437ab
Fix the 48x96 landuse.timeseries file fix #1074
ekluzek Jul 21, 2020
ebb841d
Do the match based on start-year rather than sim_year, so that will m…
ekluzek Jul 21, 2020
e4085c7
Add in the ne0np4CONUS.ne30x8 mapping files
ekluzek Jul 21, 2020
eec6c92
Set st_year and ic_date if not set, so it can use reasonable assumptions
ekluzek Jul 21, 2020
7c01167
Merge branch 'new_se_grids' of github.com:fischer-ncar/CTSM into new_…
ekluzek Jul 21, 2020
9336665
Get the build-namelist unit tests working correctly, namelist_default…
ekluzek Jul 22, 2020
8d8a61b
Ignore the standard run system test log file
ekluzek Jul 23, 2020
abacd3a
Revert "Ignore the standard run system test log file"
ekluzek Jul 23, 2020
6d0bcfb
Merge branch 'new_se_grids' of github.com:fischer-ncar/CTSM into new_…
ekluzek Jul 23, 2020
8f3dd97
Update ChangeLog file
ekluzek Jul 23, 2020
b75ad2a
Update externals for CMEPS to hashes from nuopc_dev branch so will ru…
ekluzek 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
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ required = True
local_path = cime
protocol = git
repo_url = https://github.com/ESMCI/cime
tag = branch_tags/cime5.8.24_a01
tag = cime5.8.28
externals = ../Externals_cime.cfg
required = True

Expand Down
16 changes: 15 additions & 1 deletion Externals_cime.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
[cmeps]
hash = 386e1631a6a1e1900700c3a04d693df8692c9420
hash = 9376b87
protocol = git
repo_url = https://github.com/ESCOMP/CMEPS.git
local_path = src/drivers/nuopc/
required = True

[fox]
hash = 0ed59c1
protocol = git
repo_url = https://github.com/ESMCI/fox.git
local_path = src/externals/fox
required = True

[cdeps]
hash = 8e77759
protocol = git
repo_url = https://github.com/ESCOMP/CDEPS.git
local_path = src/components/cdeps
required = True

[externals_description]
schema_version = 1.0.0
87 changes: 59 additions & 28 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,16 @@ sub setup_cmdl_run_type {
my $val;
my $var = "clm_start_type";
my $ic_date = $nl->get_value('start_ymd');
my $st_year = int( $ic_date / 10000);
my $st_year;
if ( defined($ic_date) ) {
$st_year = int( $ic_date / 10000);
} else {
$st_year = $nl_flags->{'sim_year'};
$ic_date = $st_year *10000 + 101;
my $date = 'start_ymd';
my $group = $definition->get_group_name($date);
$nl->set_variable_value($group, $date, $ic_date );
}
if (defined $opts->{$var}) {
if ($opts->{$var} eq "default" ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,
Expand All @@ -1209,6 +1218,7 @@ sub setup_cmdl_run_type {
'sim_year'=>$st_year );
}
$nl_flags->{'clm_start_type'} = $nl->get_value($var);
$nl_flags->{'st_year'} = $st_year;
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -2218,7 +2228,7 @@ sub setup_logic_initial_conditions {

if (not defined $finidat ) {
my $ic_date = $nl->get_value('start_ymd');
my $st_year = int( $ic_date / 10000);
my $st_year = $nl_flags->{'st_year'};
my $nofail = 1;
my %settings;
$settings{'hgrid'} = $nl_flags->{'res'};
Expand Down Expand Up @@ -2276,47 +2286,67 @@ sub setup_logic_initial_conditions {
#}
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_sim_years" );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_how_close" );
#
# Figure out which sim_year has a usable finidat file that is closest to the desired one
#
my $close = $nl->get_value("init_interp_how_close");
foreach my $sim_yr ( split( /,/, $nl->get_value("init_interp_sim_years") )) {
my $closest_sim_year = undef;
my @sim_years = split( /,/, $nl->get_value("init_interp_sim_years") );
SIMYR: foreach my $sim_yr ( @sim_years ) {
my $how_close = undef;
if ( $nl_flags->{'sim_year'} eq "PtVg" ) {
$how_close = abs(1850 - $sim_yr);
# EBK 07/20/2020 -- This makes sure the sim_year matched is based on the sim-year
# rather than the start year.
#} elsif ( $nl_flags->{'flanduse_timeseries'} eq "null" ) {
# $how_close = abs($nl_flags->{'sim_year'} - $sim_yr);
} else {
$how_close = abs($st_year - $sim_yr);
}
if ( ($how_close < $nl->get_value("init_interp_how_close")) && ($how_close < $close) ) {
$close = $how_close;
if ( ($sim_yr == $sim_years[-1]) || (($how_close < $nl->get_value("init_interp_how_close")) && ($how_close < $close)) ) {
my $group = $definition->get_group_name($useinitvar);
$settings{'sim_year'} = $sim_yr;
$settings{$useinitvar} = $defaults->get_value($useinitvar, \%settings);
if ( ! defined($settings{$useinitvar}) ) {
$settings{$useinitvar} = $use_init_interp_default;
}
if ( &value_is_true($settings{$useinitvar}) ) {

if ( ($how_close < $nl->get_value("init_interp_how_close")) && ($how_close < $close) ) {
$close = $how_close;
$closest_sim_year = $sim_yr;
}
}
}
}
} # SIMYR:
$settings{'sim_year'} = $closest_sim_year;
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $useinitvar,
'use_cndv'=>$nl_flags->{'use_cndv'}, 'phys'=>$physv->as_string(),
'sim_year'=>$settings{'sim_year'}, 'nofail'=>1, 'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'},
'use_fates'=>$nl_flags->{'use_fates'} );
'use_cndv'=>$nl_flags->{'use_cndv'}, 'phys'=>$physv->as_string(),
'sim_year'=>$settings{'sim_year'}, 'nofail'=>1, 'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'},
'use_fates'=>$nl_flags->{'use_fates'} );
$settings{$useinitvar} = $nl->get_value($useinitvar);
if ( $try > 1 ) {
my $group = $definition->get_group_name($useinitvar);
$nl->set_variable_value($group, $useinitvar, $use_init_interp_default );
}
if ( &value_is_true($nl->get_value($useinitvar) ) ) {

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_attributes",
'sim_year'=>$settings{'sim_year'}, 'use_cndv'=>$nl_flags->{'use_cndv'},
'glc_nec'=>$nl_flags->{'glc_nec'}, 'use_fates'=>$nl_flags->{'use_fates'},
'use_cn'=>$nl_flags->{'use_cn'}, 'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'},'nofail'=>1 );
my $attributes_string = remove_leading_and_trailing_quotes($nl->get_value("init_interp_attributes"));
if ( ! &value_is_true($nl->get_value($useinitvar) ) ) {
if ( $nl_flags->{'clm_start_type'} =~ /startup/ ) {
$log->fatal_error("clm_start_type is startup so an initial conditions ($var) file is required, but can't find one without $useinitvar being set to true");
}
} else {
my $stat = add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_attributes",
'sim_year'=>$settings{'sim_year'}, 'use_cndv'=>$nl_flags->{'use_cndv'},
'glc_nec'=>$nl_flags->{'glc_nec'}, 'use_fates'=>$nl_flags->{'use_fates'},
'hgrid'=>$nl_flags->{'res'},
'use_cn'=>$nl_flags->{'use_cn'}, 'lnd_tuning_mode'=>$nl_flags->{'lnd_tuning_mode'}, 'nofail'=>1 );
if ( $stat ) {
$log->fatal_error("$useinitvar is NOT synchronized with init_interp_attributes");
}
my $attributes = $nl->get_value("init_interp_attributes");
my $attributes_string = remove_leading_and_trailing_quotes($attributes);
foreach my $pair ( split( /\s/, $attributes_string) ) {
if ( $pair =~ /^([a-z_]+)=([a-z._0-9]+)$/ ) {
if ( $pair =~ /^([a-z_]+)=([a-zA-Z._0-9]+)$/ ) {
$settings{$1} = $2;
} else {
$log->fatal_error("Problem interpreting init_interp_attributes");
$log->fatal_error("Problem interpreting init_interp_attributes: $pair");
}
}
} else {
if ( $nl_flags->{'clm_start_type'} =~ /startup/ ) {
$log->fatal_error("clm_start_type is startup so an initial conditions ($var) file is required, but can't find one without $useinitvar being set to true");
}
$try = $done;
}
} else {
$try = $done
Expand Down Expand Up @@ -3945,7 +3975,7 @@ sub add_default {
}
}
else {
return;
return( 1 );
}
}

Expand Down Expand Up @@ -3980,6 +4010,7 @@ sub add_default {
# set the value in the namelist
$nl->set_variable_value($group, $var, $val);
}
return( 0 );

}

Expand Down
Loading