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

Move ci to balfrin #15

Merged
merged 4 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
update fdb
  • Loading branch information
cfkanesan committed May 16, 2024
commit 9dccca8e12c9ba582c3d6fd901605673e2a6ff74
8 changes: 4 additions & 4 deletions spack-env/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# configuration settings.
spack:
specs:
- fdb
- eckit@1.20.2 ~mpi
- eccodes@2.25 jp2k=none
- hdf5 ~mpi
- fdb@=5.11.116 +tools
- eckit@=1.26.2 ~mpi
- eccodes@=2.33.0 jp2k=none
- metkit@=1.11.9
view: true
concretizer:
unify: true
Expand Down
4 changes: 2 additions & 2 deletions src/meteodatalab/mars.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ def to_fdb(self) -> dict[str, typing.Any]:

obj = dc.replace(self, levelist=levelist)
out = typing.cast(dict[str, typing.Any], obj.dump())
return out | {"param": self._param_id()}
return out | {"param": self._param_id(), "model": out["model"].lower()}

def to_polytope(self) -> dict[str, typing.Any]:
result = self.to_fdb()
if isinstance(result["param"], list):
param: str | list[str] = [str(p) for p in result["param"]]
else:
param = str(result["param"])
return result | {"param": param, "model": result["model"].lower()}
return result | {"param": param}
4 changes: 2 additions & 2 deletions tests/test_meteodatalab/test_mars.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def sample():
"expver": "0001",
"levtype": "ml",
"levelist": list(range(1, 81)),
"model": "COSMO-1E",
"model": "cosmo-1e",
"number": 0,
"stream": "enfo",
"param": 500028, # U
Expand Down Expand Up @@ -46,7 +46,7 @@ def test_fdb_c2e(sample):
step=0,
model=mars.Model.COSMO_2E,
).to_fdb()
expected = sample | {"model": "COSMO-2E", "levelist": list(range(1, 61))}
expected = sample | {"model": "cosmo-2e", "levelist": list(range(1, 61))}

assert observed == expected

Expand Down