If you want to change the 4-digit ID of your experiment you have to do it in the name of the initial conditions (ICM*
files), in the namelist (namelistfc
or fort.4
) and/or in the script which handles your job (oifs_run.sh
) AND in the initial conditions itself.
Set new experiment id with grib_set
This short shell script below makes this latter one: modifies the experiment ID in the GRIB files using the grib_set
command:
Code Block |
---|
|
#!/bin/bash -l
cd /wrk/sinclair/oifs_experiments/AP_Tq106_dt1hr_v2/2000010100/
newid=${1?}
echo ${newid}
key="experimentVersionNumber"
for file in *INI*; do
echo ${file}
id=$(grib_get -p $key -w count=1 $file)
echo ${id}
newgrb=${file/$id/$newid}
echo "Changing expid from '$id' to '$newid' for $file writing to new file $newgrb."
grib_set -f -s ${key}="$newid" -w ${key}="$id" $file $newgrb
done |
Set new experiment id with the exptid
command
Use the exptid command to set the new experiment id to 'hecc':
Code Block |
---|
|
troifs0@cca-login3:> exptid -n ob01 ICM*ob00*
Changing expid from 'h7cc' to 'hecc' for ICMCLh7ccINIT and writing to new file ICMCLheccINIT.
Changing expid from 'h7cc' to 'hecc' for ICMGGh7ccINIT and writing to new file ICMGGheccINIT.
Changing expid from 'h7cc' to 'hecc' for ICMGGh7ccINIUA and writing to new file ICMGGheccINIUA.
Changing expid from 'h7cc' to 'hecc' for ICMSHh7ccINIT and writing to new file ICMSHheccINIT.
|
Verify the command worked by checking the experimentVersionNumber in the new files:
Code Block |
---|
|
troifs0@cca-login3:> exptid *hecc*
In file ICMCLheccINIT, values of key experimentVersionNumber are:
hecc
In file ICMGGheccINIT, values of key experimentVersionNumber are:
0001
hecc
In file ICMGGheccINIUA, values of key experimentVersionNumber are:
hecc
In file ICMSHheccINIT, values of key experimentVersionNumber are:
hecc |