apt-get install liboctave-dev (install required Linux package)
octave
pkg install netcdf-1.0.11.tar.gz (install required NetCDF Octave package)
apt-get install nco (install NCO)
ncwa -x -v time -a time dataset-armor-3d-v4-cmems-v2_1504619838532.nc avg_dataset-armor-3d-v4-cmems-v2_1504619838532.nc (time average of the Copernicus file)
ncks --no_dmn_var_nm -H -C -v zvelocity avg_dataset-armor-3d-v4-cmems-v2_1504619838532.nc>zvelocity.csv (extract northward velocity in CSV format)
ncks --no_dmn_var_nm -H -C -v mvelocity avg_dataset-armor-3d-v4-cmems-v2_1504619838532.nc>mvelocity.csv (extract estward velocity in CSV format)
octave (run the octave environment)
source("netcdfgen.m"); (run the netcdf generator process)
ncks --dmn lon,0,1439,4 --dmn lat,0,688,4 sscurrentvel_annual.nc sscurrentvel_annual_red.nc (downsampling to 1 degree = 0.25*4 if necessary)

#Uploading the file via curl
#curl 'http://ec.oceanbrowser.net/emodnet/Python/web/uploadvel' -F "sessionid=1234-23a520a72f" -F uname=u -F vname=v -F "data_vel=@/home/gcube/kriging/example.nc"
