diff --git a/video_prediction_tools/HPC_scripts/meta_postprocess_era5_template.sh b/video_prediction_tools/HPC_scripts/meta_postprocess_era5_template.sh new file mode 100644 index 0000000000000000000000000000000000000000..ec8b6eb42c0f0bef9dbc1d70701408b6fabda7f0 --- /dev/null +++ b/video_prediction_tools/HPC_scripts/meta_postprocess_era5_template.sh @@ -0,0 +1,31 @@ +#!/bin/bash -x +## Controlling Batch-job +#SBATCH --account=deepacf +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +##SBATCH --ntasks-per-node=13 +#SBATCH --cpus-per-task=1 +#SBATCH --output=meta_postprocess_era5-out.%j +#SBATCH --error=meta_postprocess_era5-err.%j +#SBATCH --time=00:20:00 +#SBATCH --partition=batch +#SBATCH --gres=gpu:0 +#SBATCH --mail-type=ALL +#SBATCH --mail-user=me@somewhere.com + +######### Template identifier (don't remove) ######### +echo "Do not run the template scripts" +exit 99 +######### Template identifier (don't remove) ######### +jutil env activate -p deepacf + + +# Declare input parameters +root_dir=/p/project/deepacf/deeprain/video_prediction_shared_folder/ +analysis_config=video_prediction_tools/meta_postprocess_config/meta_config.json +metric=mse +exp_id=test +enable_skill_scores=True + +srun python ../main_scripts/main_meta_postprocess.py --root_dir ${root_dir} --analysis_config ${analysis_config} \ + --metric ${metric} --exp_id ${exp_id} --enable_skill_scores ${enable_skill_scores} diff --git a/video_prediction_tools/main_scripts/main_meta_postprocess.py b/video_prediction_tools/main_scripts/main_meta_postprocess.py index 3fda889c26ee4e91994800b7ae1ea254abf3b179..72de27f77a7342ecc87f3e0a46f4e88f76836827 100644 --- a/video_prediction_tools/main_scripts/main_meta_postprocess.py +++ b/video_prediction_tools/main_scripts/main_meta_postprocess.py @@ -1,3 +1,4 @@ +# coding=utf-8 # SPDX-FileCopyrightText: 2021 Earth System Data Exploration (ESDE), Jülich Supercomputing Center (JSC) # # SPDX-License-Identifier: MIT @@ -9,7 +10,9 @@ from __future__ import print_function __email__ = "b.gong@fz-juelich.de" __author__ = "Bing Gong, Yan Ji" __date__ = "2020-12-04" -__update_date__ = "2022-02-02" +__updatedate__ = "2022-02-02" + +import argparse import os from matplotlib.pylab import plt import json @@ -271,6 +274,7 @@ class MetaPostprocess(object): def main(): parser = argparse.ArgumentParser() + parser.add_argument("--root_dir", type=str, required=True, help="The root path for output dir") parser.add_argument("--analysis_config", type=str, required=True, help="The path points to the meta_postprocess configuration file.", default="../meta_postprocess_config/meta_config.json") parser.add_argument("--metric", help="Based on which the models are compared, the value should be in one of [mse,ssim,acc,texture]",default="mse") @@ -278,7 +282,7 @@ def main(): parser.add_argument("--enable_skill_scores", help="compared by skill scores or the absolute evaluation values",default=True) args = parser.parse_args() - meta = MetaPostprocess(analysis_config=args.analysis_config, metric=args.metric, exp_id=args.metric, + meta = MetaPostprocess(root_dir=args.root_dir,analysis_config=args.analysis_config, metric=args.metric, exp_id=args.metric, enable_skill_scores=args.enable_skill_scores) meta()