From 8799c1ce84297460d7637aff94a188dab7f19463 Mon Sep 17 00:00:00 2001 From: Carles Tena Date: Fri, 30 Aug 2019 14:11:01 +0200 Subject: [PATCH 1/2] drop prints --- hermesv3_bu/tools/checker.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hermesv3_bu/tools/checker.py b/hermesv3_bu/tools/checker.py index 07db83b..bb43017 100644 --- a/hermesv3_bu/tools/checker.py +++ b/hermesv3_bu/tools/checker.py @@ -15,12 +15,10 @@ def check_files(file_path_list, warning=False): for file_path in file_path_list: if not os.path.exists(file_path): files_not_found.append(file_path) - print('CHECKING') if len(files_not_found) > 0: error_message = "*ERROR* (Rank {0}) File/s not found:".format(MPI.COMM_WORLD.Get_rank()) for file_path in files_not_found: error_message += "\n\t{0}".format(file_path) - print('CHECKED') if warning: print(error_message.replace('ERROR', 'WARNING')) warn(error_message.replace('ERROR', 'WARNING')) -- GitLab From 4e62e05ca38437e03d82dbf535baebb13cdafecd Mon Sep 17 00:00:00 2001 From: Carles Tena Date: Tue, 3 Sep 2019 12:00:56 +0200 Subject: [PATCH 2/2] Solved: NMVOC or CH4 have to be in the aviation_source_pollutant_list --- conf/hermes.conf | 10 +++++----- hermesv3_bu/sectors/aviation_sector.py | 12 +++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/conf/hermes.conf b/conf/hermes.conf index e9a1539..c79b872 100755 --- a/conf/hermes.conf +++ b/conf/hermes.conf @@ -3,14 +3,14 @@ log_level = 3 input_dir = /home/Earth/ctena/Models/hermesv3_bu_data data_path = /esarchive/recon output_dir = /scratch/Earth/HERMESv3_BU_OUT -output_name = HERMESv3__tratra.nc +output_name = HERMESv3__aviation.nc emission_summary = 0 start_date = 2016/11/29 00:00:00 # ----- end_date = start_date [DEFAULT] ----- # end_date = 2010/01/01 00:00:00 output_timestep_num = 24 auxiliary_files_path = /scratch/Earth/HERMESv3_BU_aux/test/_ -erase_auxiliary_files = 1 +erase_auxiliary_files = 0 [DOMAIN] @@ -130,12 +130,12 @@ writing_processors = 1 # traffic_processors = 256 # traffic_area_processors = 1 -aviation_processors = 0 +aviation_processors = 1 shipping_port_processors = 0 livestock_processors = 0 crop_operations_processors = 0 crop_fertilizers_processors = 0 -agricultural_machinery_processors = 1 +agricultural_machinery_processors = 0 residential_processors = 0 recreational_boats_processors = 0 point_sources_processors = 0 @@ -172,7 +172,7 @@ layer_thickness_dir = /esarchive/exp/monarch/a1wd/regional/hourly/layer_thicknes [AVIATION SECTOR] # With 'hc' is calculated 'nmvoc' and 'ch4' -aviation_source_pollutants = nox_no2, co, hc, so2, pm10, pm25, co2 +aviation_source_pollutants = nox_no2, co, hc, so2, pm10, pm25, co2, nmvoc # airport_list = # plane_list = airport_shapefile_path = /aviation/Airports.shp diff --git a/hermesv3_bu/sectors/aviation_sector.py b/hermesv3_bu/sectors/aviation_sector.py index a18631b..b5a6101 100755 --- a/hermesv3_bu/sectors/aviation_sector.py +++ b/hermesv3_bu/sectors/aviation_sector.py @@ -135,17 +135,15 @@ class AviationSector(Sector): hourly_profiles_path, speciation_map_path, speciation_profiles_path, molecular_weights_path] + [os.path.join(ef_dir, PHASE_EF_FILE[phase]) for phase in PHASE_TYPE.keys()]) + if 'nmvoc' in source_pollutants or 'ch4' in source_pollutants: + if 'hc' not in source_pollutants: + source_pollutants.append('hc') + super(AviationSector, self).__init__( comm, logger, auxiliary_dir, grid, clip, date_array, source_pollutants, vertical_levels, None, weekly_profiles_path, hourly_profiles_path, speciation_map_path, speciation_profiles_path, molecular_weights_path) - if 'hc' in self.source_pollutants: - for poll in ['nmvoc', 'ch4']: - if poll not in self.source_pollutants: - self.source_pollutants.append(poll) - self.source_pollutants.remove('hc') - # self.ef_dir = ef_dir self.ef_files = self.read_ef_files(ef_dir) @@ -1028,7 +1026,7 @@ class AviationSector(Sector): emissions['nmvoc'] = 0.9 * emissions['hc'] emissions['ch4'] = 0.1 * emissions['hc'] - # Speceiation + # Speciation runway_arrival_emissions_wear = self.speciate(runway_arrival_emissions_wear, 'landing_wear') emissions = self.speciate(emissions, 'default') -- GitLab