You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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. This short shell script below makes this latter one: modifies the experiment ID in the GRIB files using the grib_set command:

#!/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


  • No labels