Commit f64c40b4 authored by Willi Rath's avatar Willi Rath

Clean up nc and grb dirs before converting

parent 19aff14f
......@@ -5,12 +5,12 @@ function convert_grb_to_netcdf {
nc_file="$(echo ${grb_file} | rev | cut -d. -f2- | rev)".nc
tmp_nc_file=${nc_file}_tmp
cdo -r -t ecmwf -f nc -copy ${grb_file} ${tmp_nc_file}
rm -f ${nc_file}
nccopy -7 -d1 -s ${tmp_nc_file} ${nc_file}
rm -f ${tmp_nc_file}
}
export -f convert_grb_to_netcdf
rm -f data/grb/* data/nc/*
find data -iname \*.grb -print0 | \
xargs -0 -n1 -P4 -I {} bash -c "convert_grb_to_netcdf {}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment