Skip to content

Commit

Permalink
CTSM5.3 updates part 2 (incomplete because SSPs pending)
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Aug 1, 2024
1 parent dc9996f commit 3a47c5d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions python/ctsm/toolchain/gen_mksurfdata_namelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,16 +463,16 @@ def check_ssp_years(start_year, end_year):
"""
Check years associated with SSP period
"""
if int(start_year) > 2022:
if int(start_year) > 2023:
error_msg = (
"ERROR: if start-year > 2022 must add an --ssp_rcp "
"ERROR: if start-year > 2023 must add an --ssp_rcp "
"argument that is not none: valid opts for ssp-rcp "
f"are {valid_opts}"
)
sys.exit(error_msg)
elif int(end_year) > 2022:
elif int(end_year) > 2023:
error_msg = (
"ERROR: if end-year > 2022 must add an --ssp-rcp "
"ERROR: if end-year > 2023 must add an --ssp-rcp "
"argument that is not none: valid opts for ssp-rcp "
f"are {valid_opts}"
)
Expand Down Expand Up @@ -547,14 +547,14 @@ def determine_pft_years(start_year, end_year, potveg):
pft_years = "2005"
elif int(start_year) >= 850 and int(end_year) <= 1849:
pft_years = "0850-1849"
elif int(start_year) >= 1700 and int(start_year) <= 2100 and int(end_year) <= 2022:
pft_years = "1700-2022"
elif int(start_year) >= 1700 and int(start_year) <= 2100 and int(end_year) <= 2023:
pft_years = "1700-2023"
elif int(start_year) >= 1700 and int(start_year) <= 2100 and int(end_year) <= 2100:
pft_years = "1700-2022"
pft_years_ssp = "2023-2100"
pft_years = "1700-2023"
pft_years_ssp = "2024-2100"
elif int(start_year) >= 2023 and int(start_year) <= 2100 and int(end_year) <= 2100:
pft_years = "-999"
pft_years_ssp = "2023-2100"
pft_years_ssp = "2024-2100"
else:
error_msg = (
f"ERROR: start_year is {start_year} and end_year is "
Expand Down Expand Up @@ -647,7 +647,7 @@ def write_nml_rawinput(
# write everything else
nlfile.write(f" {key} = '{value}' \n")

if start_year <= 2022:
if start_year <= 2023:
mksrf_fvegtyp = rawdata_files["mksrf_fvegtyp"]
mksrf_fvegtyp_mesh = rawdata_files["mksrf_fvegtyp_mesh"]
mksrf_fhrvtyp = rawdata_files["mksrf_fvegtyp"]
Expand Down Expand Up @@ -716,7 +716,7 @@ def handle_transient_run(
with open(landuse_fname, "w", encoding="utf-8") as landuse_file:
for year in range(start_year, end_year + 1):
year_str = str(year)
if year <= 2022:
if year <= 2023:
file1 = rawdata_files["mksrf_fvegtyp"]
file2 = rawdata_files["mksrf_fvegtyp_urban"]
file3 = rawdata_files["mksrf_fvegtyp_lake"]
Expand Down Expand Up @@ -834,8 +834,8 @@ def determine_input_rawdata(start_year, input_path, attribute_list):
max_match_child = child2

if max_match_child is None:
# For years greater than 2022 - mksrf_fvegtyp_ssp must have a match
if start_year > 2022:
# For years greater than 2023 - mksrf_fvegtyp_ssp must have a match
if start_year > 2023:
if "mksrf_fvegtyp_ssp" not in child1.tag:
error_msg = f"ERROR: {child1.tag} has no matches"
sys.exit(error_msg)
Expand Down
8 changes: 4 additions & 4 deletions tools/mksurfdata_esmf/gen_mksurfdata_namelist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ version of the raw dataset will probably go away.
</entry>

<entry pft_years="1700">
<data_filename>/glade/campaign/cesm/development/lmwg/landuse_source_data/CTSM53RawData/globalctsm53histTRENDY2023Deg025_240709/mksrf_landuse_ctsm53_histTRENDY2023_1700.c240709.nc</data_filename>
<data_filename>/glade/campaign/cesm/development/lmwg/landuse_source_data/CTSM53RawData/globalctsm53histTRENDY2024Deg025_240728/mksrf_landuse_ctsm53_histTRENDY2024_1700.c240728.nc</data_filename>
<mesh_filename>lnd/clm2/mappingdata/grids/UNSTRUCTgrid_0.25x0.25_nomask_cdf5_c200129.nc</mesh_filename>
<lake_filename>lnd/clm2/rawdata/lake_area/mksurf_lake_0.05x0.05_hist_clm5_hydrolakes_1850.cdf5.c20220325.nc</lake_filename>
<urban_filename>lnd/clm2/rawdata/gao_oneill_urban/historical/urban_properties_GaoOneil_05deg_ThreeClass_1850_cdf5_c20220910.nc</urban_filename>
Expand Down Expand Up @@ -263,12 +263,12 @@ version of the raw dataset will probably go away.
<urban_filename>lnd/clm2/rawdata/gao_oneill_urban/historical/urban_properties_GaoOneil_05deg_ThreeClass_1850_cdf5_c20220910.nc</urban_filename>
</entry>

<!-- Historical period from 1700 to 2022 (expect 2023 soon) -->
<!-- Historical period from 1700 to 2023 -->
<!-- Lake and urban data from 1700 to 1849 is copied from 1850 -->
<!-- Lake data from 2018 to 2023 is copied from 2017 -->
<!-- Urban data from 2016 to 2023 is copied from 2015 -->
<entry pft_years="1700-2022" >
<data_filename>/glade/campaign/cesm/development/lmwg/landuse_source_data/CTSM53RawData/globalctsm53histTRENDY2023Deg025_240709/mksrf_landuse_ctsm53_histTRENDY2023_%y.c240709.nc</data_filename>
<entry pft_years="1700-2023" >
<data_filename>/glade/campaign/cesm/development/lmwg/landuse_source_data/CTSM53RawData/globalctsm53histTRENDY2024Deg025_240728/mksrf_landuse_ctsm53_histTRENDY2024_%y.c240728.nc</data_filename>
<mesh_filename>lnd/clm2/mappingdata/grids/UNSTRUCTgrid_0.25x0.25_nomask_cdf5_c200129.nc</mesh_filename>
<lake_filename>lnd/clm2/rawdata/lake_area/mksurf_lake_0.05x0.05_hist_clm5_hydrolakes_%y.cdf5.c20220325.nc</lake_filename>
<urban_filename>lnd/clm2/rawdata/gao_oneill_urban/historical/urban_properties_GaoOneil_05deg_ThreeClass_%y_cdf5_c20220910.nc</urban_filename>
Expand Down

0 comments on commit 3a47c5d

Please sign in to comment.