%
% DESCRIPTION: Program to create the Wellhead pressure 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','Time of wellhead pressure'
    'Wellhead_pressure','Wellhead pressure'
    };
[FieldType] = {
    'Date',5
    'Wellhead_pressure',21
    };
[FieldUnit] = {
    'Date','datenum'
    'Wellhead_pressure','MPa'
    };
[d] = struct();

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



d.Wellhead_pressure = [
10.2
11.8
12.1
];


save('GDF_EpisodeName_Wellhead_Pressure_example.mat')