-
Notifications
You must be signed in to change notification settings - Fork 1
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
Updates to allow testing of ExtData2G #331
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
52ead34
update gcm_setup and run for new extdata yaml files
bena-nasa 5f41143
must use '_EOF_' to get literally translation
bena-nasa 4e6ad3c
must turn "off" yaml files for unused yaml files. Name collision
bena-nasa 24da7df
Merge branch 'develop' into feature/bmauer/add_extdata2g_files
bena-nasa 4050a02
more updates to get extdata2g working
bena-nasa 193089f
update gmao_forecast tempolate for ExtData2G
bena-nasa d0a283d
Add preliminary support for ExtData2G with SCM
mathomp4 09f4069
Merge branch 'develop' into feature/bmauer/add_extdata2g_files
sdrabenh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ set (programs | |
scm_setup | ||
gcm_quickstat.j | ||
scm_run.j | ||
construct_extdata_yaml_list.py | ||
) | ||
|
||
install ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/usr/bin/env python3 | ||
import yaml | ||
import argparse | ||
import os | ||
|
||
def parse_args(): | ||
p = argparse.ArgumentParser(description='create extdata master file') | ||
p.add_argument('rc_file',type=str,help='GEOS_ChemGridComp.rc file') | ||
return vars(p.parse_args()) | ||
|
||
if __name__ == '__main__': | ||
|
||
args = parse_args() | ||
rc_file = args['rc_file'] | ||
|
||
f = open(rc_file,"r") | ||
temp_text = f.readlines() | ||
f.close() | ||
|
||
component_yaml_files = yaml.safe_load(""" | ||
GOCART: | ||
- CFC_GridComp_ExtData.yaml | ||
- CH4_GridComp_ExtData.yaml | ||
- CO2_GridComp_ExtData.yaml | ||
- CO_GridComp_ExtData.yaml | ||
- O3_GridComp_ExtData.yaml | ||
- Rn_GridComp_ExtData.yaml | ||
GOCART2G: | ||
- CA2G_GridComp_ExtData.yaml | ||
- DU2G_GridComp_ExtData.yaml | ||
- NI2G_GridComp_ExtData.yaml | ||
- SS2G_GridComp_ExtData.yaml | ||
- SU2G_GridComp_ExtData.yaml | ||
GAAS: | ||
- GAAS_GridComp_ExtData.yaml | ||
STRATCHEM: | ||
- StratChem_ExtData.yaml | ||
GMICHEM: | ||
- GMI_ExtData.yaml | ||
CARMA: | ||
- CARMAchem_GridComp_ExtData.yaml | ||
MAM: | ||
- MAM7_ExtData.yaml | ||
ACHEM: | ||
- GEOSachem_ExtData.yaml | ||
TR: | ||
- TR_ExtData.yaml | ||
DNA: | ||
- DNA_ExtData.yaml | ||
HEMCO: | ||
- HEMCOgmi_ExtData.yaml | ||
- HEMCOgocart2g_ExtData.yaml | ||
Extras: | ||
- ChemEnv_ExtData.yaml | ||
- WSUB_ExtData.yaml | ||
""") | ||
components = {} | ||
for line in temp_text: | ||
if "ENABLE" in line: | ||
entry = line.split(":") | ||
if ".TRUE." in entry[1]: | ||
component_on = True | ||
if ".FALSE." in entry[1]: | ||
component_on = False | ||
key_name = entry[0] | ||
component_name = key_name.replace("ENABLE_","") | ||
component_name = component_name.lstrip() | ||
components[component_name] = component_on | ||
|
||
files_to_use = [] | ||
for key in components: | ||
if key in component_yaml_files and components[key]: | ||
files = component_yaml_files[key] | ||
for single_file in files: | ||
files_to_use.append(single_file) | ||
|
||
extra_files = component_yaml_files["Extras"] | ||
for single_file in extra_files: | ||
files_to_use.append(single_file) | ||
|
||
f = open("extdata.yaml","w") | ||
f.write("subconfigs:\n") | ||
for single_file in files_to_use: | ||
f.write(" - "+single_file+"\n") | ||
f.close() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@bena-nasa Should this be
touch extdata.yaml
?