I found an online example that shows the exact end-product I want, a masked .netcdf using a .shp file. Example here: https://mygeoblog.com/2019/06/25/mask-n