diff --git a/CHANGELOG b/CHANGELOG index 0d4062fcdee16e40e47a1d7804a638e453548842..7b6e2cda2b9abd775c471e3ab7e0e81625592e9d 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +2.1.0 + 2020/03/05 + - Rotated nested grid + - GFAS hourly working + - Compression level added to the configuration file + - Added regional emission inventories (Is mandatory to add 'coverage' column with 'global' or 'regional' in the 'cross_table' file) + 2.0.3 2020/02/07 - Corrected bug on grid calculation for some versions of numpy. diff --git a/conf/EI_configuration.csv b/conf/EI_configuration.csv index 34a0ac3dd3047e08686571f2f6c9fcf26f31b233..fade8b454a1e4e45582235615aaa225dbabb770f 100755 --- a/conf/EI_configuration.csv +++ b/conf/EI_configuration.csv @@ -1,98 +1,126 @@ -ei;sector;ref_year;active;factor_mask;regrid_mask;pollutants;path;frequency;source_type;p_vertical;p_month;p_week;p_hour;p_speciation;p_day -GFASv12;;2015;1;;;co,nox_no,pm25,oc,bc,so2,ch3oh,c2h5oh,c3h8,c2h4,c3h6,c5h8,terpenes,hialkenes,hialkanes,ch2o,c2h4o,c3h6o,nh3,c2h6s,c2h6,c7h8,c6h6,c8h10,c4h8,c5h10,c6h12,c8h16,c4h10,c5h12,c6h14,c7h16;/ecmwf/gfas/daily_mean;daily;point;method=sovief,approach=uniform;;;H001;E001; -HTAPv2;energy;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23,voc24;/jrc/htapv2/monthly_mean;monthly;area;V001;;W002;H002;E002; -HTAPv2;industry;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/htapv2/monthly_mean;monthly;area;V002;;W003;H004;E003; -HTAPv2;residential;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/jrc/htapv2/monthly_mean;monthly;area;;;W003;H003;E004; -HTAPv2;transport;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/htapv2/monthly_mean;monthly;area;;;W005;weekday=H006, saturday=H009, sunday=H010;E005; -HTAPv2;agriculture;2010;1;;;nh3;/jrc/htapv2/monthly_mean;monthly;area;;;W001;H007;E006; -HTAPv2;air_lto;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/jrc/htapv2/yearly_mean;yearly;area;V003;M001;W001;H001;E007; -HTAPv2;air_cds;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/jrc/htapv2/yearly_mean;yearly;area;V004;M001;W001;H001;E007; -HTAPv2;air_crs;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/jrc/htapv2/yearly_mean;yearly;area;V005;M001;W001;H001;E007; -HTAPv2;ships;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc21,voc22,voc23,voc24;/jrc/htapv2/yearly_mean;yearly;area;;M001;W001;H001;E008; -wiedinmyer;;2010;1;;;bc,c2h2,c2h4,c3h6,c6h6,ch2o,ch3cooh,ch3oh,co,hcl,nh3,nox_no,oc,pm10,pm25,so2;/ucar/wiedinmyer/yearly_mean;yearly;area;;M001;W001;H008;E009; -TNO_MACC-III;snap1;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;V001;M002;W002;H002;E010; -TNO_MACC-III;snap2;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M003;W003;H003;E011; -TNO_MACC-III;snap34;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;V002;M004;W003;H004;E012; -TNO_MACC-III;snap5;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc04,voc05,voc06,voc12,voc13,voc14,voc15;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M005;W001;H001;E013; -TNO_MACC-III;snap6;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc06,voc14,voc15,voc17,voc18,voc19,voc20,voc23;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M006;W004;H005;E014; -TNO_MACC-III;snap71;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M007;W005;weekday=H006, saturday=H009, sunday=H010;E015; -TNO_MACC-III;snap72;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M007;W005;weekday=H006, saturday=H009, sunday=H010;E016; -TNO_MACC-III;snap73;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc07,voc08,voc12,voc17,voc21,voc22;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M007;W005;weekday=H006, saturday=H009, sunday=H010;E017; -TNO_MACC-III;snap74;2011;0;;;voc03,voc04,voc05,voc06,voc12,voc13,voc14,voc15;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M007;W005;weekday=H006, saturday=H009, sunday=H010;E018; -TNO_MACC-III;snap75;2011;0;;;pm10,pm25;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M007;W005;weekday=H006, saturday=H009, sunday=H010;E019; -TNO_MACC-III;snap8;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M008;W001;H001;E020; -TNO_MACC-III;snap9;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M001;W001;H001;E021; -TNO_MACC-III;snap10;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25;/tno/tno_macc_iii/yearly_mean/;yearly;area;;M009;W001;H007;E022; -ECLIPSEv5a;agriculture;2010;0;;;pm10,pm25,nh3;/iiasa/eclipsev5a/monthly_mean;monthly;area;;;W001;H007;E023; -ECLIPSEv5a;flaring;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/yearly_mean;yearly;area;V006;M001;W001;H001;E024; -ECLIPSEv5a;energy;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;V001;;W002;H002;E025; -ECLIPSEv5a;industry;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;V002;;W003;H004;E026; -ECLIPSEv5a;transport;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;;;W005;weekday=H006, saturday=H009, sunday=H010;E027; -ECLIPSEv5a;residential;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;;;W003;H003;E028; -ECLIPSEv5a;waste;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;;;W001;H001;E029; -ECLIPSEv5.a;solvent;2010;0;;;nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;;M006;W004;H005;E030; -ECLIPSEv5a;agricultural_waste;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;;;W001;H007;E031; -ECLIPSEv5a;ships;2010;0;;;co,nox_no2,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/yearly_mean;yearly;area;;M001;W001;H001;E032; -EDGARv432_AP;ags;2010;0;;;nox_no2,nh3,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H007;E033; -EDGARv432_AP;awb;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H007;E034; -EDGARv432_AP;che;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V002;;W003;H004;E035; -EDGARv432_AP;ene;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V001;;W002;H002;E036; -EDGARv432_AP;foo_pap;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V002;;W003;H004;E037; -EDGARv432_AP;fff;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V006;;W001;H001;E038; -EDGARv432_AP;ind;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V002;;W003;H004;E039; -EDGARv432_AP;iro;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V002;;W003;H004;E040; -EDGARv432_AP;mnm;2010;0;;;nox_no2,nh3,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H007;E041; -EDGARv432_AP;neu;2010;0;;;pm10;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H001;E042; -EDGARv432_AP;nfe;2010;0;;;nox_no2,co,so2,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V002;;W003;H004;E043; -EDGARv432_AP;nmm;2010;0;;;co,so2,nh3,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V002;;W003;H004;E044; -EDGARv432_AP;pro;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H001;E045; -EDGARv432_AP;pru_sol;2010;0;;;nh3,nmvoc,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W004;H005;E046; -EDGARv432_AP;rco;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W003;H003;E047; -EDGARv432_AP;ref_trf;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V006;;W001;H001;E048; -EDGARv432_AP;swd_inc;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V006;;W001;H001;E049; -EDGARv432_AP;swd_ldf;2010;0;;;nh3,nmvoc,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H001;E050; -EDGARv432_AP;tnr_aviation_cds;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V004;;W001;H001;E051; -EDGARv432_AP;tnr_aviation_crs;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V005;;W001;H001;E052; -EDGARv432_AP;tnr_aviation_lto;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;V003;;W001;H001;E053; -EDGARv432_AP;tnr_other;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H001;E054; -EDGARv432_AP;tnr_ship;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H001;E055; -EDGARv432_AP;tro;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W005;weekday=H006, saturday=H009, sunday=H010;E056; -EDGARv432_AP;wwt;2010;0;;;nh3,nmvoc;/jrc/edgarv432_ap/monthly_mean;monthly;area;;;W001;H001;E057; -EDGARv432_VOC;awb;2010;0;;;voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H007;E058; -EDGARv432_VOC;ene;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;V001;;W002;H002;E059; -EDGARv432_VOC;fff;2010;0;;;voc2,voc3,voc4,voc5,voc6,voc8,voc10,voc12,voc13,voc14,voc15,voc17,voc18,voc19,voc20;/jrc/edgarv432_voc/monthly_mean;monthly;area;V006;;W001;H001;E060; -EDGARv432_VOC;ind;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;V002;;W003;H004;E061; -EDGARv432_VOC;ppa;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H001;E062; -EDGARv432_VOC;pro;2010;0;;;voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H001;E063; -EDGARv432_VOC;rco;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W003;H003;E064; -EDGARv432_VOC;ref;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc12,voc13,voc14,voc15,voc16,voc17,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;V006;;W003;H004;E065; -EDGARv432_VOC;swd;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc17,voc18,voc19,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H001;E066; -EDGARv432_VOC;tnr_aviation_cds;2010;0;;;voc1,voc2,voc3,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;V004;;W001;H001;E067; -EDGARv432_VOC;tnr_aviation_crs;2010;0;;;voc1,voc2,voc3,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;V005;;W001;H001;E068; -EDGARv432_VOC;tnr_aviation_lto;2010;0;;;voc1,voc2,voc3,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;V003;;W001;H001;E069; -EDGARv432_VOC;tnr_other;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H001;E070; -EDGARv432_VOC;tnr_ship;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H001;E071; -EDGARv432_VOC;trf;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W001;H001;E072; -EDGARv432_VOC;tro;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;;;W005;weekday=H006, saturday=H009, sunday=H010;E073; -EMEP;a_publicpower;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;V001;M002;W002;H002;E074; -EMEP;b_industry;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;V002;M004;W003;H004;E075; -EMEP;c_otherstationarycomb;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M003;W003;H003;E076; -EMEP;d_fugitive;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M005;W001;H001;E077; -EMEP;e_solvents;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M006;W004;H005;E078; -EMEP;f_roadtransport;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M007;W005;weekday=H006, saturday=H009, sunday=H010;E079; -EMEP;g_shipping;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M001;W001;H001;E080; -EMEP;h_aviation;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;V003;M001;W001;H001;E081; -EMEP;i_offroad;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M001;W001;H001;E082; -EMEP;j_waste;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M001;W001;H001;E083; -EMEP;k_agrilivestock;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M009;W001;H007;E084; -EMEP;l_agriother;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;;M009;W001;H007;E085; -carn;;2015;1;;;so2;/mtu/carnetal/yearly_mean;yearly;point;;M001;W001;H001;E086; -CEDS;agriculture;2014;0;;;nox_no2,nh3;/jgcri/ceds/monthly_mean;monthly;area;;;W001;H007;E087; -CEDS;energy;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;V001;;W002;H002;E088; -CEDS;industrial;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;V002;;W003;H004;E089; -CEDS;transportation;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;;;W005;weekday=H006, saturday=H009, sunday=H010;E090; -CEDS;residential;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;;;W003;H003;E091; -CEDS;solvent;2014;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;;;W004;H005;E092; -CEDS;waste;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;;;W001;H001;E093; -CEDS;shipping;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;;;W001;H001;E094; -CEDS;air;2014;0;;;co,nox_no2,oc,bc,so2,nh3,nmvoc;/jgcri/ceds/monthly_mean;monthly;area;;;W001;H001;E095; \ No newline at end of file +ei;sector;ref_year;active;factor_mask;regrid_mask;pollutants;path;frequency;source_type;coverage;p_vertical;p_month;p_week;p_day;p_hour;p_speciation;comment +GFASv12;;2015;1;;;co,nox_no,pm25,oc,bc,so2,ch3oh,c2h5oh,c3h8,c2h4,c3h6,c5h8,terpenes,hialkenes,hialkanes,ch2o,c2h4o,c3h6o,nh3,c2h6s,c2h6,c7h8,c6h6,c8h10,c4h8,c5h10,c6h12,c8h16,c4h10,c5h12,c6h14,c7h16;/ecmwf/gfas/daily_mean;daily;point;global;method=sovief,approach=uniform;;;;H001;E001; +HTAPv2;energy;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23,voc24;/jrc/htapv2/monthly_mean;monthly;area;global;V001;;W002;;H002;E002; +HTAPv2;industry;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/htapv2/monthly_mean;monthly;area;global;V002;;W003;;H004;E003; +HTAPv2;residential;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/jrc/htapv2/monthly_mean;monthly;area;global;;;W003;;H003;E004; +HTAPv2;transport;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,nh3,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/htapv2/monthly_mean;monthly;area;global;;;W005;;weekday=H006, saturday=H009, sunday=H010;E005; +HTAPv2;agriculture;2010;1;;;nh3;/jrc/htapv2/monthly_mean;monthly;area;global;;;W001;;H007;E006; +HTAPv2;air_lto;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/jrc/htapv2/yearly_mean;yearly;area;global;V003;M001;W001;;H001;E007; +HTAPv2;air_cds;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/jrc/htapv2/yearly_mean;yearly;area;global;V004;M001;W001;;H001;E007; +HTAPv2;air_crs;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/jrc/htapv2/yearly_mean;yearly;area;global;V005;M001;W001;;H001;E007; +HTAPv2;ships;2010;1;;;co,nox_no2,pm10,pm25,oc,bc,so2,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc21,voc22,voc23,voc24;/jrc/htapv2/yearly_mean;yearly;area;global;;M001;W001;;H001;E008; +wiedinmyer;;2010;1;;;bc,c2h2,c2h4,c3h6,c6h6,ch2o,ch3cooh,ch3oh,co,hcl,nh3,nox_no,oc,pm10,pm25,so2;/ucar/wiedinmyer/yearly_mean;yearly;area;global;;M001;W001;;H008;E009; +TNO_MACC-III;snap1;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;V001;M002;W002;;H002;E010; +TNO_MACC-III;snap2;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M003;W003;;H003;E011; +TNO_MACC-III;snap34;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;V002;M004;W003;;H004;E012; +TNO_MACC-III;snap5;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc04,voc05,voc06,voc12,voc13,voc14,voc15;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M005;W001;;H001;E013; +TNO_MACC-III;snap6;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc06,voc14,voc15,voc17,voc18,voc19,voc20,voc23;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M006;W004;;H005;E014; +TNO_MACC-III;snap71;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E015; +TNO_MACC-III;snap72;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E016; +TNO_MACC-III;snap73;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc02,voc03,voc07,voc08,voc12,voc17,voc21,voc22;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E017; +TNO_MACC-III;snap74;2011;0;;;voc03,voc04,voc05,voc06,voc12,voc13,voc14,voc15;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E018; +TNO_MACC-III;snap75;2011;0;;;pm10,pm25;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E019; +TNO_MACC-III;snap8;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M008;W001;;H001;E020; +TNO_MACC-III;snap9;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M001;W001;;H001;E021; +TNO_MACC-III;snap10;2011;0;;;co,nox_no2,so2,nh3,pm10,pm25;/tno/tno_macc_iii/yearly_mean/;yearly;area;regional;;M009;W001;;H007;E022; +ECLIPSEv5a;agriculture;2010;0;;;pm10,pm25,nh3;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;;;W001;;H007;E023; +ECLIPSEv5a;flaring;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/yearly_mean;yearly;area;global;V006;M001;W001;;H001;E024; +ECLIPSEv5a;energy;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;V001;;W002;;H002;E025; +ECLIPSEv5a;industry;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;V002;;W003;;H004;E026; +ECLIPSEv5a;transport;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;;;W005;;weekday=H006, saturday=H009, sunday=H010;E027; +ECLIPSEv5a;residential;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;;;W003;;H003;E028; +ECLIPSEv5a;waste;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;;;W001;;H001;E029; +ECLIPSEv5a;solvent;2010;0;;;nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;;M006;W004;;H005;E030; +ECLIPSEv5a;agricultural_waste;2010;0;;;co,nox_no2,nh3,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/monthly_mean;monthly;area;global;;;W001;;H007;E031; +ECLIPSEv5a;ships;2010;0;;;co,nox_no2,pm10,pm25,oc,bc,so2,nmvoc;/iiasa/eclipsev5a/yearly_mean;yearly;area;global;;M001;W001;;H001;E032; +EDGARv432_AP;ags;2010;0;;;nox_no2,nh3,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H007;E033; +EDGARv432_AP;awb;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H007;E034; +EDGARv432_AP;che;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V002;;W003;;H004;E035; +EDGARv432_AP;ene;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V001;;W002;;H002;E036; +EDGARv432_AP;foo_pap;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V002;;W003;;H004;E037; +EDGARv432_AP;fff;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V006;;W001;;H001;E038; +EDGARv432_AP;ind;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V002;;W003;;H004;E039; +EDGARv432_AP;iro;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V002;;W003;;H004;E040; +EDGARv432_AP;mnm;2010;0;;;nox_no2,nh3,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H007;E041; +EDGARv432_AP;neu;2010;0;;;pm10;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H001;E042; +EDGARv432_AP;nfe;2010;0;;;nox_no2,co,so2,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V002;;W003;;H004;E043; +EDGARv432_AP;nmm;2010;0;;;co,so2,nh3,nmvoc,pm10,bc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V002;;W003;;H004;E044; +EDGARv432_AP;pro;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H001;E045; +EDGARv432_AP;pru_sol;2010;0;;;nh3,nmvoc,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W004;;H005;E046; +EDGARv432_AP;rco;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W003;;H003;E047; +EDGARv432_AP;ref_trf;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V006;;W001;;H001;E048; +EDGARv432_AP;swd_inc;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V006;;W001;;H001;E049; +EDGARv432_AP;swd_ldf;2010;0;;;nh3,nmvoc,pm10,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H001;E050; +EDGARv432_AP;tnr_aviation_cds;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V004;;W001;;H001;E051; +EDGARv432_AP;tnr_aviation_crs;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V005;;W001;;H001;E052; +EDGARv432_AP;tnr_aviation_lto;2010;0;;;nox_no2,co,so2,nmvoc,pm10,bc,oc,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;V003;;W001;;H001;E053; +EDGARv432_AP;tnr_other;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H001;E054; +EDGARv432_AP;tnr_ship;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H001;E055; +EDGARv432_AP;tro;2010;0;;;nox_no2,co,so2,nh3,nmvoc,pm10,bc,oc,pm25_bio,pm25_fossil;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W005;;weekday=H006, saturday=H009, sunday=H010;E056; +EDGARv432_AP;wwt;2010;0;;;nh3,nmvoc;/jrc/edgarv432_ap/monthly_mean;monthly;area;global;;;W001;;H001;E057; +EDGARv432_VOC;awb;2010;0;;;voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H007;E058; +EDGARv432_VOC;ene;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V001;;W002;;H002;E059; +EDGARv432_VOC;fff;2010;0;;;voc2,voc3,voc4,voc5,voc6,voc8,voc10,voc12,voc13,voc14,voc15,voc17,voc18,voc19,voc20;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V006;;W001;;H001;E060; +EDGARv432_VOC;ind;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V002;;W003;;H004;E061; +EDGARv432_VOC;ppa;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H001;E062; +EDGARv432_VOC;pro;2010;0;;;voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H001;E063; +EDGARv432_VOC;rco;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W003;;H003;E064; +EDGARv432_VOC;ref;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc12,voc13,voc14,voc15,voc16,voc17,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V006;;W003;;H004;E065; +EDGARv432_VOC;swd;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc17,voc18,voc19,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H001;E066; +EDGARv432_VOC;tnr_aviation_cds;2010;0;;;voc1,voc2,voc3,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V004;;W001;;H001;E067; +EDGARv432_VOC;tnr_aviation_crs;2010;0;;;voc1,voc2,voc3,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V005;;W001;;H001;E068; +EDGARv432_VOC;tnr_aviation_lto;2010;0;;;voc1,voc2,voc3,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;V003;;W001;;H001;E069; +EDGARv432_VOC;tnr_other;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H001;E070; +EDGARv432_VOC;tnr_ship;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H001;E071; +EDGARv432_VOC;trf;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W001;;H001;E072; +EDGARv432_VOC;tro;2010;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc10,voc11,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jrc/edgarv432_voc/monthly_mean;monthly;area;global;;;W005;;weekday=H006, saturday=H009, sunday=H010;E073; +EMEP;a_publicpower;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;V001;M002;W002;;H002;E074; +EMEP;b_industry;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;V002;M004;W003;;H004;E075; +EMEP;c_otherstationarycomb;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M003;W003;;H003;E076; +EMEP;d_fugitive;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M005;W001;;H001;E077; +EMEP;e_solvents;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M006;W004;;H005;E078; +EMEP;f_roadtransport;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E079; +EMEP;g_shipping;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M001;W001;;H001;E080; +EMEP;h_aviation;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;V003;M001;W001;;H001;E081; +EMEP;i_offroad;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M001;W001;;H001;E082; +EMEP;j_waste;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M001;W001;;H001;E083; +EMEP;k_agrilivestock;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M009;W001;;H007;E084; +EMEP;l_agriother;2015;0;;;co,nox_no2,pm10,pm25,so2,nmvoc,nh3;/ceip/emepv18/yearly_mean;yearly;area;regional;;M009;W001;;H007;E085; +carn;;2015;1;;;so2;/mtu/carnetal/yearly_mean;yearly;point;global;;M001;W001;;H001;E086; +CEDS;agriculture;2014;0;;;nox_no2,nh3;/jgcri/ceds/monthly_mean;monthly;area;global;;;W001;;H007;E087; +CEDS;energy;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;V001;;W002;;H002;E088; +CEDS;industrial;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;V002;;W003;;H004;E089; +CEDS;transportation;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;;;W005;;weekday=H006, saturday=H009, sunday=H010;E090; +CEDS;residential;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;;;W003;;H003;E091; +CEDS;solvent;2014;0;;;voc1,voc2,voc3,voc4,voc5,voc6,voc7,voc8,voc9,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;;;W004;;H005;E092; +CEDS;waste;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;;;W001;;H001;E093; +CEDS;shipping;2014;0;;;co,nox_no2,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/jgcri/ceds/monthly_mean;monthly;area;global;;;W001;;H001;E094; +CEDS;air;2014;0;;;co,nox_no2,oc,bc,so2,nh3,nmvoc;/jgcri/ceds/monthly_mean;monthly;area;global;;;W001;;H001;E095; +CAMS-GLOB-ANT_v21;agriculture;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W001;;H007;E114; +CAMS-GLOB-ANT_v21;energy;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;V001;;W002;;H002;E115; +CAMS-GLOB-ANT_v21;fugitive_fuel;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W001;;H001;E116; +CAMS-GLOB-ANT_v21;industry;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;V002;;W003;;H004;E117; +CAMS-GLOB-ANT_v21;livestock;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;nox_no,nh3;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W001;;H007;E118; +CAMS-GLOB-ANT_v21;residential;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W003;;H003;E119; +CAMS-GLOB-ANT_v21;solvents;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W001;;H001;E120; +CAMS-GLOB-ANT_v21;waste;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W001;;H001;E121; +CAMS-GLOB-ANT_v21;non_road_transport;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W001;;H001;E122; +CAMS-GLOB-ANT_v21;road_transport;2015;0;;+ NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no,oc,bc,so2,nh3,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_glob_antv21/monthly_mean;monthly;area;global;;;W005;;weekday=H006, saturday=H009, sunday=H010;E123; +CAMS-GLOB-SHIP_v11;;2015;0;;;co,nox_no,oc,ec,so4,ash,so2,nmvoc;/ecmwf/cams_glob_shipv11/monthly_mean;monthly;area;global;;;W001;;H001;E111; +CAMS-GLOB-SOIL_v11;total;2015;0;;;nox_no;/ecmwf/cams_glob_soilv11/monthly_mean;monthly;area;global;;;W001;;H007;E112; +CAMS-GLOB-OCEAN_v11;;2015;0;;;c2h6s;/ecmwf/cams_glob_oceanv11/monthly_mean;monthly;area;global;;;W001;;H001;E113; +CAMS-REG-AP_v221;gnfr_A;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;V001;M002;W002;;H002;E096; +CAMS-REG-AP_v221;gnfr_B;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;V002;M004;W003;;H004;E097; +CAMS-REG-AP_v221;gnfr_C;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M003;W003;;H003;E098; +CAMS-REG-AP_v221;gnfr_D;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc19,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M005;W001;;H001;E099; +CAMS-REG-AP_v221;gnfr_E;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,voc01,voc06,voc14,voc15,voc17,voc18,voc19,voc20,voc23;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M006;W004;;H005;E100; +CAMS-REG-AP_v221;gnfr_F1;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E101; +CAMS-REG-AP_v221;gnfr_F2;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E102; +CAMS-REG-AP_v221;gnfr_F3;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc02,voc03,voc07,voc08,voc12,voc17,voc21,voc22;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E103; +CAMS-REG-AP_v221;gnfr_F4;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;pm10,pm25,oc,ec,voc03,voc04,voc05,voc06,voc12,voc13,voc14,voc15;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M007;W005;;weekday=H006, saturday=H009, sunday=H010;E104; +CAMS-REG-AP_v221;gnfr_G;2015;0;;+ AUT,CHE,FIN,FRA,ITA,ROU;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M001;W001;;H001;E105; +CAMS-REG-AP_v221;gnfr_H;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,so4,voc01,voc02,voc03,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc17,voc21,voc22,voc23;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;V003;M001;W001;;H001;E106; +CAMS-REG-AP_v221;gnfr_I;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,so4,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M001;W001;;H001;E107; +CAMS-REG-AP_v221;gnfr_J;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;V007;M001;W001;;H001;E108; +CAMS-REG-AP_v221;gnfr_K;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;nh3,pm10,pm25,oc;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M010;W001;;H007;E109; +CAMS-REG-AP_v221;gnfr_L;2015;0;;- NPL,THA,IND,TJK,CHN,MNG,AFG,ARE,ARM,AZE,BEN,BFA,BHR,CAF,CIV,CMR,COD,COG,DJI,DZA,EGY,ERI,ESH,ETH,GAB,GEO,GHA,GIN,GMB,GNB,GNQ,IRN,IRQ,ISR,JOR,KAZ,KEN,KWT,LBN,LBR,LBY,MAR,MLI,MRT,NER,NGA,OMN,PAK,PSE,QAT,RUS,SAU,SDN,SEN,SLE,SOM,SSD,SYR,TCD,TGO,TKM,TUN,UGA,UZB,YEM;co,nox_no2,so2,nh3,pm10,pm25,oc,ec,voc01,voc02,voc03,voc04,voc05,voc06,voc07,voc08,voc09,voc12,voc13,voc14,voc15,voc16,voc17,voc18,voc19,voc20,voc21,voc22,voc23,voc24;/ecmwf/cams_reg_apv221/yearly_mean;yearly;area;regional;;M011;W001;;H007;E110; \ No newline at end of file diff --git a/conf/hermes.conf b/conf/hermes.conf index 7a125976b8999b572c72dcc012ebf68037b17ee4..7b64440880dd1e1fdce9f603d1130956a3c2c895 100755 --- a/conf/hermes.conf +++ b/conf/hermes.conf @@ -12,7 +12,9 @@ output_timestep_type = hourly output_timestep_num = 24 output_timestep_freq = 1 first_time = 0 -erase_auxiliary_files = 1 +erase_auxiliary_files = 0 +# Compression level from 0 to 9; 0 corresponds to no compression and 9 to maximum compression +compression_level = 4 [DOMAIN] @@ -22,12 +24,8 @@ output_model = MONARCH # output_model = WRF_CHEM output_attributes = /data/global_attributes.csv -# ***** domain_type=[global, regular, lcc, rotated, mercator] ***** +# domain_type=[lcc, rotated, mercator, regular, rotated_nested] domain_type = global -# domain_type = regular -# domain_type = lcc -# domain_type = rotated -# domain_type = mercator vertical_description = /data/profiles/vertical/Benchmark_15layers_vertical_description.csv auxiliary_files_path = /data/auxiliar_files/_ @@ -52,6 +50,14 @@ auxiliary_files_path = /data/auxiliar_files/_/data/auxiliar_files/_/data/profiles/temporal/TemporalProfile_Monthly.csv p_week = /data/profiles/temporal/TemporalProfile_Weekly.csv p_day = /data/profiles/temporal/TemporalProfile_Daily.csv p_hour = /data/profiles/temporal/TemporalProfile_Hourly.csv -p_speciation = /data/profiles/speciation/Speciation_profile_cb05_aero5_MONARCH.csv +p_speciation = /data/profiles/speciation/Speciation_profile_cb05_aero5_Benchmark.csv molecular_weights = /data/profiles/speciation/MolecularWeights.csv world_info = /data/profiles/temporal/tz_world_country_iso3166.csv +countries_shapefile = /data/gadm_country_mask/gadm_country_ISO3166.shp diff --git a/data/gadm_country_mask/gadm_country_ISO3166.cpg b/data/gadm_country_mask/gadm_country_ISO3166.cpg new file mode 100644 index 0000000000000000000000000000000000000000..3ad133c048f2189041151425a73485649e6c32c0 --- /dev/null +++ b/data/gadm_country_mask/gadm_country_ISO3166.cpg @@ -0,0 +1 @@ +UTF-8 \ No newline at end of file diff --git a/data/gadm_country_mask/gadm_country_ISO3166.dbf b/data/gadm_country_mask/gadm_country_ISO3166.dbf new file mode 100644 index 0000000000000000000000000000000000000000..7f148fda4066eaefe8d0abb76845f107d2ebd606 Binary files /dev/null and b/data/gadm_country_mask/gadm_country_ISO3166.dbf differ diff --git a/data/gadm_country_mask/gadm_country_ISO3166.prj b/data/gadm_country_mask/gadm_country_ISO3166.prj new file mode 100644 index 0000000000000000000000000000000000000000..f45cbadf0074d8b7b2669559a93bc50bb95f82d4 --- /dev/null +++ b/data/gadm_country_mask/gadm_country_ISO3166.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] \ No newline at end of file diff --git a/data/gadm_country_mask/gadm_country_ISO3166.sbn b/data/gadm_country_mask/gadm_country_ISO3166.sbn new file mode 100644 index 0000000000000000000000000000000000000000..34e86bf48a892ff880cac24094dc84e8e5fa0df8 Binary files /dev/null and b/data/gadm_country_mask/gadm_country_ISO3166.sbn differ diff --git a/data/gadm_country_mask/gadm_country_ISO3166.sbx b/data/gadm_country_mask/gadm_country_ISO3166.sbx new file mode 100644 index 0000000000000000000000000000000000000000..aee1e8bfd73b24c631c46b2f7b3a28eeeebac3e0 Binary files /dev/null and b/data/gadm_country_mask/gadm_country_ISO3166.sbx differ diff --git a/data/gadm_country_mask/gadm_country_ISO3166.shp b/data/gadm_country_mask/gadm_country_ISO3166.shp new file mode 100644 index 0000000000000000000000000000000000000000..bb1870bd025862fae48ea52a0b42e56612a58bdb Binary files /dev/null and b/data/gadm_country_mask/gadm_country_ISO3166.shp differ diff --git a/data/gadm_country_mask/gadm_country_ISO3166.shx b/data/gadm_country_mask/gadm_country_ISO3166.shx new file mode 100644 index 0000000000000000000000000000000000000000..acf26c7515f965291a4a5bdcefb69d123b83e195 Binary files /dev/null and b/data/gadm_country_mask/gadm_country_ISO3166.shx differ diff --git a/data/profiles/speciation/MolecularWeights.csv b/data/profiles/speciation/MolecularWeights.csv index 1a43266a6dd480fc13f34f54e3efa018e8dceacb..d1090eb6a09aed8c2fb82a10a80ceab0a9b25480 100755 --- a/data/profiles/speciation/MolecularWeights.csv +++ b/data/profiles/speciation/MolecularWeights.csv @@ -2,6 +2,7 @@ Specie,MW nox_no,30.01 nox_no2,46.01 co,28.01 +co2,44.01 so2,64.06 nh3,17.03 pm10,1.0 @@ -66,4 +67,6 @@ voc22,68.8 voc23,75.3 voc24,59.1 voc25,86.9 -nmvoc,1.0 \ No newline at end of file +nmvoc,1.0 +tpm,1.0 +ch4,16.04 \ No newline at end of file diff --git a/data/profiles/speciation/Speciation_profile_cb05_aero5_Benchmark.csv b/data/profiles/speciation/Speciation_profile_cb05_aero5_Benchmark.csv new file mode 100755 index 0000000000000000000000000000000000000000..9fb2e8bac821d75c1136d64afdb39f7acf05f4c7 --- /dev/null +++ b/data/profiles/speciation/Speciation_profile_cb05_aero5_Benchmark.csv @@ -0,0 +1,123 @@ +ID;NO;NO2;HONO;CO;SO2;NH3;ALD2;ALDX;BENZENE;ETH;ETHA;ETOH;FORM;IOLE;ISOP;MEOH;OLE;PAR;SESQ;TERP;TOL;XYL;DMS;HCL;SULF;POC;PEC;PNO3;PSO4;PMFINE;PMC +units;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;mol.s-1.m-2;kg.s-1.m-2;kg.s-1.m-2;kg.s-1.m-2;kg.s-1.m-2;kg.s-1.m-2;kg.s-1.m-2 +short_description;nitrogen_monoxide;nitrogen_dioxide;nitrous_acid;carbon_monoxide;sulfur_dioxide;ammonia;acetaldehyde;higher_aldehydes;benzene;ethene;ethane;ethanol;formaldehyde;internal_olefin_carbon_bond;isoprene;methanol;terminal_olefin_carbon_bond;paraffin_carbon_bond;sesquiterpenes;terpene;toluene;xylene;dimethyl_sulfide;hydrogen_chloride;sulfuric_acid;primary_organic_carbon;primary_elemental_carbon;primary_nitrate_fine;primary_sulfate_fine;primary_others_fine;pm_coarse +E001;0.72*nox_no;0.18*nox_no;0.1*nox_no;co;so2;nh3;c2h4o;0;c6h6;c2h4;c2h6;c2h5oh;0;0.5*hialkenes;c5h8;ch3oh;c8h16+c5h10+c3h6+c4h8+c6h12+0.5*hialkanes;4*c4h10+6*c6h14+5*hialkanes+6*c8h16+3*c5h10+c3h6+3*c3h6o+2*c4h8+7*c7h16+4*c6h12+hialkenes+5*c5h12+1.5*c3h8;0;terpenes;ch2o+c7h8;c8h10;c2h6s;0;0;oc;5.9*bc;0;0;3.3*pm25-3*oc-5.9*bc;0 +E002;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;(pm25-oc-bc)*0.155;(pm25-oc-bc)*0.845;pm10-pm25 +E003;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;(pm25-oc-bc)*0.089;(pm25-oc-bc)*0.911;pm10-pm25 +E004;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;(pm25-oc-bc)*0.047;(pm25-oc-bc)*0.953;pm10-pm25 +E005;0.823*nox_no2;0.16*nox_no2;0.017*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;(pm25-oc-bc)*0.059;(pm25-oc-bc)*0.941;pm10-pm25 +E006;0;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +E007;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;oc;bc;0;0;pm25-oc-bc;pm10-pm25 +E008;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;(pm25-oc-bc)*0.537;(pm25-oc-bc)*0.463;pm10-pm25 +E009;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0;0;c6h6;c2h4;0;0;0;0;0;ch3oh;c3h6;c2h2+c3h6+ch3cooh;0;0;ch2o;0;0;hcl;0;oc;bc;0;0;pm25-oc-bc;pm10-pm25 +E010;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0.02*pm25;0.01*pm25;0;0.15*pm25;0.82*pm25;pm10-pm25 +E011;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0.35*pm25;0.18*pm25;0;0.02*pm25;0.45*pm25;pm10-pm25 +E012;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0.03*pm25;0.01*pm25;0;0.1*pm25;0.86*pm25;pm10-pm25 +E013;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;voc13;0;voc02;0;0;0.666*voc12;0;0;0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc13;0;0;voc14;voc15;0;0;0;0;0;0;0;1*pm25;pm10-pm25 +E014;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0.01*voc18+0.3*voc19;0;0;0;0.5*voc01;0;0;0;0.5*voc01;0;7.5*voc06+2.2*voc17+4.11*voc18+4*voc19+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;0;0;0;0;0;0 +E015;0.95*nox_no2;0.042*nox_no2;0.008*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0.58*pm25;0.21*pm25;0;0.01*pm25;0.21*pm25;pm10-pm25 +E016;0.7*nox_no2;0.283*nox_no2;0.017*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;0.288*pm25;0.675*pm25;0;0.01*pm25;0.037*pm25;pm10-pm25 +E017;0.95*nox_no2;0.042*nox_no2;0.008*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;0;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+voc08+2.2*voc17+1.875*voc22;0;0;0.2*voc17;voc17;0;0;0;0.58*pm25;0.21*pm25;0;0.01*pm25;0.21*pm25;pm10-pm25 +E018;0;0;0;0;0;0;0;0;voc13;0;0;0;0;0.666*voc12;0;0;0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc13;0;0;voc14;voc15;0;0;0;0;0;0;0;0;0 +E019;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0.2*pm25;0.06*pm25;0;0;0.74*pm25;pm10-pm25 +E020;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0.31*pm25;0.41*pm25;0;0.03*pm25;0.25*pm25;pm10-pm25 +E021;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0.31*pm25;0.2*pm25;0;0;0.49*pm25;pm10-pm25 +E022;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0.48*pm25;0.15*pm25;0;0;0.37*pm25;pm10-pm25 +E023;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;pm25;pm10-pm25 +E024;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25-oc-bc;pm10-pm25 +E025;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000008*nmvoc;0;0;0.000858*nmvoc;0.004177*nmvoc;0;0.018548*nmvoc;0;0;0;0.00104*nmvoc;0.011594*nmvoc;0;0;0;0.000893*nmvoc;0;0;0;oc;bc;0;(pm25-oc-bc)*0.155;(pm25-oc-bc)*0.845;pm10-pm25 +E026;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000013*nmvoc;0;0;0.003224*nmvoc;0.001662*nmvoc;0.000659*nmvoc;0.008038*nmvoc;0;0;0.000175*nmvoc;0.000496*nmvoc;0.025751*nmvoc;0;0;0;0.001726*nmvoc;0;0;0;oc;bc;0;(pm25-oc-bc)*0.089;(pm25-oc-bc)*0.911;pm10-pm25 +E027;0.823*nox_no2;0.16*nox_no2;0.017*nox_no2;co;so2;nh3;0.000592*nmvoc;0;0;0.002423*nmvoc;0.001607*nmvoc;0;0.000899*nmvoc;0;0;0;0.002589*nmvoc;0.028079*nmvoc;0;0;0;0.003302*nmvoc;0;0;0;oc;bc;0;(pm25-oc-bc)*0.059;(pm25-oc-bc)*0.941;pm10-pm25 +E028;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000047*nmvoc;0;0;0.002914*nmvoc;0.004187*nmvoc;0.000849*nmvoc;0.00186*nmvoc;0;0;0;0.002559*nmvoc;0.029992*nmvoc;0;0;0;0.001755*nmvoc;0;0;0;oc;bc;0;(pm25-oc-bc)*0.047;(pm25-oc-bc)*0.953;pm10-pm25 +E029;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0.001867*nmvoc;0.008553*nmvoc;0.000529*nmvoc;0.005349*nmvoc;0;0.000169*nmvoc;0.000133*nmvoc;0.000435*nmvoc;0.025797*nmvoc;0;0;0;0.000742*nmvoc;0;0;0;oc;bc;0;0;pm25-oc-bc;pm10-pm25 +E030;0;0;0;0;0;0;0;0;0;0.000087*nmvoc;0.000148*nmvoc;0.003563*nmvoc;0.000004*nmvoc;0;0.000001*nmvoc;0.001904*nmvoc;0.000161*nmvoc;0.036006*nmvoc;0;0;0;0.001686*nmvoc;0;0;0;0;0;0;0;0;0 +E031;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.002093*nmvoc;0.000525*nmvoc;0.000105*nmvoc;0.002929*nmvoc;0.001894*nmvoc;0.000023*nmvoc;0.002826*nmvoc;0.000116*nmvoc;0.000043*nmvoc;0.003664*nmvoc;0.003078*nmvoc;0.010261*nmvoc;0;0.000006*nmvoc;0.00013*nmvoc;0.000006*nmvoc;0;0;0;oc;bc;0;0;pm25-oc-bc;pm10-pm25 +E032;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0.002496*nmvoc;0.004456*nmvoc;0;0;0.001693*nmvoc;0;0;0;0.001111*nmvoc;0.030672*nmvoc;0;0;0.001132*nmvoc;0.000762*nmvoc;0;0;0;oc;bc;0;(pm25-oc-bc)*0.537;(pm25-oc-bc)*0.463;pm10-pm25 +E033;nox_no2;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;pm25_fossil;pm10-pm25_fossil +E034;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_bio;pm10-pm25_bio +E035;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;bc;0;0;pm25_fossil-bc;pm10-pm25_fossil +E036;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_fossil+pm25_bio-oc-bc)*0.155;(pm25_fossil+pm25_bio-oc-bc)*0.845;pm10-pm25_fossil-pm25_bio +E037;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;bc;0;0;pm25_fossil-bc;pm10-pm25_fossil +E038;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_fossil;pm10-pm25_fossil +E039;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_fossil+pm25_bio-oc-bc)*0.089;(pm25_fossil+pm25_bio-oc-bc)*0.911;pm10-pm25_fossil-pm25_bio +E040;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;bc;0;0;pm25_fossil-bc;pm10-pm25_fossil +E041;0.9*nox_no2;0.1*nox_no2;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;pm25_fossil;pm10-pm25_fossil +E042;0.9*nox_no2;0.1*nox_no2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;pm10 +E043;0;0;0;0;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;bc;0;0;pm25_fossil-bc;pm10-pm25_fossil +E044;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;bc;0;0;pm25_fossil-bc;pm10-pm25_fossil +E045;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_fossil-oc-bc;pm10-pm25_fossil +E046;0;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;pm25_fossil;pm10-pm25_fossil +E047;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_bio+pm25_fossil-oc-bc)*0.047;(pm25_bio+pm25_fossil-oc-bc)*0.953;pm10-pm25_fossil-pm25_bio +E048;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_bio+pm25_fossil-oc-bc)*0.155;(pm25_bio+pm25_fossil-oc-bc)*0.845;pm10-pm25_fossil-pm25_bio +E049;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_fossil+pm25_bio;pm10-pm25_fossil-pm25_bio +E050;0;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;pm25_fossil;pm10-pm25_fossil +E051;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_fossil-oc-bc;pm10-pm25_fossil +E052;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_fossil-oc-bc;pm10-pm25_fossil +E053;0.9*nox_no2;0.1*nox_no2;0;co;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;pm25_fossil-oc-bc;pm10-pm25_fossil +E054;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_bio+pm25_fossil-oc-bc)*0.059;(pm25_bio+pm25_fossil-oc-bc)*0.941;pm10-pm25_bio-pm25_fossil +E055;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_bio+pm25_fossil-oc-bc)*0.537;(pm25_bio+pm25_fossil-oc-bc)*0.463;pm10-pm25_bio-pm25_fossil +E056;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;(pm25_bio+pm25_fossil-oc-bc)*0.059;(pm25_bio+pm25_fossil-oc-bc)*0.941;pm10-pm25_bio-pm25_fossil +E057;0;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +E058;0;0;0;0;0;0;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;voc10;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E059;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E060;0;0;0;0;0;0;0;0.01*voc18+0.3*voc19;voc13;voc07;voc02;0;0;0.666*voc12;voc10;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc13+2.2*voc17+4.11*voc18+4*voc19;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;0;0;0;0;0;0 +E061;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E062;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E063;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;voc10;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E064;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E065;0;0;0;0;0;0;0;0;voc13;voc07;voc02;0.5*voc01;0;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E066;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E067;0;0;0;0;0;0;0.625*voc22;0.666*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E068;0;0;0;0;0;0;0.625*voc22;0.666*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E069;0;0;0;0;0;0;0.625*voc22;0.666*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E070;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E071;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E072;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E073;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;voc11;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E074;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000008*nmvoc;0;0;0.000858*nmvoc;0.004177*nmvoc;0;0.018548*nmvoc;0;0;0;0.00104*nmvoc;0.011594*nmvoc;0;0;0;0.000893*nmvoc;0;0;0;0.02*pm25;0.01*pm25;0;0.15*pm25;0.82*pm25;pm10-pm25 +E075;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000013*nmvoc;0;0;0.003224*nmvoc;0.001662*nmvoc;0.000659*nmvoc;0.008038*nmvoc;0;0;0.000175*nmvoc;0.000496*nmvoc;0.025751*nmvoc;0;0;0;0.001726*nmvoc;0;0;0;0.03*pm25;0.01*pm25;0;0.1*pm25;0.86*pm25;pm10-pm25 +E076;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000047*nmvoc;0;0;0.002914*nmvoc;0.004187*nmvoc;0.000849*nmvoc;0.00186*nmvoc;0;0;0;0.002559*nmvoc;0.029992*nmvoc;0;0;0;0.001755*nmvoc;0;0;0;0.35*pm25;0.18*pm25;0;0.02*pm25;0.45*pm25;pm10-pm25 +E077;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0.000006*nmvoc;0.005934*nmvoc;0;0.000026*nmvoc;0;0.000001*nmvoc;0;0.000373*nmvoc;0.055357*nmvoc;0;0;0;0.000048*nmvoc;0;0;0;0;0;0;0;1*pm25;pm10-pm25 +E078;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0.000087*nmvoc;0.000148*nmvoc;0.003563*nmvoc;0.000004*nmvoc;0;0.000001*nmvoc;0.001904*nmvoc;0.000161*nmvoc;0.036006*nmvoc;0;0;0;0.001686*nmvoc;0;0;0;0;0;0;0;1*pm25;pm10-pm25 +E079;0.7*nox_no2;0.283*nox_no2;0.017*nox_no2;co;so2;nh3;0.000592*nmvoc;0;0;0.002423*nmvoc;0.001607*nmvoc;0;0.000899*nmvoc;0;0;0;0.002589*nmvoc;0.028079*nmvoc;0;0;0;0.003302*nmvoc;0;0;0;0.32*pm25;0.49*pm25;0;0.01*pm25;0.18*pm25;pm10-pm25 +E080;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0.002496*nmvoc;0.004456*nmvoc;0;0;0.001693*nmvoc;0;0;0;0.001111*nmvoc;0.030672*nmvoc;0;0;0.001132*nmvoc;0.000762*nmvoc;0;0;0;0.12*pm25;0.005*pm25;0;0.40*pm25;0.475*pm25;pm10-pm25 +E081;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.001084*nmvoc;0.000756*nmvoc;0.000248*nmvoc;0.00622*nmvoc;0.000293*nmvoc;0;0.005437*nmvoc;0.000086*nmvoc;0;0;0.003296*nmvoc;0.011816*nmvoc;0;0;0.000192*nmvoc;0.000124*nmvoc;0;0;0;0.62*pm25;0.16*pm25;0;0.15*pm25;0.07*pm25;pm10-pm25 +E082;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.000227*nmvoc;0.000311*nmvoc;0.000333*nmvoc;0.003921*nmvoc;0.000166*nmvoc;0;0.00206*nmvoc;0.00079*nmvoc;0;0;0.00111*nmvoc;0.039123*nmvoc;0;0;0.000245*nmvoc;0.000476*nmvoc;0;0;0;0.31*pm25;0.41*pm25;0;0.03*pm25;0.25*pm25;pm10-pm25 +E083;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0;0;0.001867*nmvoc;0.008553*nmvoc;0.000529*nmvoc;0.005349*nmvoc;0;0.000169*nmvoc;0.000133*nmvoc;0.000435*nmvoc;0.025797*nmvoc;0;0;0;0.000742*nmvoc;0;0;0;0.31*pm25;0.2*pm25;0;0;0.49*pm25;pm10-pm25 +E084;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.001591*nmvoc;0.000103*nmvoc;0.000038*nmvoc;0;0;0.000022*nmvoc;0;0;0;0;0.000023*nmvoc;0.03941*nmvoc;0;0.000007*nmvoc;0.000237*nmvoc;0;0;0;0;0.318*pm25;0.0516*pm25;0;0.0446*pm25;0.5858*pm25;pm10-pm25 +E085;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.002093*nmvoc;0.000525*nmvoc;0.000105*nmvoc;0.002929*nmvoc;0.001894*nmvoc;0.000023*nmvoc;0.002826*nmvoc;0.000116*nmvoc;0.000043*nmvoc;0.003664*nmvoc;0.003078*nmvoc;0.010261*nmvoc;0;0.000006*nmvoc;0.00013*nmvoc;0.000006*nmvoc;0;0;0;0.48*pm25;0.15*pm25;0;0;0.37*pm25;pm10-pm25 +E086;0;0;0;0;so2;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +E087;nox_no2;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;bc;0;0;0;0 +E088;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E089;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E090;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E091;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E092;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E093;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E094;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E095;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.001084*nmvoc;0.000756*nmvoc;0.000248*nmvoc;0.00622*nmvoc;0.000293*nmvoc;0;0.005437*nmvoc;0.000086*nmvoc;0;0;0.003296*nmvoc;0.011816*nmvoc;0;0;0.000192*nmvoc;0.000124*nmvoc;0;0;0;oc;bc;0;0;0;0 +E096;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E097;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E098;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E099;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E100;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0.01*voc18+0.3*voc19;0;0;0;0.5*voc01;0;0;0;0.5*voc01;0;7.5*voc06+2.2*voc17+4.11*voc18+4*voc19+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;0;0;0;0;pm25;pm10-pm25 +E101;0.95*nox_no2;0.042*nox_no2;0.008*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E102;0.7*nox_no2;0.283*nox_no2;0.017*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E103;0.95*nox_no2;0.042*nox_no2;0.008*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;0;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+voc08+2.2*voc17+1.875*voc22;0;0;0.2*voc17;voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E104;0;0;0;0;0;0;0;0;voc13;0;0;0;0;0.666*voc12;0;0;0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc13;0;0;voc14;voc15;0;0;0;oc;ec;0;0;pm25-oc-ec;pm10-pm25 +E105;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E106;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;oc;0;0;so4;pm25-oc-so4;pm10-pm25 +E107;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E108;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;0;pm25-oc-ec;pm10-pm25 +E109;0;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;0;0;0;pm25-oc;pm10-pm25 +E110;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;0;pm25-oc-ec;pm10-pm25 +E114;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E115;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;5.6*(oc+bc)-oc-bc;3.4*(oc+bc) +E116;0.9*nox_no;0.1*nox_no;0;co;so2;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E117;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;3.1*(oc+bc)-oc-bc;0.6*(oc+bc) +E118;nox_no;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +E119;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;1.7*(oc+bc)-oc-bc;1.5*(oc+bc) +E120;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E121;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E122;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;3.4*(oc+bc)-oc-bc;0 +E123;0.7*nox_no;0.283*nox_no;0.017*nox_no;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;1.2*(oc+bc)-oc-bc;0 \ No newline at end of file diff --git a/data/profiles/speciation/Speciation_profile_cb05_aero5_CMAQ.csv b/data/profiles/speciation/Speciation_profile_cb05_aero5_CMAQ.csv index d667082d115bd9a1d77f07139e6f719751fe3ddb..a124558eb9263f1cf1dd34b50e0dea14fe64802f 100755 --- a/data/profiles/speciation/Speciation_profile_cb05_aero5_CMAQ.csv +++ b/data/profiles/speciation/Speciation_profile_cb05_aero5_CMAQ.csv @@ -96,3 +96,28 @@ E092;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02; E093;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 E094;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;voc10;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 E095;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.001084*nmvoc;0.000756*nmvoc;0.000248*nmvoc;0.00622*nmvoc;0.000293*nmvoc;0;0.005437*nmvoc;0.000086*nmvoc;0;0;0.003296*nmvoc;0.011816*nmvoc;0;0;0.000192*nmvoc;0.000124*nmvoc;0;0;0;oc;bc;0;0;0;0 +E096;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E097;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E098;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E099;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E100;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0;0.01*voc18+0.3*voc19;0;0;0;0.5*voc01;0;0;0;0.5*voc01;0;7.5*voc06+2.2*voc17+4.11*voc18+4*voc19+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;0;0;0;0;pm25;pm10-pm25 +E101;0.95*nox_no2;0.042*nox_no2;0.008*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E102;0.7*nox_no2;0.283*nox_no2;0.017*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E103;0.95*nox_no2;0.042*nox_no2;0.008*nox_no2;co;so2;nh3;0.625*voc22;0.375*voc22;0;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+voc08+2.2*voc17+1.875*voc22;0;0;0.2*voc17;voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E104;0;0;0;0;0;0;0;0;voc13;0;0;0;0;0.666*voc12;0;0;0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc13;0;0;voc14;voc15;0;0;0;oc;ec;0;0;pm25-oc-ec;pm10-pm25 +E105;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E106;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+5*voc05+7.5*voc06+voc08+voc09+voc13+2.2*voc17+1.875*voc22+4*voc23;0;0;voc14+0.2*voc17;voc15+voc17;0;0;0;oc;0;0;so4;pm25-oc-so4;pm10-pm25 +E107;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.375*voc22;voc13;voc07;voc02;0;voc21;0.666*voc12;0;0;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;so4;pm25-oc-ec-so4;pm10-pm25 +E108;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;0;pm25-oc-ec;pm10-pm25 +E109;0;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;oc;0;0;0;pm25-oc;pm10-pm25 +E110;0.9*nox_no2;0.1*nox_no2;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;ec;0;0;pm25-oc-ec;pm10-pm25 +E114;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E115;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;5.6*(oc+bc)-oc-bc;3.4*(oc+bc) +E116;0.9*nox_no;0.1*nox_no;0;co;so2;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E117;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;3.1*(oc+bc)-oc-bc;0.6*(oc+bc) +E118;nox_no;0;0;0;0;nh3;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0 +E119;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;1.7*(oc+bc)-oc-bc;1.5*(oc+bc) +E120;0;0;0;0;0;0;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;0;0;0;0;0;0 +E121;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;0;0 +E122;0.9*nox_no;0.1*nox_no;0;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;3.4*(oc+bc)-oc-bc;0 +E123;0.7*nox_no;0.283*nox_no;0.017*nox_no;co;so2;nh3;0.625*voc22;0.01*voc18+0.3*voc19+0.375*voc22;voc13;voc07;voc02;0.5*voc01;voc21;0.666*voc12;0;0.5*voc01;voc08+0.333*voc12;1.5*voc03+4*voc04+5*voc05+7.5*voc06+voc08+voc09+voc13+voc16+2.2*voc17+4.11*voc18+4*voc19+1.875*voc22+4*voc23+voc24;0;0;voc14+0.2*voc17;voc15+voc16+voc17;0;0;0;oc;bc;0;0;1.2*(oc+bc)-oc-bc;0 \ No newline at end of file diff --git a/hermesv3_gr/config/config.py b/hermesv3_gr/config/config.py index 6cb466a4a97006fd91c7e376e83ba8a49735b877..aa613e1ac651db00bbc16178826a76c46de8bf21 100755 --- a/hermesv3_gr/config/config.py +++ b/hermesv3_gr/config/config.py @@ -75,11 +75,14 @@ class Config(ArgParser): p.add_argument('--output_model', required=True, help='Name of the output model.', choices=['MONARCH', 'CMAQ', 'WRF_CHEM']) + p.add_argument('--compression_level', required=False, type=int, choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + help='Compression level of the NetCDF output (0 for no compressed output).', default=4) + p.add_argument('--output_attributes', required=False, help='Path to the file that contains the global attributes.') p.add_argument('--domain_type', required=True, help='Type of domain to simulate.', - choices=['global', 'lcc', 'rotated', 'mercator', 'regular']) + choices=['global', 'lcc', 'rotated', 'mercator', 'regular', 'rotated_nested']) p.add_argument('--auxiliary_files_path', required=True, help='Path to the directory where the necessary auxiliary files will be created if them are ' + 'not created yet.') @@ -117,6 +120,20 @@ class Config(ArgParser): help='Longitudinal grid resolution (rotated degrees). Corresponds to the DLMD parameter ' + 'in NMMB-MONARCH.', type=float) + # Rotated_nested options + p.add_argument('--parent_grid_path', required=False, type=str, + help='Path to the netCDF that contains the grid definition.') + p.add_argument('--parent_ratio', required=False, type=int, + help='Ratio between the parent and the nested domain.') + p.add_argument('--i_parent_start', required=False, type=int, + help='Location of the I to start the nested.') + p.add_argument('--j_parent_start', required=False, type=int, + help='Location of the J to start the nested.') + p.add_argument('--n_rlat', required=False, type=int, + help='Number of rotated latitude points.') + p.add_argument('--n_rlon', required=False, type=int, + help='Number of rotated longitude points.') + # Lambert conformal conic arguments p.add_argument('--lat_1', required=False, help='Standard parallel 1 (in deg). Corresponds to the P_ALP parameter of the GRIDDESC file.', @@ -167,6 +184,8 @@ class Config(ArgParser): help='Path to the file that contains the molecular weights of the input pollutants.') p.add_argument('--world_info', required=True, help='Path to the file that contains the world information like timezones, ISO codes, ...') + p.add_argument('--countries_shapefile', required=False, + help='...') arguments, unknown = p.parse_known_args() if len(unknown) > 0: @@ -184,6 +203,9 @@ class Config(ArgParser): elif arguments.domain_type == 'rotated': arguments.__dict__[item] = arguments.__dict__[item].replace('', '{1}_{2}'.format( item, arguments.inc_rlat, arguments.inc_rlon)) + elif arguments.domain_type == 'rotated_nested': + arguments.__dict__[item] = arguments.__dict__[item].replace('', '{1}_{2}'.format( + item, arguments.n_rlat, arguments.n_rlon)) elif arguments.domain_type == 'lcc' or arguments.domain_type == 'mercator': arguments.__dict__[item] = arguments.__dict__[item].replace('', '{1}_{2}'.format( item, arguments.inc_x, arguments.inc_y)) diff --git a/hermesv3_gr/config/settings.py b/hermesv3_gr/config/settings.py index 8a6966b3743a8dadd6fbe295d1852f74149ed8ac..c114f84b782db1d2e0f6cf1fc07a4b88aa556055 100755 --- a/hermesv3_gr/config/settings.py +++ b/hermesv3_gr/config/settings.py @@ -30,11 +30,6 @@ precision = np.float64 global writing_serial writing_serial = True -global compressed_netcdf -compressed_netcdf = True - -if not writing_serial: - compressed_netcdf = False global icomm global comm diff --git a/hermesv3_gr/hermes.py b/hermesv3_gr/hermes.py index 1df2970d2e8cb67a377177a046b381952e077637..d7faef45fbfa25cd100d12e1a607064edbc403fa 100755 --- a/hermesv3_gr/hermes.py +++ b/hermesv3_gr/hermes.py @@ -34,7 +34,7 @@ class HermesGr(object): Interface class for HERMESv3_GR. """ def __init__(self, config, new_date=None, comm=None): - from hermesv3_gr.modules.grids.grid import Grid + from hermesv3_gr.modules.grids.grid import select_grid from hermesv3_gr.modules.temporal.temporal import TemporalDistribution from hermesv3_gr.modules.writing.writer import Writer global full_time @@ -65,18 +65,11 @@ class HermesGr(object): self.levels = VerticalDistribution.get_vertical_output_profile(self.options.vertical_description) - self.grid = Grid.select_grid( - self.comm, - self.options.domain_type, self.options.vertical_description, self.options.output_timestep_num, - self.options.auxiliary_files_path, self.options.inc_lat, self.options.inc_lon, self.options.lat_orig, - self.options.lon_orig, self.options.n_lat, self.options.n_lon, self.options.centre_lat, - self.options.centre_lon, self.options.west_boundary, self.options.south_boundary, self.options.inc_rlat, - self.options.inc_rlon, self.options.lat_1, self.options.lat_2, self.options.lon_0, self.options.lat_0, - self.options.nx, self.options.ny, self.options.inc_x, self.options.inc_y, self.options.x_0, - self.options.y_0, self.options.lat_ts) + self.grid = select_grid(self.comm, self.options) - self.emission_list = EmissionInventory.make_emission_list(self.options, self.grid, self.levels, - self.options.start_date) + self.emission_list = EmissionInventory.make_emission_list(self.comm, self.options, self.grid, self.levels, + self.options.start_date, + self.options.countries_shapefile) self.delta_hours = TemporalDistribution.calculate_delta_hours( self.options.start_date, self.options.output_timestep_type, self.options.output_timestep_num, @@ -85,8 +78,7 @@ class HermesGr(object): self.writer = Writer.get_writer( self.options.output_model, self.config.get_output_name(self.options.start_date), self.grid, self.levels, self.options.start_date, self.delta_hours, self.options.output_attributes, - compress=settings.compressed_netcdf, - parallel=not settings.writing_serial) + self.options.compression_level, parallel=not settings.writing_serial) settings.write_log('End of HERMESv3 initialization.') settings.write_time('HERMES', 'Init', timeit.default_timer() - st_time, level=1) diff --git a/hermesv3_gr/modules/emision_inventories/emission_inventory.py b/hermesv3_gr/modules/emision_inventories/emission_inventory.py index 167042479a4a6f79db5b1c727b89eec59dfd8e35..6519782b52d8ecc1a3e494bad955b42d0ca3fb3f 100755 --- a/hermesv3_gr/modules/emision_inventories/emission_inventory.py +++ b/hermesv3_gr/modules/emision_inventories/emission_inventory.py @@ -74,23 +74,27 @@ class EmissionInventory(object): :param p_speciation: ID of the speciation profile to use. :type p_speciation: str """ - def __init__(self, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, - input_frequency, vertical_output_profile, reference_year=2010, factors=None, regrid_mask=None, - p_vertical=None, p_month=None, p_week=None, p_day=None, p_hour=None, p_speciation=None): + def __init__(self, comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, + input_frequency, vertical_output_profile, reference_year=2010, coverage='global', factors=None, + regrid_mask=None, p_vertical=None, p_month=None, p_week=None, p_day=None, p_hour=None, + p_speciation=None, countries_shapefile=None): from hermesv3_gr.modules.masking.masking import Masking st_time = timeit.default_timer() settings.write_log('\t\tCreating area source emission inventory.', level=3) # Emission Inventory parameters + self.comm = comm self.source_type = source_type self.date = current_date self.inventory_name = inventory_name self.sector = sector self.reference_year = reference_year + self.coverage = coverage self.inputs_path = inputs_path self.input_frequency = input_frequency self.grid = grid + self.auxiliary_files_path = options.auxiliary_files_path # Profiles p_vertical = self.get_profile(p_vertical) @@ -104,12 +108,13 @@ class EmissionInventory(object): self.masking = Masking( options.world_info, factors, regrid_mask, grid, world_mask_file=os.path.join(os.path.dirname(options.auxiliary_files_path), - '{0}_WorldMask.nc'.format(inventory_name))) + '{0}_WorldMask.nc'.format(inventory_name)), + countries_shapefile=countries_shapefile) self.input_pollutants = pollutants self.pollutant_dicts = self.create_pollutants_dicts(pollutants) - self.masking.check_regrid_mask(self.pollutant_dicts[0]['path']) + self.masking.check_regrid_mask(self.comm, self.pollutant_dicts[0]['path']) # Creating Regrid Object # It will also create the WoldMasks necessaries @@ -118,7 +123,7 @@ class EmissionInventory(object): self.pollutant_dicts, os.path.join(options.auxiliary_files_path, "Weight_Matrix_{0}_{1}.nc".format(self.inventory_name, settings.size)), - grid, masking=self.masking) + grid, self.coverage, masking=self.masking) if not options.first_time: # Creating Vertical Object if p_vertical is not None: @@ -171,7 +176,7 @@ class EmissionInventory(object): for pollutant_name in pollutants: pollutant_list.append( {'name': pollutant_name, - 'path': self.get_input_path(pollutant_name), + 'path': self.get_input_path(pollutant=pollutant_name), 'Dataset': "{0}_{1}".format(self.inventory_name, self.sector)} ) return pollutant_list @@ -258,14 +263,17 @@ class EmissionInventory(object): st_time = timeit.default_timer() settings.write_log("\tRegridding", level=2) - regridded_emissions = self.regrid.start_regridding() + if self.coverage == 'global': + regridded_emissions = self.regrid.start_regridding() + else: + regridded_emissions = self.regrid.start_esmpy_regridding() for emission in regridded_emissions: dict_aux = {'name': emission['name'], 'data': emission['data'], 'units': 'm'} self.emissions.append(dict_aux) settings.write_time('EmissionInventory', 'do_regrid', timeit.default_timer() - st_time, level=2) @staticmethod - def make_emission_list(options, grid, vertical_output_profile, date): + def make_emission_list(comm, options, grid, vertical_levels, date, countries_shapefile): """ Extract the information of the cross table to read all the needed emissions. @@ -275,8 +283,8 @@ class EmissionInventory(object): :param grid: Grid to use. :type grid: Grid - :param vertical_output_profile: Path to eht file that contains the vertical profile. - :type vertical_output_profile: str + :param vertical_levels: Verical levels + :type vertical_levels: list :param date: Date to simulate. :type date: datetime.datetime @@ -289,6 +297,7 @@ class EmissionInventory(object): from .point_gfas_emission_inventory import PointGfasEmissionInventory from .gfas_emission_inventory import GfasEmissionInventory from .point_source_emission_inventory import PointSourceEmissionInventory + from .point_gfas_hourly_emission_inventory import PointGfasHourlyEmissionInventory st_time = timeit.default_timer() settings.write_log('Loading emissions') @@ -296,7 +305,7 @@ class EmissionInventory(object): path = options.cross_table df = pd.read_csv(path, sep=';', index_col=False) for column in ['ei', 'sector', 'ref_year', 'active', 'factor_mask', 'regrid_mask', 'pollutants', 'path', - 'frequency', 'source_type', 'p_vertical', 'p_month', 'p_week', 'p_day', 'p_hour', + 'frequency', 'source_type', 'coverage', 'p_vertical', 'p_month', 'p_week', 'p_day', 'p_hour', 'p_speciation']: df_cols = list(df.columns.values) if column not in df_cols: @@ -345,51 +354,59 @@ class EmissionInventory(object): if emission_inventory.source_type == 'area': if emission_inventory.ei == 'GFASv12': emission_inventory_list.append( - GfasEmissionInventory(options, grid, date, emission_inventory.ei, - emission_inventory.source_type, emission_inventory.sector, pollutants, - emission_inventory_path, - emission_inventory.frequency, vertical_output_profile, - reference_year=emission_inventory.ref_year, - factors=emission_inventory.factor_mask, - regrid_mask=emission_inventory.regrid_mask, - p_vertical=emission_inventory.p_vertical, - p_month=p_month, - p_week=p_week, - p_day=p_day, - p_hour=p_hour, - p_speciation=emission_inventory.p_speciation)) + GfasEmissionInventory( + comm, options, grid, date, emission_inventory.ei, emission_inventory.source_type, + emission_inventory.sector, pollutants, emission_inventory_path, + emission_inventory.frequency, vertical_levels, + reference_year=emission_inventory.ref_year, + coverage=emission_inventory.coverage, + factors=emission_inventory.factor_mask, + regrid_mask=emission_inventory.regrid_mask, + p_vertical=emission_inventory.p_vertical, p_month=p_month, p_week=p_week, p_day=p_day, + p_hour=p_hour, p_speciation=emission_inventory.p_speciation, + countries_shapefile=countries_shapefile)) else: emission_inventory_list.append( - EmissionInventory(options, grid, date, emission_inventory.ei, emission_inventory.source_type, - emission_inventory.sector, pollutants, - emission_inventory_path, - emission_inventory.frequency, vertical_output_profile, - reference_year=emission_inventory.ref_year, - factors=emission_inventory.factor_mask, - regrid_mask=emission_inventory.regrid_mask, - p_vertical=emission_inventory.p_vertical, - p_month=p_month, - p_week=p_week, - p_day=p_day, - p_hour=p_hour, - p_speciation=emission_inventory.p_speciation)) + EmissionInventory( + comm, options, grid, date, emission_inventory.ei, emission_inventory.source_type, + emission_inventory.sector, pollutants, emission_inventory_path, + emission_inventory.frequency, vertical_levels, + reference_year=emission_inventory.ref_year, + coverage=emission_inventory.coverage, + factors=emission_inventory.factor_mask, + regrid_mask=emission_inventory.regrid_mask, + p_vertical=emission_inventory.p_vertical, p_month=p_month, p_week=p_week, p_day=p_day, + p_hour=p_hour, p_speciation=emission_inventory.p_speciation, + countries_shapefile=countries_shapefile)) elif emission_inventory.source_type == 'point': if emission_inventory.ei == 'GFASv12': - emission_inventory_list.append( - PointGfasEmissionInventory( - options, grid, date, emission_inventory.ei, emission_inventory.source_type, - emission_inventory.sector, pollutants, emission_inventory_path, - emission_inventory.frequency, vertical_output_profile, - reference_year=emission_inventory.ref_year, factors=emission_inventory.factor_mask, - regrid_mask=emission_inventory.regrid_mask, p_vertical=emission_inventory.p_vertical, - p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, - p_speciation=emission_inventory.p_speciation)) + if emission_inventory.frequency == 'daily': + emission_inventory_list.append( + PointGfasEmissionInventory( + comm, options, grid, date, emission_inventory.ei, emission_inventory.source_type, + emission_inventory.sector, pollutants, emission_inventory_path, + emission_inventory.frequency, vertical_levels, + reference_year=emission_inventory.ref_year, factors=emission_inventory.factor_mask, + regrid_mask=emission_inventory.regrid_mask, p_vertical=emission_inventory.p_vertical, + p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, + p_speciation=emission_inventory.p_speciation)) + elif emission_inventory.frequency == 'hourly': + emission_inventory_list.append( + PointGfasHourlyEmissionInventory( + comm, options, grid, date, emission_inventory.ei, emission_inventory.source_type, + emission_inventory.sector, pollutants, emission_inventory_path, + emission_inventory.frequency, vertical_levels, + reference_year=emission_inventory.ref_year, factors=emission_inventory.factor_mask, + regrid_mask=emission_inventory.regrid_mask, p_vertical=emission_inventory.p_vertical, + p_speciation=emission_inventory.p_speciation)) + else: + raise NotImplementedError("ERROR: {0} frequency are not implemented, use 'daily' or 'hourly.") else: emission_inventory_list.append( - PointSourceEmissionInventory(options, grid, date, emission_inventory.ei, + PointSourceEmissionInventory(comm, options, grid, date, emission_inventory.ei, emission_inventory.source_type, emission_inventory.sector, pollutants, emission_inventory_path, - emission_inventory.frequency, vertical_output_profile, + emission_inventory.frequency, vertical_levels, reference_year=emission_inventory.ref_year, factors=emission_inventory.factor_mask, regrid_mask=emission_inventory.regrid_mask, @@ -398,7 +415,8 @@ class EmissionInventory(object): p_week=p_week, p_day=p_day, p_hour=p_hour, - p_speciation=emission_inventory.p_speciation)) + p_speciation=emission_inventory.p_speciation, + countries_shapefile=countries_shapefile)) else: settings.write_log('ERROR: Check the .err file to get more info.') if settings.rank == 0: diff --git a/hermesv3_gr/modules/emision_inventories/gfas_emission_inventory.py b/hermesv3_gr/modules/emision_inventories/gfas_emission_inventory.py index c06261561fa526b69de98473bb325f2aaec0914d..fe2f35d4cb115516f8122e1355b47b3eb08a23b0 100755 --- a/hermesv3_gr/modules/emision_inventories/gfas_emission_inventory.py +++ b/hermesv3_gr/modules/emision_inventories/gfas_emission_inventory.py @@ -68,20 +68,21 @@ class GfasEmissionInventory(EmissionInventory): :type p_speciation: str """ - def __init__(self, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, + def __init__(self, comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, vertical_output_profile, - reference_year=2010, factors=None, regrid_mask=None, p_vertical=None, p_month=None, p_week=None, - p_day=None, p_hour=None, p_speciation=None): + reference_year=2010, coverage='global', factors=None, regrid_mask=None, p_vertical=None, p_month=None, + p_week=None, p_day=None, p_hour=None, p_speciation=None): from hermesv3_gr.modules.vertical.vertical_gfas import GfasVerticalDistribution st_time = timeit.default_timer() settings.write_log('\t\tCreating GFAS emission inventory.', level=3) super(GfasEmissionInventory, self).__init__( - options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, + comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, vertical_output_profile, - reference_year=reference_year, factors=factors, regrid_mask=regrid_mask, p_vertical=None, - p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, p_speciation=p_speciation) + reference_year=reference_year, coverage=coverage, factors=factors, regrid_mask=regrid_mask, + p_vertical=None, p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, p_speciation=p_speciation, + countries_shapefile=countries_shapefile) if not options.first_time: self.approach = self.get_approach(p_vertical) self.method = self.get_method(p_vertical) diff --git a/hermesv3_gr/modules/emision_inventories/point_gfas_emission_inventory.py b/hermesv3_gr/modules/emision_inventories/point_gfas_emission_inventory.py index 2cc879f895192dbe96b663798bca363ea4446fbb..820390e03801ef9c950d1f7d30fff4632e95c963 100755 --- a/hermesv3_gr/modules/emision_inventories/point_gfas_emission_inventory.py +++ b/hermesv3_gr/modules/emision_inventories/point_gfas_emission_inventory.py @@ -70,19 +70,20 @@ class PointGfasEmissionInventory(EmissionInventory): :type p_speciation: str """ - def __init__(self, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, + def __init__(self, comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, vertical_output_profile, reference_year=2010, factors=None, regrid_mask=None, p_vertical=None, p_month=None, p_week=None, - p_day=None, p_hour=None, p_speciation=None): + p_day=None, p_hour=None, p_speciation=None, countries_shapefile=None): from hermesv3_gr.modules.vertical.vertical_gfas import GfasVerticalDistribution st_time = timeit.default_timer() settings.write_log('\t\tCreating GFAS emission inventory as point source.', level=3) super(PointGfasEmissionInventory, self).__init__( - options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, + comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, vertical_output_profile, reference_year=reference_year, factors=factors, regrid_mask=regrid_mask, p_vertical=None, - p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, p_speciation=p_speciation) + p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, p_speciation=p_speciation, + countries_shapefile=countries_shapefile) # self.approach = self.get_approach(p_vertical) self.method = self.get_method(p_vertical) @@ -203,26 +204,26 @@ class PointGfasEmissionInventory(EmissionInventory): return return_value - def do_vertical_allocation(self, values): - """ - Allocates the fire emissions on their top level. - - :param values: 2D array with the fire emissions - :type values: numpy.array - - :return: Emissions already allocated on the top altitude of each fire. - :rtype: numpy.array - """ - print('do_vertical_allocation') - sys.exit() - st_time = timeit.default_timer() - - return_value = self.vertical.do_vertical_interpolation_allocation(values, self.altitude) - - settings.write_time('PointGfasEmissionInventory', 'do_vertical_allocation', timeit.default_timer() - st_time, - level=3) - - return return_value + # def do_vertical_allocation(self, values): + # """ + # Allocates the fire emissions on their top level. + # + # :param values: 2D array with the fire emissions + # :type values: numpy.array + # + # :return: Emissions already allocated on the top altitude of each fire. + # :rtype: numpy.array + # """ + # print('do_vertical_allocation') + # sys.exit() + # st_time = timeit.default_timer() + # + # return_value = self.vertical.do_vertical_interpolation_allocation(values, self.altitude) + # + # settings.write_time('PointGfasEmissionInventory', 'do_vertical_allocation', timeit.default_timer() - st_time, + # level=3) + # + # return return_value def do_regrid(self): import pandas as pd @@ -261,7 +262,7 @@ class PointGfasEmissionInventory(EmissionInventory): gdf['geometry'] = [Point(xy) for xy in zip(lons.flatten()[gdf['src_index']], lats.flatten()[gdf['src_index']])] gdf['src_area'] = netcdf.variables['cell_area'][:].flatten()[gdf['src_index']] - grid_shp = self.grid.to_shapefile(full_grid=False) + grid_shp = self.grid.to_shapefile(full_grid=False).reset_index() temp_coords = Dataset(os.path.join(self.grid.temporal_path, 'temporal_coords.nc'), mode='r') @@ -294,71 +295,71 @@ class PointGfasEmissionInventory(EmissionInventory): return True - def do_regrid_balanced_NOT_USED(self): - import pandas as pd - import geopandas as gpd - from shapely.geometry import Point - import numpy as np - from netCDF4 import Dataset - - st_time = timeit.default_timer() - settings.write_log("\tAllocating GFAS as point sources on grid:", level=2) - - netcdf = Dataset(self.pollutant_dicts[0]['path'], mode='r') - if settings.rank == 0: - gdf = gpd.GeoDataFrame(crs={'init': 'epsg:4326'}) - - first_var = netcdf.variables[self.input_pollutants[0]][:] - - gdf['src_index'] = np.where(first_var.flatten() > 0)[0] - - gdf['altitude'] = self.vertical.altitude.flatten()[gdf['src_index']] - - lat_1d = netcdf.variables['lat'][:] - lon_1d = netcdf.variables['lon'][:] - lon_1d[lon_1d > 180] -= 360 - # 1D to 2D - lats = np.array([lat_1d] * len(lon_1d)).T - lons = np.array([lon_1d] * len(lat_1d)) - - gdf['geometry'] = [Point(xy) for xy in zip(lons.flatten()[gdf['src_index']], - lats.flatten()[gdf['src_index']])] - gdf['src_area'] = netcdf.variables['cell_area'][:].flatten()[gdf['src_index']] - grid_shp = self.grid.to_shapefile() - - temp_coords = Dataset(os.path.join(self.grid.temporal_path, 'temporal_coords.nc'), mode='r') - cell_area = temp_coords.variables['cell_area'][:].flatten() - grid_shp['dst_area'] = cell_area[grid_shp['FID']] - # grid_shp['dst_area'] = grid_shp.to_crs({'init': 'epsg:3857'}).area - # print grid_shp.crs['units'] - # sys.exit() - - gdf = gpd.sjoin(gdf.to_crs(grid_shp.crs), grid_shp, how='inner') - print(gdf) - gdf = np.array_split(gdf, settings.size) - else: - gdf = None - - gdf = settings.comm.scatter(gdf, root=0) - - for num, pollutant in enumerate(self.pollutant_dicts): - settings.write_log('\t\tPollutant {0} ({1}/{2})'.format( - pollutant['name'], num + 1, len(self.pollutant_dicts)), level=3) - print(('\t\tPollutant {0} ({1}/{2})'.format(pollutant['name'], num + 1, len(self.pollutant_dicts)))) - aux = netcdf.variables[pollutant['name']][:].flatten()[gdf['src_index']] - - gdf[pollutant['name']] = (aux / gdf['dst_area'].values) * netcdf.variables['cell_area'][:].flatten()[ - gdf['src_index']] - # print netcdf.variables['bc'][:].sum() - - netcdf.close() - - settings.write_time('PointGfasEmissionInventory', 'do_regrid', timeit.default_timer() - st_time, level=2) - print('regrid done') - del gdf['src_index'], gdf['index_right'] - self.emissions = gdf - - return True + # def do_regrid_balanced_NOT_USED(self): + # import pandas as pd + # import geopandas as gpd + # from shapely.geometry import Point + # import numpy as np + # from netCDF4 import Dataset + # + # st_time = timeit.default_timer() + # settings.write_log("\tAllocating GFAS as point sources on grid:", level=2) + # + # netcdf = Dataset(self.pollutant_dicts[0]['path'], mode='r') + # if settings.rank == 0: + # gdf = gpd.GeoDataFrame(crs={'init': 'epsg:4326'}) + # + # first_var = netcdf.variables[self.input_pollutants[0]][:] + # + # gdf['src_index'] = np.where(first_var.flatten() > 0)[0] + # + # gdf['altitude'] = self.vertical.altitude.flatten()[gdf['src_index']] + # + # lat_1d = netcdf.variables['lat'][:] + # lon_1d = netcdf.variables['lon'][:] + # lon_1d[lon_1d > 180] -= 360 + # # 1D to 2D + # lats = np.array([lat_1d] * len(lon_1d)).T + # lons = np.array([lon_1d] * len(lat_1d)) + # + # gdf['geometry'] = [Point(xy) for xy in zip(lons.flatten()[gdf['src_index']], + # lats.flatten()[gdf['src_index']])] + # gdf['src_area'] = netcdf.variables['cell_area'][:].flatten()[gdf['src_index']] + # grid_shp = self.grid.to_shapefile() + # + # temp_coords = Dataset(os.path.join(self.grid.temporal_path, 'temporal_coords.nc'), mode='r') + # cell_area = temp_coords.variables['cell_area'][:].flatten() + # grid_shp['dst_area'] = cell_area[grid_shp['FID']] + # # grid_shp['dst_area'] = grid_shp.to_crs({'init': 'epsg:3857'}).area + # # print grid_shp.crs['units'] + # # sys.exit() + # + # gdf = gpd.sjoin(gdf.to_crs(grid_shp.crs), grid_shp, how='inner') + # print(gdf) + # gdf = np.array_split(gdf, settings.size) + # else: + # gdf = None + # + # gdf = settings.comm.scatter(gdf, root=0) + # + # for num, pollutant in enumerate(self.pollutant_dicts): + # settings.write_log('\t\tPollutant {0} ({1}/{2})'.format( + # pollutant['name'], num + 1, len(self.pollutant_dicts)), level=3) + # print(('\t\tPollutant {0} ({1}/{2})'.format(pollutant['name'], num + 1, len(self.pollutant_dicts)))) + # aux = netcdf.variables[pollutant['name']][:].flatten()[gdf['src_index']] + # + # gdf[pollutant['name']] = (aux / gdf['dst_area'].values) * netcdf.variables['cell_area'][:].flatten()[ + # gdf['src_index']] + # # print netcdf.variables['bc'][:].sum() + # + # netcdf.close() + # + # settings.write_time('PointGfasEmissionInventory', 'do_regrid', timeit.default_timer() - st_time, level=2) + # print('regrid done') + # del gdf['src_index'], gdf['index_right'] + # self.emissions = gdf + # + # return True def calculate_altitudes(self, vertical_description_path): """ diff --git a/hermesv3_gr/modules/emision_inventories/point_gfas_hourly_emission_inventory.py b/hermesv3_gr/modules/emision_inventories/point_gfas_hourly_emission_inventory.py new file mode 100755 index 0000000000000000000000000000000000000000..a6b53cf0bd260b20347f119ba127b14a4e6776fe --- /dev/null +++ b/hermesv3_gr/modules/emision_inventories/point_gfas_hourly_emission_inventory.py @@ -0,0 +1,463 @@ +#!/usr/bin/env python + +# Copyright 2018 Earth Sciences Department, BSC-CNS +# +# This file is part of HERMESv3_GR. +# +# HERMESv3_GR is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# HERMESv3_GR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with HERMESv3_GR. If not, see . + +import sys +import os +import timeit +import warnings +from datetime import datetime +import pandas as pd +import hermesv3_gr.config.settings as settings +from .emission_inventory import EmissionInventory +from hermesv3_gr.modules.temporal.temporal import TemporalDistribution +from hermesv3_gr.modules.vertical.vertical_gfas_hourly import GfasHourlyVerticalDistribution +from hermesv3_gr.tools.mpi_tools import * +# import mpi4py +# mpi4py.rc.recv_mprobe = False + +BUFFER_SIZE = 2**25 + + +class PointGfasHourlyEmissionInventory(EmissionInventory): + """ + Class that defines the content and the methodology for the GFAS hourly emission inventories + + :param current_date: Date to simulate. + :type current_date: datetime.datetime + + :param inventory_name: Name of the inventory to use. + :type inventory_name: str + + :param sector: Name of the sector of the inventory to use. + :type sector: str + + :param pollutants: List of the pollutant name to take into account. + :type pollutants: list of str + + :param frequency: Frequency of the inputs. [yearly, monthly, daily] + :type frequency: str + + :param reference_year: year of reference of the information of the dataset. + :type reference_year: int + + :param factors: NOT IMPLEMENTED YET + :type factors: NOT IMPLEMENTED YET + + :param regrid_mask: NOT IMPLEMENTED YET + :type regrid_mask: NOT IMPLEMENTED YET + + :param p_vertical: ID of the vertical profile to use. + :type p_vertical: str + + :param p_speciation: ID of the speciation profile to use. + :type p_speciation: str + """ + + def __init__(self, comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, + frequency, vertical_output_profile, + reference_year=2010, factors=None, regrid_mask=None, p_vertical=None, p_speciation=None): + + st_time = timeit.default_timer() + settings.write_log('\t\tCreating GFAS emission inventory as point source.', level=3) + super(PointGfasHourlyEmissionInventory, self).__init__( + comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, + vertical_output_profile, + reference_year=reference_year, factors=factors, regrid_mask=regrid_mask, p_vertical=None, + p_month=None, p_week=None, p_day=None, p_hour=None, p_speciation=p_speciation) + + self.method = self.get_method(p_vertical) + self.altitude_name = self.get_altitude_name() + + self.vertical = GfasHourlyVerticalDistribution(vertical_output_profile, self.get_approach(p_vertical)) + + self.date_array = TemporalDistribution.caclulate_date_array( + options.start_date, options.output_timestep_type, options.output_timestep_num, options.output_timestep_freq) + + self.grid_shp = self.grid.to_shapefile(full_grid=False) + self.cell_id_by_proc = self.get_cell_ids() + self.coordinates = self.get_coordinates() + self.fid_distribution = self.get_fids() + + self.temporal = None + + settings.write_time('PointGfasHourlyEmissionInventory', 'Init', timeit.default_timer() - st_time, level=3) + + def __str__(self): + string = "PointGfasHourlyEmissionInventory:\n" + string += "\t self.method = {0}\n".format(self.method) + string += "\t self.vertical = {0}\n".format(self.vertical) + + return string + + @ staticmethod + def get_approach(p_vertical): + """ + Extract the given approach value. + + :return: Approach value + :rtype: str + """ + import re + + st_time = timeit.default_timer() + + return_value = None + aux_list = re.split(', |,| , | ,', p_vertical) + for element in aux_list: + aux_value = re.split('=| =|= | = ', element) + if aux_value[0] == 'approach': + return_value = aux_value[1] + + settings.write_time('PointGfasHourlyEmissionInventory', 'get_approach', timeit.default_timer() - st_time, + level=3) + + return return_value + + def get_coordinates(self): + from netCDF4 import Dataset + import geopandas as gpd + import pandas as pd + from shapely import wkt + from hermesv3_gr.tools.netcdf_tools import get_grid_area + + # Getting 2D coordinates + coordinates_path = os.path.join( + self.auxiliary_files_path, 'gfas', 'coordinates_s{0}_n{1}.csv'.format(settings.size, settings.rank)) + + if not os.path.exists(coordinates_path): + if settings.rank == 0: + if not os.path.exists(os.path.dirname(coordinates_path)): + os.makedirs(os.path.dirname(coordinates_path)) + + coordinates_shapefile = os.path.join( + self.auxiliary_files_path, 'gfas', 'coordinates.shp'.format(settings.size, settings.rank)) + if not os.path.exists(coordinates_shapefile): + src_area = get_grid_area(self.get_input_path(date=self.date_array[0])) + netcdf = Dataset(self.get_input_path(date=self.date_array[0]), mode='r') + lats = netcdf.variables['latitude'][:] + lons = netcdf.variables['longitude'][:] + netcdf.close() + + lons[lons > 180] = lons[lons > 180] - 360.0 + + len_lats = len(lats) + len_lons = len(lons) + + lats = np.array([lats] * len_lons).T.flatten() + lons = np.array([lons] * len_lats).flatten() + + coordinates = gpd.GeoDataFrame(lats, columns=['lats'], crs={'init': 'epsg:4326'}) + coordinates['lons'] = lons + coordinates.index.name = 'FID' + + coordinates['geometry'] = \ + 'POINT (' + coordinates['lons'].astype(str) + ' ' + coordinates['lats'].astype(str) + ')' + coordinates.drop(columns=['lats', 'lons'], inplace=True) + coordinates['src_area'] = src_area.flatten() + coordinates['geometry'] = coordinates['geometry'].apply(wkt.loads) + coordinates.reset_index(inplace=True) + coordinates.to_file(coordinates_shapefile) + else: + coordinates = gpd.read_file(coordinates_shapefile) + coordinates = gpd.sjoin(coordinates, + self.grid.to_shapefile(full_grid=True).to_crs(coordinates.crs), + how='inner', op='within') + + coordinates.rename(columns={'FID_left': 'FID'}, inplace=True) + + coordinates = coordinates[['FID', 'src_area', 'Cell_ID']] + for proc in range(settings.size): + if proc > 0: + settings.comm.send(coordinates[coordinates['Cell_ID'].isin(self.cell_id_by_proc[proc])], + dest=proc) + coordinates = coordinates[coordinates['Cell_ID'].isin(self.cell_id_by_proc[0])] + + else: + coordinates = settings.comm.recv(source=0) + + # coordinates = coordinates[['FID', 'Cell_ID']] + temp_coords = Dataset(os.path.join(self.grid.temporal_path, 'temporal_coords.nc'), mode='r') + + cell_area = pd.DataFrame(temp_coords.variables['cell_area'][:].flatten(), columns=['dst_area']) + temp_coords.close() + cell_area['Cell_ID'] = cell_area.index + + coordinates = pd.merge(coordinates, cell_area, on='Cell_ID') + # print(coordinates) + # exit() + coordinates.to_csv(coordinates_path) + else: + coordinates = pd.read_csv(coordinates_path) + coordinates = coordinates[['FID', 'src_area', 'Cell_ID', 'dst_area']] + coordinates.set_index('FID', inplace=True) + + return coordinates + + def get_input_path(self, date=None, pollutant=None, extension='nc'): + """ + Completes the path of the NetCDF that contains the needed information of the given pollutant. + + :param date: Date of the NetCDF. + :type date: datetime + + :param pollutant: Name of the pollutant of the NetCDF. + :type pollutant: str + + :param extension: Extension of the input file. + :type: str + + :return: Full path of the needed NetCDF. + :rtype: str + """ + st_time = timeit.default_timer() + + if date is None: + date = self.date + + # TODO to change path + file_path = os.path.join(self.inputs_path, 'multivar', 'ftp', + '{0}'.format(date.strftime('%Y%m%d')), + 'ga_{0}.{1}'.format(date.strftime('%Y%m%d_%H'), extension)) + + # Checking input file + if not os.path.exists(file_path): + settings.write_log('ERROR: Check the .err file to get more info.') + if settings.rank == 0: + raise IOError('ERROR: File {0} not found.'.format(file_path)) + sys.exit(1) + + settings.write_time('PointGfasHourlyEmissionInventory', 'get_input_path', timeit.default_timer() - st_time, + level=3) + + return file_path + + def get_altitude_name(self): + st_time = timeit.default_timer() + + if self.method == 'sovief': + alt_var = 'apt' + elif self.method == 'prm': + alt_var = 'mami' + else: + alt_var = None + print("ERROR: Only 'sovief' and 'prm' methods are accepted.") + + settings.write_time('PointGfasHourlyEmissionInventory', 'get_altitude_name', timeit.default_timer() - st_time, + level=3) + return alt_var + + @ staticmethod + def get_method(p_vertical): + """ + Extract the given method value. + + :return: Method value + :rtype: str + """ + import re + + st_time = timeit.default_timer() + + return_value = None + aux_list = re.split(', |,| , | ,', p_vertical) + for element in aux_list: + aux_value = re.split('=| =|= | = ', element) + if aux_value[0] == 'method': + return_value = aux_value[1] + + settings.write_time('PointGfasHourlyEmissionInventory', 'get_method', timeit.default_timer() - st_time, level=3) + + return return_value + + def get_cell_ids(self): + cell_id_by_proc = {} + for proc in range(settings.size): + if proc == settings.rank: + aux_fid = self.grid_shp['Cell_ID'].values + else: + aux_fid = None + cell_id_by_proc[proc] = bcast_array(settings.comm, aux_fid, master=proc) + + return cell_id_by_proc + + def get_fids(self): + fid_by_proc = {} + for proc in range(settings.size): + if proc == settings.rank: + aux_fid = list(np.unique(self.coordinates.index.get_level_values('FID').values)) + else: + aux_fid = None + fid_by_proc[proc] = bcast_array(settings.comm, aux_fid, master=proc) + + return fid_by_proc + + def do_regrid(self): + + import numpy as np + from netCDF4 import Dataset + + st_time = timeit.default_timer() + settings.write_log("\tAllocating GFAS as point sources on grid:", level=2) + + # # Masking + # if self.masking.regrid_mask is not None: + # gdf = gdf.loc[gdf['src_index'].isin(np.where(self.masking.regrid_mask.flatten() > 0)[0]), ] + + distribution = None + # st_time = timeit.default_timer() + shapefile_list = [] + + # One NetCDF for time step (hour) + for tstep, date in enumerate(self.date_array): + # print(date, self.get_input_path(date=date)) + shapefile_list_hour = [] + netcdf = Dataset(self.get_input_path(date=date), mode='r') + for pollutant in self.input_pollutants: + if distribution is None: + distribution = get_balanced_distribution( + settings.size, netcdf.variables[pollutant].shape)[settings.rank] + var = netcdf.variables[pollutant][0, distribution['y_min']: distribution['y_max'], :].flatten() + + var_index = np.where(var > 0)[0] + shapefile_list_hour.append( + pd.DataFrame(var[var_index], columns=[pollutant], + index=pd.MultiIndex.from_product([(var_index + distribution['fid_min']).astype(int), + [tstep]], names=['FID', 'tstep']))) + + shapefile = pd.concat(shapefile_list_hour, axis=1, sort=False) + + # shapefile = shapefile[sorted(sum(fid_distribution.values(), []))] + + altitude_var = netcdf.variables[self.altitude_name][:].flatten() + netcdf.close() + + shapefile['altitude'] = altitude_var[shapefile.index.get_level_values('FID')] + + shapefile_list.append(shapefile) + shapefile = pd.concat(shapefile_list, sort=False) + + # Filtering shapefile with the involved cells + shapefile = shapefile[shapefile.index.get_level_values('FID').isin( + sorted(sum(self.fid_distribution.values(), [])))] + + shapefile = balance_dataframe(settings.comm, shapefile) + shapefile.fillna(0.0, inplace=True) + + # print(timeit.default_timer() - st_time) + # shapefile = shapefile.reset_index().set_index(['FID', 'tstep']) + + self.emissions = shapefile + + return True + + def distribute(self, emissions): + emissions_list = [] + # print('distributing') + for proc in range(settings.size): + partial_emis = emissions[emissions['FID'].isin(sorted(np.unique(self.fid_distribution[proc])))].copy() + if settings.rank < proc: + settings.comm.send(partial_emis, dest=proc) + recv_partial_emis = settings.comm.recv(source=proc) + elif settings.rank > proc: + recv_partial_emis = settings.comm.recv(source=proc) + settings.comm.send(partial_emis, dest=proc) + else: + recv_partial_emis = partial_emis + emissions_list.append(recv_partial_emis) + + emissions = pd.concat(emissions_list) + + emissions = pd.merge(emissions, self.coordinates.reset_index(), on='FID') + + for pollutant in self.input_pollutants: + emissions[pollutant] = emissions[pollutant] * (emissions['src_area'] / emissions['dst_area']) + emissions.drop(columns=['FID', 'src_area', 'dst_area'], inplace=True) + + # Replacing Cell_ID by FID to be able to write + emissions = pd.merge(emissions, self.grid_shp[['FID', 'Cell_ID']], on='Cell_ID') + emissions.drop(columns=['Cell_ID'], inplace=True) + + emissions.rename(columns={'Cell_ID': 'FID'}, inplace=True) + emissions = emissions.groupby(['FID', 'tstep', 'layer']).sum() + + return emissions + + def calculate_altitudes(self, vertical_description_path): + """ + Calculate the number layer to allocate the point source. + + :param vertical_description_path: Path to the file that contains the vertical description + :type vertical_description_path: str + + :return: True + :rtype: bool + """ + import pandas as pd + + st_time = timeit.default_timer() + settings.write_log("\t\tCalculating vertical allocation.", level=3) + df = pd.read_csv(vertical_description_path, sep=',') + if self.vertical.approach == 'surface': + self.emissions['altitude'] = 0 + + self.emissions['layer'] = None + for i, line in df.iterrows(): + layer = line['Ilayer'] - 1 + self.emissions.loc[self.emissions['altitude'] <= line['height_magl'], 'layer'] = layer + self.emissions.loc[self.emissions['altitude'] <= line['height_magl'], 'altitude'] = None + + # Fires with higher altitudes than the max layer limit goes to the last layer + if len(self.emissions[~self.emissions['altitude'].isna()]) > 0: + self.emissions.loc[~self.emissions['altitude'].isna(), 'layer'] = layer + warnings.warn('WARNING: One or more fires have an altitude of fire emission injection higher than the top' + + ' layer of the model defined in the {0} file'.format(vertical_description_path)) + + # print(self.emissions.loc[~self.emissions['altitude'].isna()]) + del self.emissions['altitude'] + + self.emissions = self.emissions.groupby(['FID', 'tstep', 'layer']).sum() + self.emissions.reset_index(inplace=True) + + self.emissions = self.vertical.distribute_vertically(self.emissions, self.input_pollutants) + + settings.write_time('PointGfasHourlyEmissionInventory', 'calculate_altitudes', timeit.default_timer() - st_time, + level=2) + return True + + def point_source_by_cell(self): + """ + Sums the different emissions that are allocated in the same cell and layer. + + :return: None + """ + emissions = self.distribute(self.emissions).reset_index() + self.location = emissions.loc[:, ['FID', 'tstep', 'layer']] + + self.emissions = [] + for input_pollutant in self.input_pollutants: + dict_aux = { + 'name': input_pollutant, + 'units': '...', + 'data': emissions.loc[:, input_pollutant].values + } + self.emissions.append(dict_aux) + + +if __name__ == "__main__": + pass diff --git a/hermesv3_gr/modules/emision_inventories/point_source_emission_inventory.py b/hermesv3_gr/modules/emision_inventories/point_source_emission_inventory.py index 5eab7dc7526bf7e03cb94d2bb151f2795fcd383a..b213e5f35baf28e302301623ada8e5336dffbd21 100755 --- a/hermesv3_gr/modules/emision_inventories/point_source_emission_inventory.py +++ b/hermesv3_gr/modules/emision_inventories/point_source_emission_inventory.py @@ -73,18 +73,19 @@ class PointSourceEmissionInventory(EmissionInventory): :type p_speciation: str """ - def __init__(self, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, + def __init__(self, comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, vertical_output_profile, reference_year=2010, factors=None, regrid_mask=None, - p_vertical=None, p_month=None, p_week=None, p_day=None, p_hour=None, p_speciation=None): + p_vertical=None, p_month=None, p_week=None, p_day=None, p_hour=None, p_speciation=None, + countries_shapefile=None): st_time = timeit.default_timer() settings.write_log('\t\tCreating point source emission inventory.', level=3) super(PointSourceEmissionInventory, self).__init__( - options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, + comm, options, grid, current_date, inventory_name, source_type, sector, pollutants, inputs_path, frequency, vertical_output_profile, reference_year=reference_year, factors=factors, regrid_mask=regrid_mask, p_vertical=p_vertical, p_month=p_month, p_week=p_week, p_day=p_day, p_hour=p_hour, - p_speciation=p_speciation) + p_speciation=p_speciation, countries_shapefile=countries_shapefile) self.crs = {'init': 'epsg:4326'} self.location = None diff --git a/hermesv3_gr/modules/grids/grid.py b/hermesv3_gr/modules/grids/grid.py index 79ebcb8d08424c1ff8b621cdc8e085dbc6cc8572..a4784dd934b72e56da7e6cf279cea97477b2b059 100755 --- a/hermesv3_gr/modules/grids/grid.py +++ b/hermesv3_gr/modules/grids/grid.py @@ -26,6 +26,61 @@ import ESMF import hermesv3_gr.config.settings as settings +def select_grid(comm, arguments): + + st_time = timeit.default_timer() + settings.write_log('Selecting grid', level=1) + + # Creating a different object depending on the grid type + if arguments.domain_type == 'global': + from hermesv3_gr.modules.grids.grid_global import GlobalGrid + grid = GlobalGrid(arguments.domain_type, arguments.vertical_description, arguments.output_timestep_num, + arguments.auxiliary_files_path, arguments.inc_lat, arguments.inc_lon, comm=comm) + + elif arguments.domain_type == 'regular': + from hermesv3_gr.modules.grids.grid_latlon import LatLonGrid + grid = LatLonGrid(arguments.domain_type, arguments.vertical_description, arguments.output_timestep_num, + arguments.auxiliary_files_path, arguments.inc_lat, arguments.inc_lon, + arguments.lat_orig, arguments.lon_orig, arguments.n_lat, arguments.n_lon, comm=comm) + + elif arguments.domain_type == 'rotated': + from hermesv3_gr.modules.grids.grid_rotated import RotatedGrid + grid = RotatedGrid(arguments.domain_type, arguments.vertical_description, arguments.output_timestep_num, + arguments.auxiliary_files_path, arguments.centre_lat, arguments.centre_lon, + arguments.west_boundary, arguments.south_boundary, arguments.inc_rlat, arguments.inc_rlon, + comm=comm) + + elif arguments.domain_type == 'rotated_nested': + from hermesv3_gr.modules.grids.grid_rotated_nested import RotatedNestedGrid + grid = RotatedNestedGrid(arguments.domain_type, arguments.vertical_description, arguments.output_timestep_num, + arguments.auxiliary_files_path, arguments.parent_grid_path, arguments.parent_ratio, + arguments.i_parent_start, arguments.j_parent_start, arguments.n_rlat, arguments.n_rlon, + comm=comm) + + elif arguments.domain_type == 'lcc': + from hermesv3_gr.modules.grids.grid_lcc import LccGrid + grid = LccGrid(arguments.domain_type, arguments.vertical_description, arguments.output_timestep_num, + arguments.auxiliary_files_path, arguments.lat_1, arguments.lat_2, arguments.lon_0, + arguments.lat_0, arguments.nx, arguments.ny, arguments.inc_x, arguments.inc_y, arguments.x_0, + arguments.y_0, comm=comm) + + elif arguments.domain_type == 'mercator': + from hermesv3_gr.modules.grids.grid_mercator import MercatorGrid + grid = MercatorGrid(arguments.domain_type, arguments.vertical_description, arguments.output_timestep_num, + arguments.auxiliary_files_path, arguments.lat_ts, arguments.lon_0, arguments.nx, + arguments.ny, arguments.inc_x, arguments.inc_y, arguments.x_0, arguments.y_0, comm=comm) + else: + settings.write_log('ERROR: Check the .err file to get more info.') + if settings.rank == 0: + raise NotImplementedError("The grid type {0} is not implemented.".format(arguments.domain_type) + + " Use 'global', 'regular, 'rotated', 'lcc' or 'mercator.") + sys.exit(1) + + settings.write_time('Grid', 'select_grid', timeit.default_timer() - st_time, level=3) + + return grid + + class Grid(object): """ Grid object that contains the information of the output grid. @@ -61,6 +116,7 @@ class Grid(object): self.coords_netcdf_file = os.path.join(temporal_path, 'temporal_coords.nc') self.temporal_path = temporal_path self.shapefile_path = None + self.border_shapefile_path = None # self.esmf_grid = None self.x_lower_bound = None @@ -110,125 +166,6 @@ class Grid(object): settings.write_time('Grid', 'create_esmf_grid_from_file', timeit.default_timer() - st_time, level=3) return grid - @staticmethod - def select_grid(comm, grid_type, vertical_description_path, timestep_num, temporal_path, inc_lat, inc_lon, lat_orig, - lon_orig, n_lat, n_lon, centre_lat, centre_lon, west_boundary, south_boundary, inc_rlat, inc_rlon, - lat_1, lat_2, lon_0, lat_0, nx, ny, inc_x, inc_y, x_0, y_0, lat_ts): - # TODO describe better the rotated parameters - """ - Create a Grid object depending on the grid type. - - :param grid_type: type of grid to create [global, rotated, lcc, mercator] - :type grid_type: str - - :param vertical_description_path: Path to the file that contains the vertical description. - :type vertical_description_path: str - - :param timestep_num: Number of timesteps. - :type timestep_num: int - - :param temporal_path: Path to the temporal folder. - :type temporal_path: str - - :param inc_lat: [global] Increment between latitude centroids (degrees). - :type inc_lat: float - - :param inc_lon: [global] Increment between longitude centroids (degrees). - :type inc_lon: float - - :param centre_lat: [rotated] - :type centre_lat: float - - :param centre_lon: [rotated] - :type centre_lon: float - - :param west_boundary: [rotated] - :type west_boundary: float - - :param south_boundary: [rotated] - :type south_boundary: float - - :param inc_rlat: [rotated] Increment between rotated latitude centroids (degrees). - :type inc_rlat: float - - :param inc_rlon: [rotated] Increment between rotated longitude centroids (degrees). - :type inc_rlon: float - - :param lat_ts: [mercator] - :type lat_ts: float - - :param lat_1: [lcc] Value of the Lat1 for the LCC grid type. - :type lat_1: float - - :param lat_2: [lcc] Value of the Lat2 for the LCC grid type. - :type lat_2: float - - :param lon_0: [lcc, mercator] Value of the Lon0 for the LCC grid type. - :type lon_0: float - - :param lat_0: [lcc] Value of the Lat0 for the LCC grid type. - :type lat_0: float - - :param nx: [lcc, mercator] Number of cells on the x dimension. - :type nx: int - - :param ny: [lcc, mercator] Number of cells on the y dimension. - :type ny: int - - :param inc_x: [lcc, mercator] Increment between x dimensions cell centroids (metres). - :type inc_x: int - - :param inc_y: [lcc, mercator] Increment between y dimensions cell centroids (metres). - :type inc_y: int - - :param x_0: [lcc, mercator] Value of the X0 for the LCC grid type. - :type x_0: float - - :param y_0: [lcc, mercator] Value of the Y0 for the LCC grid type. - :type y_0: float - - :return: Grid object. It will return a GlobalGrid, RotatedGrid or LccGrid depending on the type. - :rtype: Grid - """ - - st_time = timeit.default_timer() - settings.write_log('Selecting grid', level=1) - - # Creating a different object depending on the grid type - if grid_type == 'global': - from hermesv3_gr.modules.grids.grid_global import GlobalGrid - grid = GlobalGrid(grid_type, vertical_description_path, timestep_num, temporal_path, inc_lat, inc_lon, - comm=comm) - - elif grid_type == 'regular': - from hermesv3_gr.modules.grids.grid_latlon import LatLonGrid - grid = LatLonGrid(grid_type, vertical_description_path, timestep_num, temporal_path, inc_lat, inc_lon, - lat_orig, lon_orig, n_lat, n_lon, comm=comm) - elif grid_type == 'rotated': - from hermesv3_gr.modules.grids.grid_rotated import RotatedGrid - grid = RotatedGrid(grid_type, vertical_description_path, timestep_num, temporal_path, - centre_lat, centre_lon, west_boundary, south_boundary, inc_rlat, inc_rlon, comm=comm) - - elif grid_type == 'lcc': - from hermesv3_gr.modules.grids.grid_lcc import LccGrid - grid = LccGrid(grid_type, vertical_description_path, timestep_num, temporal_path, lat_1, lat_2, lon_0, - lat_0, nx, ny, inc_x, inc_y, x_0, y_0, comm=comm) - - elif grid_type == 'mercator': - from hermesv3_gr.modules.grids.grid_mercator import MercatorGrid - grid = MercatorGrid(grid_type, vertical_description_path, timestep_num, temporal_path, lat_ts, lon_0, - nx, ny, inc_x, inc_y, x_0, y_0, comm=comm) - else: - settings.write_log('ERROR: Check the .err file to get more info.') - if settings.rank == 0: - raise NotImplementedError("The grid type {0} is not implemented.".format(grid_type) - + " Use 'global', 'regular, 'rotated', 'lcc' or 'mercator.") - sys.exit(1) - - settings.write_time('Grid', 'select_grid', timeit.default_timer() - st_time, level=3) - - return grid - @staticmethod def set_vertical_levels(vertical_description_path): """ @@ -492,23 +429,45 @@ class Grid(object): list_points = df.values del df['p1'], df['p2'], df['p3'], df['p4'] + # Calculating Cell ID + index = np.array(range(self.full_shape[2] * self.full_shape[3])) + index = index.reshape((self.full_shape[2], self.full_shape[3])) + index = index[self.x_lower_bound:self.x_upper_bound, self.y_lower_bound:self.y_upper_bound] + df['Cell_ID'] = index.flatten() # List of polygons from the list of points geometry = [Polygon(list(points)) for points in list_points] gdf = gpd.GeoDataFrame(df, crs={'init': 'epsg:4326'}, geometry=geometry) gdf = gdf.to_crs(self.crs) - gdf['FID'] = gdf.index + gdf.index.name = 'FID' - gdf.to_file(self.shapefile_path) + gdf.reset_index().to_file(self.shapefile_path) else: settings.write_log('\t\tGrid shapefile already done. Lets try to read it.', level=3) gdf = gpd.read_file(self.shapefile_path) + gdf.set_index('FID') settings.write_time('Grid', 'to_shapefile', timeit.default_timer() - st_time, level=1) return gdf + def get_border(self): + from geopandas import GeoDataFrame + from hermesv3_gr.tools.mpi_tools import bcast_array + + st_time = timeit.default_timer() + # settings.write_log('\t\tGetting grid shapefile', level=3) + + if settings.rank == 0: + grid = self.to_shapefile(full_grid=True) + border = GeoDataFrame(geometry=[grid.unary_union], crs=grid.crs) + else: + border = None + + border = bcast_array(settings.comm, border) + return border + def chech_coords_file(self): """ Checks if the auxiliary coordinates file is created well. diff --git a/hermesv3_gr/modules/grids/grid_mercator.py b/hermesv3_gr/modules/grids/grid_mercator.py index e956d17f676349bf90e5c4248a44cde76717f11b..171443973b94e58eff015cc34c500028210f2280 100755 --- a/hermesv3_gr/modules/grids/grid_mercator.py +++ b/hermesv3_gr/modules/grids/grid_mercator.py @@ -68,12 +68,12 @@ class MercatorGrid(Grid): """ def __init__(self, grid_type, vertical_description_path, timestep_num, temporal_path, lat_ts, lon_0, - nx, ny, inc_x, inc_y, x_0, y_0, earth_radius=6370000.000): + nx, ny, inc_x, inc_y, x_0, y_0, earth_radius=6370000.000, comm=None): st_time = timeit.default_timer() settings.write_log('\tCreating Mercator grid.', level=2) # Initialises with parent class - super(MercatorGrid, self).__init__(grid_type, vertical_description_path, temporal_path) + super(MercatorGrid, self).__init__(grid_type, vertical_description_path, temporal_path, comm) # Setting parameters self.lat_ts = lat_ts diff --git a/hermesv3_gr/modules/grids/grid_rotated_nested.py b/hermesv3_gr/modules/grids/grid_rotated_nested.py new file mode 100755 index 0000000000000000000000000000000000000000..1ae474f2533082027ab0dfaec4186539f3f8db98 --- /dev/null +++ b/hermesv3_gr/modules/grids/grid_rotated_nested.py @@ -0,0 +1,253 @@ +#!/usr/bin/env python + +# Copyright 2018 Earth Sciences Department, BSC-CNS +# +# This file is part of HERMESv3_GR. +# +# HERMESv3_GR is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# HERMESv3_GR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with HERMESv3_GR. If not, see . + + +import sys +import os +import timeit +import hermesv3_gr.config.settings as settings +from .grid import Grid + + +class RotatedNestedGrid(Grid): + # TODO Rotated options description + """ + :param grid_type: Type of the output grid [global, rotated, lcc, mercator]. + :type grid_type: str + + :param vertical_description_path: Path to the file that contains the vertical description. + :type vertical_description_path: str + + + :param timestep_num: Number of timesteps. + :type timestep_num: int + """ + + def __init__(self, grid_type, vertical_description_path, timestep_num, temporal_path, parent_grid_path, + parent_ratio, i_parent_start, j_parent_start, n_rlat, n_rlon, comm=None): + st_time = timeit.default_timer() + settings.write_log('\tCreating Rotated grid.', level=2) + + # Initialises with parent class + super(RotatedNestedGrid, self).__init__(grid_type, vertical_description_path, temporal_path, comm) + + # Setting parameters + attributes = {'parent_grid_path': parent_grid_path, 'parent_ratio': parent_ratio, + 'i_parent_start': i_parent_start, 'j_parent_start': j_parent_start, + 'n_rlat': n_rlat, 'n_rlon': n_rlon, 'crs': {'init': 'epsg:4326'}} + attributes = self.get_parent_attributes(attributes) + + self.new_pole_longitude_degrees = attributes['parent']['new_pole_longitude_degrees'] + self.new_pole_latitude_degrees = attributes['parent']['new_pole_latitude_degrees'] + self.rlat_1st = attributes['1st_rlat'] + self.rlon_1st = attributes['1st_rlon'] + self.inc_rlat = attributes['inc_rlat'] + self.inc_rlon = attributes['inc_rlon'] + self.n_rlat = attributes['n_rlat'] + self.n_rlon = attributes['n_rlon'] + + # Rotated coordinates + self.rlat = None + self.rlon = None + + # Create coordinates + self.crs = {'init': 'epsg:4326'} + self.create_coords() + + if not os.path.exists(self.coords_netcdf_file): + if settings.rank == 0: + self.write_coords_netcdf() + settings.comm.Barrier() + + self.calculate_bounds() + + self.shape = (timestep_num, len(self.vertical_description), self.x_upper_bound-self.x_lower_bound, + self.y_upper_bound-self.y_lower_bound) + + total_area = self.get_cell_area() + self.full_shape = (timestep_num, len(self.vertical_description), total_area.shape[-2], total_area.shape[-1]) + self.cell_area = total_area[self.x_lower_bound:self.x_upper_bound, self.y_lower_bound:self.y_upper_bound] + + settings.write_time('RotatedNestedGrid', 'Init', timeit.default_timer() - st_time, level=1) + + @staticmethod + def get_parent_attributes(attributes): + from netCDF4 import Dataset + + netcdf = Dataset(attributes['parent_grid_path'], mode='r') + + rlat = netcdf.variables['rlat'][:] + attributes['inc_rlat'] = (rlat[1] - rlat[0]) / attributes['parent_ratio'] + # j_parent_start start the index at 1 so we must - 1 + attributes['1st_rlat'] = rlat[int(attributes['j_parent_start']) - 1] + + rlon = netcdf.variables['rlon'][:] + attributes['inc_rlon'] = (rlon[1] - rlon[0]) / attributes['parent_ratio'] + # i_parent_start start the index at 1 so we must - 1 + attributes['1st_rlon'] = rlon[attributes['i_parent_start'] - 1] + + rotated_pole = netcdf.variables['rotated_pole'] + attributes['parent'] = {'new_pole_longitude_degrees': rotated_pole.grid_north_pole_longitude, + 'new_pole_latitude_degrees': 90 - rotated_pole.grid_north_pole_latitude} + + return attributes + + def create_coords(self): + """ + Create the coordinates for a rotated domain. + """ + from hermesv3_gr.tools.coordinates_tools import create_regular_rotated + import numpy as np + + st_time = timeit.default_timer() + settings.write_log('\t\tCreating rotated coordinates.', level=3) + + # Create rotated coordinates + (self.rlat, self.rlon, br_lats_single, br_lons_single) = create_regular_rotated( + self.rlat_1st, self.rlon_1st, self.inc_rlat, self.inc_rlon, self.n_rlat, self.n_rlon) + if len(self.rlon)//2 < settings.size: + settings.write_log('ERROR: Check the .err file to get more info.') + if settings.rank == 0: + raise AttributeError("ERROR: Maximum number of processors exceeded. " + + "It has to be less or equal than {0}.".format(len(self.rlon)//2)) + sys.exit(1) + # 1D to 2D + c_lats = np.array([self.rlat] * len(self.rlon)).T + c_lons = np.array([self.rlon] * len(self.rlat)) + + # Create rotated boundary coordinates + b_lats = super(RotatedNestedGrid, self).create_bounds(c_lats, self.inc_rlat, number_vertices=4, inverse=True) + b_lons = super(RotatedNestedGrid, self).create_bounds(c_lons, self.inc_rlon, number_vertices=4) + + # Rotated to Lat-Lon + self.boundary_longitudes, self.boundary_latitudes = self.rotated2latlon(b_lons, b_lats) + self.center_longitudes, self.center_latitudes = self.rotated2latlon(c_lons, c_lats) + + settings.write_time('RotatedNestedGrid', 'create_coords', timeit.default_timer() - st_time, level=2) + + def rotated2latlon(self, lon_deg, lat_deg, lon_min=-180): + """ + Calculate the unrotated coordinates using the rotated ones. + + :param lon_deg: Rotated longitude coordinate. + :type lon_deg: numpy.array + + :param lat_deg: Rotated latitude coordinate. + :type lat_deg: numpy.array + + :param lon_min: Minimum value for the longitudes: -180 (-180 to 180) or 0 (0 to 360) + :type lon_min: float + + :return: Unrotated coordinates. Longitudes, Latitudes + :rtype: tuple(numpy.array, numpy.array) + """ + import numpy as np + import math + + st_time = timeit.default_timer() + settings.write_log('\t\t\tTransforming rotated coordinates to latitude, longitude coordinates.', level=3) + + # TODO Document this function + degrees_to_radians = math.pi / 180. + # radians_to_degrees = 180. / math.pi + + # Positive east to negative east + # self.new_pole_longitude_degrees -= 180 + + tph0 = self.new_pole_latitude_degrees * degrees_to_radians + tlm = lon_deg * degrees_to_radians + tph = lat_deg * degrees_to_radians + tlm0d = self.new_pole_longitude_degrees + ctph0 = np.cos(tph0) + stph0 = np.sin(tph0) + + stlm = np.sin(tlm) + ctlm = np.cos(tlm) + stph = np.sin(tph) + ctph = np.cos(tph) + + # Latitude + sph = (ctph0 * stph) + (stph0 * ctph * ctlm) + # if sph > 1.: + # sph = 1. + # if sph < -1.: + # sph = -1. + # print type(sph) + sph[sph > 1.] = 1. + sph[sph < -1.] = -1. + + aph = np.arcsin(sph) + aphd = aph / degrees_to_radians + + # Longitude + anum = ctph * stlm + denom = (ctlm * ctph - stph0 * sph) / ctph0 + relm = np.arctan2(anum, denom) - math.pi + almd = relm / degrees_to_radians + tlm0d + + # if almd < min_lon: + # almd += 360 + # elif almd > max_lon: + # almd -= 360 + almd[almd > (lon_min + 360)] -= 360 + almd[almd < lon_min] += 360 + + settings.write_time('RotatedNestedGrid', 'rotated2latlon', timeit.default_timer() - st_time, level=3) + + return almd, aphd + + def write_coords_netcdf(self): + """ + Writes the temporal file with the coordinates of the output needed to generate the weight matrix. + If it is already well created it will only add the cell_area parameter. + """ + from hermesv3_gr.modules.writing.writer import Writer + + st_time = timeit.default_timer() + settings.write_log('\tWriting {0} file.'.format(self.coords_netcdf_file), level=3) + + if not self.chech_coords_file(): + # Writes an auxiliary empty NetCDF only with the coordinates and an empty variable. + Writer.write_netcdf(self.coords_netcdf_file, self.center_latitudes, self.center_longitudes, + [{'name': 'var_aux', 'units': '', 'data': 0}], + boundary_latitudes=self.boundary_latitudes, + boundary_longitudes=self.boundary_longitudes, + roated=True, rotated_lats=self.rlat, rotated_lons=self.rlon, + north_pole_lat=self.new_pole_latitude_degrees, + north_pole_lon=self.new_pole_longitude_degrees) + + # Calculate the cell area of the auxiliary NetCDF file + self.cell_area = self.get_cell_area() + + # Re-writes the NetCDF adding the cell area + Writer.write_netcdf(self.coords_netcdf_file, self.center_latitudes, self.center_longitudes, + [{'name': 'var_aux', 'units': '', 'data': 0}], + boundary_latitudes=self.boundary_latitudes, + boundary_longitudes=self.boundary_longitudes, cell_area=self.cell_area, + roated=True, rotated_lats=self.rlat, rotated_lons=self.rlon, + north_pole_lat=self.new_pole_latitude_degrees, + north_pole_lon=self.new_pole_longitude_degrees) + else: + self.cell_area = self.get_cell_area() + + settings.write_time('RotatedNestedGrid', 'write_coords_netcdf', timeit.default_timer() - st_time, level=3) + + +if __name__ == '__main__': + pass diff --git a/hermesv3_gr/modules/masking/masking.py b/hermesv3_gr/modules/masking/masking.py index 90670cae1cc825744927c0805bc3b6417b5d3acb..4983a1e1d60f85e06a559672eff9a7a88b5ab0dc 100755 --- a/hermesv3_gr/modules/masking/masking.py +++ b/hermesv3_gr/modules/masking/masking.py @@ -44,12 +44,14 @@ class Masking(object): :type world_mask_file: str """ - def __init__(self, world_info, factors_mask_values, regrid_mask_values, grid, world_mask_file=None): + def __init__(self, world_info, factors_mask_values, regrid_mask_values, grid, world_mask_file=None, + countries_shapefile=None): from timezonefinder import TimezoneFinder st_time = timeit.default_timer() settings.write_log('\t\tCreating mask.', level=2) + self.countries_shapefile = countries_shapefile self.adding = None self.world_info = world_info self.country_codes = self.get_country_codes() @@ -85,46 +87,41 @@ class Masking(object): settings.write_time('Masking', 'get_country_codes', timeit.default_timer() - st_time, level=3) return countries_dict - def create_country_iso(self, in_nc): + def create_country_iso(self, comm, netcdf_path): import numpy as np - from hermesv3_gr.tools.netcdf_tools import extract_vars + from hermesv3_gr.tools.netcdf_tools import netcdf2shp, extract_vars, gather_shapefile from hermesv3_gr.modules.writing.writer import Writer + import geopandas as gpd st_time = timeit.default_timer() settings.write_log('\t\t\tCreating {0} file.'.format(self.world_mask_file), level=2) # output_path = os.path.join(output_dir, 'iso.nc') + shapefile = netcdf2shp(comm, netcdf_path) - lat_o, lon_o = extract_vars(in_nc, ['lat', 'lon']) - lon = np.array([lon_o['data']] * len(lat_o['data'])) - lat = np.array([lat_o['data']] * len(lon_o['data'])).T - - dst_var = [] - num = 0 - aux_list = list(zip(lat.flatten(), lon.flatten())) - points = np.array(aux_list[:]) - - points_list = np.array_split(points, settings.size) - - for lat_aux, lon_aux in points_list[settings.rank]: - num += 1 - - settings.write_log("\t\t\t\tlat:{0}, lon:{1} ({2}/{3})".format( - lat_aux, lon_aux, num, len(points_list[settings.rank])), level=3) + if comm.Get_rank() == 0: + countries = gpd.read_file(self.countries_shapefile) + countries = countries.to_crs(shapefile.crs) + else: + countries = None + countries = comm.bcast(countries, root=0) - tz = self.find_timezone(lat_aux, lon_aux) - tz_id = self.get_iso_code_from_tz(tz) - dst_var.append(tz_id) - dst_var = np.array(dst_var) - dst_var = settings.comm.gather(dst_var, root=0) + shapefile = gpd.sjoin(shapefile, countries[['M49', 'geometry']], how='left', op='intersects') + shapefile = shapefile[~shapefile.index.duplicated(keep='first')] + shapefile.fillna(0, inplace=True) + shapefile = gather_shapefile(comm, shapefile) if settings.rank == 0: - dst_var = np.concatenate(dst_var) - dst_var = dst_var.reshape((1,) + lat.shape) + lat_o, lon_o = extract_vars(netcdf_path, ['lat', 'lon']) + lon = np.array([lon_o['data']] * len(lat_o['data'])) + lat = np.array([lat_o['data']] * len(lon_o['data'])).T + + values = shapefile['M49'].astype(int).values data = [{ 'name': 'timezone_id', 'units': '', - 'data': dst_var, + 'data': values.reshape((1, lat.shape[0], lat.shape[1])), }] + Writer.write_netcdf(self.world_mask_file, lat, lon, data, regular_latlon=True) settings.comm.Barrier() @@ -223,15 +220,15 @@ class Masking(object): return code_list - def check_regrid_mask(self, input_file): + def check_regrid_mask(self, comm, input_file): if self.regrid_mask_values is not None: if not os.path.exists(self.world_mask_file): - self.create_country_iso(input_file) + self.create_country_iso(comm, input_file) self.regrid_mask = self.custom_regrid_mask() if self.factors_mask_values is not None: if not os.path.exists(self.world_mask_file): - self.create_country_iso(input_file) + self.create_country_iso(comm, input_file) self.scale_mask = self.custom_scale_mask() def custom_regrid_mask(self): diff --git a/hermesv3_gr/modules/regrid/regrid.py b/hermesv3_gr/modules/regrid/regrid.py index 1302a9d810ea088085bed065bb9b371b98721e4c..a7f0379b27dfe1756048369e61987671c1d4db1c 100755 --- a/hermesv3_gr/modules/regrid/regrid.py +++ b/hermesv3_gr/modules/regrid/regrid.py @@ -25,11 +25,12 @@ import hermesv3_gr.config.settings as settings class Regrid(object): # TODO Documentation - def __init__(self, pollutant_dicts, weight_matrix_file, grid, masking=None): + def __init__(self, pollutant_dicts, weight_matrix_file, grid, src_coverage, masking=None): st_time = timeit.default_timer() settings.write_log('\t\t\tInitializing Regrid.', level=3) self.grid = grid + self.src_coverage = src_coverage self.pollutant_dicts = pollutant_dicts self.weight_matrix_file = weight_matrix_file self.masking = masking diff --git a/hermesv3_gr/modules/regrid/regrid_conservative.py b/hermesv3_gr/modules/regrid/regrid_conservative.py index d75850a5a214516c9fb20eed9096c9924f9aec6a..1108697a69eb6f858cf40e8612751650e8917ae5 100755 --- a/hermesv3_gr/modules/regrid/regrid_conservative.py +++ b/hermesv3_gr/modules/regrid/regrid_conservative.py @@ -28,22 +28,24 @@ from .regrid import Regrid class ConservativeRegrid(Regrid): # TODO Documentation - def __init__(self, pollutant_dicts, weight_matrix_file, grid, masking=None): + def __init__(self, pollutant_dicts, weight_matrix_file, grid, src_coverage, masking=None): st_time = timeit.default_timer() settings.write_log('\t\tInitializing Conservative regrid.', level=2) - super(ConservativeRegrid, self).__init__(pollutant_dicts, weight_matrix_file, grid, masking=masking) + super(ConservativeRegrid, self).__init__( + pollutant_dicts, weight_matrix_file, grid, src_coverage, masking=masking) settings.write_time('ConservativeRegrid', 'Init', timeit.default_timer() - st_time, level=2) - def create_weight_matrix(self): + def create_weight_matrix(self,): """ Calls to ESMF_RegridWeightGen to generate the weight matrix. """ st_time = timeit.default_timer() - src_grid = self.grid.create_esmf_grid_from_file(self.pollutant_dicts[0]['path']) + src_grid = self.grid.create_esmf_grid_from_file(self.pollutant_dicts[0]['path'], + sphere=self.src_coverage == 'global') src_field = ESMF.Field(src_grid, name='my input field') src_field.read(filename=self.pollutant_dicts[0]['path'], variable=self.pollutant_dicts[0]['name'], timeslice=0) @@ -52,7 +54,8 @@ class ConservativeRegrid(Regrid): dst_field = ESMF.Field(dst_grid, name='my outut field') - ESMF.Regrid(src_field, dst_field, filename=self.weight_matrix_file, regrid_method=ESMF.RegridMethod.CONSERVE,) + ESMF.Regrid(src_field, dst_field, filename=self.weight_matrix_file, regrid_method=ESMF.RegridMethod.CONSERVE, + unmapped_action=1) settings.write_time('ConservativeRegrid', 'create_weight_matrix', timeit.default_timer() - st_time, level=1) @@ -109,6 +112,53 @@ class ConservativeRegrid(Regrid): settings.write_time('ConservativeRegrid', 'start_regridding', timeit.default_timer() - st_time, level=3) return dst_field_list + def start_esmpy_regridding(self, gfas=False, vertical=None): + + st_time = timeit.default_timer() + + regrid = None + + src_grid = self.grid.create_esmf_grid_from_file(self.pollutant_dicts[0]['path'], + sphere=self.src_coverage == 'global') + + x_lower = src_grid.lower_bounds[ESMF.StaggerLoc.CENTER][1] + x_upper = src_grid.upper_bounds[ESMF.StaggerLoc.CENTER][1] + y_lower = src_grid.lower_bounds[ESMF.StaggerLoc.CENTER][0] + y_upper = src_grid.upper_bounds[ESMF.StaggerLoc.CENTER][0] + + dst_grid = self.grid.create_esmf_grid_from_file(self.grid.coords_netcdf_file, + sphere=self.grid.grid_type == 'global') + + dst_field_list = [] + num = 1 + for pollutant_single_dict in self.pollutant_dicts: + settings.write_log('\t\tPollutant {0} ({1}/{2})'.format( + pollutant_single_dict['name'], num, len(self.pollutant_dicts)), level=3) + num += 1 + + src_field = ESMF.Field(src_grid, name='my input field') + src_field.read(filename=pollutant_single_dict['path'], variable=pollutant_single_dict['name'], timeslice=0) + + if self.masking.regrid_mask is not None: + src_field.data[:] = self.masking.regrid_mask[0, x_lower:x_upper, y_lower:y_upper].T * src_field.data[:] + if self.masking.scale_mask is not None: + src_field.data[:] = self.masking.scale_mask[0, x_lower:x_upper, y_lower:y_upper].T * src_field.data[:] + + dst_field = ESMF.Field(dst_grid, name=pollutant_single_dict['name']) + if regrid is None: + # os.remove(self.weight_matrix_file) + # regrid = ESMF.Regrid(src_field, dst_field, filename=self.weight_matrix_file, + # regrid_method=ESMF.RegridMethod.CONSERVE, + # extrap_method=ESMF.ExtrapMethod.NEAREST_STOD) + regrid = ESMF.RegridFromFile(src_field, dst_field, self.weight_matrix_file) + dst_field = regrid(src_field, dst_field) + + dst_field_list.append({'data': dst_field.data.T, 'name': pollutant_single_dict['name']}) + + settings.write_time('ConservativeRegrid', 'start_esmpy_regridding', timeit.default_timer() - st_time, level=3) + + return dst_field_list + def read_weight_matrix(self): from netCDF4 import Dataset dict_aux = {} diff --git a/hermesv3_gr/modules/temporal/temporal.py b/hermesv3_gr/modules/temporal/temporal.py index e1630aadbda8a4ada642ade11eb196687b09a944..256246fb3c411d7a51e159dd065cab12da61a813 100755 --- a/hermesv3_gr/modules/temporal/temporal.py +++ b/hermesv3_gr/modules/temporal/temporal.py @@ -122,7 +122,8 @@ class TemporalDistribution(object): settings.write_time('TemporalDistribution', 'Init', timeit.default_timer() - st_time, level=2) - def caclulate_date_array(self, st_date, time_step_type, time_step_num, time_step_freq): + @staticmethod + def caclulate_date_array(st_date, time_step_type, time_step_num, time_step_freq): from datetime import timedelta from calendar import monthrange, isleap diff --git a/hermesv3_gr/modules/vertical/vertical_gfas_hourly.py b/hermesv3_gr/modules/vertical/vertical_gfas_hourly.py new file mode 100755 index 0000000000000000000000000000000000000000..b650de4a83c935774743e65e5bc452971ddf9bbf --- /dev/null +++ b/hermesv3_gr/modules/vertical/vertical_gfas_hourly.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python + +# Copyright 2018 Earth Sciences Department, BSC-CNS +# +# This file is part of HERMESv3_GR. +# +# HERMESv3_GR is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# HERMESv3_GR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with HERMESv3_GR. If not, see . + + +import timeit +import hermesv3_gr.config.settings as settings +from .vertical import VerticalDistribution + + +class GfasHourlyVerticalDistribution(VerticalDistribution): + """ + Class that contains all the needed information to vertically distribute the fire emissions. + + :param vertical_output_profile: Path to the file that contains the vertical description of the desired output. + :type vertical_output_profile: str + + :param approach: Approach to take into account. + :type approach: str + """ + def __init__(self, vertical_output_profile, approach): + st_time = timeit.default_timer() + + self.output_heights = vertical_output_profile + self.approach = approach + + settings.write_time('GfasHourlyVerticalDistribution', 'Init', timeit.default_timer() - st_time, level=3) + + def __str__(self): + + string = "GFAS Hourly Vertical distribution:\n" + + string += "\t self.approach = {0}\n".format(self.approach) + + string += "\t self.output_heights = {0}\n".format(self.output_heights) + + return string + + @staticmethod + def calculate_widths(heights_list): + """ + Calculate the width of each vertical level. + + :param heights_list: List of the top altitude in meters of each level. + :type heights_list: list + + :return: List with the width of each vertical level. + :rtype: list + """ + st_time = timeit.default_timer() + + widths = [] + for i in range(len(heights_list)): + if i == 0: + widths.append(heights_list[i]) + else: + widths.append(heights_list[i] - heights_list[i - 1]) + + settings.write_time('GfasHourlyVerticalDistribution', 'calculate_widths', + timeit.default_timer() - st_time, level=3) + return widths + + def get_weights(self, heights_list): + """ + Calculate the proportion (%) of emission to put on each layer. + + :param heights_list: List with the width of each vertical level. + :type heights_list: list + + :return: List of the weight to apply to each layer. + :rtype: list + """ + st_time = timeit.default_timer() + + weights = [] + width_list = self.calculate_widths(heights_list) + if self.approach == 'uniform': + max_percent = 1. + elif self.approach == '50_top': + max_percent = 0.5 + width_list = width_list[0:-1] + else: + max_percent = 1. + + for width in width_list: + weights.append((width * max_percent) / sum(width_list)) + if self.approach == '50_top': + if len(heights_list) == 1: + weights.append(1.) + else: + weights.append(0.5) + + settings.write_time('GfasHourlyVerticalDistribution', 'get_weights', timeit.default_timer() - st_time, level=3) + return weights + + def apply_approach(self, top_fires): + """ + Scatters the emissions vertically. + + :param top_fires: 4D array (time, level, latitude, longitude) with all the emission on each top layer. + :type top_fires: numpy.array + + :return: 4D array (time, level, latitude, longitude) with all the emission distributed on all the involved + layers. + :rtype: numpy.array + """ + import numpy as np + + st_time = timeit.default_timer() + + fires = np.zeros(top_fires.shape) + for i in range(len(self.output_heights)): + if top_fires[i].sum() != 0: + weight_list = self.get_weights(list(self.output_heights[0: i + 1])) + for i_weight in range(len(weight_list)): + fires[i_weight] += top_fires[i] * weight_list[i_weight] + + settings.write_time('GfasHourlyVerticalDistribution', 'apply_approach', + timeit.default_timer() - st_time, level=3) + return fires + + def do_vertical_interpolation_allocation(self, values, altitude): + """ + Allocates the fire emissions on their top level. + + :param values: 2D array with the fire emissions + :type values: numpy.array + + :param altitude: 2D array with the altitude of the fires. + :type altitude: numpy.array + + :return: Emissions already allocated on the top altitude of each fire. + :rtype: numpy.array + """ + import numpy as np + + st_time = timeit.default_timer() + + fire_list = [] + aux_var = values + for height in self.output_heights: + aux_data = np.zeros(aux_var.shape) + ma = np.ma.masked_less_equal(altitude, height) + aux_data[ma.mask] += aux_var[ma.mask] + aux_var -= aux_data + fire_list.append(aux_data) + fire_list = np.array(fire_list).reshape((len(fire_list), values.shape[1], values.shape[2])) + + settings.write_time('GfasHourlyVerticalDistribution', 'do_vertical_interpolation_allocation', + timeit.default_timer() - st_time, level=3) + return fire_list + + def do_vertical_interpolation(self, values): + """ + Manages all the process to do the vertical distribution. + + :param values: Emissions to be vertically distributed. + :type values: numpy.array + + :return: Emissions already vertically distributed. + :rtype: numpy.array + """ + st_time = timeit.default_timer() + + fire_list = self.apply_approach(values) + + settings.write_time('GfasHourlyVerticalDistribution', 'do_vertical_interpolation', + timeit.default_timer() - st_time, level=3) + return fire_list + + def calculate_weight_layer_dict(self, layer): + weight_layer_dict = {x: None for x in range(layer + 1)} + if self.approach == '50_top': + weight_layer_dict[layer] = 0.5 + to_distribute = 0.5 + layer = layer - 1 + elif self.approach == 'uniform': + to_distribute = 1. + + total_width = self.output_heights[layer] + + previous_height = 0 + for i, height in enumerate(self.output_heights[0:layer + 1]): + partial_width = height - previous_height + weight_layer_dict[i] = to_distribute * partial_width / total_width + + previous_height = height + + return weight_layer_dict + + def distribute_vertically(self, emissions_df, input_pollutant_list): + import pandas as pd + + vert_emissions = [] + for layer, emis in emissions_df.groupby('layer'): + if layer == 0: + vert_emissions.append(emis) + else: + weight_layer_dict = self.calculate_weight_layer_dict(layer) + for layer, weight in weight_layer_dict.items(): + aux_emis = emis.copy() + aux_emis.loc[:, 'layer'] = layer + aux_emis.loc[:, input_pollutant_list] = aux_emis[input_pollutant_list].multiply(weight) + + vert_emissions.append(aux_emis) + if len(vert_emissions) == 0: + vert_emissions = emissions_df + else: + vert_emissions = pd.concat(vert_emissions) + + vert_emissions = vert_emissions.groupby(['FID', 'tstep', 'layer']).sum() + vert_emissions.reset_index(inplace=True) + return vert_emissions + + +if __name__ == '__main__': + pass diff --git a/hermesv3_gr/modules/writing/writer.py b/hermesv3_gr/modules/writing/writer.py index 9fb1d1a968225a1497f02d8246a851faebbd7ec1..69f3f314712562d8a717e626e6b1f1f0beca2889 100755 --- a/hermesv3_gr/modules/writing/writer.py +++ b/hermesv3_gr/modules/writing/writer.py @@ -58,11 +58,21 @@ class Writer(object): :type parallel. bool """ - def __init__(self, path, grid, levels, date, hours, global_attributes_path, compress=True, parallel=False): + def __init__(self, path, grid, levels, date, hours, global_attributes_path, compression_level, parallel=False): self.path = path self.grid = grid - self.compress = compress + + if compression_level > 0: + if parallel: + settings.write_log("WARNING: Parallel write doesn't allow compression. Setting it to no compression") + self.compress = False + else: + self.compress = True + self.compression_level = compression_level + else: + self.compress = False + self.parallel = parallel self.variables_attributes = None @@ -225,9 +235,15 @@ class Writer(object): else: aux_data = emission['data'] elif ei.source_type == 'point': - aux_data = np.zeros((shape[1], shape[2] * shape[3])) - aux_data[ei.location['layer'], ei.location['FID']] = emission['data'] - aux_data = aux_data.reshape((shape[1], shape[2], shape[3])) + if 'tstep' in ei.location.columns: + aux_data = np.zeros((shape[0], shape[1], shape[2] * shape[3])) + aux_data[ei.location['tstep'], ei.location['layer'], + ei.location['FID']] = emission['data'] + aux_data = aux_data.reshape(shape) + else: + aux_data = np.zeros((shape[1], shape[2] * shape[3])) + aux_data[ei.location['layer'], ei.location['FID']] = emission['data'] + aux_data = aux_data.reshape((shape[1], shape[2], shape[3])) else: aux_data = None @@ -241,7 +257,10 @@ class Writer(object): if ei.temporal_factors is not None: data += aux_data[np.newaxis, :, :, :] * ei.temporal_factors[:, np.newaxis, :, :] else: - data += aux_data[np.newaxis, :, :, :] + if len(aux_data.shape) == 4: + data += aux_data + else: + data += aux_data[np.newaxis, :, :, :] settings.write_time('TemporalDistribution', 'calculate_data_by_var', timeit.default_timer() - temporal_time, level=2) # Unit changes @@ -307,7 +326,7 @@ class Writer(object): return new_list @staticmethod - def get_writer(output_model, path, grid, levels, date, hours, global_attributes_path, compress, parallel): + def get_writer(output_model, path, grid, levels, date, hours, global_attributes_path, compression_level, parallel): """ Choose between the different writers depending on the desired output model. @@ -332,8 +351,8 @@ class Writer(object): :param global_attributes_path: Path to the file that contains the static global attributes. :type global_attributes_path: str - :param compress: Indicates if you want to compress the netCDF variable data. - :type compress: bool + :param compression_level: Indicates if you want to compress the netCDF variable data. + :type compression_level: bool :param parallel: Indicates if you want to write in parallel mode. :type parallel. bool @@ -347,11 +366,11 @@ class Writer(object): settings.write_log('Selecting writing output type for {0}.'.format(output_model)) if output_model.lower() == 'monarch': - return WriterMonarch(path, grid, levels, date, hours, global_attributes_path, compress, parallel) + return WriterMonarch(path, grid, levels, date, hours, global_attributes_path, compression_level, parallel) elif output_model.lower() == 'cmaq': - return WriterCmaq(path, grid, levels, date, hours, global_attributes_path, compress, parallel) + return WriterCmaq(path, grid, levels, date, hours, global_attributes_path, compression_level, parallel) elif output_model.lower() == 'wrf_chem': - return WriterWrfChem(path, grid, levels, date, hours, global_attributes_path, compress, parallel) + return WriterWrfChem(path, grid, levels, date, hours, global_attributes_path, compression_level, parallel) else: settings.write_log('ERROR: Check the .err file to get more info.') if settings.rank == 0: @@ -454,14 +473,14 @@ class Writer(object): # ===== Variables ===== # Time if date is None: - time = netcdf.createVariable('time', 'd', ('time',), zlib=True) + time = netcdf.createVariable('time', 'd', ('time',), zlib=False) time.units = "months since 2000-01-01 00:00:00" time.standard_name = "time" time.calendar = "gregorian" time.long_name = "time" time[:] = [0.] else: - time = netcdf.createVariable('time', 'd', ('time',), zlib=True) + time = netcdf.createVariable('time', 'd', ('time',), zlib=False) # print u.offset_by_time(encode_time(date.year, date.month, date.day, date.hour, date.minute, date.second)) # Unit('hour since 1970-01-01 00:00:00.0000000 UTC') time.units = str(Unit('hours').offset_by_time( @@ -472,7 +491,7 @@ class Writer(object): time[:] = hours # Latitude - lats = netcdf.createVariable('lat', 'f', lat_dim, zlib=True) + lats = netcdf.createVariable('lat', 'f', lat_dim, zlib=False) lats.units = "degrees_north" lats.axis = "Y" lats.long_name = "latitude coordinate" @@ -481,12 +500,12 @@ class Writer(object): if boundary_latitudes is not None: lats.bounds = "lat_bnds" - lat_bnds = netcdf.createVariable('lat_bnds', 'f', lat_dim + ('nv',), zlib=True) + lat_bnds = netcdf.createVariable('lat_bnds', 'f', lat_dim + ('nv',), zlib=False) # print lat_bnds[:].shape, boundary_latitudes.shape lat_bnds[:] = boundary_latitudes # Longitude - lons = netcdf.createVariable('lon', 'f', lon_dim, zlib=True) + lons = netcdf.createVariable('lon', 'f', lon_dim, zlib=False) lons.units = "degrees_east" lons.axis = "X" @@ -496,32 +515,32 @@ class Writer(object): lons[:] = center_longitudes if boundary_longitudes is not None: lons.bounds = "lon_bnds" - lon_bnds = netcdf.createVariable('lon_bnds', 'f', lon_dim + ('nv',), zlib=True) + lon_bnds = netcdf.createVariable('lon_bnds', 'f', lon_dim + ('nv',), zlib=False) # print lon_bnds[:].shape, boundary_longitudes.shape lon_bnds[:] = boundary_longitudes if roated: # Rotated Latitude - rlat = netcdf.createVariable('rlat', 'f', ('rlat',), zlib=True) + rlat = netcdf.createVariable('rlat', 'f', ('rlat',), zlib=False) rlat.long_name = "latitude in rotated pole grid" rlat.units = Unit("degrees").symbol rlat.standard_name = "grid_latitude" rlat[:] = rotated_lats # Rotated Longitude - rlon = netcdf.createVariable('rlon', 'f', ('rlon',), zlib=True) + rlon = netcdf.createVariable('rlon', 'f', ('rlon',), zlib=False) rlon.long_name = "longitude in rotated pole grid" rlon.units = Unit("degrees").symbol rlon.standard_name = "grid_longitude" rlon[:] = rotated_lons if lcc or mercator: - x_var = netcdf.createVariable('x', 'd', ('x',), zlib=True) + x_var = netcdf.createVariable('x', 'd', ('x',), zlib=False) x_var.units = Unit("km").symbol x_var.long_name = "x coordinate of projection" x_var.standard_name = "projection_x_coordinate" x_var[:] = lcc_x - y_var = netcdf.createVariable('y', 'd', ('y',), zlib=True) + y_var = netcdf.createVariable('y', 'd', ('y',), zlib=False) y_var.units = Unit("km").symbol y_var.long_name = "y coordinate of projection" y_var.standard_name = "projection_y_coordinate" @@ -531,18 +550,18 @@ class Writer(object): # Levels if levels is not None: var_dim = ('lev',) + var_dim - lev = netcdf.createVariable('lev', 'f', ('lev',), zlib=True) + lev = netcdf.createVariable('lev', 'f', ('lev',), zlib=False) lev.units = Unit("m").symbol lev.positive = 'up' lev[:] = levels # All variables if len(data_list) is 0: - var = netcdf.createVariable('aux_var', 'f', ('time',) + var_dim, zlib=True) + var = netcdf.createVariable('aux_var', 'f', ('time',) + var_dim, zlib=False) var[:] = 0 for variable in data_list: # print ('time',) + var_dim - var = netcdf.createVariable(variable['name'], 'f', ('time',) + var_dim, zlib=True) + var = netcdf.createVariable(variable['name'], 'f', ('time',) + var_dim, zlib=False) var.units = Unit(variable['units']).symbol if 'long_name' in variable: var.long_name = str(variable['long_name']) @@ -577,7 +596,7 @@ class Writer(object): # Rotated pole mapping = netcdf.createVariable('rotated_pole', 'c') mapping.grid_mapping_name = 'rotated_latitude_longitude' - mapping.grid_north_pole_latitude = north_pole_lat + mapping.grid_north_pole_latitude = 90 - north_pole_lat mapping.grid_north_pole_longitude = north_pole_lon elif lcc: # CRS diff --git a/hermesv3_gr/modules/writing/writer_cmaq.py b/hermesv3_gr/modules/writing/writer_cmaq.py index 71242c10677390be8f9aae06821640ff920c3e09..f9e46882793ea5331985994330e8bbea2338765a 100755 --- a/hermesv3_gr/modules/writing/writer_cmaq.py +++ b/hermesv3_gr/modules/writing/writer_cmaq.py @@ -49,15 +49,16 @@ class WriterCmaq(Writer): :param global_attributes_path: Path to the file that contains the static global attributes. :type global_attributes_path: str - :param compress: Indicates if you want to compress the netCDF variable data. - :type compress: bool + :param compression_level: Indicates if you want to compress the netCDF variable data. + :type compression_level: bool :param parallel: Indicates if you want to write in parallel mode. :type parallel. bool """ - def __init__(self, path, grid, levels, date, hours, global_attributes_path, compress=True, parallel=False): - super(WriterCmaq, self).__init__(path, grid, levels, date, hours, global_attributes_path, compress, parallel) + def __init__(self, path, grid, levels, date, hours, global_attributes_path, compression_level=True, parallel=False): + super(WriterCmaq, self).__init__(path, grid, levels, date, hours, global_attributes_path, compression_level, + parallel) self.global_attributes_order = [ 'IOAPI_VERSION', 'EXEC_ID', 'FTYPE', 'CDATE', 'CTIME', 'WDATE', 'WTIME', 'SDATE', 'STIME', 'TSTEP', 'NTHIK', @@ -434,7 +435,12 @@ class WriterCmaq(Writer): # data_list, var_list = self.change_variable_attributes(self.variables_attributes) for var_name in self.variables_attributes.keys(): index += 1 - var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',), zlib=self.compress) + if self.compress: + var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',), zlib=self.compress, + complevel=self.compression_level) + else: + var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',)) + var.setncatts(self.variables_attributes[var_name]) settings.write_log("\t\t\t'{0}' variable created with size: {1}".format(var_name, var[:].shape) + "\n\t\t\t\t'{0}' variable will be filled later.".format(var_name), level=3) @@ -567,8 +573,12 @@ class WriterCmaq(Writer): data = 0 st_time = timeit.default_timer() index += 1 + if self.compress: + var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',), zlib=True, + complevel=self.compression_level) + else: + var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',)) - var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',), zlib=self.compress) var.setncatts(self.variables_attributes[var_name]) # var.units = variable['units'] # var.long_name = str(variable['long_name']) diff --git a/hermesv3_gr/modules/writing/writer_monarch.py b/hermesv3_gr/modules/writing/writer_monarch.py index 1bd675827d67b5d5ed7c6b63818dd000968bf497..6a087f4da26682fc9ddf889ddf6149991cfa23db 100755 --- a/hermesv3_gr/modules/writing/writer_monarch.py +++ b/hermesv3_gr/modules/writing/writer_monarch.py @@ -49,15 +49,16 @@ class WriterMonarch(Writer): :param global_attributes_path: Path to the file that contains the static global attributes. :type global_attributes_path: str - :param compress: Indicates if you want to compress the netCDF variable data. - :type compress: bool + :param compression_level: Indicates if you want to compress the netCDF variable data. + :type compression_level: bool :param parallel: Indicates if you want to write in parallel mode. :type parallel. bool """ - def __init__(self, path, grid, levels, date, hours, global_attributes_path, compress=True, parallel=False): - super(WriterMonarch, self).__init__(path, grid, levels, date, hours, global_attributes_path, compress, parallel) + def __init__(self, path, grid, levels, date, hours, global_attributes_path, compression_level=True, parallel=False): + super(WriterMonarch, self).__init__(path, grid, levels, date, hours, global_attributes_path, compression_level, + parallel) # self.global_attributes = { # 'nom_attribut': 'value_attribut' @@ -129,7 +130,7 @@ class WriterMonarch(Writer): LambertConformalConic = False if self.grid.grid_type == 'global' or self.grid.grid_type == 'regular': RegularLatLon = True - elif self.grid.grid_type == 'rotated': + elif self.grid.grid_type in ['rotated', 'rotated_nested']: Rotated = True elif self.grid.grid_type == 'lcc': LambertConformalConic = True @@ -430,7 +431,7 @@ class WriterMonarch(Writer): if self.grid.grid_type == 'global' or self.grid.grid_type == 'regular': regular_latlon = True - elif self.grid.grid_type == 'rotated': + elif self.grid.grid_type in ['rotated', 'rotated_nested']: rotated = True elif self.grid.grid_type == 'lcc': lcc = True @@ -693,7 +694,11 @@ class WriterMonarch(Writer): except (UnboundLocalError, TypeError, IndexError): data = 0 index += 1 - var = netcdf.createVariable(var_name, 'f', ('time',) + var_dim, zlib=self.compress) + if self.compress: + var = netcdf.createVariable(var_name, 'f', ('time',) + var_dim, zlib=self.compress, + complevel=self.compression_level) + else: + var = netcdf.createVariable(var_name, 'f', ('time',) + var_dim) var.units = Unit(self.variables_attributes[var_name]['units']).symbol diff --git a/hermesv3_gr/modules/writing/writer_wrf_chem.py b/hermesv3_gr/modules/writing/writer_wrf_chem.py index 5f27d7998d5c8fc4e7491dbcd77c483fdf33ecc2..30df6befc04e310e21dd94505986af6f6af712c7 100755 --- a/hermesv3_gr/modules/writing/writer_wrf_chem.py +++ b/hermesv3_gr/modules/writing/writer_wrf_chem.py @@ -49,15 +49,16 @@ class WriterWrfChem(Writer): :param global_attributes_path: Path to the file that contains the static global attributes. :type global_attributes_path: str - :param compress: Indicates if you want to compress the netCDF variable data. - :type compress: bool + :param compression_level: Indicates if you want to compress the netCDF variable data. + :type compression_level: bool :param parallel: Indicates if you want to write in parallel mode. :type parallel. bool """ - def __init__(self, path, grid, levels, date, hours, global_attributes_path, compress=True, parallel=False): - super(WriterWrfChem, self).__init__(path, grid, levels, date, hours, global_attributes_path, compress, parallel) + def __init__(self, path, grid, levels, date, hours, global_attributes_path, compression_level=True, parallel=False): + super(WriterWrfChem, self).__init__(path, grid, levels, date, hours, global_attributes_path, compression_level, + parallel) self.global_attributes_order = [ 'TITLE', 'START_DATE', 'WEST-EAST_GRID_DIMENSION', 'SOUTH-NORTH_GRID_DIMENSION', @@ -308,11 +309,6 @@ class WriterWrfChem(Writer): return aux_times def create_parallel_netcdf(self): - # TODO Documentation - """ - - :return: - """ st_time = timeit.default_timer() settings.write_log("\tCreating parallel NetCDF file.", level=2) netcdf = Dataset(self.path, mode='w', format="NETCDF4") @@ -342,8 +338,12 @@ class WriterWrfChem(Writer): index = 0 for var_name in self.variables_attributes.keys(): index += 1 - var = netcdf.createVariable(var_name, 'f', ('Time', 'emissions_zdim', 'south_north', 'west_east',), - zlib=self.compress) + if self.compress: + var = netcdf.createVariable(var_name, 'f', ('Time', 'emissions_zdim', 'south_north', 'west_east',), + zlib=self.compress, complevel=self.compression_level) + else: + var = netcdf.createVariable(var_name, 'f', ('Time', 'emissions_zdim', 'south_north', 'west_east',)) + var.setncatts(self.variables_attributes[var_name]) settings.write_log("\t\t\t'{0}' variable created with size: {1}".format(var_name, var[:].shape) + "\n\t\t\t\t'{0}' variable will be filled later.".format(var_name), level=3) diff --git a/hermesv3_gr/tools/mpi_tools.py b/hermesv3_gr/tools/mpi_tools.py new file mode 100644 index 0000000000000000000000000000000000000000..430530266531ddb3f131a5c555f08e151799873b --- /dev/null +++ b/hermesv3_gr/tools/mpi_tools.py @@ -0,0 +1,78 @@ +import numpy as np + + +def scatter_array(comm, data, master=0): + if comm.Get_size() == 1: + data = data + else: + if comm.Get_rank() == master: + data = np.array_split(data, comm.Get_size()) + else: + data = None + data = comm.scatter(data, root=master) + + return data + + +def bcast_array(comm, data, master=0): + if comm.Get_size() == 1: + data = data + else: + data = comm.bcast(data, root=master) + + return data + + +def balance_dataframe(comm, data, master=0): + import pandas as pd + data = comm.gather(data, root=master) + if comm.Get_rank() == master: + data = pd.concat(data) + data = np.array_split(data, comm.Get_size()) + else: + data = None + + data = comm.scatter(data, root=master) + + return data + + +def get_balanced_distribution(processors, shape): + while len(shape) < 4: + shape = (0,) + shape + + fid_dist = {} + total_rows = shape[2] + + procs_rows = total_rows // processors + procs_rows_extended = total_rows-(procs_rows*processors) + + rows_sum = 0 + for proc in range(processors): + if proc < procs_rows_extended: + aux_rows = procs_rows + 1 + else: + aux_rows = procs_rows + + total_rows -= aux_rows + if total_rows < 0: + rows = total_rows + aux_rows + else: + rows = aux_rows + + min_fid = proc * aux_rows * shape[3] + max_fid = (proc + 1) * aux_rows * shape[3] + + fid_dist[proc] = { + 'y_min': rows_sum, + 'y_max': rows_sum + rows, + 'x_min': 0, + 'x_max': shape[3], + 'fid_min': min_fid, + 'fid_max': max_fid, + 'shape': (shape[0], shape[1], rows, shape[3]), + } + + rows_sum += rows + + return fid_dist diff --git a/hermesv3_gr/tools/netcdf_tools.py b/hermesv3_gr/tools/netcdf_tools.py index 9e0fa356af80f61245069cf47bd80f75ec002705..3be6772ea41a5422968314941ef343dfade65f86 100755 --- a/hermesv3_gr/tools/netcdf_tools.py +++ b/hermesv3_gr/tools/netcdf_tools.py @@ -673,5 +673,88 @@ def calculate_displacements(counts): return new_list +def netcdf2shp(comm, netcdf_path): + from netCDF4 import Dataset + import numpy as np + import pandas as pd + import geopandas as gpd + from shapely import wkt + + if comm.Get_rank() == 0: + nc_in = Dataset(netcdf_path, mode='r') + lat_bnds = nc_in.variables['lat_bnds'][:] + lon_bnds = nc_in.variables['lon_bnds'][:] + nc_in.close() + + lat_bnds_0 = np.array([lat_bnds[:, 0]] * lon_bnds.shape[0]).T.flatten() + lat_bnds_1 = np.array([lat_bnds[:, 1]] * lon_bnds.shape[0]).T.flatten() + lon_bnds_0 = np.array([lon_bnds[:, 0]] * lat_bnds.shape[0]).flatten() + lon_bnds_1 = np.array([lon_bnds[:, 1]] * lat_bnds.shape[0]).flatten() + + coordinates = pd.DataFrame(lat_bnds_0, columns=['lat_bnds_0']) + coordinates.index.name = 'FID' + coordinates['lat_bnds_1'] = lat_bnds_1 + coordinates['lon_bnds_0'] = lon_bnds_0 + coordinates['lon_bnds_1'] = lon_bnds_1 + else: + coordinates = None + coordinates = split_shapefile(comm, coordinates) + coordinates['Coordinates'] = \ + 'POLYGON ((' + coordinates['lon_bnds_0'].astype(str) + ' ' + coordinates['lat_bnds_0'].astype(str) + ', ' + \ + coordinates['lon_bnds_0'].astype(str) + ' ' + coordinates['lat_bnds_1'].astype(str) + ', ' + \ + coordinates['lon_bnds_1'].astype(str) + ' ' + coordinates['lat_bnds_1'].astype(str) + ', ' + \ + coordinates['lon_bnds_1'].astype(str) + ' ' + coordinates['lat_bnds_0'].astype(str) + ', ' + \ + coordinates['lon_bnds_0'].astype(str) + ' ' + coordinates['lat_bnds_0'].astype(str) + '))' + + coordinates['Coordinates'] = coordinates['Coordinates'].apply(wkt.loads) + + shapefile = gpd.GeoDataFrame(coordinates, geometry='Coordinates', crs={'init': 'epsg:4326'}) + return shapefile + + +def split_shapefile(comm, data, rank=0): + import numpy as np + + if comm.Get_size() == 1: + data = data + else: + if comm.Get_rank() == rank: + data = np.array_split(data, comm.Get_size()) + else: + data = None + data = comm.scatter(data, root=rank) + + return data + + +def gather_shapefile(comm, data, rank=0): + import pandas as pd + + if comm.Get_size() == 1: + data = data + else: + data = comm.gather(data, root=rank) + if comm.Get_rank() == rank: + data = pd.concat(data) + else: + data = None + return data + + +def write_shapefile_parallel(comm, data, path, rank=0): + import os + import pandas as pd + data = comm.gather(data, root=rank) + if comm.Get_rank() == rank: + if not os.path.exists(os.path.dirname(path)): + os.makedirs(os.path.dirname(path)) + data = pd.concat(data) + data.to_file(path) + + comm.Barrier() + + return True + + if __name__ == '__main__': pass diff --git a/hermesv3_gr/tools/sample_files.py b/hermesv3_gr/tools/sample_files.py index 17c7eac88ce876a1fa9b35511ccc8c7991a71ef0..11a588af76b20a16f343db96d9d668556246395d 100755 --- a/hermesv3_gr/tools/sample_files.py +++ b/hermesv3_gr/tools/sample_files.py @@ -44,6 +44,8 @@ def make_profiles_file_list(): {'profiles': [{ 'speciation': [ os.path.join(main_dir, 'data', 'profiles', 'speciation', 'MolecularWeights.csv'), + os.path.join(main_dir, 'data', 'profiles', 'speciation', + 'Speciation_profile_cb05_aero5_Benchmark.csv'), os.path.join(main_dir, 'data', 'profiles', 'speciation', 'Speciation_profile_cb05_aero5_CMAQ.csv'), os.path.join(main_dir, 'data', 'profiles', 'speciation', 'Speciation_profile_cb05_aero5_MONARCH.csv'), @@ -56,6 +58,7 @@ def make_profiles_file_list(): ]}, {'temporal': [ os.path.join(main_dir, 'data', 'profiles', 'temporal', 'TemporalProfile_Daily.csv'), + os.path.join(main_dir, 'data', 'profiles', 'temporal', 'TemporalProfile_Weekly.csv'), os.path.join(main_dir, 'data', 'profiles', 'temporal', 'TemporalProfile_Hourly.csv'), os.path.join(main_dir, 'data', 'profiles', 'temporal', 'TemporalProfile_Monthly.csv'), os.path.join(main_dir, 'data', 'profiles', 'temporal', 'tz_world_country_iso3166.csv'), diff --git a/preproc/uchile_preproc.py b/preproc/uchile_preproc.py new file mode 100755 index 0000000000000000000000000000000000000000..5ce0ce7a7fc25a45fee36325582fde54dd98be8a --- /dev/null +++ b/preproc/uchile_preproc.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python + +# Copyright 2018 Earth Sciences Department, BSC-CNS +# +# This file is part of HERMESv3_GR. +# +# HERMESv3_GR is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# HERMESv3_GR is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with HERMESv3_GR. If not, see . + + +import os +import timeit +from netCDF4 import Dataset + +# ============== README ====================== +""" +downloading website: ¿¿¿??? +reference: ¿¿¿??? +Besides citing HERMESv3_GR, users must also acknowledge the use of the corresponding emission inventories in their works +""" + +# ============== CONFIGURATION PARAMETERS ====================== +INPUT_PATH = '/esarchive/recon/uchile/cr2_dgf/original_files/emis__v20190928//-.nc' +OUTPUT_PATH = '/esarchive/recon/uchile/cr2_dgf/' +LIST_POLLUTANTS = ['bc', 'ch4', 'co', 'co2', 'nox_no2', 'pm25', 'nmvoc'] +SECTOR_LIST = {'TRA': 'road_transport'} + +YEAR_LIST = [2013, 2014, 2015, 2016, 2017] +# YEAR_LIST = [2015] +# ============================================================== + + +def get_pollutant_dict(sector): + if sector == 'TRA': + pollutant_dict = { + 'bc': {'file': 'BC', 'var': 'BC'}, + 'ch4': {'file': 'CH4', 'var': 'CH4'}, + 'co': {'file': 'CO-', 'var': 'CO'}, + 'co2': {'file': 'CO2', 'var': 'CO2'}, + 'nox_no2': {'file': 'NOx', 'var': 'NOx'}, + 'pm25': {'file': 'PM25', 'var': 'PM25'}, + 'nmvoc': {'file': 'VOC', 'var': 'VOC'}, + } + + return pollutant_dict + + +def do_transformation(): + from hermesv3_gr.tools.netcdf_tools import write_netcdf, get_grid_area + from hermesv3_gr.tools.coordinates_tools import create_bounds + import calendar + import numpy as np + from datetime import datetime + + lats = lons = blats = blons = cell_area = None + + for sector in SECTOR_LIST.keys(): + pollutant_dict = get_pollutant_dict(sector) + for year in YEAR_LIST: + for pollutant in pollutant_dict.keys(): + out_file_name = os.path.join(OUTPUT_PATH, 'yearly_mean', + '{0}_{1}'.format(pollutant, SECTOR_LIST[sector]), + "{0}_{1}.nc".format(pollutant, year)) + file_name = INPUT_PATH.replace('', str(year)).replace('', sector).replace( + '', pollutant_dict[pollutant]['file']) + + netcdf = Dataset(file_name, mode='r') + if lats is None: + lat_nc = netcdf.variables['lat'][:] + lon_nc = netcdf.variables['lon'][:] + lat_inc = round(lat_nc[1] - lat_nc[0], 5) + lon_inc = round(lon_nc[1] - lon_nc[0], 5) + + lats = np.linspace(lat_nc[0], lat_nc[0] + (lat_inc * (len(lat_nc) - 1)), len(lat_nc), + dtype=np.float) + lons = np.linspace(lon_nc[0], lon_nc[0] + (lon_inc * (len(lon_nc) - 1)), len(lon_nc), + dtype=np.float) + del lat_nc, lon_nc + blats = create_bounds(lats) + blons = create_bounds(lons) + cell_area = get_grid_area(file_name) + + var = netcdf.variables[pollutant_dict[pollutant]['var']][:] + + if calendar.isleap(year): + days = 366 + else: + days = 365 + + # from ton/yr to kg/m2.s + var = (var / cell_area) * (1000 / (days * 24 * 60 * 60)) + + data = [{'name': pollutant, 'units': 'kg.m-2.s-1', 'data': var.reshape((1,) + var.shape)}] + + if not os.path.exists(os.path.dirname(out_file_name)): + os.makedirs(os.path.dirname(out_file_name)) + print(out_file_name) + write_netcdf(out_file_name, lats, lons, data, date=datetime(year=year, month=1, day=1), + boundary_latitudes=blats, boundary_longitudes=blons, cell_area=cell_area, + regular_latlon=True) + + +if __name__ == '__main__': + starting_time = timeit.default_timer() + + do_transformation() + + print('Time(s):', timeit.default_timer() - starting_time) diff --git a/setup.py b/setup.py index fab8b0c5e32abe719073e5acdfd5a51cc280945a..1461d7dcfd3252de05e14097a7044292185484d6 100755 --- a/setup.py +++ b/setup.py @@ -80,7 +80,8 @@ setup( ('data', ['data/global_attributes.csv', ]), ('data/profiles', []), ('data/profiles/speciation', [ - 'data/profiles/speciation/MolecularWeights.csv', + 'data/profiles/speciation/MolecularWeights.csv', + 'data/profiles/speciation/Speciation_profile_cb05_aero5_Benchmark.csv', 'data/profiles/speciation/Speciation_profile_cb05_aero5_CMAQ.csv', 'data/profiles/speciation/Speciation_profile_cb05_aero5_MONARCH.csv', 'data/profiles/speciation/Speciation_profile_cb05_aero6_CMAQ.csv', @@ -88,6 +89,7 @@ setup( 'data/profiles/speciation/Speciation_profile_radm2_madesorgam_WRF_CHEM.csv', ]), ('data/profiles/temporal', [ 'data/profiles/temporal/TemporalProfile_Daily.csv', + 'data/profiles/temporal/TemporalProfile_Weekly.csv', 'data/profiles/temporal/TemporalProfile_Hourly.csv', 'data/profiles/temporal/TemporalProfile_Monthly.csv', 'data/profiles/temporal/tz_world_country_iso3166.csv', ]),