Thank your for your help.
This is an important feature for me.
I am not sure it was clear on my example, but I am trying to remove data "on land" from my offshore raster !
Given your comments, I have been looking for a shapefile delimiting oceans. NaturalEarth provides me with a very good dataset which fulfilled my needs.(10mphysical/10m_ocean.shp)
Here is the image of the 3 layers : the ocean, my initial dataset and the
However the extracted dataset do not keep track of the metadata !!
H0:bathymetry became 'Band1'.
Do you know a way to bypass those modification?
gdalinfo on first dataset :
Band 1 Block=345x1 Type=Float32, ColorInterp=Undefined
NoData Value=-32768
Metadata:
_FillValue=-32768
coordinates=lon lat
grid_mapping=crs
long_name=bathymetry relative to the mean level
NETCDF_VARNAME=H0
standard_name=model_sea_floor_depth_below_geoid
units=m
valid_max=10000
valid_min=-10000
gdalinfo on second dataset :
Band 1 Block=345x1 Type=Float32, ColorInterp=Undefined
NoData Value=-32768
Metadata:
_FillValue=-32768
coordinates=lon lat
grid_mapping=crs
long_name=GDAL Band Number 1
NETCDF_VARNAME=Band1