%
% DESCRIPTION: Program to create the Flowback Bottomhole 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 flowback bottomhole pressure'
    'Flowback_bottomhole_pressure','Flowback bottomhole pressure'};
[FieldType] = {
    'Date',5
    'Flowback_bottomhole_pressure',34};
[FieldUnit] = {
    'Date','datenum'
    'Flowback_bottomhole_pressure','MPa'};
[d] = struct();

d.Date = [734588.607407407
734588.608101852
734588.608796296
734588.609490741
734588.610185185
734588.610879630
734588.611574074
];

d.Flowback_bottomhole_pressure = [25.8075463307505
25.8030440519925
25.7985417739893
25.7940394959860
25.7925387364000
25.7928313806888
25.7932703470485
];

save('GDF_EpizodName_Flowback_bottomhole_pressure_example.mat')