-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): run the cli script as modules with
python -m
- Loading branch information
Showing
11 changed files
with
41 additions
and
23 deletions.
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Create source and forcing files used in the CESM2 climate model.""" | ||
|
||
from importlib_metadata import version | ||
|
||
__version__ = version(__package__) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
and find a suitable altitude (perhaps from `volcano-cooking`). Then the values are set | ||
using the implementations from `volcano-cooking`. | ||
""" | ||
|
||
import os | ||
from datetime import datetime | ||
|
||
|
@@ -159,9 +160,9 @@ def __set_global_attrs(self, file) -> None: | |
+ f"volcanoes, {start}-{end}" | ||
) | ||
elif a == "data_creator": | ||
self.my_frc.attrs[ | ||
a | ||
] = "Eirik Rolland Enger, University of Tromsø, [email protected]" | ||
self.my_frc.attrs[a] = ( | ||
"Eirik Rolland Enger, University of Tromsø, [email protected]" | ||
) | ||
elif a == "data_doi": | ||
self.my_frc.attrs[a] = "No doi yet" | ||
elif a == "data_source_url": | ||
|
@@ -179,9 +180,9 @@ def __set_global_attrs(self, file) -> None: | |
elif a == "cesm_contact": | ||
self.my_frc.attrs[a] = "None" | ||
elif a == "data_script": | ||
self.my_frc.attrs[ | ||
a | ||
] = "Generated with the 'volcano-cooking' CLI with the re-write option." | ||
self.my_frc.attrs[a] = ( | ||
"Generated with the 'volcano-cooking' CLI with the re-write option." | ||
) | ||
elif a == "data_summary": | ||
nd = ( | ||
10000 * self.yoes.astype(np.float32) | ||
|
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