Skip to content
Snippets Groups Projects
Commit 1ceba131 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Remove projection variable.

parent 662477c2
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ import xarray as xr
# locals
from climax.core.cli import preprocess_obs_parser
from climax.core.constants import CORDEX_VARIABLES
from climax.core.constants import CORDEX_VARIABLES, PROJECTION
from pysegcnn.core.logging import log_conf
from pysegcnn.core.utils import search_files
from pysegcnn.core.trainer import LogConfig
......@@ -88,6 +88,9 @@ if __name__ == '__main__':
ds['time'] = np.asarray([t.astype('datetime64[D]') for t in
ds.time.values])
# drop projection variable, if present
ds = ds.drop_vars(PROJECTION) if PROJECTION in ds.data_vars else ds
# set NetCDF file compression for each variable
for _, var in ds.data_vars.items():
var.encoding['zlib'] = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment