Skip to content

Commit

Permalink
Merge pull request #745 from aodn/fix_magdec_wave_name_workhorse
Browse files Browse the repository at this point in the history
Fix magdec wave name workhorse, fixes #743
  • Loading branch information
lbesnard authored Jun 10, 2021
2 parents aed372f + f093ea6 commit 6bf7dc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Parser/workhorseParse.m
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
dims = {
'TIME', waveData.param.time, ['Time stamp corresponds to the start of the measurement which lasts ' num2str(avgInterval) ' seconds.']; ...
'FREQUENCY', waveData.Dspec.freq, ''; ...
['DIR' magExt], waveData.Dspec.dir, ''
['DIR' magdec_name_extension], waveData.Dspec.dir, ''
};

nDims = size(dims, 1);
Expand All @@ -287,7 +287,7 @@
sample_data{2}.dimensions{i}.data = sample_data{2}.dimensions{i}.typeCastFunc(dims{i, 2});
if strcmpi(dims{i, 1}, 'DIR')
sample_data{2}.dimensions{i}.compass_correction_applied = meta.compass_correction_applied;
sample_data{2}.dimensions{i}.comment = magdec_name_comment;
sample_data{2}.dimensions{i}.comment = magdec_attrs.comment;
end
end
clear dims;
Expand All @@ -303,13 +303,13 @@
'NOMINAL_DEPTH', [], NaN; ...
'WSSH', 1, waveData.param.Hs; ... % Significant Wave Height Hs = 4 sqrt(M0)
'WPPE', 1, waveData.param.Tp; ... % Peak Wave Period (seconds) - period associated with the largest peak in the power spectrum
['WPDI' magExt], 1, waveData.param.Dp; ... % Peak Wave Direction (degrees) - peak direction at the peak period
['WPDI' magdec_name_extension], 1, waveData.param.Dp; ... % Peak Wave Direction (degrees) - peak direction at the peak period
'WWSH', 1, waveData.param.Hs_W; ... % Significant Wave Height in the sea region of the power spectrum
'WWPP', 1, waveData.param.Tp_W; ... % Peak Sea Wave Period (seconds) - period associated with the largest peak in the sea region of the power spectrum
['WWPD' magExt], 1, waveData.param.Dp_W; ... % Peak Sea Wave Direction (degrees) - peak sea direction at the peak period in the sea region
['WWPD' magdec_name_extension], 1, waveData.param.Dp_W; ... % Peak Sea Wave Direction (degrees) - peak sea direction at the peak period in the sea region
'SWSH', 1, waveData.param.Hs_S; ... % Significant Wave Height in the swell region of the power spectrum
'SWPP', 1, waveData.param.Tp_S; ... % Peak Swell Wave Period (seconds) - period associated with the largest peak in the swell region of the power spectrum
['SWPD' magExt], 1, waveData.param.Dp_S; ... % Peak Swell Wave Direction (degrees) - peak swell direction at the peak period in the swell region
['SWPD' magdec_name_extension], 1, waveData.param.Dp_S; ... % Peak Swell Wave Direction (degrees) - peak swell direction at the peak period in the swell region
% ht is in mm
'DEPTH', 1, waveData.param.ht/1000; ...
'WMXH', 1, waveData.param.Hmax; ... % Maximum wave height (meters) as determined by Zero-Crossing analysis of the surface track time series
Expand All @@ -320,13 +320,13 @@
'WPMH', 1, waveData.param.Tmn; ... % The period associated with the mean significant wave height of the waves in the field as determined by Zero-Crossing analysis of the surface track time series
'WHTE', 1, waveData.param.Hte; ... % Significant wave height of the largest 1/10 of the waves in the field as determined by Zero-Crossing analysis of the surface track time series
'WPTE', 1, waveData.param.Tte; ... % The period associated with the peak wave height of the largest 1/10 of the waves in the field as determined by Zero-Crossing analysis of the surface track time series
['VDIR' magExt], 1, waveData.param.Dmn; ... % Mean Peak Wave Direction
['VDIR' magdec_name_extension], 1, waveData.param.Dmn; ... % Mean Peak Wave Direction
% Vspec is in mm/sqrt(Hz)
'VDEV', [1 2], (waveData.Vspec.data/1000).^2; ... % sea_surface_wave_variance_spectral_density_from_velocity
'VDEP', [1 2], (waveData.Pspec.data/1000).^2; ... % sea_surface_wave_variance_spectral_density_from_pressure
'VDES', [1 2], (waveData.Sspec.data/1000).^2; ... % sea_surface_wave_variance_spectral_density_from_range_to_surface
% Dspec is in mm^2/Hz/deg
['SSWV' magExt], [1 2 3], waveData.Dspec.data/1000.^2 % sea_surface_wave_directional_variance_spectral_density
['SSWV' magdec_name_extension], [1 2 3], waveData.Dspec.data/1000.^2 % sea_surface_wave_directional_variance_spectral_density
};
clear waveData;

Expand All @@ -346,7 +346,7 @@
sample_data{2}.variables{i}.data = sample_data{2}.variables{i}.typeCastFunc(vars{i, 3});
if any(strcmpi(vars{i, 1}, {'WPDI', 'WWPD', 'SWPD', 'VDIR', 'SSWV'}))
sample_data{2}.variables{i}.compass_correction_applied = meta.compass_correction_applied;
sample_data{2}.variables{i}.comment = magdec_name_comment;
sample_data{2}.variables{i}.comment = magdec_attrs.comment;
end
end
clear vars;
Expand Down
Binary file modified imosToolbox_Linux64.bin
Binary file not shown.
Binary file modified imosToolbox_Win64.exe
Binary file not shown.

0 comments on commit 6bf7dc5

Please sign in to comment.