http://gfi.wiki.uib.no/index.php?title=Kristine_Bonnevie_shiplog_data&feed=atom&action=history
Kristine Bonnevie shiplog data - Revision history
2024-03-29T11:56:46Z
Revision history for this page on the wiki
MediaWiki 1.39.6
http://gfi.wiki.uib.no/index.php?title=Kristine_Bonnevie_shiplog_data&diff=1219&oldid=prev
Hso039: Created page with "The ship log data on Kristine Bonnevie contain meteorological and hydrographic information from the boat's sensor packages. Matlab routines Read ship's logger data <pre> %..."
2020-01-13T10:31:36Z
<p>Created page with "The ship log data on Kristine Bonnevie contain meteorological and hydrographic information from the boat's sensor packages. Matlab routines Read ship's logger data <pre> %..."</p>
<p><b>New page</b></p><div>The ship log data on Kristine Bonnevie contain meteorological and hydrographic information from the boat's sensor packages.<br />
<br />
Matlab routines<br />
<br />
Read ship's logger data<br />
<br />
<pre><br />
% Read CSV Ship Logger Data<br />
clear<br />
<br />
% Define the Location where Data is stored<br />
% Insert path to Data Locaction e.g.<br />
data_loc = '/Data/gfi/metdata/campaigns/GEOF-232_2019/Ship_log'; <br />
<br />
% Go to that Location<br />
cd(data_loc);<br />
<br />
% Search for files ending in .csv<br />
files = dir('GEO*.csv');<br />
<br />
% Read the csv in table format<br />
x=readtable(files(1).name);<br />
<br />
% Get the Variable names<br />
VarNames = x.Properties.VariableNames;<br />
<br />
% Get the timestamp<br />
TimeIdx = find(strcmp(VarNames, 'Timestamp')); <br />
ship_data.Time = table2array(x(:,TimeIdx));<br />
<br />
% Define the Variables of interest and find the column number. For example:<br />
vars = [{'Longitude'} {'Latitude'} {'Depth'} {'AirTemp'} {'Humidity'} {'AirPressure'} {'Wind'} {'WindDir'} {'Clouds'} {'WaterTemp'}];<br />
% Have a look at VarNames for more Variables of interest<br />
<br />
VarIdx = zeros(length(vars));<br />
for i=1:length(vars)<br />
VarIdx(i) = find(strcmp(VarNames, vars(i)));<br />
end<br />
<br />
ship_data.LON = table2array(x(:,VarIdx(1))); % Longitude [deg E]<br />
ship_data.LAT = table2array(x(:,VarIdx(2))); % Latitude [deg N]<br />
ship_data.D = table2array(x(:,VarIdx(3))); % Depth [m]<br />
ship_data.TA = table2array(x(:,VarIdx(4))); % AirTemp [deg C]<br />
ship_data.RH = table2array(x(:,VarIdx(5))); % Rel Humidity [%]<br />
ship_data.P = table2array(x(:,VarIdx(6))); % AirPressure [hPa]<br />
ship_data.WS = table2array(x(:,VarIdx(7))); % WindSpeed [m/s]<br />
ship_data.WD = table2array(x(:,VarIdx(8))); % WindDir [deg]<br />
ship_data.CC = table2array(x(:,VarIdx(9))); % CloudCover [n/8]<br />
ship_data.TW = table2array(x(:,VarIdx(10))); % WaterTemp [deg C]<br />
<br />
% Plot some of the meteorological data. For example:<br />
figure(1)<br />
subplot(5,1,1), plot(ship_data.Time,ship_data.TA)<br />
hold all<br />
plot(ship_data.Time,ship_data.TW)<br />
legend('AirT','WaterT')<br />
subplot(5,1,2), plot(ship_data.Time,ship_data.RH)<br />
subplot(5,1,3), plot(ship_data.Time,ship_data.P)<br />
subplot(5,1,4), plot(ship_data.Time,ship_data.WS)<br />
subplot(5,1,5), plot(ship_data.Time,ship_data.WD)<br />
</pre></div>
Hso039