Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Feb 5, 2024
1 parent c81b56c commit 93f536f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ai_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

__version__ = "0.3.2"
__version__ = "0.3.3"
8 changes: 8 additions & 0 deletions ai_models/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def _main():
help="Turn on debug",
)

parser.add_argument(
"-v",
"--verbose",
action="count",
default=0,
help="Increase verbosity",
)

parser.add_argument(
"--retrieve-requests",
help=(
Expand Down
3 changes: 2 additions & 1 deletion ai_models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Model:
assets_extra_dir = None
retrieve = {} # Extra parameters for retrieve
version = 1 # To be overriden in subclasses
grib_extra_metadata = {} # Extra metadata for grib files

param_level_ml = ([], []) # param, level
param_level_pl = ([], []) # param, level
Expand Down Expand Up @@ -118,7 +119,7 @@ def all_fields(self):

def write(self, *args, **kwargs):
self.collect_archive_requests(
self.output.write(*args, **kwargs),
self.output.write(*args, **kwargs, **self.grib_extra_metadata),
)

def collect_archive_requests(self, written):
Expand Down

0 comments on commit 93f536f

Please sign in to comment.