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

Feature/wdboggs/add alias to acg3 #3461

Merged
merged 5 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 15 additions & 6 deletions Apps/MAPL_GridCompSpecs_ACGv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def get_mandatory_options(cls):
'VLOCATION': ('vlocation', VLOCATION_EMIT),
'VLOC': ('vlocation', VLOCATION_EMIT),
# these are Options that are not output but used to write
'ALIAS': ('alias', identity_writer, False, False),
'CONDITION': ('condition', identity_writer, False, False),
'COND': ('condition', identity_writer, False, False),
'ALLOC': ('alloc', identity_writer, False, False),
Expand Down Expand Up @@ -460,6 +461,7 @@ def digest(specs, args):
for spec in specs[state_intent]: # spec from list
dims = None
ungridded = None
alias = None
option_values = dict() # dict of option values
for column in spec: # for spec writer value
column_value = spec[column]
Expand All @@ -477,6 +479,10 @@ def digest(specs, args):
dims = option_value
elif option == Option.UNGRIDDED:
ungridded = option_value
elif option == Option.ALIAS:
alias = option_value
if alias:
option_values[Option.INTERNAL_NAME] = alias
# MANDATORY
for option in mandatory_options:
if option not in option_values:
Expand Down Expand Up @@ -545,12 +551,8 @@ def emit_values(specs, args):
if f_get_pointers:
f_get_pointers.close()


#############################################
# MAIN program begins here
#############################################

if __name__ == "__main__":
# Main Procedure (Added to facilitate testing.)
def main():
# Process command line arguments
args = get_args()

Expand All @@ -567,5 +569,12 @@ def emit_values(specs, args):
# Emit values
emit_values(specs, args)

#############################################
# MAIN program begins here
#############################################

if __name__ == "__main__":
main()
# FIN
sys.exit(SUCCESS)

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Change `run_dt` to `timestep`
- Add checks for compatibility between `timestep` and `reference_time` for OuterMetaComponent and user component.
- Changed `refTime` (`reference_time`) to `offset` and runTime = refTime + offset
- Add ALIAS column for ACG for MAPL3

### Changed

Expand Down
Loading