%
% DESCRIPTION: Program to create the Oil Production 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 oil production'
    'Name_1','Oil production by well no.1'
    'Name_2','Oil production by well no.2'
    'Name_n','Oil production by well no.n'
    };
[FieldType] = {
    'Date',5
    'Name_1',4
    'Name_2',4
    'Name_n',4
    };
[FieldUnit] = {
    'Date','datenum'
    'Name_1','m^3'
    'Name_2','m^3'
    'Name_n','m^3'
    };
[d] = struct();

d.Date = [734504
    734535
    734563
    734594
    734624];

d.Name_1 = [308
    319
    295
    279
    285
];

d.Name_2 = [9
    45
    59
    55
    53
];

d.Name_n = [428
    403
    414
    417
    434
];

save('GDF_EpisodeName_Oil_Production_example.mat')