I am working with climate data which are in NetCDF format. I want to plot my variables such as rainfall, temperature, etc over a river basin. I would like my plots to have only the form or the contour of my basin.
it would be good to know if you want to plot some area-averaged quantities (e.g. the average rainfall across all pixels in your river basin) or if you're interested in plotting pixel-based quantities (e.g. precipitation at every single pixel in your domain).
For the first option, you can use e.g. the fill-function in Matlab or in the Matplotlib-Library in Python. You could also simply create a raster, assign every pixel in your domain the same value, and then follow the advice for the second option...
For the second option, you plot your raster data and then truncate the plot to the domain you're interested in. As I am a GMT-user, I normally use the psclip-tool for these purposes.