%
% DESCRIPTION: Program to create the Injection Rate Multi 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'
    'Well_number_1','Injection rate measured for a specified well no.1'
    'Well_number_2','Injection rate measured for a specified well no.2'
    'Well_number_n','Injection rate measured for a specified well no.n'
    };
[FieldType] = {
    'Date',5
    'Well_number_1',24
    'Well_number_2',24
    'Well_number_n',24
    };
[FieldUnit] = {
    'Date','datenum'
    'Well_number_1','m^3/s'
    'Well_number_2','m^3/s'
    'Well_number_n','m^3/s'
    };
[d] = struct();

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

d.Well_number_1 = [0.000058775
    0.000059683
	0.000060167
    0.000059925
    0.000058291
];

d.Well_number_2 = [0.000068521
    0.000060046
    0.000078448
    0.000072092
    0.000068521
];

d.Well_number_n = [0.00016949
    0.00012966
    0.00014703
    0.000096304
    0.000092854
];

save('GDF_EpisodeName_Injection_rate_multi_example.mat')