diff --git a/conf/hermes.conf b/conf/hermes.conf index c79b872dc0b632bd232b66bf8dce848408cd7f66..0a85af5d194f0a134b92e1997a433a046661a126 100755 --- a/conf/hermes.conf +++ b/conf/hermes.conf @@ -3,7 +3,7 @@ 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__aviation.nc +output_name = HERMESv3__TRATRA_old_1_1.nc emission_summary = 0 start_date = 2016/11/29 00:00:00 # ----- end_date = start_date [DEFAULT] ----- @@ -130,7 +130,7 @@ writing_processors = 1 # traffic_processors = 256 # traffic_area_processors = 1 -aviation_processors = 1 +aviation_processors = 0 shipping_port_processors = 0 livestock_processors = 0 crop_operations_processors = 0 @@ -140,7 +140,7 @@ residential_processors = 0 recreational_boats_processors = 0 point_sources_processors = 0 traffic_processors = 0 -traffic_area_processors = 0 +traffic_area_processors = 1 [SHAPEFILES] diff --git a/hermesv3_bu/io_server/io_netcdf.py b/hermesv3_bu/io_server/io_netcdf.py index a102d83ea3938d9fe0abc8af95cf3f4885beb751..ed44f4a42ef08af429eeadb28a0e2816b5b58269 100755 --- a/hermesv3_bu/io_server/io_netcdf.py +++ b/hermesv3_bu/io_server/io_netcdf.py @@ -122,6 +122,7 @@ class IoNetcdf(IoServer): try: lat_o = nc.variables['latitude'][:] lon_o = nc.variables['longitude'][:] + n_lat = len(lat_o) time = nc.variables['time'] except KeyError as e: error_exit("{0} variable not found in {1} file.".format(str(e), path)) @@ -143,7 +144,7 @@ class IoNetcdf(IoServer): # From 1D to 2D lat = np.array([lat_o[:]] * len(lon_o[:])).T.flatten() lon = np.array([lon_o[:]] * len(lat_o[:])).flatten() - del lat_o, lon_o + # del lat_o, lon_o # Reads the var variable of the xone and the times needed. try: @@ -173,7 +174,7 @@ class IoNetcdf(IoServer): var = var.reshape((var.shape[0], var.shape[1] * var.shape[2])) df = gpd.GeoDataFrame(var.T, geometry=[Point(xy) for xy in zip(lon, lat)]) # df.columns = ['t_{0}'.format(x) for x in df.columns.values[:-1]] + ['geometry'] - df.loc[:, 'REC'] = df.index + df.loc[:, 'REC'] = (((df.index // len(lon_o)) + j_min) * n_lat) + ((df.index % len(lon_o)) + i_min) return df