11#! /bin/bash
2- # PBS -N cmor_{{ variable }}
2+ # PBS -N cmor_{{ variable | replace('.', '_') }}
33# PBS -q {{ config.get('queue', 'normal') }}
44# PBS -l ncpus={{ config.get('cpus_per_node', 4) }}
55# PBS -l mem={{ config.get('mem', '16GB') }}
66# PBS -l walltime={{ config.get('walltime', '01:00:00') }}
7- # PBS -o {{ script_dir }}/cmor_{{ variable }}.out
8- # PBS -e {{ script_dir }}/cmor_{{ variable }}.err
7+ # PBS -o {{ script_dir }}/cmor_{{ variable | replace('.', '_') }}.out
8+ # PBS -e {{ script_dir }}/cmor_{{ variable | replace('.', '_') }}.err
99{{ config.get(' scheduler_options' , ' #PBS -P your_project' ) }}
1010{% if config.get(' storage' ) %}# PBS -l storage={{ config.get('storage') }}{% endif %}
1111
@@ -23,7 +23,7 @@ sys.path.insert(0, '{{ package_path }}')
2323from access_mopper import ACCESS_ESM_CMORiser
2424from access_mopper.tracking import TaskTracker
2525
26- config = json.loads('{{ config | tojson | replace( \" ' \" , \"\\ ' \" ) }}')
26+ config = json.loads('{{ config | tojson }}')
2727variable = os.environ['VARIABLE']
2828db_path = os.environ['CMOR_TRACKER_DB']
2929
@@ -34,7 +34,7 @@ if not pattern:
3434full_pattern = str(Path(input_folder) / pattern)
3535input_files = glob.glob(full_pattern)
3636if not input_files:
37- raise ValueError(f'No files found for pattern {pattern }')
37+ raise ValueError(f'No files found for pattern {full_pattern }')
3838
3939print(f'Processing {variable} with {len(input_files)} files')
4040
5959 drs_root=config.get('drs_root'),
6060 )
6161 cmoriser.run()
62+ cmoriser.write()
6263 tracker.mark_done(variable, exp)
6364 print(f'Completed: {variable}')
6465except Exception as e:
0 commit comments