%
% DESCRIPTION: Program to create the Reservoir 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 fluid injection'
    'Reservoir_pressure','Reservoir pressure'};
[FieldType] = {
    'Date',5
    'Reservoir_pressure',34};
[FieldUnit] = {
    'Date','datenum'
    'Reservoir_pressure','MPa'};
[d] = struct();

d.Date = [714567
714932
715297
715662
716028
716393
716758
];

d.Reservoir_pressure = [4.9
4.8
4.65
4.5
4.35
4.2
4.1
];

save('GDF_EpizodName_Reservoir_pressure.mat')