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

Run a model without compression #1150

Merged
merged 2 commits into from
Feb 20, 2024
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
2 changes: 1 addition & 1 deletion core/src/write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ end
function write_arrow(
path::AbstractString,
table::NamedTuple,
compress::TranscodingStreams.Codec,
compress::Union{ZstdCompressor, Nothing},
)::Nothing
# ensure DateTime is encoded in a compatible manner
# https://github.com/apache/arrow-julia/issues/303
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Compression(str, Enum):

class Results(ChildModel):
outstate: str | None = None
compression: Compression = Compression.zstd
compression: bool = True
compression_level: int = 6
subgrid: bool = False

Expand Down
30 changes: 15 additions & 15 deletions python/ribasim/ribasim/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@ class Config:
coerce = True


class TargetLevelStaticSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class TargetLevelTimeSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
time: Series[Timestamp] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class BasinProfileSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
area: Series[float] = pa.Field(nullable=False)
Expand Down Expand Up @@ -184,6 +169,21 @@ class TabulatedRatingCurveTimeSchema(_BaseSchema):
flow_rate: Series[float] = pa.Field(nullable=False)


class TargetLevelStaticSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class TargetLevelTimeSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)
time: Series[Timestamp] = pa.Field(nullable=False)
min_level: Series[float] = pa.Field(nullable=False)
max_level: Series[float] = pa.Field(nullable=False)
priority: Series[int] = pa.Field(nullable=False)


class TerminalStaticSchema(_BaseSchema):
node_id: Series[int] = pa.Field(nullable=False)

Expand Down
2 changes: 1 addition & 1 deletion python/ribasim_testmodels/ribasim_testmodels/trivial.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ def trivial_model() -> ribasim.Model:
tabulated_rating_curve=rating_curve,
starttime="2020-01-01 00:00:00",
endtime="2021-01-01 00:00:00",
results=ribasim.Results(subgrid=True),
results=ribasim.Results(subgrid=True, compression=False),
)
return model
Loading