Offline
Trying to use Copernicus to extract historical current data specifically for the north west self. This is flagged as NetCDF-4 and I noted in the help file that some NetCDF files is limited. For now would I need to convert this to grib2?
Weather and tides
NetCDF files
Expedition supports some NetCDF data. This can be expanded as support for new datasets is requested.
Atlantic- European North West Shelf- Ocean Physics Reanalysis
Offline
Ended up using CDO utility to convert the netCDF files to grib1. I did this on the Mac as the CDO install is straight forward and this is a shell script to process a series of separate netCDF files for the years/dates of interest. As these are grib files you can then merge when into a single file for easier handling in Expedition
#
for f in cmems_2*.nc
do
fname=`basename -s .nc $f`
echo $f $fname
# set missing paramaters to 0
cdo setmisstoc,0 $f mcds-input_ex.nc
# Convert each variable with proper parameter ID
cdo -f grb1 -setparam,49 -selvar,uo mcds-input_ex.nc u10.grb1
cdo -f grb1 -setparam,50 -selvar,vo mcds-input_ex.nc v10.grb1
# Merge into one file
if [ -f ${fname}.grb1 ]; then
mv ${fname}.grb1 ,${fname}.grb1
fi
cdo merge u10.grb1 v10.grb1 ${fname}.grb1
done
cat cmems_2*.grb1 > cmems_fastnet.grb1
btw I've used cdo merge as this ensures that showvar lists both var49 and var50. If you cat the files this will only list the first variable. You can also use -O on the merge to force existing files to be over written
cdo showvar cmems_2023.grb1
var49 var50
cdo showname: Processed 2 variables [0.00s 12MB]
Last edited by greg.brougham (Yesterday 7:35 am)
Offline
You don't need cdo merge - you can just cat the files.
Offline
Nick, agree but then cdo showvars will only lists the first variable in the record set. I've updated the text to make this clear