CABLE-LSM / benchcab

Tool for evaluation of CABLE land surface model
https://benchcab.readthedocs.io/en/latest/
Apache License 2.0
2 stars 3 forks source link

No such file or directory: 'config.yaml' following the User Guide #276

Closed jiachenlu95 closed 5 months ago

jiachenlu95 commented 6 months ago

Hi, I'm new to CABLE and working on introducing some urban component to CABLE. I was trying to run some example configurations to start following https://benchcab.readthedocs.io/en/stable/user_guide/.

I run the following command,

cd /scratch/$PROJECT/$USER git clone https://github.com/CABLE-LSM/bench_example.git module use /g/data/hh5/public/modules module load conda/analysis3-unstable cd benchcab benchcab run

The batch code seems to successfully check and build the model and submit batch job, but show the follow errors that crashed the PBS job.

/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/bin/benchcab fluxsite-run-tasks --config=config.yaml Traceback (most recent call last): File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/bin/benchcab", line 10, in sys.exit(main()) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/benchcab/main.py", line 42, in main parse_and_dispatch(parser) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/benchcab/main.py", line 32, in parse_and_dispatch func(**args) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/benchcab/benchcab.py", line 281, in fluxsite_run_tasks config = self._get_config(config_path) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/benchcab/benchcab.py", line 136, in _get_config self._config = read_config(config_path) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/benchcab/config.py", line 165, in read_config config = read_config_file(config_path) File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/site-packages/benchcab/config.py", line 139, in read_config_file with Path.open(Path(config_path), "r", encoding="utf-8") as file: File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-24.01/lib/python3.10/pathlib.py", line 1119, in open return self._accessor.open(self, mode, buffering, encoding, errors, FileNotFoundError: [Errno 2] No such file or directory: 'config.yaml'

SeanBryan51 commented 5 months ago

Hi @jiachenlu95, benchcab will automatically find the configuration file when running from the bench_example work directory. I've managed to do a successful benchcab run with the following commands:

module use /g/data/hh5/public/modules
module load conda/analysis3-unstable
cd /scratch/$PROJECT/$USER
git clone https://github.com/CABLE-LSM/bench_example.git bench_example_tmp
cd bench_example_tmp
# Set fluxsite experiment to a single site for shorter runtime:
cat << EOF >> config.yaml
fluxsite:
  experiment: AU-Tum
EOF
benchcab run -v
jiachenlu95 commented 5 months ago

Hi Sean,

Thanks for the help. I have managed to run the benchcab following your suggestion. Is it possible to update the tutorial page to include this with details? I guess it will be a lot easier for beginners to use benchcab.

Thanks, Jiachen

SeanBryan51 commented 5 months ago

@jiachenlu95 No worries. I've made a separate issue (#277) to update the user guide to include my previous instructions. I will close this issue in the meantime.