- 28 Jan, 2013 1 commit
-
-
Pierre Cazenave authored
Create a new function whose job is to take an existing FVCOM model restart file and change the temperature and salinity values for values extracted from an appropriate POLCOMS model result file. The POLCOMS data is read in as a 4D array (y, x, z, t) and is interpolated onto the FVCOM sigma layers. This provides the correct number of vertical levels which are then interpolated onto the FVCOM horizontal unstructured grid. This order is chosen because interpolating onto the horizontal grid first would dramatically increase the number of interpolations of the vertical which would be necessary. Initial development of the function revealed that the interpolation returns NaNs outside the POLCOMS domain: since it is likely the FVCOM domain is both higher resolution and more faithful to the coastline, a simple extrapolation is performed to remove all the NaNs (based on the nearest existing finite value to a given NaN location). Once the data have been interpolated (and extrapolated), an existing NetCDF restart file is opened and its contents replicated into a new NetCDF file (appended with _polcoms.nc). Only the "temp" and "salinity" variables are changed with the interpolated 3D arrays (we lose a dimension because the FVCOM grid is unstructured).
-
- 23 Jan, 2013 1 commit
-
-
Pierre Cazenave authored
Tidy up the help a bit and add a note for the vertical interpolation to possibly use a different 1D interpolation method (from linear to pchip)
-
- 21 Jan, 2013 1 commit
-
-
Pierre Cazenave authored
In cases where the requested constituent is not found in the POLPRED data, eliminate the NaN values from the relevant indices and return POLPRED data for the remaining constituents. It is worth noting that actually trying to write out the data returned by this with write_FVCOM_spectide.m will probably fail because the size of the list of constituents will differ from the size of the arrays of amplitude and phase returned by this script
-
- 18 Jan, 2013 1 commit
-
-
Pierre Cazenave authored
Add support for a sponge radius based on the distance to the nearest element to the specified boundary nodes (rather than a fixed radius away from the boundary). To enable, set the SpongeRadius value given to add_sponge_nodes_list.m to a negative value and then call calc_sponge_radius.m to assign sponge layer coefficients to the relevant nodes. Finally, call add_spong_nodes_list to add the nodes to the MATLAB mesh struct
-
- 17 Jan, 2013 3 commits
-
-
Pierre Cazenave authored
Script from Karen and NOCL to extract forcing from the MetOffice NAE2 model (u and v winds and air-pressure)
-
Pierre Cazenave authored
-
Pierre Cazenave authored
-
- 16 Jan, 2013 2 commits
-
-
Pierre Cazenave authored
Add function to interpolate the NOC Operation Tide Surge Model surface elevations to the FVCOM open boundary nodes
-
Pierre Cazenave authored
-
- 10 Jan, 2013 4 commits
-
-
Pierre Cazenave authored
-
Pierre Cazenave authored
Add new (optional) variable to supply (the MATLAB mesh structure). This is used to get the sigma coordinate levels and layers to output to the NetCDF file. Also made some small stylistic changes (using repmat instead of ones and a mutiplication, for example)
-
Pierre Cazenave authored
Move the preallocation to the outer loop otherwise the results from the previous iteration are obliterated on the next one
-
Pierre Cazenave authored
Fix a few problems with accessing the POLCOMS data due to the new way it's stored in the pc struct. Also change the way the depth values are interpolated (onto the sigma layers rather than sigma levels
-
- 09 Jan, 2013 11 commits
-
-
Pierre Cazenave authored
-
Pierre Cazenave authored
Allow the input temperature and salinity values to be either single values (for uniform grids) or otherwise 3D arrays of unstructured grid points with sigma layers and time as the two other dimensions. This should maintain backwards compatibilty with the previous invocation
-
Pierre Cazenave authored
Add code to try to parse the time attribute such that a Modified Julian Day time series for the POLCOMS data can be calcualted. Also means slightly changing the format of the pc struct so that each variables has a data and units array, the latter being used to find the reference time for the seconds in pc.time.data
-
Pierre Cazenave authored
-
Pierre Cazenave authored
Rename the POLCOMS temperature and salinity function to better match what it does (the forcing I typically think of as being the wind forcing)
-
Pierre Cazenave authored
Take the workings out of the shelf model get_POLCOMS_forcing.m script and make a new function from it. This reads in a POLCOMS output NetCDF file and interpolates (not in time, in space only, but horizontally and vertically) to create boundary inputs for the open boundaries in a given FVCOM grid
-
Pierre Cazenave authored
Attempt at generating a 3D array without resorting to a couple of loops. Not yet tested (hence it is commented out)
-
Pierre Cazenave authored
-
Pierre Cazenave authored
-
Pierre Cazenave authored
New function (based on the new code in show_sigma.m) to extract sigma levels for every node in a mesh structure
-
Pierre Cazenave authored
-
- 08 Jan, 2013 3 commits
-
-
Pierre Cazenave authored
-
Pierre Cazenave authored
Fix code indentation. Also fix bug in MATLAB display of two different types of plot (e.g. patch and plot) by setting the renderer to OpenGL.
-
Pierre Cazenave authored
Add more robust code to read in a sigma.dat file (skipping comments, blank lines etc.). Also add optional argument to sample a larger number of points from the bathymetry
-
- 18 Dec, 2012 5 commits
-
-
Pierre Cazenave authored
-
Pierre Cazenave authored
-
Pierre Cazenave authored
-
Pierre Cazenave authored
-
Pierre Cazenave authored
-
- 30 Nov, 2012 2 commits
-
-
Pierre Cazenave authored
Add script to create the files needed by FVCOM when outputting a set of time series at given locations
-
Pierre Cazenave authored
-
- 26 Nov, 2012 2 commits
-
-
Pierre Cazenave authored
Fix a weird issue with the printing of the status information. This way should be more robust (if ftbverbose is empty, for example)
-
Pierre Cazenave authored
-
- 15 Nov, 2012 3 commits
-
-
Pierre Cazenave authored
Script to parse the POLPRED ASCII files and extract a specified list of harmonics. Based off the relevant functions in tide_tools.py from fvcom-py (https://bitbucket.org/pwcazenave/fvcom-py)
-
Pierre Cazenave authored
Fix two problems: 1. The date strings in Times were completely wrong (because it was assumed the values in MJD were MATLAB dates (not Modified Julian Days). Fixing that problem highlighted some possible limitations in mjulian2greg in which some second values are output as 60 (which is obviously wrong). So, some additional checks on the values of the seconds are performed, and times adjusted as necessary. 2. The Code to get the list of open boundary node IDs was a bit ugly, so I rewrote it to be a bit prettier. The old version is left in as a comment so that it can be reverted easily if necessary
-
Pierre Cazenave authored
-
- 14 Nov, 2012 1 commit
-
-
Pierre Cazenave authored
Change the boundary file generation code to expect Modified Julian Day (rather than doing the conversion blindly in the function). Also fold in the code from set_elevtide.m into this function as it was somewhat pointless having set_elevtide call write_FVCOM_elevtide
-