-
Notifications
You must be signed in to change notification settings - Fork 312
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 soiltex for ctsm5.2.mksurfdata #1732
Changes from all commits
a849f95
8de015d
c79e8fc
3da0c0a
98c78b1
048dc94
2491f62
f855eff
c5e496b
82c3924
191803f
d7e2da6
057714f
474cd95
3e6d2f2
0216669
cd04245
1d7bbc1
9ca5228
efd5ca2
d53d1b9
2e7fc48
195ae0d
c1bde16
6c8ef8b
f7c80ec
ba8d426
c55575c
73950a3
9b37f01
e0fd2b1
1cc1fad
59785d4
94b844b
e4ad556
7c05469
ac53754
ea5dbae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,9 @@ Build Requirements: | |
=================== | ||
|
||
mksurfdata_esmf is a distributed memory parallel program (using Message Passing | ||
Interface -- MPI) that utilizes | ||
both ESMF (Earth System Modelling Framework) for regridding as well as Parallel | ||
I/O (PIO) and NetCDF output. As | ||
such libraries must be built for the following: | ||
Interface -- MPI) that utilizes both ESMF (Earth System Modelling Framework) | ||
for regridding as well as PIO (Parallel I/O) and NetCDF output. As | ||
such, libraries must be built for the following: | ||
|
||
1) MPI | ||
2) NetCDF | ||
|
@@ -25,35 +24,36 @@ such libraries must be built for the following: | |
|
||
In addition for the build: python, bash-shell, CMake and GNU-Make are required | ||
|
||
These libraries need to be built such that they can all work together in the same executable. Hence, the above | ||
order may be required in building them. | ||
These libraries need to be built such that they can all work together in the | ||
same executable. Hence, the above order may be required in building them. | ||
|
||
========================================= | ||
Use cime to manage the build requirements | ||
========================================= | ||
|
||
For users working on cime machines you can use the build | ||
script to build the tool for you. On other machines you'll need to do a port to cime | ||
and tell how to build for that machine. That's talked about in the cime documentation. | ||
For users working on cime machines you can use the build script to build the | ||
tool. On other machines you'll need to do a port to cime and tell how to build | ||
for that machine. That's talked about in the cime documentation. | ||
And you'll have to make some modifications to the build script. | ||
|
||
https://github.com/ESMCI/cime/wiki/Porting-Overview | ||
|
||
Machines that already run CTSM or CESM have been ported to cime. So if you can run the model | ||
on your machine you will be able to build the tool there. | ||
Machines that already run CTSM or CESM have been ported to cime. So if you can | ||
run the model on your machine, you will be able to build the tool there. | ||
|
||
To get a list of the machines that have been ported to cime: | ||
|
||
cd ../../cime/scripts # assumes we are in tools/mksurfdata_esmf | ||
./query_config --machines | ||
|
||
NOTE: | ||
In addition to having a port to cime, the machine also needs to have PIO built and able | ||
to be referenced with the env variable PIO which will need to be in the porting instructions | ||
for the machine. Currently an independent PIO library is not available on cime ported machines. | ||
In addition to having a port to cime, the machine also needs to have PIO built | ||
and able to be referenced with the env variable PIO which will need to be in | ||
the porting instructions for the machine. Currently an independent PIO library | ||
is not available on cime ported machines. | ||
|
||
======================= | ||
building the executable (working in tools/mksurfdata_esmf) | ||
Building the executable (working in tools/mksurfdata_esmf) | ||
======================= | ||
|
||
> ./gen_mksurfdata_build.sh # For machines with a cime build | ||
|
@@ -63,7 +63,7 @@ building the executable (working in tools/mksurfdata_esmf) | |
# a default value does get set for other machines. | ||
|
||
======================= | ||
running for a single submission: | ||
Running for a single submission: | ||
======================= | ||
# to generate your target namelist: | ||
> ./gen_mksurfdata_namelist.py --help | ||
|
@@ -83,7 +83,7 @@ running for a single submission: | |
# Read note about regional grids below. | ||
|
||
======================= | ||
running for the generation of multiple datasets | ||
Running for the generation of multiple datasets | ||
======================= | ||
# Notes: | ||
# - gen_mksurfdata_jobscript_multi.py runs ./gen_mksurfdata_namelist.py for you | ||
|
@@ -102,6 +102,7 @@ slevis HAS RUN THESE CASES and HAS LISTED ISSUES ENCOUNTERED | |
------------------------------------------------------------ | ||
REMEMBER TO compare against existing fsurdat files in | ||
/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata_map/release-clm5.0.18 | ||
0) New 30-sec raw data for soil texture fails. Try requesting more mem. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this README file, this is the only substantial change (others just improve the formatting): |
||
1) Soil color & texture and ag fire peak month outputs too high in .log | ||
TODO? Change frac_o from always 1. | ||
2) Pct lake has chged in the .log bc the old diagnostic omitted mask_i frac_o | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,7 +196,19 @@ def get_parser(): | |
[default: %(default)s] | ||
""", | ||
action="store_true", | ||
dest="hres_flag", | ||
dest="hres_pft", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renamed hres_flag to hres_pft to distinguish it from the new hres_soitex. |
||
default=False, | ||
) | ||
parser.add_argument( | ||
"--hires_soitex", | ||
help=""" | ||
If you want to use the high-resolution soil texture dataset rather | ||
than the default lower resolution dataset. | ||
(Low resolution is 5x5min, high resolution 30-second) | ||
[default: %(default)s] | ||
""", | ||
action="store_true", | ||
dest="hres_soitex", | ||
default=False, | ||
) | ||
parser.add_argument( | ||
|
@@ -230,19 +242,6 @@ def get_parser(): | |
dest="potveg_flag", | ||
default=False, | ||
) | ||
parser.add_argument( | ||
"--merge_gis", | ||
help=""" | ||
If you want to use the glacier dataset that merges in | ||
the Greenland Ice Sheet data that CISM uses (typically | ||
used only if consistency with CISM is important) | ||
[default: %(default)s] | ||
""", | ||
action="store", | ||
dest="merge_gis", | ||
choices=["on","off"], | ||
default="off", | ||
) | ||
return parser | ||
|
||
def main (): | ||
|
@@ -267,8 +266,8 @@ def main (): | |
glc_flag = args.glc_flag | ||
potveg = args.potveg_flag | ||
glc_nec = args.glc_nec | ||
merge_gis = args.merge_gis | ||
if args.hres_flag: | ||
|
||
if args.hres_pft: | ||
if (start_year == 1850 and end_year == 1850) or \ | ||
(start_year == 2005 and end_year == 2005): | ||
hires_pft = 'on' | ||
|
@@ -279,6 +278,13 @@ def main (): | |
else: | ||
hires_pft = 'off' | ||
|
||
if args.hres_soitex: | ||
hires_soitex = 'on' | ||
else: | ||
hires_soitex = 'off' | ||
|
||
verbose = args.verbose | ||
|
||
if force_model_mesh_file is not None: | ||
# open mesh_file to read element_count and, if available, orig_grid_dims | ||
mesh_file = netCDF4.Dataset(force_model_mesh_file, 'r') | ||
|
@@ -369,10 +375,10 @@ def main (): | |
|
||
# create attribute list for parsing xml file | ||
attribute_list = {'hires_pft':hires_pft, | ||
'hires_soitex':hires_soitex, | ||
'pft_years':pft_years, | ||
'pft_years_ssp':pft_years_ssp, | ||
'ssp_rcp':ssp_rcp, | ||
'mergeGIS':merge_gis, | ||
'res':res} | ||
|
||
# create dictionary for raw data files names | ||
|
@@ -431,9 +437,10 @@ def main (): | |
print('WARNING: run ./download_input_data to try TO ' \ | ||
'OBTAIN MISSING FILES') | ||
_must_run_download_input_data = True | ||
elif 'urban_properties' in rawdata_files[child1.tag]: | ||
# Time-slice cases pull urban_properties from the transient | ||
# urban_properties data files | ||
elif 'urban_properties' in rawdata_files[child1.tag] or \ | ||
'lake' in rawdata_files[child1.tag]: | ||
# Time-slice cases pull urban_properties and %lake from the | ||
# corresponding transient files | ||
rawdata_files[child1.tag] = rawdata_files[child1.tag]. \ | ||
replace("%y",str(start_year)) | ||
|
||
|
@@ -455,6 +462,10 @@ def main (): | |
new_key = f"{child1.tag}_urban" | ||
rawdata_files[new_key] = os.path.join(input_path, item.text) | ||
|
||
if item.tag == 'lookup_filename': | ||
new_key = f"{child1.tag}_lookup" | ||
rawdata_files[new_key] = os.path.join(input_path, item.text) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needed for the newly introduced soil texture lookup file. |
||
|
||
# determine output mesh | ||
xml_path = os.path.join(tool_path, '../../ccs_config/component_grids_nuopc.xml') | ||
tree2 = ET.parse(xml_path) | ||
|
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.
@billsacks this is the only change in this commit where I didn't feel confident. Could you confirm? Other than the variable name, would you have also changed the array values for the purposes of this test?
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.
Technically this should be changed so that the value is 50 (the max value of the PCT_LAKE array) rather than 1. I think that could be done by changing
array(1.,1.,AREA)
toarray(50.,0.,AREA)
(I think the second value is irrelevant here). However, it shouldn't matter in practice, because a value of 1 will do the same thing as a value of 50 where this is read... it may just cause a bit of confusion. Thanks for taking care of this!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.
Thanks, @billsacks
I will take care of this later since I merged this branch earlier today.
Probably in a PR that will address #1703