%
% DESCRIPTION: Program to create the Fracking Process Parameters 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 measurement'
    'Maximum_pressure','Maximum pressure obtained during fracking stage'
    'Total_proppant','Total amount of proppant'
    'Maximum_proppant_concentration','Maximum proppant concentration'
    'Total_volume_of_slickwater','Total volume of slickwater'
    'Total_volume_of_injected_fluid','Total volume of injected fluid'
    
    'Perforation_number','Number of perforations performed at the particular fracking stage'
    'Mesh_100','Concentration of proppant with size 100 mesh'
    'Mesh_40_70','Concentration of proppant with size 40/70 mesh'
    'ISP_40_70','Concentration of Intermediate Strength Proppant with size 40/70 mesh'
    'Resinated_40_70','Concentration of Resinated Proppant with size 40/70 mesh'
    'Sinterball_30_60','Concentration of SinterBall Proppant with size 30/60 mesh'
    'NRT_20_40','Concentration of Non-Radioactive Tracers proppant with size 20/40 mesh'
    'Carbolite_30_50','Concentration of Carbolite Proppant with size 30/50 mesh'
    'Slickwater_pump_down','Slickwater volume during pump down'
    'Slickwater_main_operation','Slickwater volume during fracking main operation'
    'Linear_gel','Volume of linear gel'
    'HCL','Volume of HCL'
    };

[FieldType] = {
    'Date',5
    'Maximum_pressure',143
    'Total_proppant',143
    'Maximum_proppant_concentration',143
    'Total_volume_of_slickwater',143
    'Total_volume_of_injected_fluid',143
    
    'Perforation_number',143
    'Mesh_100',143
    'Mesh_40_70',143
    'ISP_40_70',143
    'Resinated_40_70',143
    'Sinterball_30_60',143
    'NRT_20_40',143
    'Carbolite_30_50',143
    'Slickwater_pump_down',143
    'Slickwater_main_operation',143
    'Linear_gel',143
    'HCL',143
    };

[FieldUnit] = {
    'Date','datenum'
    'Maximum_pressure','bar'
    'Total_proppant','ton'
    'Maximum_proppant_concentration','kg/m^3'
    'Total_volume_of_slickwater','m^3'
    'Total_volume_of_injected_fluid','m^3'
    
    'Perforation_number','dimensionless'
    'Mesh_100','ton'
    'Mesh_40_70','ton'
    'ISP_40_70','ton'
    'Resinated_40_70','ton'
    'Sinterball_30_60','ton'
    'NRT_20_40','ton'
    'Carbolite_30_50','ton'
    'Slickwater_pump_down','m^3'
    'Slickwater_main_operation','m^3'
    'Linear_gel','m^3'
    'HCL','m^3'
    };

[d] = struct();

d.Date = [];

d.Maximum_pressure = [];

d.Total_proppant = [];

d.Maximum_proppant_concentration = [];

d.Total_volume_of_slickwater = [];

d.Total_volume_of_injected_fluid = [];


d.Perforation_number = [];

d.Mesh_100 = [];

d.Mesh_40_70 = [];

d.ISP_40_70 = [];

d.Resinated_40_70 = [];

d.Sinterball_30_60 = [];

d.NRT_20_40 = [];

d.Carbolite_30_50 = [];

d.Slickwater_pump_down = [];

d.Slickwater_main_operation = [];

d.Linear_gel = [];

d.HCL = [];



save('GDF_EpisodeName_Fracking_Process_Parameters_example.mat')