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

Group preprocessing by dataset.

parent cc1b630f
No related branches found
No related tags found
No related merge requests found
......@@ -17,10 +17,10 @@ PR_INVENTORY='/mnt/CEPH_PROJECTS/FACT_CLIMAX/CORDEX/Inventory/pr/pr_inventory_se
# preprocess EuroCordex simulations
# tasmin
time python climax/main/preprocess.py $TARGET_GRID $SOURCE_PATH $TARGET_PATH -f $TASMIN_INVENTORY -m 'bilinear' -rm -a -o
time python climax/main/preprocess_CORDEX.py $TARGET_GRID $SOURCE_PATH $TARGET_PATH -f $TASMIN_INVENTORY -m 'bilinear' -rm -a -o
# tasmax
time python climax/main/preprocess.py $TARGET_GRID $SOURCE_PATH $TARGET_PATH -f $TASMAX_INVENTORY -m 'bilinear' -rm -a -o
time python climax/main/preprocess_CORDEX.py $TARGET_GRID $SOURCE_PATH $TARGET_PATH -f $TASMAX_INVENTORY -m 'bilinear' -rm -a -o
# pr
time python climax/main/preprocess.py $TARGET_GRID $SOURCE_PATH $TARGET_PATH -f $PR_INVENTORY -m 'bilinear' -rm -a -o
\ No newline at end of file
time python climax/main/preprocess_CORDEX.py $TARGET_GRID $SOURCE_PATH $TARGET_PATH -f $PR_INVENTORY -m 'bilinear' -rm -a -o
\ No newline at end of file
......@@ -82,6 +82,8 @@ if __name__ == '__main__':
product, {**CONFIG, **{'variable': var, 'year': year}}, file)
for file, year in zip(files, years) if not file.exists())
# TODO: Move to preprocess_ERA5.py
# aggregate files for different years into a single file using xarray
# and dask
ds = xr.open_mfdataset(files, parallel=True).compute()
......
......@@ -20,7 +20,7 @@ from pysegcnn.core.logging import log_conf
from pysegcnn.core.trainer import LogConfig
from climax.core.utils import (get_inventory, reproject_cdo,
_parse_cordex_time_span)
from climax.core.cli import preprocess_parser
from climax.core.cli import preprocess_cordex_parser
from climax.core.constants import EUROCORDEX_DOMAIN, CORDEX_PARAMETERS
# module level logger
......@@ -47,7 +47,7 @@ if __name__ == '__main__':
dictConfig(log_conf())
# define command line argument parser
parser = preprocess_parser()
parser = preprocess_cordex_parser()
# parse command line arguments
args = sys.argv[1:]
......
"""Preprocess ERA-5 data: aggregate to daily and resample to target grid."""
# !/usr/bin/env python
# -*- coding: utf-8 -*-
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment