Skip to content
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
8 changes: 6 additions & 2 deletions CLASS/CLASS_to_ILAMB.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
"time_bnds": xr.DataArray(tb, dims=("time", "nv")),
}
)
out[v].attrs["bounds"] = uncert
out[v].attrs["ancillary_variables"] = uncert
out[uncert].attrs = {
"standard_name": f"{v} standard_error",
"units": out[v].attrs["units"],
}

attrs = {}
attrs["title"] = "Conserving Land-Atmosphere Synthesis Suite (CLASS) v1.1"
Expand Down Expand Up @@ -98,11 +102,11 @@
}
"""
out.attrs = attrs
print(out)
out.to_netcdf(
"%s.nc" % v,
encoding={
v: {"zlib": True},
uncert: {"zlib": True},
"time": {"units": "days since 2003-01-01", "bounds": "time_bnds"},
"time_bnds": {"units": "days since 2003-01-01"},
},
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
name = "ilamb-data"
version = "0.1.0"
description = "Scripts that the ILAMB project uses to format reference data in the CF-conventions/"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"cftime>=1.6.4.post1",
"dask>=2024.12.1",
"ilamb3",
"ilamb>=2.7.2",
"netcdf4>=1.7.2",
"xarray>=2024.11.0",
]

[tool.uv.sources]
ilamb3 = { git = "https://github.com/rubisco-sfa/ilamb3" }
Loading