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

Input and Output module.

parent 85e41d45
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@
# -*- coding: utf-8 -*-
# builtins
import pathlib
import datetime
# externals
......@@ -13,25 +12,6 @@ import numpy as np
# locals
from climax.core.constants import PREDICTANDS
# -----------------------------------------------------------------------------
# Paths to input data ---------------------------------------------------------
# -----------------------------------------------------------------------------
# project root path
ROOT = pathlib.Path('/mnt/CEPH_PROJECTS/FACT_CLIMAX/')
# path to this file
HERE = pathlib.Path(__file__).parent
# path to ERA5 reanalysis data
ERA5_PATH = ROOT.joinpath('REANALYSIS')
# path to OBServation data
OBS_PATH = ROOT.joinpath('OBSERVATION')
# path to save trained models
MODEL_PATH = ROOT.joinpath('Models')
# -----------------------------------------------------------------------------
# ERA5 downscaling configuration ----------------------------------------------
# -----------------------------------------------------------------------------
......
......@@ -19,9 +19,9 @@ from pysegcnn.core.trainer import NetworkTrainer
from pysegcnn.core.logging import log_conf
from climax.core.dataset import ERA5Dataset, NetCDFDataset
from climax.core.constants import ERA5_VARIABLES
from climax.main.config import (ERA5_PATH, ERA5_PLEVELS, OBS_PATH, PREDICTAND,
CALIB_PERIOD, MODEL_PATH, SHUFFLE, BATCH_SIZE,
LR, TRAIN_CONFIG)
from climax.main.config import (ERA5_PLEVELS, PREDICTAND, CALIB_PERIOD,
SHUFFLE, BATCH_SIZE, LR, TRAIN_CONFIG)
from climax.main.io import ERA5_PATH, OBS_PATH, MODEL_PATH
if __name__ == '__main__':
......
"""Climax input and output files."""
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# builtins
import pathlib
# -----------------------------------------------------------------------------
# Paths to input data ---------------------------------------------------------
# -----------------------------------------------------------------------------
# project root path
ROOT = pathlib.Path('~/FACT_CLIMAX')
ROOT = pathlib.Path('/mnt/CEPH_PROJECTS/FACT_CLIMAX/')
# path to this file
HERE = pathlib.Path(__file__).parent
# path to ERA5 reanalysis data
ERA5_PATH = ROOT.joinpath('REANALYSIS')
# path to OBServation data
OBS_PATH = ROOT.joinpath('OBSERVATION')
# path to save trained models
MODEL_PATH = ROOT.joinpath('Models')
# create input and output paths
for path in [ERA5_PATH, OBS_PATH, MODEL_PATH]:
if not path.exists():
path.mkdir(parents=True, exist_ok=True)
......@@ -13,7 +13,7 @@ import numpy as np
# locals
from climax.core.constants import ERA5_P_VARIABLES, ERA5_VARIABLES
from climax.main.config import ERA5_PATH
from climax.main.io import ERA5_PATH
# pressure levels
pressure_levels = ['850', '500']
......
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