Skip to content

Commit

Permalink
Merge tag 'clm5.0.dev012' into release-clm5.0
Browse files Browse the repository at this point in the history
Fixes for variable_year orbital mode

Fixes for correctness and exact restartability with variable_year
orbital mode:

(1) Update max day length (max_dayl) each time step, rather than just
    updating it once in initialization

(2) Update to a cime version that has a fix for datm, which updates the
    orbital parameters (used for solar zenith angle-based interpolation)
    each time step, rather than just once in initialization

Fixes #379
Fixes #260
  • Loading branch information
ekluzek committed May 18, 2018
2 parents edd59ca + e739c2c commit db586e2
Show file tree
Hide file tree
Showing 203 changed files with 48,188 additions and 43,611 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ components/
build/
CMakeFiles/


# unit testing directories
src/unit_tests.*

# cime_config
buildnmlc
buildcppc
Expand Down Expand Up @@ -57,6 +61,9 @@ surfdata_*.namelist
clm.input_data_list
clm.input_data_list.previous

# Tools executables
tools/mksurfdata_map/mksurfdata_map
tools/mkprocdata_map/mkprocdata_map

# build output
*.o
Expand Down
49 changes: 49 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, politcal affiliation, veteran status, pregnancy, genetic information, personal appearance, choice of text editor or operating system, race, religion, or sexual identity and orientation, or any other characteristic protected under applicable US federal or state law.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Refusing to use the pronouns that someone requests
* Intimidating, threatening, or hostile conduct; physical or verbal abuse; vandalism; arson; and sabotage
* Alarming or threatening comments that might refer to, suggest, or promote a violent, intimidating, or threatening action

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. Alternatively, this behavior can be reported to individuals on the CTSM team, who will then have the responsibility to talk about the behavior to the core team. Another alternative for NCAR employees (when all individuals involved are NCAR employees) is to use the reporting methods of NCAR for this behavior (these options include anonymous reporting methods). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Retaliation against a person who initiates a complaint or an inquiry about such behaviors is equally prohibited.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
10 changes: 5 additions & 5 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ required = True
local_path = components/cism
protocol = git
repo_url = https://github.com/ESCOMP/cism-wrapper
tag = cism2_1_46
tag = release-v2.1.00
externals = Externals_CISM.cfg
required = True

[rtm]
local_path = components/rtm
protocol = git
repo_url = https://github.com/ESCOMP/rtm
tag = rtm1_0_65
tag = rtm1_0_66
required = True

[mosart]
local_path = components/mosart
protocol = git
repo_url = https://github.com/ESCOMP/mosart
tag = mosart1_0_30
tag = mosart1_0_31
required = True

[cime]
local_path = cime
protocol = git
repo_url = https://github.com/CESM-Development/cime
tag = clm4518/n04/cime5.4.0-alpha.03
repo_url = https://github.com/ESMCI/cime
hash = a67dceae95567cc7529c4cfed153017f4b65b210
required = True

[externals_description]
Expand Down
4 changes: 2 additions & 2 deletions Externals_CLM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
local_path = src/fates
protocol = git
repo_url = https://github.com/NCAR/fates-release
tag = fates_s1.4.1_a3.0.0_rev3
tag = fates_s1.8.1_a3.0.0
required = True

[PTCLM]
local_path = tools/PTCLM
protocol = git
repo_url = https://github.com/ESCOMP/ptclm
tag = PTCLM2_171216c
tag = PTCLM2_180214
required = True

[externals_description]
Expand Down
32 changes: 20 additions & 12 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ offline-build and test scripts. This gives you everything you need
to run CLM with CESM with datm8 to provide CRU NCEP or GSWP3 forcing data in
place of a modeled atmosphere.

For lists of current bugs (issues) and current development see the CTSM github page:

https://github.com/ESCOMP/ctsm

General directory structure:

doc --------------- Documentation of CLM.
Expand Down Expand Up @@ -59,35 +63,39 @@ doc/Quickstart.userdatasets - Quick guide to using your own datasets.
doc/IMPORTANT_NOTES --------- Some important notes about this version of
clm, configuration modes and namelist items
that are not validated or functional.
doc/KnownBugs --------------- List of known bugs.
doc/KnownLimitations -------- List of known limitations and workarounds.
doc/ChangeLog --------------- Detailed list of changes for each model version.
doc/ChangeSum --------------- Summary one-line list of changes for each
model version.
model version.
doc/README ------------------ Documentation similar to this file
doc/UsersGuide -------------- CLM Users Guide
doc/CodeReference ----------- CLM Code Reference Guide

bld/README ------------------ Description of how to use the configure and
build-namelist scripts.
bld/configure --------------- Script to prepare CLM to be built.
bld/build-namelist ---------- Script to build CLM namelists.

cime_config/buildnml ------------- Build the CLM namelist for CIME
cime_config/buildlib ------------- Build the CLM library
cime_config/config_compsets.xml -- Define CLM compsets
cime_config/config_component.xml - Define CLM XML settings
cime_config/config_pes.xml ------- Define Processor layouts for various CLM grids and compsets

test/tools/test_driver.sh -- Script for general software testing of
CLM's offline tools.

tools/clm4_5/mksurfdata_map --- Directory to build program to create surface dataset
tools/mksurfdata_map ---------- Directory to build program to create surface dataset
at any resolution.
tools/clm4_5/interpinic ------- Directory to build program to interpolate initial
conditions to any resolution.
tools/shared/mkdatadomain ----- Directory to build program to create datm7 or docn7
tools/mkdatadomain ------------ Directory to build program to create datm7 or docn7
domain files from clm files.
tools/shared/mkprocdata_map --- Process history data from unstructed grids to a gridded
tools/mkprocdata_map ---------- Process history data from unstructed grids to a gridded
format.
tools/shared/ncl_scripts ----- Directory of NCL and perl scripts to do various
tools/mkmapgrids -------------- NCL script to create a SCRIP grid file for a regular lat/lon grid
tools/ncl_scripts ------------ Directory of NCL and perl scripts to do various
tasks. Most notably to plot perturbation error growth
testing and to extract regional information from
global datasets for single-point/regional simulations.

bld/README ------------- Description of how to use the configure and
build-namelist scripts.

=============================================================================================
Source code directory structure:
Expand All @@ -112,7 +120,7 @@ scr_clm40 ------- CLM4.0 source code directory

cd cime/scripts
./create_newcase # get help on how to run create_newcase
./create_newcase --case testI --res f19_g16 --compset I2000Clm50BgcCrop --mach cheyenne
./create_newcase --case testI --res f19_g17_gl4 --compset I2000Clm50BgcCrop --mach cheyenne
# create new "I" case for cheyenne_intel at 1.9x2.5_gx1v7 res
# "I2000Clm50BgcCrop" case is clm5_0 active, datm8, and inactive ice/ocn
cd testI
Expand Down
11 changes: 9 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ https://escomp.github.io/ctsm-docs/

For help with how to work with CTSM in git, see

https://github.com/ESCOMP/ctsm/wiki/Recommended-git-setup
https://github.com/ESCOMP/ctsm/wiki/Getting-started-with-CTSM-in-git

and

https://github.com/ESCOMP/ctsm/wiki/Getting-started-with-CTSM-in-git
https://github.com/ESCOMP/ctsm/wiki/Recommended-git-setup

To get updates on CTSM tags and important notes on CTSM developments
join our low traffic email list:

https://groups.google.com/a/ucar.edu/forum/#!forum/ctsm-dev

(Send email to [email protected] if you have problems with any of this)
54 changes: 48 additions & 6 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1569,12 +1569,15 @@ sub process_namelist_inline_logic {
setup_logic_dynamic_roots($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_params_file($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_create_crop_landunit($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_subgrid($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_fertilizer($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_grainproduct($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_soilstate($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_demand($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_surface_dataset($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_initial_conditions($opts, $nl_flags, $definition, $defaults, $nl, $physv);
if ( remove_leading_and_trailing_quotes($nl_flags->{'clm_start_type'}) ne "branch" ) {
setup_logic_initial_conditions($opts, $nl_flags, $definition, $defaults, $nl, $physv);
}
setup_logic_dynamic_subgrid($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_spinup($opts, $nl_flags, $definition, $defaults, $nl, $physv);
setup_logic_supplemental_nitrogen($opts, $nl_flags, $definition, $defaults, $nl, $physv);
Expand Down Expand Up @@ -1742,6 +1745,10 @@ sub process_namelist_inline_logic {
#######################################################################
setup_logic_hydrology_switches($nl, $physv);

#########################################
# namelist group: clm_initinterp_inparm #
#########################################
setup_logic_initinterp($opts, $nl_flags, $definition, $defaults, $nl, $physv);
}

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -2069,6 +2076,18 @@ sub setup_logic_create_crop_landunit {
}
}
}

#-------------------------------------------------------------------------------

sub setup_logic_subgrid {
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;

my $var = 'run_zero_weight_urban';
if ($physv->as_long() >= $physv->as_long("clm4_5")) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var);
}
}

#-------------------------------------------------------------------------------

sub setup_logic_cnfire {
Expand Down Expand Up @@ -2103,7 +2122,7 @@ sub setup_logic_cnfire {
sub setup_logic_cnprec {
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;

if ( $physv->as_long() >= $physv->as_long("clm5_0") && &value_is_true($nl->get_value('use_cn')) ) {
if ( $physv->as_long() >= $physv->as_long("clm4_5") && &value_is_true($nl_flags->{'use_cn'}) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults,
$nl, 'ncrit', 'use_cn'=>$nl_flags->{'use_cn'});
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults,
Expand Down Expand Up @@ -2363,7 +2382,10 @@ sub setup_logic_initial_conditions {
}
if ($opts->{'ignore_ic_date'}) {
if ( &value_is_true($nl_flags->{'use_crop'}) ) {
$log->fatal_error("using ignore_ic_date is incompatable with crop!");
$log->warning("using ignore_ic_date is incompatable with crop! If you choose to ignore this error, " .
"the counters since planting for crops will be messed up. \nSo you should ignore at " .
"least the first season for crops. And since it will impact the 20 year means, ideally the " .
"first 20 years should be ignored.");
}
} elsif ($opts->{'ignore_ic_year'}) {
$settings{'ic_md'} = $ic_date;
Expand All @@ -2386,9 +2408,9 @@ sub setup_logic_initial_conditions {
# Delete any date settings, except for crop
delete( $settings{'ic_ymd'} );
delete( $settings{'ic_md'} );
if ( &value_is_true($nl_flags->{'use_crop'}) ) {
$settings{'ic_md'} = $ic_date;
}
#if ( &value_is_true($nl_flags->{'use_crop'}) ) {
#$settings{'ic_md'} = $ic_date;
#}
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" );
foreach my $sim_yr ( split( /,/, $nl->get_value("init_interp_sim_years") )) {
Expand Down Expand Up @@ -3705,6 +3727,26 @@ sub setup_logic_lnd2atm {

#-------------------------------------------------------------------------------

sub setup_logic_initinterp {
#
# Options related to init_interp
#
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;

if ($physv->as_long() >= $physv->as_long("clm4_5")) {
my $var = 'init_interp_method';
if ( &value_is_true($nl->get_value("use_init_interp"))) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var);
} else {
if (defined($nl->get_value($var))) {
$log->fatal_error("$var can only be set if use_init_interp is true");
}
}
}
}

#-------------------------------------------------------------------------------

sub setup_logic_fates {
#
# Set some default options related to Ecosystem Demography
Expand Down
8 changes: 4 additions & 4 deletions bld/namelist_files/namelist_defaults_clm4_0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ irrig=".false." crop="off" lnd_tuning_mode="clm4_0_GSWP3v1"
>lnd/clm2/initdata_map/clmi.I1850Clm40CnGswGs.1441-01-01.0.9x1.25_gx1v6_simyr1850_c170823.nc
</finidat>

<finidat hgrid="0.9x1.25" maxpft="17" mask="gx1v6" bgc="none" ic_ymd="06010101" ic_tod="0" sim_year="1850" glc_nec="0"
<finidat hgrid="0.9x1.25" maxpft="17" mask="gx1v6" bgc="none" ic_ymd="33620101" ic_tod="0" sim_year="1850" glc_nec="0"
irrig=".false." crop="off" lnd_tuning_mode="clm4_0_CRUv7"
>lnd/clm2/initdata_map/clmi.I1850Clm40CnCruGs.0601-01-01.0.9x1.25_gx1v6_simyr1850_c171224.nc
>lnd/clm2/initdata_map/clmi.I1850Clm40CnCruGs.3362-01-01.0.9x1.25_gx1v6_simyr1850_c171222.nc
</finidat>

<finidat hgrid="0.9x1.25" maxpft="17" mask="gx1v6" bgc="cn" ic_ymd="06010101" ic_tod="0" sim_year="1850" glc_nec="0"
<finidat hgrid="0.9x1.25" maxpft="17" mask="gx1v6" bgc="cn" ic_ymd="33620101" ic_tod="0" sim_year="1850" glc_nec="0"
irrig=".false." crop="off" lnd_tuning_mode="clm4_0_CRUv7"
>lnd/clm2/initdata_map/clmi.I1850Clm40CnCruGs.0601-01-01.0.9x1.25_gx1v6_simyr1850_c171224.nc
>lnd/clm2/initdata_map/clmi.I1850Clm40CnCruGs.3362-01-01.0.9x1.25_gx1v6_simyr1850_c171222.nc
</finidat>

<!-- Initial files at 0.9x1.25 or 1.9x2.5 native resolution -->
Expand Down
Loading

0 comments on commit db586e2

Please sign in to comment.