-
Notifications
You must be signed in to change notification settings - Fork 1
SSH | Hourly Statistics
Required Model Data: Hourly SSH output, variable naming adhering to COAsT
Required Observation Data: Tidegauge data in netCDF format. Dimensions: 'port' and 'time'. Coordinates: 'longitude', 'latitude', 'time'. Data should be hourly -- possibly obtained via preprocessing/interpolation.
This script will extract model SSH time series at the nearest wet point to observation locations. Extracted time series will be output to a netcdf file along estimates of non-tidal residuals. These non-tidal residuals are calculated by performing an equivalent harmonic analysis on both the model and observation data. This means using the same time period, frequency, constituent set and missing data in each of the two datasets. In addition, the following diagnostics will be saved to the file:
- Non-tidal residual correlations between model and obs.
- Non-tidal residual MAE.
- SSH standard deviations in model and obs. Error in model SSH standard deviation.
- Errors in harmonic amplitudes and phases.
- Threshold statistics. The number of peaks and total amount of time spent over thresholds by non-tidal residuals. Comparisons between model and observed counts.
- Monthly climatology for non-tidal residuals in obs and model.
- Monthly means and variability in non-tidal residuals for obs and model.
Import the file
import validate_ssh_tg_hourly
The routine inputs are:
class analyse_ssh_hourly():
def __init__(self, fn_nemo_data, fn_nemo_domain, fn_obs, fn_out,
thresholds = np.arange(0,2,0.1),
constit_to_save = ['M2', 'S2', 'K1','O1'],
chunks = {'time_counter':100}):
'''
Routine for hourly analysis of NEMO SSH output. See Github wiki for more details.
INPUTS
fn_nemo_data : Absoltue path to NEMO data file(s)
fn_nemo_domain : Absolute path to NEMO domain file
fn_obs : Absolute path to Tidegauge data file
fn_out : Absolute path to output file
thresholds : Array of floats describing NTR thresholds for analysis (m)
constit_to_save : List of strings for which constituents to save amp/phases
chunks : xarray chunking dictionary
'''
To use, set up the file path names and any other arguments, and call this routine:
validate_ssh_tg_hourly.analyse_ssh_hourly(fn_nemo_data, fn_nemo_domain, fn_obs, fn_out, thresholds)