%
% DESCRIPTION: Program to create the Water level GDF file in the Matlab format.
% 
% [TimeZone] and [Description] have text format so the values give in ''


clear;clc;
[FormatName] = 'GDF';
[FormatVersion] = 2.1;
[CRS] = 'n/a'%['EPSG:' num2str(input('[CRS] EPSG code (just number) = '))];
[TimeZone] = 'UTC' %input('TimeZone (char) = ');
[Description] = 'Description of the dataset' %input('Description of data (char) = ');
         
[FieldDescription] = {
    'Date','Date of water level measure'
    'Water_level','Water level above sea level'
    };
[FieldType] = {
    'Date',5
    'Water_level',32
    };
[FieldUnit] = {
    'Date','datenum'
    'Water_level','m'
    };
[d] = struct();

d.Date = [datenum({
'2017-01-01'
'2017-01-02'
'2017-01-03'
'2017-01-04'
'2017-01-05'},'yyyy-mm-dd')];



d.Water_level = [
500.25
501.35
501.45
501.55
501.65
];


save('GDF_EpisodeName_Water_Level_example.mat')