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

handle case where diskless_write is not in kwargs (e.g. from pysurfex… #43

Merged
merged 2 commits into from
Aug 21, 2024
Merged
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
5 changes: 4 additions & 1 deletion pysurfex/forcing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Forcing."""

import abc
import copy
import json
Expand Down Expand Up @@ -764,6 +765,7 @@ def set_forcing_config(**kwargs):
co2 = "default"
co2_converter = "none"

diskless_write = False
analysis = False
interpolation = None
try:
Expand All @@ -772,7 +774,6 @@ def set_forcing_config(**kwargs):
input_format = kwargs["input_format"]
output_format = kwargs["output_format"]
outfile = kwargs["of"]
diskless_write = kwargs["diskless_write"]
zref = kwargs["zref"]
uref = kwargs["uref"]
config = kwargs["config"]
Expand Down Expand Up @@ -848,6 +849,8 @@ def set_forcing_config(**kwargs):
co2 = kwargs["co2"]
if "co2_converter" in kwargs:
co2_converter = kwargs["co2_converter"]
if "diskless_write" in kwargs:
diskless_write = kwargs["diskless_write"]

except ValueError:
raise Exception("Needed input is missing") from ValueError
Expand Down
Loading