Trouble Adding Temperature Deltas to Pressure Levels
Added by Paul Fremeau over 4 years ago
Hello,
I'm having trouble adding a grib file containing temperature deltas at different pressure levels to a grib file containing reanalysis data (both files have the same pressure levels).
The script I'm running is here:
@
plevels=(100000 97500 95000 92500 90000 87500 85000 82500 80000 77500 75000 70000 65000 60000 55000 50000 45000 40000 35000 30000 25000 22500 20000 17500 15000 12500 10000 7000 5000 3000 2000 1000 700 500 300 200 100 )
for((i=0;i<${#plevels[]};i++))
do
cdo -add -select,name=var130,level=${plevels[$i]} $pl_grib_file -select,name=var130,level=${plevels[$i]} $ta_delta_file ${dir_temp}perturbed_ta_${scenario}_${i}.grib
done
But I'm getting this error:
cdo (Abort): Too few streams specified! Operator -add needs 2 input streams and 1 output stream!
Can anybody tell me what I'm doing wrong?
Thanks,
Paul
Replies (2)
RE: Trouble Adding Temperature Deltas to Pressure Levels - Added by Paul Fremeau over 4 years ago
Something weird happened when I tried to use inline code. Here's what I meant to post:
plevels=(100000 97500 95000 92500 90000 87500 85000 82500 80000 77500 75000 70000 65000 60000 55000 50000 45000 40000 35000 30000 25000 22500 20000 17500 15000 12500 10000 7000 5000 3000 2000 1000 700 500 300 200 100 )
for((i=0;i<${#plevels[@]};i++)) do cdo -add -select,name=var130,level=${plevels[$i]} $pl_grib_file -select,name=var130,level=${plevels[$i]} $ta_delta_file ${dir_temp}perturbed_ta_${scenario}_${i}.grib done
Trying to figure out why I get the error:
cdo (Abort): Too few streams specified! Operator -add needs 2 input streams and 1 output stream!
RE: Trouble Adding Temperature Deltas to Pressure Levels - Added by Ralf Mueller over 4 years ago
hi!
with so many variables its hard to say. In those situations I usually print the command line with echo
to see, what it really looks like
hth
ralf