Pull the fixed for the vertical interpolation of the temperature and salinity from the dev branch into master
Undo the depth profile inversion since using the depths to interpolate means the values are reordered if necessary
Merge the changes from the dev branch allowing more generic loading of PML POLCOMS-ERSEM model outputs to be read in and used as boundary forcing for temperature and salinity (at the moment, potentially for mean flow in the future) as well as a source for replacing variables in the restart files. As a result of these changes, the old replace_FVCOM_restart_vars.m has been split into a number of smaller more flexible functions
Merge branch 'dev'

Bring in the changes from the dev branch into the master branch. These include:

- Support for converting POLCOMS flow, index and grid files into the necessary files to write FVCOM river input files (NetCDF and nml files). The existing river functions have been updated to reflect the changes needed in the latest versions of FVCOM (3.1.x). write_FVCOM_river.m now uses the native MATLAB NetCDF routines to export to NetCDF.
- Preliminary support for mean flow at the open boundaries. At the moment, the mean flow is interpolated from POLCOMS daily mean flow values. The necessary tools to write out the FVCOM ASCII mean flow files have been created, but I have not yet managed to successfully run a model with mean flow. Consider it a work in progress.
- The NCEP surface forcing is now able to use either the MATLAB native support or otherwise (for older versions) the third-party OPeNDAP toolbox (http://www.opendap.org/pub/contributed/source/ml-toolbox/). It is still dependent on the air-sea toolbox (http://woodshole.er.usgs.gov/operations/sea-mat/air_sea-html/index.html). The surface forcing has had the sign convention fixed (see get_NCEP_forcing.m).
- Vertical temperature and salinity profiles from POLCOMS model outputs are scaled to the FVCOM depth rather than truncating. Hopefully this means the full structure of the water column is preserved if POLCOMS and FVCOM differ in their depths (see get_POLCOMS_tsobc.m).
- Export of the surface forcing can now use a precomputed surface heat flux rather than having to interpolate the four components only to merge them (see write_FVCOM_forcing.m).
- Some of the older functions have been made more consistent in terms of the coding style (e.g. warnings are now turned on, or not turned off, for all functions). Similarly, the history global variable in any FVCOM NetCDF file now includes the name of the function from which it was generated.
- The routine to replace variables within an FVCOM restart file now includes the ability to adjust the times for which the restart file is applicable. This is useful if you have a restart file for a model domain, but wish to use it for a different time.
- A new function to reorganise open boundary elements to have an edge approximately normal to the open boundary has been added (fix_inside_boundary.m). The routine is somewhat brute force, and can result in invalid unstructured grids. As such, any changes should be reviewed in SMS prior to being used in a model run.
- Additional tools (write_SMS_2dm.m and write_SMS_cst.m) provide functionality to export data from MATLAB to formats compatible with SMS.
Add changes to the ChangeLog following the dev branch merge
Fix formatting to be consistent
Transpose the river data arrays prior to dumping to NetCDF so the data is read correctly by FVCOM