You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Follow the following steps to test the program:
44
44
where [NGEN-FCST_ROOT] is where ngen-fcst is installed
45
45
46
46
The program takes three command line arguments:
47
-
1) Path to the NetCDF forcing file
47
+
1) Path to the NetCDF forcing file or folder containing csv forcing files for all catchments in the basin
48
48
2) Path to the config yaml file for a validation run (from ngen-cal)
49
49
3) Path to the folder to be created for storing inputs/outputs from running ngen, relative to the Output directory of the calibration run as indicated in the config yaml file. For example, if "fcst_run1" is the 3rd argument, and "yaml_file" in the "general" section of the config file is '/home/yuqiong.liu/work/Gitlab/run/kge_DDS/noah_cfes/01123000/Output/Validation_Run/01123000_config_valid_best.yaml', then the new output directory to be created for the ngen-fcst run would be:
50
50
@@ -79,7 +79,7 @@ This will print a usage statement for the container:
echo"FORCING_FILE: Path to the NetCDF forcing file."
23
+
echo"FORCING_DIR: Path to the directory container csv forcing files."
24
24
echo"CONFIG_FILE: Path to the config yaml file for a validation run (from ngen-cal)."
25
25
echo"FORECAST_DIR: Name of the folder to to store the forecast output."
26
26
echo"STDOUT_FILE (optional): Path to the stdout file where the script's console output will be saved. Used when running in LOCAL or DOCKER environment"
@@ -71,18 +71,18 @@ if [ $# -lt $REQUIRED_ARGS ]; then
71
71
show_help
72
72
fi
73
73
74
-
FORCING_FILE=$1
74
+
FORCING_DIR=$1
75
75
CONFIG_FILE=$2
76
76
FORECAST_DIR=$3
77
77
shift$REQUIRED_ARGS
78
78
79
-
echo"FORCING_FILE: ${FORCING_FILE}"
79
+
echo"FORCING_DIR: ${FORCING_DIR}"
80
80
echo"CONFIG_FILE: ${CONFIG_FILE}"
81
81
echo"FORECAST_DIR: ${FORECAST_DIR}"
82
82
83
83
# Check if the forcing data exists
84
-
if [ !-f"${FORCING_FILE}" ];then
85
-
echo"Forcing data not found at ${FORCING_FILE}"
84
+
if [[!-f"${FORCING_DIR}"&&!-d"${FORCING_DIR}" ]];then
85
+
echo"Forcing data not found at ${FORCING_DIR}"
86
86
fi
87
87
88
88
# Check if the configuration file exists
@@ -124,9 +124,9 @@ fi
124
124
# Run the Python script, redirecting its output if an output file is provided
125
125
echo" Running $(basename "$SCRIPT_PATH") with input file: $CONFIG_FILE"
0 commit comments