Move the code to write the NetCDF file into a new function...
Move the code to write the NetCDF file into a new function (write_FVCOM_forcing.m). Also improve the speed of the interpolation in two ways: 1. Use TriScatteredInterp to do the interpolation (with natural neighbour interpolation), and 2. Do the interpolation onto the element centres using their positions directly, rather than averaging the nodal values for each element. This last step significantly improved the speed of the interpolation
Showing with 104 additions and 186 deletions