diff --git a/docs/build/doctrees/changelog.doctree b/docs/build/doctrees/changelog.doctree
index 5c70d842b1b4c6ab163adf8acbc846233edff16a..0ef54b05ad4b1e7af75c5f8bfec6d3c83408eadd 100644
Binary files a/docs/build/doctrees/changelog.doctree and b/docs/build/doctrees/changelog.doctree differ
diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle
index a6dbcc1cf34232bf14f764eb73b15d4abd43571c..362e89409eadc4eaa2cc5b2d51df75e94fb6688d 100644
Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ
diff --git a/docs/build/doctrees/formats.doctree b/docs/build/doctrees/formats.doctree
index 92f908ee82d4fffde2425a066a2207bf45b7c75d..8c2830685c4291700a410c8004ccfc09cc2041e5 100644
Binary files a/docs/build/doctrees/formats.doctree and b/docs/build/doctrees/formats.doctree differ
diff --git a/docs/build/doctrees/methods.doctree b/docs/build/doctrees/methods.doctree
index 2b6ac637d7cad743112d061f2de42c878f340ee2..2c1c03706691638c0a374d208f8471b2e58a769d 100644
Binary files a/docs/build/doctrees/methods.doctree and b/docs/build/doctrees/methods.doctree differ
diff --git a/docs/build/doctrees/projections.doctree b/docs/build/doctrees/projections.doctree
index 57a0dfd9fe272e409c74dec200861761866f202c..a94ee6992adefdf7fdb5bd52889b81b1de944eab 100644
Binary files a/docs/build/doctrees/projections.doctree and b/docs/build/doctrees/projections.doctree differ
diff --git a/docs/build/html/_modules/nes/load_nes.html b/docs/build/html/_modules/nes/load_nes.html
index d51ea5a41ee039178195ac2adf038153483a9214..c7b22e1018d766d9680ef05e001aa9e8f94ea0ff 100644
--- a/docs/build/html/_modules/nes/load_nes.html
+++ b/docs/build/html/_modules/nes/load_nes.html
@@ -138,12 +138,13 @@
if xarray:
dataset = None
else:
- # dataset = Dataset(path, format="NETCDF4", mode='r', parallel=False)
- if comm.Get_size() == 1:
- dataset = Dataset(path, format="NETCDF4", mode='r', parallel=False)
- else:
- dataset = Dataset(path, format="NETCDF4", mode='r', parallel=True, comm=comm, info=MPI.Info())
-
+ dataset = Dataset(path, format="NETCDF4", mode='r', parallel=False)
+ # Parallel is not needed for reading
+ # if comm.Get_size() == 1:
+ # dataset = Dataset(path, format="NETCDF4", mode='r', parallel=False)
+ # else:
+ # dataset = Dataset(path, format="NETCDF4", mode='r', parallel=True, comm=comm, info=MPI.Info())
+
if __is_rotated(dataset):
# Rotated grids
nessy = RotatedNes(comm=comm, dataset=dataset, xarray=xarray, info=info, parallel_method=parallel_method,
diff --git a/docs/build/html/_modules/nes/methods/cell_measures.html b/docs/build/html/_modules/nes/methods/cell_measures.html
index 2cde66b73b89bd08deb12d01d7a8e9d46c228d39..331b5c4b68f6550ec0e4a8234a595db4f23b976b 100644
--- a/docs/build/html/_modules/nes/methods/cell_measures.html
+++ b/docs/build/html/_modules/nes/methods/cell_measures.html
@@ -224,14 +224,14 @@
def mod_huiliers_area(cell_corner_lon, cell_corner_lat):
"""
Calculate the area of each cell according to Huilier's theorem.
- Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/)
+ Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/).
Parameters
----------
cell_corner_lon : np.array
- Longitude boundaries of each cell
+ Longitude boundaries of each cell.
cell_corner_lat : np.array
- Latitude boundaries of each cell
+ Latitude boundaries of each cell.
"""
sum = 0
@@ -269,7 +269,7 @@
def tri_area(point_0, point_1, point_2):
"""
Calculate area between three points that form a triangle.
- Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/)
+ Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/).
Parameters
----------
diff --git a/docs/build/html/_modules/nes/methods/horizontal_interpolation.html b/docs/build/html/_modules/nes/methods/horizontal_interpolation.html
index 7ef793d71fe4893aa3968faeff57bcb1d7341c88..929849c39378dab212b3b828165357d362de967a 100644
--- a/docs/build/html/_modules/nes/methods/horizontal_interpolation.html
+++ b/docs/build/html/_modules/nes/methods/horizontal_interpolation.html
@@ -127,10 +127,11 @@
only_create_wm : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
"""
+
if info and self.master:
print("Creating Weight Matrix")
# Obtain weight matrix
@@ -197,7 +198,7 @@
for time in range(dst_shape[0]):
for lev in range(dst_shape[1]):
src_aux = get_src_data(self.comm, var_info['data'][time, lev], idx, self.parallel_method)
- final_dst.variables[var_name]['data'][time, lev] = np.sum(weights * src_aux, axis=1)
+ final_dst.variables[var_name]['data'][time, lev] = np.nansum(weights * src_aux, axis=1)
if isinstance(dst_grid, nes.PointsNes):
# Removing level axis
@@ -248,6 +249,7 @@
Parameters
----------
comm : MPI.Communicator.
+ MPI communicator.
var_data : np.array
Rank source data.
idx : np.array
@@ -306,15 +308,16 @@
only_create : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
Returns
-------
tuple
Weights and source data index.
"""
+
if wm is not None:
weight_matrix = wm
@@ -406,15 +409,16 @@
only_create : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
Returns
-------
tuple
Weights and source data index.
"""
+
if isinstance(dst_grid, nes.PointsNes) and weight_matrix_path is not None:
if self.master:
warn("To point weight matrix cannot be saved.")
@@ -519,6 +523,7 @@
nes.Nes
Weight matrix.
"""
+
weight_matrix = nes.open_netcdf(path=weight_matrix_path, comm=comm, parallel_method=parallel_method, balanced=True)
weight_matrix.load()
@@ -526,6 +531,9 @@
if 'inverse_dists' in weight_matrix.variables.keys():
weight_matrix.variables['weight'] = weight_matrix.variables['inverse_dists']
+ weight_matrix.variables['weight']['data'][weight_matrix.variables['weight']['data'] <= 0] = np.nan
+ weight_matrix.variables['weight']['data'][weight_matrix.variables['idx']['data'] <= 0] = np.nan
+
return weight_matrix
@@ -545,7 +553,7 @@
n_neighbours : int
Used if kind == NearestNeighbour. Number of nearest neighbours to interpolate. Default: 4.
wm_path : str
- Path where write the weight matrix
+ Path where write the weight matrix.
info: bool
Indicates if you want to print extra info during the methods process.
@@ -642,9 +650,9 @@
dst_nes : nes.Nes
Final projection Nes object.
wm_path : str
- Path where write the weight matrix
+ Path where write the weight matrix.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
info: bool
Indicates if you want to print extra info during the methods process.
@@ -653,6 +661,7 @@
nes.Nes
Weight matrix.
"""
+
if info and self.master:
print("\tCreating area conservative Weight Matrix")
sys.stdout.flush()
@@ -830,15 +839,15 @@
[docs]
def lon_lat_to_cartesian_ecef(lon, lat):
"""
- # convert observational/model geographic longitude/latitude coordinates to cartesian ECEF (Earth Centred,
- # Earth Fixed) coordinates, assuming WGS84 datum and ellipsoid, and that all heights = 0.
- # ECEF coordiantes represent positions (in meters) as X, Y, Z coordinates, approximating the earth surface
- # as an ellipsoid of revolution.
- # This conversion is for the subsequent calculation of euclidean distances of the model gridcell centres
- # from each observational station.
- # Defining the distance between two points on the earth's surface as simply the euclidean distance
- # between the two lat/lon pairs could lead to inaccurate results depending on the distance
- # between two points (i.e. 1 deg. of longitude varies with latitude).
+ Convert observational/model geographic longitude/latitude coordinates to cartesian ECEF (Earth Centred,
+ Earth Fixed) coordinates, assuming WGS84 datum and ellipsoid, and that all heights = 0.
+ ECEF coordiantes represent positions (in meters) as X, Y, Z coordinates, approximating the earth surface
+ as an ellipsoid of revolution.
+ This conversion is for the subsequent calculation of euclidean distances of the model gridcell centres
+ from each observational station.
+ Defining the distance between two points on the earth's surface as simply the euclidean distance
+ between the two lat/lon pairs could lead to inaccurate results depending on the distance
+ between two points (i.e. 1 deg. of longitude varies with latitude).
Parameters
----------
diff --git a/docs/build/html/_modules/nes/methods/spatial_join.html b/docs/build/html/_modules/nes/methods/spatial_join.html
index 60e438320dc19c9616923a6721430ec9c9628ef2..d3cf43a1ab25d5f7d9a89523404ec885b7130b33 100644
--- a/docs/build/html/_modules/nes/methods/spatial_join.html
+++ b/docs/build/html/_modules/nes/methods/spatial_join.html
@@ -91,13 +91,14 @@
[docs]
-
def spatial_join(self, ext_shp, method=None, var_list=None, info=False):
+
def spatial_join(self, ext_shp, method=None, var_list=None, info=False, apply_bbox=True):
"""
Compute overlay intersection of two GeoPandasDataFrames.
Parameters
----------
self : nes.Nes
+
Nes Object.
ext_shp : GeoPandasDataFrame or str
File or path from where the data will be obtained on the intersection.
method : str
@@ -105,7 +106,9 @@
var_list : List or None or str
Variables that will be included in the resulting shapefile.
info : bool
-
Indicates if you want to print the process info or no
+
Indicates if you want to print the process info.
+
apply_bbox : bool
+
Indicates if you want to reduce the shapefile to a bbox.
"""
if self.master and info:
@@ -121,7 +124,8 @@
sys.stdout.flush()
self.create_shapefile()
-
ext_shp = prepare_external_shapefile(self, ext_shp=ext_shp, var_list=var_list, info=info)
+
ext_shp = prepare_external_shapefile(self, ext_shp=ext_shp, var_list=var_list, info=info,
+
apply_bbox=apply_bbox)
if method == 'nearest':
# Nearest centroids to the shapefile polygons
@@ -143,7 +147,7 @@
[docs]
-
def prepare_external_shapefile(self, ext_shp, var_list, info=False):
+
def prepare_external_shapefile(self, ext_shp, var_list, info=False, apply_bbox=True):
"""
Prepare the external shapefile.
@@ -156,26 +160,31 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
ext_shp : GeoDataFrame or str
-
External shapefile or path to it
+
External shapefile or path to it.
var_list : List[str] or None
-
External shapefile variables to be computed
+
External shapefile variables to be computed.
info : bool
-
Indicates if you want to print the information
+
Indicates if you want to print the information.
+
apply_bbox : bool
+
Indicates if you want to reduce the shapefile to a bbox.
Returns
-------
GeoDataFrame
-
External shapefile
+
External shapefile.
"""
-
+
if isinstance(ext_shp, str):
# Reading external shapefile
if self.master and info:
print("\tReading external shapefile")
# ext_shp = gpd.read_file(ext_shp, include_fields=var_list, mask=self.shapefile.geometry)
-
ext_shp = gpd.read_file(ext_shp, include_fields=var_list, bbox=get_bbox(self))
-
+
if apply_bbox:
+
ext_shp = gpd.read_file(ext_shp, include_fields=var_list, bbox=get_bbox(self))
+
else:
+
ext_shp = gpd.read_file(ext_shp, include_fields=var_list)
else:
msg = "WARNING!!! "
msg += "External shapefile already read. If you pass the path to the shapefile instead of the opened shapefile "
@@ -201,13 +210,12 @@
[docs]
def get_bbox(self):
"""
-
Obtain the bounding box of the rank data
-
-
(lon_min, lat_min, lon_max, lat_max)
+
Obtain the bounding box of the rank data (lon_min, lat_min, lon_max, lat_max).
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
@@ -226,15 +234,16 @@
[docs]
def spatial_join_nearest(self, ext_shp, info=False):
"""
-
Perform the spatial join using the nearest method
+
Perform the spatial join using the nearest method.
Parameters
----------
self : nes.Nes
+
Nes Object.
ext_shp : GeoDataFrame
-
External shapefile
+
External shapefile.
info : bool
-
Indicates if you want to print the information
+
Indicates if you want to print the information.
"""
if self.master and info:
@@ -269,15 +278,16 @@
[docs]
def spatial_join_centroid(self, ext_shp, info=False):
"""
-
Perform the spatial join using the centroid method
+
Perform the spatial join using the centroid method.
Parameters
----------
self : nes.Nes
+
Nes Object.
ext_shp : GeoDataFrame
-
External shapefile
+
External shapefile.
info : bool
-
Indicates if you want to print the information
+
Indicates if you want to print the information.
"""
if self.master and info:
@@ -313,15 +323,16 @@
[docs]
def spatial_join_intersection(self, ext_shp, info=False):
"""
-
Perform the spatial join using the intersection method
+
Perform the spatial join using the intersection method.
Parameters
----------
self : nes.Nes
+
Nes Object.
ext_shp : GeoDataFrame
-
External shapefile
+
External shapefile.
info : bool
-
Indicates if you want to print the information
+
Indicates if you want to print the information.
"""
var_list = list(ext_shp.columns)
diff --git a/docs/build/html/_modules/nes/methods/vertical_interpolation.html b/docs/build/html/_modules/nes/methods/vertical_interpolation.html
index 440e05316bee93bde0cb6dc47ec59138c0ed70cf..c2defa792db4dc1d0b6a3c238b7cff8dd121b2eb 100644
--- a/docs/build/html/_modules/nes/methods/vertical_interpolation.html
+++ b/docs/build/html/_modules/nes/methods/vertical_interpolation.html
@@ -121,7 +121,9 @@
Source Nes object.
new_levels : List
List of new vertical levels.
-
new_src_vertical
+
new_src_vertical : nes.Nes, str
+
Nes object with the vertical information as variable or str with the path to the NetCDF file that contains
+
the vertical data.
kind : str
Vertical methods type.
extrapolate : None, tuple, str
@@ -129,8 +131,9 @@
info: None, bool
Indicates if you want to print extra information.
overwrite: bool
-
Indicates if you want to compute the vertical interpolation in the same object or not
+
Indicates if you want to compute the vertical interpolation in the same object or not.
"""
+
if len(self.lev) == 1:
raise RuntimeError("1D data cannot be vertically interpolated.")
if not overwrite:
@@ -218,8 +221,12 @@
else:
kind = kind # 'cubic'
if extrapolate is None:
-
fill_value = (np.float64(self.variables[var_name]['data'][t, 0, j, i]),
-
np.float64(self.variables[var_name]['data'][t, -1, j, i]))
+
if ascendant:
+
fill_value = (np.float64(self.variables[var_name]['data'][t, 0, j, i]),
+
np.float64(self.variables[var_name]['data'][t, -1, j, i]))
+
else:
+
fill_value = (np.float64(self.variables[var_name]['data'][t, -1, j, i]),
+
np.float64(self.variables[var_name]['data'][t, 0, j, i]))
else:
fill_value = extrapolate
@@ -232,7 +239,7 @@
# 4D vertical component
src_levels_aux = src_levels[t, :, j, i]
-
if kind == 'linear':
+
if kind == 'linear' and ascendant:
dst_data[t, :, j, i] = np.array(
np.interp(new_levels,
np.array(src_levels_aux, dtype=np.float64),
@@ -275,7 +282,7 @@
self.free_vars(self.vertical_var_name)
self.vertical_var_name = None
-
+
# Remove original file information
self.__ini_path = None
self.dataset = None
diff --git a/docs/build/html/_modules/nes/nc_projections/default_nes.html b/docs/build/html/_modules/nes/nc_projections/default_nes.html
index 1af4b6fa3cebbf427deb3c13d765e655e5afc266..e09210d4f21cd3a1397b4deb6a174816acc3113e 100644
--- a/docs/build/html/_modules/nes/nc_projections/default_nes.html
+++ b/docs/build/html/_modules/nes/nc_projections/default_nes.html
@@ -109,6 +109,7 @@
Attributes
----------
comm : MPI.Communicator.
+
MPI communicator.
rank : int
MPI rank.
master : bool
@@ -319,8 +320,8 @@
self._time = self.__get_time()
self._time_bnds = self.__get_time_bnds()
self._lev = self._get_coordinate_dimension(['lev', 'level', 'lm', 'plev'])
-
self._lat = self._get_coordinate_dimension(['lat', 'latitude'])
-
self._lon = self._get_coordinate_dimension(['lon', 'longitude'])
+
self._lat = self._get_coordinate_dimension(['lat', 'latitude', 'latitudes'])
+
self._lon = self._get_coordinate_dimension(['lon', 'longitude', 'longitudes'])
self._lat_bnds, self._lon_bnds = self.__get_coordinates_bnds()
# Complete cell measures
@@ -1214,8 +1215,7 @@
Statistic to perform. Accepted values: "max", "mean" and "min".
type_op : str
Type of statistic to perform. Accepted values: "calendar", "alltsteps", and "withoutt0".
-
- "calendar": Calculate the statistic using the time metadata.
-
It will avoid single time step by day calculations
+
- "calendar": Calculate the statistic using the time metadata. It will avoid single time step by day calculations
- "alltsteps": Calculate a single time statistic with all the time steps.
- "withoutt0": Calculate a single time statistic with all the time steps avoiding the first one.
"""
@@ -2636,8 +2636,6 @@
# Create lev, lon and lat dimensions
netcdf.createDimension('lev', len(self.lev['data']))
-
netcdf.createDimension('lon', len(self._lon['data']))
-
netcdf.createDimension('lat', len(self._lat['data']))
# Create string length dimension
if self.strlen is not None:
@@ -3848,7 +3846,9 @@
Source Nes object.
new_levels : List
New vertical levels.
-
new_src_vertical
+
new_src_vertical : nes.Nes, str
+
Nes object with the vertical information as variable or str with the path to the NetCDF file that contains
+
the vertical data.
kind : str
Vertical methods type.
extrapolate : None, tuple, str
@@ -3856,7 +3856,7 @@
info: None, bool
Indicates if you want to print extra information.
overwrite: bool
-
Indicates if you want to compute the vertical interpolation in the same object or not
+
Indicates if you want to compute the vertical interpolation in the same object or not.
"""
return vertical_interpolation.interpolate_vertical(
@@ -3888,9 +3888,9 @@
only_create_wm : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
-
Weight matrix Nes File
+
Weight matrix Nes File.
flux : bool
-
Indicates if you want to calculate the weight matrix for flux variables
+
Indicates if you want to calculate the weight matrix for flux variables.
"""
return horizontal_interpolation.interpolate_horizontal(
@@ -3900,7 +3900,7 @@
[docs]
-
def spatial_join(self, ext_shp, method=None, var_list=None, info=False):
+
def spatial_join(self, ext_shp, method=None, var_list=None, info=False, apply_bbox=True):
"""
Compute overlay intersection of two GeoPandasDataFrames.
@@ -3913,10 +3913,13 @@
var_list : List or None
Variables that will be included in the resulting shapefile.
info : bool
-
Indicates if you want to print the process info or no
+
Indicates if you want to print the process info.
+
apply_bbox : bool
+
Indicates if you want to reduce the shapefile to a bbox.
"""
-
return spatial_join(self, ext_shp=ext_shp, method=method, var_list=var_list, info=info)
+
return spatial_join(self, ext_shp=ext_shp, method=method, var_list=var_list, info=info,
+
apply_bbox=apply_bbox)
@@ -3930,7 +3933,7 @@
self : nes.Nes
Source projection Nes Object.
overwrite : bool
-
Indicates if we want to overwrite the grid area
+
Indicates if we want to overwrite the grid area.
"""
if ('cell_area' not in self.cell_measures.keys()) or (overwrite):
@@ -3988,13 +3991,14 @@
[docs]
def get_fids(self):
"""
-
Obtain the FIDs in a 2D format
+
Obtain the FIDs in a 2D format.
Returns
-------
np.array
-
2D array with the FID data
+
2D array with the FID data.
"""
+
fids = np.arange(self._lat['data'].shape[0] * self._lon['data'].shape[-1])
fids = fids.reshape((self._lat['data'].shape[0], self._lon['data'].shape[-1]))
fids = fids[self.write_axis_limits['y_min']:self.write_axis_limits['y_max'],
diff --git a/docs/build/html/_modules/nes/nc_projections/latlon_nes.html b/docs/build/html/_modules/nes/nc_projections/latlon_nes.html
index 3fc4c79305b7be4204b609968c09ee88b65cbca8..44400aca4b17991e7ceb5d822142cd47358b2d22 100644
--- a/docs/build/html/_modules/nes/nc_projections/latlon_nes.html
+++ b/docs/build/html/_modules/nes/nc_projections/latlon_nes.html
@@ -294,6 +294,9 @@
super(LatLonNes, self)._create_dimensions(netcdf)
+
netcdf.createDimension('lon', len(self._lon['data']))
+
netcdf.createDimension('lat', len(self._lat['data']))
+
# Create spatial_nv (number of vertices) dimension
if (self._lat_bnds is not None) and (self._lon_bnds is not None):
netcdf.createDimension('spatial_nv', 2)
diff --git a/docs/build/html/_modules/nes/nes_formats/cams_ra_format.html b/docs/build/html/_modules/nes/nes_formats/cams_ra_format.html
index 825f9fcd7154918a06b1ba48bdf1a5474f7de577..5b729d6c1903fa56ada968a78b297323ff64f224 100644
--- a/docs/build/html/_modules/nes/nes_formats/cams_ra_format.html
+++ b/docs/build/html/_modules/nes/nes_formats/cams_ra_format.html
@@ -100,7 +100,7 @@
self : nes.Nes
Source projection Nes Object.
path : str
-
Path to the output netCDF file.
+
Path to the output netCDF file.
"""
if not isinstance(self, nes.LatLonNes):
diff --git a/docs/build/html/_modules/nes/nes_formats/cmaq_format.html b/docs/build/html/_modules/nes/nes_formats/cmaq_format.html
index 3d152c311a2f95eb0b98a6ebac57473bbaa20121..e2496410c6c0dc4887f2a5ed3928a299afc68077 100644
--- a/docs/build/html/_modules/nes/nes_formats/cmaq_format.html
+++ b/docs/build/html/_modules/nes/nes_formats/cmaq_format.html
@@ -108,8 +108,9 @@
chunking: bool
Indicates if you want to chunk the output netCDF.
keep_open : bool
-
Indicates if you want to keep open the NetCDH to fill the data by time-step
+
Indicates if you want to keep open the NetCDH to fill the data by time-step.
"""
+
self.to_dtype(np.float32)
set_global_attributes(self)
@@ -157,7 +158,9 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
"""
+
for var_name in self.variables.keys():
if self.variables[var_name]['units'] == 'mol.s-1':
@@ -172,6 +175,7 @@
else:
raise TypeError("The unit '{0}' of specie {1} is not defined correctly. ".format(
self.variables[var_name]['units'], var_name) + "Should be 'mol.s-1' or 'g.s-1'")
+
return None
@@ -185,12 +189,14 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
dict
-
Variable in the MONARCH units
+
Variable in the MONARCH units.
"""
+
self.calculate_grid_area(overwrite=False)
for var_name in self.variables.keys():
if isinstance(self.variables[var_name]['data'], np.ndarray):
@@ -216,17 +222,19 @@
[docs]
def create_tflag(self):
"""
-
Create the content of the CMAQ variable TFLAG
+
Create the content of the CMAQ variable TFLAG.
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
numpy.ndarray
-
Array with the content of TFLAG
+
Array with the content of TFLAG.
"""
+
t_flag = np.empty((len(self.time), len(self.variables), 2))
for i_d, aux_date in enumerate(self.time):
@@ -249,12 +257,14 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
str
List of variable names transformed on string.
"""
+
str_var_list = ""
for var in self.variables.keys():
str_var_list += "{:<16}".format(var)
@@ -267,12 +277,14 @@
[docs]
def set_global_attributes(self):
"""
-
Set the NetCDF global attributes
+
Set the NetCDF global attributes.
Parameters
----------
self : nes.Nes
+
Nes Object.
"""
+
now = datetime.now()
if len(self.time) > 1:
tstep = ((self.time[1] - self.time[0]).seconds // 3600) * 10000
@@ -369,9 +381,11 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
netcdf.createDimension('TSTEP', len(self._time))
netcdf.createDimension('DATE-TIME', 2)
netcdf.createDimension('LAY', len(self._lev['data']))
@@ -393,6 +407,7 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
netcdf : Dataset
NetCDF object.
"""
@@ -415,9 +430,11 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
for var_name, var_info in self.variables.items():
var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',),
zlib=self.zip_lvl > 0, complevel=self.zip_lvl)
diff --git a/docs/build/html/_modules/nes/nes_formats/monarch_format.html b/docs/build/html/_modules/nes/nes_formats/monarch_format.html
index 0a8be6613611dc6c888f78a4ea4c851aed0c95d2..2279df2293357b99fcd6bba0ca788a60c538eb07 100644
--- a/docs/build/html/_modules/nes/nes_formats/monarch_format.html
+++ b/docs/build/html/_modules/nes/nes_formats/monarch_format.html
@@ -101,7 +101,7 @@
chunking: bool
Indicates if you want to chunk the output netCDF.
keep_open : bool
-
Indicates if you want to keep open the NetCDH to fill the data by time-step
+
Indicates if you want to keep open the NetCDH to fill the data by time-step.
"""
self.to_dtype(np.float32)
@@ -166,17 +166,19 @@
[docs]
def to_monarch_units(self):
"""
-
Change the data values according to the MONARCH conventions
+
Change the data values according to the MONARCH conventions.
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
dict
-
Variable in the MONARCH units
+
Variable in the MONARCH units.
"""
+
for var_name in self.variables.keys():
if isinstance(self.variables[var_name]['data'], np.ndarray):
if self.variables[var_name]['units'] == 'mol.s-1.m-2':
diff --git a/docs/build/html/_modules/nes/nes_formats/wrf_chem_format.html b/docs/build/html/_modules/nes/nes_formats/wrf_chem_format.html
index eb4945f639db998e484633445e744b6eeddcc9c3..4398dc73f7e671b23328beca5d4721714e844b3e 100644
--- a/docs/build/html/_modules/nes/nes_formats/wrf_chem_format.html
+++ b/docs/build/html/_modules/nes/nes_formats/wrf_chem_format.html
@@ -116,8 +116,9 @@
chunking: bool
Indicates if you want to chunk the output netCDF.
keep_open : bool
-
Indicates if you want to keep open the NetCDH to fill the data by time-step
+
Indicates if you want to keep open the NetCDH to fill the data by time-step.
"""
+
self.to_dtype(np.float32)
set_global_attributes(self)
@@ -165,7 +166,9 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
"""
+
for var_name in self.variables.keys():
if self.variables[var_name]['units'] == 'mol.h-1.km-2':
self.variables[var_name]['FieldType'] = np.int32(104)
@@ -198,17 +201,19 @@
[docs]
def to_wrf_chem_units(self):
"""
-
Change the data values according to the WRF-CHEM conventions
+
Change the data values according to the WRF-CHEM conventions.
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
dict
-
Variable in the MONARCH units
+
Variable in the MONARCH units.
"""
+
self.calculate_grid_area(overwrite=False)
for var_name in self.variables.keys():
if isinstance(self.variables[var_name]['data'], np.ndarray):
@@ -236,17 +241,19 @@
[docs]
def create_times_var(self):
"""
-
Create the content of the WRF-CHEM variable times
+
Create the content of the WRF-CHEM variable times.
Parameters
----------
self : nes.Nes
+
Nes Object.
Returns
-------
numpy.ndarray
-
Array with the content of TFLAG
+
Array with the content of TFLAG.
"""
+
aux_times = np.chararray((len(self.time), 19), itemsize=1)
for i_d, aux_date in enumerate(self.time):
@@ -265,7 +272,9 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
"""
+
now = datetime.now()
if len(self.time) > 1:
tstep = ((self.time[1] - self.time[0]).seconds // 3600) * 10000
@@ -412,9 +421,11 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
netcdf.createDimension('Time', len(self._time))
netcdf.createDimension('DateStrLen', 19)
netcdf.createDimension('emissions_zdim', len(self._lev['data']))
@@ -435,6 +446,7 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
netcdf : Dataset
NetCDF object.
"""
@@ -455,9 +467,11 @@
Parameters
----------
self : nes.Nes
+
Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
for var_name, var_info in self.variables.items():
var = netcdf.createVariable(var_name, 'f', ('Time', 'emissions_zdim', 'south_north', 'west_east',),
zlib=self.zip_lvl > 0, complevel=self.zip_lvl)
diff --git a/docs/build/html/changelog.html b/docs/build/html/changelog.html
index 584369525afd9f8c0553ffa5308969b50648c8b5..c126d010f4fdbbaee4973692157620505bfd15c0 100644
--- a/docs/build/html/changelog.html
+++ b/docs/build/html/changelog.html
@@ -101,6 +101,10 @@
Documentation
+
Removed negative values on the horizontal interpolation due to unmapped NaNs values.
+
Improved load_nes.py removing redundant code
+
Fix vertical interpolation for descendant level values (Pressure) ([#71](https://earth.bsc.es/gitlab/es/NES/-/issues/71))
+
Removed lat-lon dimension on the NetCDF projections that not need them
diff --git a/docs/build/html/formats.html b/docs/build/html/formats.html
index 5eefd790aef8b0c51198c56269f80cdc8a3f4bee..094db7ace7ca3c0d0e43a37d783f2f66d3b1e2e9 100644
--- a/docs/build/html/formats.html
+++ b/docs/build/html/formats.html
@@ -195,7 +195,10 @@
Modify the emission list to be consistent to use the output as input for CMAQ model.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
@@ -205,11 +208,12 @@
Create the ‘y’ and ‘x’ variables.
Parameters
-self : nes.Nes
-netcdf : Dataset
-
-
+
+- selfnes.Nes
Nes Object.
+
+- netcdfDataset
NetCDF object.
+
+
@@ -219,26 +223,30 @@ netcdf : Dataset
Create ‘time’, ‘time_bnds’, ‘lev’, ‘lon’ and ‘lat’ dimensions.
Parameters
-self : nes.Nes
-netcdf : Dataset
-
-netcdf4-python open dataset.
-
+
+- selfnes.Nes
Nes Object.
+
+- netcdfDataset
netcdf4-python open dataset.
+
+
-
nes.nes_formats.cmaq_format.create_tflag(self)[source]
-Create the content of the CMAQ variable TFLAG
+Create the content of the CMAQ variable TFLAG.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
-- numpy.ndarray
Array with the content of TFLAG
+- numpy.ndarray
Array with the content of TFLAG.
@@ -250,21 +258,25 @@ netcdf : Dataset
Create the netCDF file variables.
Parameters
-self : nes.Nes
-netcdf : Dataset
-
-netcdf4-python open dataset.
-
+
+- selfnes.Nes
Nes Object.
+
+- netcdfDataset
netcdf4-python open dataset.
+
+
-
nes.nes_formats.cmaq_format.set_global_attributes(self)[source]
-Set the NetCDF global attributes
+Set the NetCDF global attributes.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
@@ -274,7 +286,10 @@ netcdf : Dataset
Transform the list of variable names to a string with the elements with 16 white spaces.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
@@ -291,12 +306,15 @@ netcdf : Dataset
Change the data values according to the CMAQ conventions
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
-- dict
Variable in the MONARCH units
+- dict
Variable in the MONARCH units.
@@ -315,7 +333,7 @@ netcdf : Dataset
chunking: boolIndicates if you want to chunk the output netCDF.
-keep_openboolIndicates if you want to keep open the NetCDH to fill the data by time-step
+keep_openboolIndicates if you want to keep open the NetCDH to fill the data by time-step.
@@ -327,15 +345,18 @@ netcdf : Dataset
-
nes.nes_formats.monarch_format.to_monarch_units(self)[source]
-Change the data values according to the MONARCH conventions
+Change the data values according to the MONARCH conventions.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
-- dict
Variable in the MONARCH units
+- dict
Variable in the MONARCH units.
@@ -354,7 +375,7 @@ netcdf : Dataset
- chunking: bool
Indicates if you want to chunk the output netCDF.
-- keep_openbool
Indicates if you want to keep open the NetCDH to fill the data by time-step
+- keep_openbool
Indicates if you want to keep open the NetCDH to fill the data by time-step.
@@ -369,7 +390,10 @@ netcdf : Dataset
Modify the emission list to be consistent to use the output as input for WRF-CHEM model.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
@@ -379,11 +403,12 @@ netcdf : Dataset
Create the ‘y’ and ‘x’ variables.
Parameters
-self : nes.Nes
-netcdf : Dataset
-
-
+
+- selfnes.Nes
Nes Object.
+
+- netcdfDataset
NetCDF object.
+
+
@@ -393,26 +418,30 @@ netcdf : Dataset
Create ‘time’, ‘time_bnds’, ‘lev’, ‘lon’ and ‘lat’ dimensions.
Parameters
-self : nes.Nes
-netcdf : Dataset
-
-netcdf4-python open dataset.
-
+
+- selfnes.Nes
Nes Object.
+
+- netcdfDataset
netcdf4-python open dataset.
+
+
-
nes.nes_formats.wrf_chem_format.create_times_var(self)[source]
-Create the content of the WRF-CHEM variable times
+Create the content of the WRF-CHEM variable times.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
-- numpy.ndarray
Array with the content of TFLAG
+- numpy.ndarray
Array with the content of TFLAG.
@@ -424,11 +453,12 @@ netcdf : Dataset
Create the netCDF file variables.
Parameters
-self : nes.Nes
-netcdf : Dataset
-
-netcdf4-python open dataset.
-
+
+- selfnes.Nes
Nes Object.
+
+- netcdfDataset
netcdf4-python open dataset.
+
+
@@ -438,7 +468,10 @@ netcdf : Dataset
Set the NetCDF global attributes
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
@@ -455,7 +488,7 @@ netcdf : Dataset
chunking: boolIndicates if you want to chunk the output netCDF.
-
keep_openboolIndicates if you want to keep open the NetCDH to fill the data by time-step
+keep_openboolIndicates if you want to keep open the NetCDH to fill the data by time-step.
@@ -464,15 +497,18 @@ netcdf : Dataset
-
nes.nes_formats.wrf_chem_format.to_wrf_chem_units(self)[source]
-Change the data values according to the WRF-CHEM conventions
+Change the data values according to the WRF-CHEM conventions.
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
-- dict
Variable in the MONARCH units
+- dict
Variable in the MONARCH units.
diff --git a/docs/build/html/methods.html b/docs/build/html/methods.html
index df79a9bfe7fdf3c9068281bddb179295d11593f0..7720b5ac47b4a4104e3822fc29ac0ddfff9e3d65 100644
--- a/docs/build/html/methods.html
+++ b/docs/build/html/methods.html
@@ -207,13 +207,13 @@
-
nes.methods.cell_measures.mod_huiliers_area(cell_corner_lon, cell_corner_lat)[source]
Calculate the area of each cell according to Huilier’s theorem.
-Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/)
+Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/).
Parameters
-- cell_corner_lonnp.array
Longitude boundaries of each cell
+- cell_corner_lonnp.array
Longitude boundaries of each cell.
-- cell_corner_latnp.array
Latitude boundaries of each cell
+- cell_corner_latnp.array
Latitude boundaries of each cell.
@@ -236,7 +236,7 @@ Reference: CDO (
nes.methods.cell_measures.tri_area(point_0, point_1, point_2)[source]
Calculate area between three points that form a triangle.
-Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/)
+Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/).
@@ -389,9 +388,9 @@ var_data : np.array
- only_createbool
Indicates if you want to only create the Weight Matrix.
-- wmNes
Weight matrix Nes File
+- wmNes
Weight matrix Nes File.
-- fluxbool
Indicates if you want to calculate the weight matrix for flux variables
+- fluxbool
Indicates if you want to calculate the weight matrix for flux variables.
@@ -427,9 +426,9 @@ var_data : np.array
only_create_wmboolIndicates if you want to only create the Weight Matrix.
-
wmNesWeight matrix Nes File
+wmNesWeight matrix Nes File.
-
fluxboolIndicates if you want to calculate the weight matrix for flux variables
+fluxboolIndicates if you want to calculate the weight matrix for flux variables.
@@ -456,15 +455,15 @@ var_data : np.array
-
nes.methods.horizontal_interpolation.lon_lat_to_cartesian_ecef(lon, lat)[source]
-# convert observational/model geographic longitude/latitude coordinates to cartesian ECEF (Earth Centred,
-# Earth Fixed) coordinates, assuming WGS84 datum and ellipsoid, and that all heights = 0.
-# ECEF coordiantes represent positions (in meters) as X, Y, Z coordinates, approximating the earth surface
-# as an ellipsoid of revolution.
-# This conversion is for the subsequent calculation of euclidean distances of the model gridcell centres
-# from each observational station.
-# Defining the distance between two points on the earth’s surface as simply the euclidean distance
-# between the two lat/lon pairs could lead to inaccurate results depending on the distance
-# between two points (i.e. 1 deg. of longitude varies with latitude).
+Convert observational/model geographic longitude/latitude coordinates to cartesian ECEF (Earth Centred,
+Earth Fixed) coordinates, assuming WGS84 datum and ellipsoid, and that all heights = 0.
+ECEF coordiantes represent positions (in meters) as X, Y, Z coordinates, approximating the earth surface
+as an ellipsoid of revolution.
+This conversion is for the subsequent calculation of euclidean distances of the model gridcell centres
+from each observational station.
+Defining the distance between two points on the earth’s surface as simply the euclidean distance
+between the two lat/lon pairs could lead to inaccurate results depending on the distance
+between two points (i.e. 1 deg. of longitude varies with latitude).
Parameters
@@ -506,11 +505,13 @@ var_data : np.array
-
nes.methods.spatial_join.get_bbox(self)[source]
-Obtain the bounding box of the rank data
-(lon_min, lat_min, lon_max, lat_max)
+Obtain the bounding box of the rank data (lon_min, lat_min, lon_max, lat_max).
Parameters
-self : nes.Nes
+
+- selfnes.Nes
Nes Object.
+
+
Returns
@@ -523,7 +524,7 @@ var_data : np.array
-
-nes.methods.spatial_join.prepare_external_shapefile(self, ext_shp, var_list, info=False)[source]
+nes.methods.spatial_join.prepare_external_shapefile(self, ext_shp, var_list, info=False, apply_bbox=True)[source]
Prepare the external shapefile.
It is high recommended to pass ext_shp parameter as string because it will clip the external shapefile to the rank.
@@ -533,22 +534,23 @@ var_data : np.array
Parameters
-self : nes.Nes
-ext_shp : GeoDataFrame or str
-
-External shapefile or path to it
-
-- var_listList[str] or None
External shapefile variables to be computed
+- selfnes.Nes
Nes Object.
+
+- ext_shpGeoDataFrame or str
External shapefile or path to it.
-- infobool
Indicates if you want to print the information
+- var_listList[str] or None
External shapefile variables to be computed.
+
+- infobool
Indicates if you want to print the information.
+
+- apply_bboxbool
Indicates if you want to reduce the shapefile to a bbox.
Returns
-- GeoDataFrame
External shapefile
+- GeoDataFrame
External shapefile.
@@ -556,21 +558,22 @@ ext_shp : GeoDataFrame or str
-
-nes.methods.spatial_join.spatial_join(self, ext_shp, method=None, var_list=None, info=False)[source]
+nes.methods.spatial_join.spatial_join(self, ext_shp, method=None, var_list=None, info=False, apply_bbox=True)[source]
Compute overlay intersection of two GeoPandasDataFrames.
Parameters
-self : nes.Nes
-ext_shp : GeoPandasDataFrame or str
-
-File or path from where the data will be obtained on the intersection.
-
+- selfnes.Nes
Nes Object.
+
+- ext_shpGeoPandasDataFrame or str
File or path from where the data will be obtained on the intersection.
+
- methodstr
Overlay method. Accepted values: [‘nearest’, ‘intersection’, ‘centroid’].
- var_listList or None or str
Variables that will be included in the resulting shapefile.
-- infobool
Indicates if you want to print the process info or no
+- infobool
Indicates if you want to print the process info.
+
+- apply_bboxbool
Indicates if you want to reduce the shapefile to a bbox.
@@ -579,16 +582,15 @@ ext_shp : GeoPandasDataFrame or str
-
nes.methods.spatial_join.spatial_join_centroid(self, ext_shp, info=False)[source]
-Perform the spatial join using the centroid method
+Perform the spatial join using the centroid method.
Parameters
-self : nes.Nes
-ext_shp : GeoDataFrame
-
-
-- infobool
Indicates if you want to print the information
+- selfnes.Nes
Nes Object.
+
+- ext_shpGeoDataFrame
External shapefile.
+
+- infobool
Indicates if you want to print the information.
@@ -597,16 +599,15 @@ ext_shp : GeoDataFrame
-
nes.methods.spatial_join.spatial_join_intersection(self, ext_shp, info=False)[source]
-Perform the spatial join using the intersection method
+Perform the spatial join using the intersection method.
Parameters
-self : nes.Nes
-ext_shp : GeoDataFrame
-
-
-- infobool
Indicates if you want to print the information
+- selfnes.Nes
Nes Object.
+
+- ext_shpGeoDataFrame
External shapefile.
+
+- infobool
Indicates if you want to print the information.
@@ -615,16 +616,15 @@ ext_shp : GeoDataFrame
-
nes.methods.spatial_join.spatial_join_nearest(self, ext_shp, info=False)[source]
-Perform the spatial join using the nearest method
+Perform the spatial join using the nearest method.
Parameters
-self : nes.Nes
-ext_shp : GeoDataFrame
-
-
-- infobool
Indicates if you want to print the information
+- selfnes.Nes
Nes Object.
+
+- ext_shpGeoDataFrame
External shapefile.
+
+- infobool
Indicates if you want to print the information.
@@ -660,18 +660,16 @@ the vertical data.
- new_levelsList
List of new vertical levels.
-
-new_src_vertical
-kind : str
-
-
-
+- new_src_verticalnes.Nes, str
Nes object with the vertical information as variable or str with the path to the NetCDF file that contains
+the vertical data.
+
+- kindstr
Vertical methods type.
+
- extrapolateNone, tuple, str
Extrapolate method (for non linear operations).
- info: None, bool
Indicates if you want to print extra information.
-- overwrite: bool
Indicates if you want to compute the vertical interpolation in the same object or not
+- overwrite: bool
Indicates if you want to compute the vertical interpolation in the same object or not.
diff --git a/docs/build/html/projections.html b/docs/build/html/projections.html
index dde678609d0e57e575196a12fb1feaea5825a0b2..11ba9c3c4e8b11130b1fd08a7a5e3208dd4830fa 100644
--- a/docs/build/html/projections.html
+++ b/docs/build/html/projections.html
@@ -249,12 +249,11 @@
Bases: object
Attributes
-comm : MPI.Communicator.
-rank : int
-
-
+- commMPI.Communicator.
MPI communicator.
+
+- rankint
MPI rank.
+
- masterbool
True when rank == 0.
- sizeint
Size of the communicator.
@@ -385,7 +384,7 @@ the vertical data.
- selfnes.Nes
Source projection Nes Object.
-- overwritebool
Indicates if we want to overwrite the grid area
+- overwritebool
Indicates if we want to overwrite the grid area.
@@ -495,18 +494,13 @@ The copy will avoid to copy the communicator, dataset and variables by default.<
Calculate daily statistic.
Parameters
-
+
- opstr
Statistic to perform. Accepted values: “max”, “mean” and “min”.
- type_opstr
Type of statistic to perform. Accepted values: “calendar”, “alltsteps”, and “withoutt0”.
-- “calendar”: Calculate the statistic using the time metadata.
-
-It will avoid single time step by day calculations
-
-
+- “calendar”: Calculate the statistic using the time metadata. It will avoid single time step by day calculations
+- “alltsteps”: Calculate a single time statistic with all the time steps.
+- “withoutt0”: Calculate a single time statistic with all the time steps avoiding the first one.
@@ -610,11 +604,11 @@ Default: 0.
-
get_fids()[source]
-Obtain the FIDs in a 2D format
+Obtain the FIDs in a 2D format.
Returns
-- np.array
2D array with the FID data
+- np.array
2D array with the FID data.
@@ -800,9 +794,9 @@ t_min, t_max, z_min, z_max, y_min, y_max, x_min and x_max.
- only_create_wmbool
Indicates if you want to only create the Weight Matrix.
-- wmNes
Weight matrix Nes File
+- wmNes
Weight matrix Nes File.
-- fluxbool
Indicates if you want to calculate the weight matrix for flux variables
+- fluxbool
Indicates if you want to calculate the weight matrix for flux variables.
@@ -819,18 +813,16 @@ t_min, t_max, z_min, z_max, y_min, y_max, x_min and x_max.
- new_levelsList
New vertical levels.
-
-
new_src_vertical
-kind : str
-
-
-
+- new_src_verticalnes.Nes, str
Nes object with the vertical information as variable or str with the path to the NetCDF file that contains
+the vertical data.
+
+- kindstr
Vertical methods type.
+
- extrapolateNone, tuple, str
Extrapolate method (for non linear operations).
- info: None, bool
Indicates if you want to print extra information.
-- overwrite: bool
Indicates if you want to compute the vertical interpolation in the same object or not
+- overwrite: bool
Indicates if you want to compute the vertical interpolation in the same object or not.
@@ -1075,7 +1067,7 @@ Balanced dataset cannot be written in chunking mode.
-
-spatial_join(ext_shp, method=None, var_list=None, info=False)[source]
+spatial_join(ext_shp, method=None, var_list=None, info=False, apply_bbox=True)[source]
Compute overlay intersection of two GeoPandasDataFrames.
Parameters
@@ -1086,7 +1078,9 @@ Balanced dataset cannot be written in chunking mode.
- var_listList or None
Variables that will be included in the resulting shapefile.
-- infobool
Indicates if you want to print the process info or no
+- infobool
Indicates if you want to print the process info.
+
+- apply_bboxbool
Indicates if you want to reduce the shapefile to a bbox.
diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js
index a6d1152be16ee2bd259a5cf552740aba5fba54e3..c8fa7c8a07ef62aef367855e43c9ca87820cd085 100644
--- a/docs/build/html/searchindex.js
+++ b/docs/build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["authors", "changelog", "contributing", "formats", "index", "methods", "object", "projections", "readme"], "filenames": ["authors.rst", "changelog.rst", "contributing.rst", "formats.rst", "index.rst", "methods.rst", "object.rst", "projections.rst", "readme.rst"], "titles": ["Authors", "CHANGELOG", "Contributing", "Formats", "Contents", "Methods", "The NES object", "Projections", "Introduction"], "terms": {"carl": [0, 2], "tena": 0, "ctwebpag": 0, "alba": [0, 2], "vilanova": 0, "cortez\u00f3n": 0, "avcwebpag": 0, "releas": [1, 8], "date": 1, "unknown": 1, "chang": [1, 2, 3, 7], "new": [1, 2, 5, 7, 8], "featur": [1, 8], "statist": [1, 7], "roll": [1, 7], "mean": [1, 7], "document": 1, "2023": 1, "06": 1, "16": [1, 3], "rotat": [1, 4], "nest": [1, 4], "project": [1, 3, 4, 5, 6], "improv": 1, "function": [1, 5, 7], "get_fid": [1, 7], "climatologi": 1, "option": [1, 7], "ad": [1, 7], "millisecond": 1, "second": [1, 5], "minut": 1, "dai": [1, 7], "time": [1, 2, 3, 6, 7], "unit": [1, 3, 7], "accept": [1, 5, 6, 7], "resolut": 1, "bug": [1, 2], "fix": [1, 2, 5, 7], "The": [1, 4, 7], "input": [1, 3], "argument": 1, "have": [1, 7], "been": [1, 2], "correct": 1, "month": 1, "05": 1, "15": 1, "minor": [1, 5, 7], "tutori": 1, "updat": [1, 2], "write": [1, 5, 6, 7, 8], "format": [1, 4, 5, 7], "cmaq": [1, 4], "monarch": [1, 4], "wrf_chem": 1, "63": 1, "http": [1, 5, 7, 8], "earth": [1, 5, 7, 8], "bsc": [1, 5, 8], "e": [1, 2, 5, 7, 8], "gitlab": [1, 5, 8], "ne": [1, 2, 3, 4, 5, 7, 8], "issu": [1, 2], "04": 1, "12": 1, "sum": 1, "object": [1, 3, 4, 5, 7], "48": 1, "2d": [1, 5, 7], "string": [1, 3, 5, 7], "data": [1, 3, 5, 6, 7, 8], "save": [1, 7], "variabl": [1, 3, 5, 6, 7], "from": [1, 2, 3, 5, 6, 7], "shapefil": [1, 5, 6, 7], "after": 1, "do": 1, "spatial": [1, 4, 6, 7], "join": [1, 4, 6], "49": 1, "horizont": [1, 3, 4, 7], "interpol": [1, 4, 7], "conserv": [1, 5, 7], "memori": 1, "usag": 1, "when": [1, 7], "calcul": [1, 5, 7], "weight": [1, 5, 7], "matrix": [1, 5, 7], "54": 1, "concatenate_netcdf": [1, 6], "55": 1, "step": [1, 3, 6, 7], "avoid": [1, 7], "57": 1, "flux": [1, 5, 7], "60": 1, "cell_method": 1, "serial": [1, 7], "53": 1, "avoid_first_hour": [1, 6, 7], "where": [1, 5, 7], "filter": [1, 5, 7], "read": [1, 5, 6, 7, 8], "dimens": [1, 3, 7], "59": 1, "while": [1, 7], "mask": 1, "grid_map": 1, "netcdf": [1, 3, 5, 6, 7, 8], "integ": 1, "instead": 1, "charact": 1, "03": 1, "02": 1, "lat": [1, 3, 4, 5], "lon": [1, 3, 4, 5], "cartesian": [1, 5, 7], "coordin": [1, 5, 7], "method": [1, 3, 4, 6, 7], "us": [1, 3, 5, 6, 7, 8], "providentia": [1, 4, 5], "to_shapefil": [1, 7], "creat": [1, 2, 3, 4, 5, 7], "without": [1, 2, 7], "lose": 1, "origin": [1, 7], "grid": [1, 3, 5, 6, 7], "being": 1, "abl": 1, "select": [1, 7], "level": [1, 5, 6, 7], "from_shapefil": [1, 6], "create_shapefil": [1, 7], "can": [1, 7, 8], "now": 1, "parallel": [1, 5, 6, 7], "calculate_grid_area": [1, 5, 7], "area": [1, 5, 7], "each": [1, 5, 7], "cell": [1, 5, 7], "calculate_geometry_area": [1, 5, 7], "given": [1, 7], "set": [1, 3, 5, 7], "geometri": [1, 5, 7], "get_spatial_bounds_mesh_format": [1, 7], "get": [1, 5, 6, 7, 8], "boundari": [1, 5, 7], "mesh": [1, 7], "pcolormesh": [1, 7], "result": [1, 5, 7], "point": [1, 4, 5], "dataset": [1, 3, 6, 7], "ani": [1, 2, 7], "amend": 1, "take": 1, "account": 1, "case": [1, 2], "which": [1, 7], "distanc": [1, 5, 7], "among": 1, "equal": 1, "zero": 1, "wai": [1, 5], "we": [1, 5, 7], "retriev": 1, "posit": [1, 5, 7], "valu": [1, 3, 5, 6, 7], "how": [1, 4], "bound": [1, 5, 7], "lcc": [1, 4], "mercat": [1, 4], "were": 1, "flip": [1, 7], "all": [1, 2, 5, 6, 7], "axi": [1, 5, 7], "limit": [1, 7], "centroid": [1, 5, 7], "creation": [1, 7], "geopanda": 1, "rais": 1, "warn": 1, "possibl": [1, 2, 7], "error": 1, "enabl": 1, "type": [1, 5, 7], "appear": [1, 2], "try": 1, "file": [1, 3, 5, 6, 7, 8], "2022": 1, "11": 1, "24": 1, "first": [1, 5, 6, 7], "beta": 1, "open": [1, 3, 6, 7], "regular": [1, 7], "latitud": [1, 5, 7], "longitud": [1, 5, 7], "lambert": 1, "conform": 1, "conic": 1, "ghost": [1, 4], "balanc": [1, 6, 7], "unbalanc": 1, "By": 1, "y": [1, 3, 5, 6, 7], "x": [1, 3, 5, 6, 7], "cam": [1, 4], "reanalysi": 1, "grib2": [1, 7], "vertic": [1, 4, 7], "nearest": [1, 5, 6, 7], "neighbour": [1, 5, 7], "daily_mean": 1, "daily_max": 1, "daily_min": 1, "last": [1, 6, 7], "concaten": [1, 6, 7], "same": [1, 5, 7], "period": 1, "differ": [1, 6, 7], "an": [2, 5, 7], "complet": [2, 7], "descript": [2, 7], "much": 2, "estim": 2, "correspond": [2, 7], "mileston": 2, "assign": 2, "person": 2, "etc": 2, "branch": [2, 8], "master": [2, 7, 8], "directli": 2, "Its": 2, "name": [2, 3, 7], "should": 2, "start": 2, "develop": 2, "follow": [2, 7, 8], "number": [2, 5, 6, 7], "titl": 2, "default": [2, 4, 5, 6], "clone": [2, 4], "checkout": [2, 8], "modif": 2, "nord3v2": 2, "It": [2, 5, 7], "i": [2, 5, 6, 7, 8], "recommend": [2, 5], "run": [2, 4], "some": [2, 7], "test": [2, 8], "ensur": 2, "current": [2, 7], "behavior": 2, "modifi": [2, 3, 7], "code": 2, "simul": 2, "import": 2, "prepend": 2, "path": [2, 3, 5, 6, 7], "pythonpath": 2, "g": 2, "export": 2, "gpf": 2, "scratch": [2, 6, 7], "bsc32": 2, "bsc32538": 2, "specif": 2, "your": 2, "folder": 2, "changelog": [2, 4], "rst": 2, "includ": [2, 5, 7], "inform": [2, 5, 7], "wiki": [2, 8], "merg": 2, "To": [2, 5, 7], "ha": [2, 7], "ar": [2, 7, 8], "request": 2, "avilanov": 2, "ctena": 2, "who": 2, "review": 2, "nes_format": 3, "cams_ra_format": 3, "create_dimension_vari": 3, "self": [3, 5, 7], "sourc": [3, 5, 6, 7], "time_bnd": [3, 7], "lev": [3, 7], "lat_bnd": [3, 7], "lon_bnd": [3, 7], "netcdf4": [3, 7], "python": [3, 7, 8], "create_dimens": 3, "create_vari": 3, "i_lev": 3, "date2num": 3, "time_arrai": 3, "time_unit": 3, "none": [3, 5, 6, 7], "time_calendar": 3, "to_netcdf_cams_ra": 3, "one": [3, 5, 7], "anoth": [3, 5, 7], "str": [3, 5, 6, 7], "output": [3, 7], "cmaq_format": 3, "change_variable_attribut": 3, "emiss": 3, "list": [3, 5, 6, 7], "consist": 3, "model": [3, 5, 7], "create_tflag": 3, "content": 3, "tflag": 3, "numpi": [3, 7], "ndarrai": [3, 7], "arrai": [3, 5, 7], "set_global_attribut": 3, "global": [3, 7], "attribut": 3, "str_var_list": 3, "transform": [3, 7], "element": [3, 7], "white": 3, "space": 3, "to_cmaq_unit": 3, "accord": [3, 5], "convent": 3, "dict": [3, 7], "to_netcdf_cmaq": 3, "chunk": [3, 6, 7], "fals": [3, 5, 6, 7], "keep_open": [3, 7], "bool": [3, 5, 6, 7], "indic": [3, 5, 6, 7], "you": [3, 5, 6, 7, 8], "want": [3, 5, 6, 7], "keep": [3, 7], "netcdh": [3, 7], "fill": [3, 7], "monarch_format": 3, "to_monarch_unit": 3, "to_netcdf_monarch": 3, "wrf_chem_format": 3, "create_times_var": 3, "to_netcdf_wrf_chem": 3, "to_wrf_chem_unit": 3, "introduct": 4, "about": 4, "load": [4, 7], "gener": 4, "ra": 4, "wrf": 4, "chem": 4, "regulat": 4, "contribut": 4, "1": [4, 5, 7], "4": [4, 5, 7], "3": 4, "2": [4, 7], "0": [4, 5, 6, 7], "author": 4, "cell_measur": 5, "calculate_cell_area": 5, "grid_corner_lon": 5, "grid_corner_lat": 5, "earth_radius_minor_axi": [5, 7], "6356752": [5, 7], "3142": [5, 7], "earth_radius_major_axi": [5, 7], "6378137": [5, 7], "np": [5, 7], "float": [5, 7], "radiu": [5, 7], "major": [5, 7], "geometry_list": [5, 7], "call": [5, 7], "polygon": [5, 7], "cross_product": 5, "b": 5, "cross": 5, "product": [5, 8], "between": [5, 7], "two": [5, 7], "lon_lat_to_cartesian": 5, "sphere": 5, "mod_huiliers_area": 5, "cell_corner_lon": 5, "cell_corner_lat": 5, "huilier": 5, "": [5, 7], "theorem": 5, "refer": [5, 7], "cdo": 5, "ce": 5, "norm": 5, "cp": 5, "normal": 5, "oper": [5, 7], "tri_area": 5, "point_0": 5, "point_1": 5, "point_2": 5, "three": 5, "form": [5, 6], "triangl": 5, "third": 5, "horizontal_interpol": 5, "create_area_conservative_weight_matrix": 5, "dst_ne": 5, "wm_path": 5, "info": [5, 6, 7], "final": [5, 7], "print": [5, 6, 7], "extra": [5, 7], "dure": [5, 7], "process": [5, 7, 8], "create_nn_weight_matrix": 5, "dst_grid": [5, 7], "n_neighbour": [5, 7], "int": [5, 6, 7], "kind": [5, 7], "nearestneighbour": [5, 7], "get_src_data": 5, "comm": [5, 6, 7], "var_data": 5, "idx": 5, "parallel_method": [5, 6, 7], "obtain": [5, 7], "need": [5, 7], "src": 5, "mpi": [5, 6, 7], "commun": [5, 6, 7], "rank": [5, 7], "index": [5, 6, 7], "flatten": 5, "get_weights_idx_t_axi": 5, "weight_matrix_path": [5, 7], "only_cr": 5, "wm": [5, 7], "through": [5, 7], "t": [5, 6, 7], "onli": [5, 6, 7], "tupl": [5, 7], "get_weights_idx_xy_axi": 5, "interpolate_horizont": [5, 7], "to_providentia": [5, 7], "only_create_wm": [5, 7], "deprec": 5, "lon_lat_to_cartesian_ecef": [5, 7], "convert": [5, 7], "observ": [5, 7], "geograph": [5, 7], "ecef": [5, 7], "centr": [5, 7], "assum": [5, 7], "wgs84": [5, 7], "datum": [5, 7], "ellipsoid": [5, 7], "height": [5, 7], "coordiant": [5, 7], "repres": [5, 7], "meter": [5, 7], "z": [5, 7], "approxim": [5, 7], "surfac": [5, 7], "revolut": [5, 7], "thi": [5, 7], "convers": [5, 7], "subsequ": [5, 7], "euclidean": [5, 7], "gridcel": [5, 7], "station": [5, 7], "defin": [5, 7], "simpli": [5, 7], "pair": [5, 7], "could": [5, 7], "lead": [5, 7], "inaccur": [5, 7], "depend": [5, 7], "deg": [5, 7], "vari": [5, 7], "read_weight_matrix": 5, "spatial_join": [5, 7], "get_bbox": 5, "box": 5, "lon_min": [5, 7], "lat_min": [5, 7], "lon_max": [5, 7], "lat_max": [5, 7], "prepare_external_shapefil": 5, "ext_shp": [5, 7], "var_list": [5, 7], "prepar": 5, "extern": 5, "high": 5, "pass": 5, "becaus": 5, "clip": 5, "alreadi": 5, "standard": [5, 7], "geodatafram": [5, 7], "comput": [5, 7], "overlai": [5, 6, 7], "intersect": [5, 6, 7], "geopandasdatafram": [5, 7], "spatial_join_centroid": 5, "perform": [5, 7], "spatial_join_intersect": 5, "spatial_join_nearest": 5, "vertical_interpol": 5, "add_4d_vertical_info": [5, 7], "info_to_add": [5, 7], "add": [5, 6, 7], "other": [5, 7], "contain": [5, 7], "interpolate_vert": [5, 7], "new_level": [5, 7], "new_src_vert": [5, 7], "linear": [5, 7], "extrapol": [5, 7], "overwrit": [5, 7], "non": [5, 7], "create_n": [6, 7], "avoid_last_hour": [6, 7], "first_level": [6, 7], "last_level": [6, 7], "kwarg": [6, 7], "class": [6, 7], "cannot": [6, 7], "written": [6, 7], "mode": [6, 7], "hour": [6, 7], "remov": [6, 7], "load_n": 6, "nessy_list": 6, "open_netcdf": [6, 7], "xarrai": [6, 7], "comm_world": 6, "Not": [6, 7], "work": [6, 7], "stdout": [6, 7], "lazi": [6, 7], "metadata": [6, 7], "nc_project": 7, "default_n": 7, "base": 7, "true": 7, "size": 7, "is_xarrai": 7, "__ini_path": 7, "hours_start": 7, "hours_end": 7, "xr": 7, "store": 7, "dictionari": 7, "var_nam": 7, "kei": 7, "_time": 7, "_lev": 7, "rest": 7, "_lat": 7, "_lon": 7, "_": 7, "chosen": 7, "read_axis_limit": 7, "4d": 7, "t_min": 7, "t_max": 7, "z_min": 7, "z_max": 7, "y_min": 7, "y_max": 7, "x_min": 7, "x_max": 7, "write_axis_limit": 7, "datetim": 7, "portion": 7, "global_attr": 7, "_var_dim": 7, "_lat_dim": 7, "_lon_dim": 7, "pyproj": 7, "proj": 7, "projection_data": 7, "add_variables_to_shapefil": 7, "idx_lev": 7, "idx_tim": 7, "append_time_step_data": 7, "i_tim": 7, "out_format": 7, "static": 7, "clear_commun": 7, "eras": 7, "close": 7, "aux_nessi": 7, "var": 7, "copi": [7, 8], "copy_var": 7, "nessi": 7, "datafram": 7, "create_single_spatial_bound": 7, "inc": 7, "spatial_nv": 7, "invers": 7, "degre": 7, "increment": 7, "mandatori": 7, "must": 7, "For": [7, 8], "mani": 7, "coord": 7, "create_spatial_bound": 7, "them": 7, "daily_statist": 7, "op": 7, "type_op": 7, "calendar": 7, "daili": 7, "max": 7, "min": 7, "alltstep": 7, "withoutt0": 7, "singl": 7, "filter_coordinates_select": 7, "find_time_id": 7, "find": 7, "free_var": 7, "get_centroids_from_coordin": 7, "centroids_gdf": 7, "get_climatologi": 7, "get_coordinate_id": 7, "search": 7, "get_earth_radiu": 7, "ellp": 7, "system": 7, "fid": 7, "get_full_level": 7, "get_full_tim": 7, "get_idx_interv": 7, "interv": 7, "get_read_axis_limit": 7, "get_read_axis_limits_balanc": 7, "get_read_axis_limits_unbalanc": 7, "see": 7, "matplotlib": 7, "org": 7, "stabl": [7, 8], "api": 7, "_as_gen": 7, "pyplot": 7, "html": 7, "lon_bnds_mesh": 7, "lat_bnds_mesh": 7, "get_time_id": 7, "get_time_interv": 7, "interrv": 7, "get_write_axis_limit": 7, "get_write_axis_limits_balanc": 7, "get_write_axis_limits_unbalanc": 7, "choic": 7, "keep_var": 7, "last_time_step": 7, "That": 7, "initi": 7, "over": 7, "exist": 7, "substitut": 7, "ones": 7, "reverse_level_direct": 7, "rolling_mean": 7, "8": 7, "window": 7, "sel": 7, "time_min": 7, "time_max": 7, "lev_min": 7, "lev_max": 7, "slice": 7, "minimum": 7, "maximum": 7, "sel_tim": 7, "stamp": 7, "te": 7, "set_climatologi": 7, "is_climatologi": 7, "set_commun": 7, "set_level_direct": 7, "new_direct": 7, "set_level": 7, "set_strlen": 7, "strlen": 7, "75": 7, "length": 7, "set_tim": 7, "time_list": 7, "set_time_bnd": 7, "set_time_resolut": 7, "new_resolut": 7, "str2char": 7, "sum_axi": 7, "to_dtyp": 7, "data_typ": 7, "float32": 7, "cast": 7, "to_grib2": 7, "grib_kei": 7, "grib_template_path": 7, "lat_flip": 7, "templat": 7, "to_netcdf": 7, "compression_level": 7, "compress": 7, "9": 7, "avail": 7, "cams_ra": 7, "independ": 7, "write_shapefil": 7, "latlon_n": 7, "latlonn": 7, "create_providentia_exp_centre_coordin": 7, "model_centre_lat": 7, "model_centre_lon": 7, "create_providentia_exp_grid_edge_coordin": 7, "edg": 7, "outlin": 7, "grid_edge_lat": 7, "grid_edge_lon": 7, "lcc_ne": 7, "lccne": 7, "_y": 7, "_x": 7, "mercator_n": 7, "mercatorn": 7, "points_n": 7, "pointsn": 7, "_station": 7, "pointsnesprovidentia": 7, "points_nes_providentia": 7, "points_nes_ghost": 7, "pointsnesghost": 7, "_qa": 7, "qualiti": 7, "flag": 7, "check": 7, "_flag": 7, "provid": 7, "erase_flag": 7, "get_standard_metadata": 7, "ghost_vers": 7, "version": [7, 8], "metadata_vari": 7, "certain": 7, "to_point": 7, "_model_centre_lon": 7, "_model_centre_lat": 7, "_grid_edge_lon": 7, "_grid_edge_lat": 7, "rotated_n": 7, "rotatedn": 7, "_rlat": 7, "_rlon": 7, "rlat": 7, "rlon": 7, "rotated2latlon": 7, "lon_deg": 7, "lat_deg": 7, "180": 7, "unrot": 7, "360": 7, "almd": 7, "aphd": 7, "rotated_nested_n": 7, "rotatednestedn": 7, "scienc": 8, "o": 8, "librari": 8, "sne": 8, "framework": 8, "implement": 8, "post": 8, "pipelin": 8, "depart": 8, "command": 8, "repositori": 8, "git": 8, "latest": 8, "access": 8, "also": 8, "upcom": 8, "pleas": 8, "instruct": 8}, "objects": {"nes": [[6, 0, 0, "-", "create_nes"], [6, 0, 0, "-", "load_nes"]], "nes.create_nes": [[6, 1, 1, "", "create_nes"], [6, 1, 1, "", "from_shapefile"]], "nes.load_nes": [[6, 1, 1, "", "concatenate_netcdfs"], [6, 1, 1, "", "open_netcdf"]], "nes.methods": [[5, 0, 0, "-", "cell_measures"], [5, 0, 0, "-", "horizontal_interpolation"], [5, 0, 0, "-", "spatial_join"], [5, 0, 0, "-", "vertical_interpolation"]], "nes.methods.cell_measures": [[5, 1, 1, "", "calculate_cell_area"], [5, 1, 1, "", "calculate_geometry_area"], [5, 1, 1, "", "calculate_grid_area"], [5, 1, 1, "", "cross_product"], [5, 1, 1, "", "lon_lat_to_cartesian"], [5, 1, 1, "", "mod_huiliers_area"], [5, 1, 1, "", "norm"], [5, 1, 1, "", "tri_area"]], "nes.methods.horizontal_interpolation": [[5, 1, 1, "", "create_area_conservative_weight_matrix"], [5, 1, 1, "", "create_nn_weight_matrix"], [5, 1, 1, "", "get_src_data"], [5, 1, 1, "", "get_weights_idx_t_axis"], [5, 1, 1, "", "get_weights_idx_xy_axis"], [5, 1, 1, "", "interpolate_horizontal"], [5, 1, 1, "", "lon_lat_to_cartesian"], [5, 1, 1, "", "lon_lat_to_cartesian_ecef"], [5, 1, 1, "", "read_weight_matrix"]], "nes.methods.spatial_join": [[5, 1, 1, "", "get_bbox"], [5, 1, 1, "", "prepare_external_shapefile"], [5, 1, 1, "", "spatial_join"], [5, 1, 1, "", "spatial_join_centroid"], [5, 1, 1, "", "spatial_join_intersection"], [5, 1, 1, "", "spatial_join_nearest"]], "nes.methods.vertical_interpolation": [[5, 1, 1, "", "add_4d_vertical_info"], [5, 1, 1, "", "interpolate_vertical"]], "nes.nc_projections": [[7, 0, 0, "-", "default_nes"], [7, 0, 0, "-", "latlon_nes"], [7, 0, 0, "-", "lcc_nes"], [7, 0, 0, "-", "mercator_nes"], [7, 0, 0, "-", "points_nes"], [7, 0, 0, "-", "points_nes_ghost"], [7, 0, 0, "-", "points_nes_providentia"], [7, 0, 0, "-", "rotated_nes"], [7, 0, 0, "-", "rotated_nested_nes"]], "nes.nc_projections.default_nes": [[7, 2, 1, "", "Nes"]], "nes.nc_projections.default_nes.Nes": [[7, 3, 1, "", "add_4d_vertical_info"], [7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "append_time_step_data"], [7, 3, 1, "", "calculate_geometry_area"], [7, 3, 1, "", "calculate_grid_area"], [7, 3, 1, "", "clear_communicator"], [7, 3, 1, "", "close"], [7, 3, 1, "", "concatenate"], [7, 3, 1, "", "copy"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_single_spatial_bounds"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "daily_statistic"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "find_time_id"], [7, 3, 1, "", "free_vars"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "get_climatology"], [7, 3, 1, "", "get_coordinate_id"], [7, 3, 1, "", "get_earth_radius"], [7, 3, 1, "", "get_fids"], [7, 3, 1, "", "get_full_levels"], [7, 3, 1, "", "get_full_times"], [7, 3, 1, "", "get_idx_intervals"], [7, 3, 1, "", "get_read_axis_limits"], [7, 3, 1, "", "get_read_axis_limits_balanced"], [7, 3, 1, "", "get_read_axis_limits_unbalanced"], [7, 3, 1, "", "get_spatial_bounds_mesh_format"], [7, 3, 1, "", "get_time_id"], [7, 3, 1, "", "get_time_interval"], [7, 3, 1, "", "get_write_axis_limits"], [7, 3, 1, "", "get_write_axis_limits_balanced"], [7, 3, 1, "", "get_write_axis_limits_unbalanced"], [7, 3, 1, "", "interpolate_horizontal"], [7, 3, 1, "", "interpolate_vertical"], [7, 3, 1, "", "keep_vars"], [7, 3, 1, "", "last_time_step"], [7, 3, 1, "", "load"], [7, 3, 1, "", "lon_lat_to_cartesian_ecef"], [7, 3, 1, "", "new"], [7, 3, 1, "", "open"], [7, 3, 1, "", "reverse_level_direction"], [7, 3, 1, "", "rolling_mean"], [7, 3, 1, "", "sel"], [7, 3, 1, "", "sel_time"], [7, 3, 1, "", "set_climatology"], [7, 3, 1, "", "set_communicator"], [7, 3, 1, "", "set_level_direction"], [7, 3, 1, "", "set_levels"], [7, 3, 1, "", "set_strlen"], [7, 3, 1, "", "set_time"], [7, 3, 1, "", "set_time_bnds"], [7, 3, 1, "", "set_time_resolution"], [7, 3, 1, "", "spatial_join"], [7, 3, 1, "", "str2char"], [7, 3, 1, "", "sum_axis"], [7, 3, 1, "", "to_dtype"], [7, 3, 1, "", "to_grib2"], [7, 3, 1, "", "to_netcdf"], [7, 3, 1, "", "to_shapefile"], [7, 3, 1, "", "write_shapefile"]], "nes.nc_projections.latlon_nes": [[7, 2, 1, "", "LatLonNes"]], "nes.nc_projections.latlon_nes.LatLonNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.lcc_nes": [[7, 2, 1, "", "LCCNes"]], "nes.nc_projections.lcc_nes.LCCNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.mercator_nes": [[7, 2, 1, "", "MercatorNes"]], "nes.nc_projections.mercator_nes.MercatorNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.points_nes": [[7, 2, 1, "", "PointsNes"]], "nes.nc_projections.points_nes.PointsNes": [[7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"], [7, 3, 1, "", "to_providentia"]], "nes.nc_projections.points_nes_ghost": [[7, 2, 1, "", "PointsNesGHOST"]], "nes.nc_projections.points_nes_ghost.PointsNesGHOST": [[7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "erase_flags"], [7, 3, 1, "", "get_standard_metadata"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_netcdf"], [7, 3, 1, "", "to_points"]], "nes.nc_projections.points_nes_providentia": [[7, 2, 1, "", "PointsNesProvidentia"]], "nes.nc_projections.points_nes_providentia.PointsNesProvidentia": [[7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_netcdf"]], "nes.nc_projections.rotated_nes": [[7, 2, 1, "", "RotatedNes"]], "nes.nc_projections.rotated_nes.RotatedNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "rotated2latlon"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.rotated_nested_nes": [[7, 2, 1, "", "RotatedNestedNes"]], "nes.nes_formats": [[3, 0, 0, "-", "cams_ra_format"], [3, 0, 0, "-", "cmaq_format"], [3, 0, 0, "-", "monarch_format"], [3, 0, 0, "-", "wrf_chem_format"]], "nes.nes_formats.cams_ra_format": [[3, 1, 1, "", "create_dimension_variables"], [3, 1, 1, "", "create_dimensions"], [3, 1, 1, "", "create_variables"], [3, 1, 1, "", "date2num"], [3, 1, 1, "", "to_netcdf_cams_ra"]], "nes.nes_formats.cmaq_format": [[3, 1, 1, "", "change_variable_attributes"], [3, 1, 1, "", "create_dimension_variables"], [3, 1, 1, "", "create_dimensions"], [3, 1, 1, "", "create_tflag"], [3, 1, 1, "", "create_variables"], [3, 1, 1, "", "set_global_attributes"], [3, 1, 1, "", "str_var_list"], [3, 1, 1, "", "to_cmaq_units"], [3, 1, 1, "", "to_netcdf_cmaq"]], "nes.nes_formats.monarch_format": [[3, 1, 1, "", "to_monarch_units"], [3, 1, 1, "", "to_netcdf_monarch"]], "nes.nes_formats.wrf_chem_format": [[3, 1, 1, "", "change_variable_attributes"], [3, 1, 1, "", "create_dimension_variables"], [3, 1, 1, "", "create_dimensions"], [3, 1, 1, "", "create_times_var"], [3, 1, 1, "", "create_variables"], [3, 1, 1, "", "set_global_attributes"], [3, 1, 1, "", "to_netcdf_wrf_chem"], [3, 1, 1, "", "to_wrf_chem_units"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"author": 0, "changelog": 1, "1": 1, "4": 1, "3": 1, "2": 1, "0": 1, "contribut": 2, "format": 3, "cam": 3, "ra": 3, "paramet": [3, 5, 6, 7], "cmaq": 3, "return": [3, 5, 6, 7], "monarch": 3, "wrf": 3, "chem": 3, "content": 4, "method": 5, "gener": 5, "horizont": 5, "interpol": 5, "spatial": 5, "join": 5, "vertic": 5, "The": 6, "ne": 6, "object": 6, "creat": 6, "load": 6, "project": 7, "default": 7, "attribut": 7, "regulat": 7, "lat": 7, "lon": 7, "lcc": 7, "mercat": 7, "point": 7, "ghost": 7, "providentia": 7, "rotat": 7, "nest": 7, "introduct": 8, "about": 8, "how": 8, "clone": 8, "run": 8}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Authors": [[0, "authors"]], "CHANGELOG": [[1, "changelog"]], "1.1.4": [[1, "id1"]], "1.1.3": [[1, "id2"]], "1.1.2": [[1, "id3"]], "1.1.1": [[1, "id4"]], "1.1.0": [[1, "id5"]], "1.0.0": [[1, "id6"]], "Contributing": [[2, "contributing"]], "Formats": [[3, "formats"]], "CAMS RA format": [[3, "module-nes.nes_formats.cams_ra_format"]], "Parameters": [[3, "parameters"], [3, "id1"], [3, "id2"], [3, "id3"], [3, "id4"], [3, "id5"], [3, "id6"], [3, "id7"], [3, "id8"], [3, "id9"], [3, "id10"], [3, "id12"], [3, "id14"], [3, "id15"], [3, "id17"], [3, "id18"], [3, "id19"], [3, "id20"], [3, "id21"], [3, "id23"], [3, "id24"], [3, "id25"], [3, "id26"], [5, "parameters"], [5, "id1"], [5, "id2"], [5, "id3"], [5, "id4"], [5, "id5"], [5, "id6"], [5, "id7"], [5, "id8"], [5, "id9"], [5, "id11"], [5, "id13"], [5, "id15"], [5, "id17"], [5, "id18"], [5, "id19"], [5, "id20"], [5, "id22"], [5, "id24"], [5, "id26"], [5, "id27"], [5, "id28"], [5, "id29"], [5, "id30"], [5, "id31"], [6, "parameters"], [6, "id1"], [6, "id2"], [6, "id3"], [7, "parameters"], [7, "id1"], [7, "id2"], [7, "id3"], [7, "id4"], [7, "id5"], [7, "id8"], [7, "id10"], [7, "id11"], [7, "id13"], [7, "id15"], [7, "id17"], [7, "id24"], [7, "id30"], [7, "id31"], [7, "id32"], [7, "id33"], [7, "id34"], [7, "id35"], [7, "id36"], [7, "id38"], [7, "id40"], [7, "id41"], [7, "id42"], [7, "id43"], [7, "id44"], [7, "id45"], [7, "id46"], [7, "id47"], [7, "id48"], [7, "id49"], [7, "id50"], [7, "id54"], [7, "id55"], [7, "id61"], [7, "id62"], [7, "id68"], [7, "id69"], [7, "id73"], [7, "id74"], [7, "id77"], [7, "id79"], [7, "id80"], [7, "id83"], [7, "id84"], [7, "id90"], [7, "id91"], [7, "id93"]], "CMAQ format": [[3, "module-nes.nes_formats.cmaq_format"]], "Returns": [[3, "returns"], [3, "id11"], [3, "id13"], [3, "id16"], [3, "id22"], [3, "id27"], [5, "returns"], [5, "id10"], [5, "id12"], [5, "id14"], [5, "id16"], [5, "id21"], [5, "id23"], [5, "id25"], [6, "returns"], [6, "id4"], [7, "returns"], [7, "id6"], [7, "id7"], [7, "id9"], [7, "id12"], [7, "id14"], [7, "id16"], [7, "id18"], [7, "id19"], [7, "id20"], [7, "id21"], [7, "id22"], [7, "id23"], [7, "id25"], [7, "id26"], [7, "id27"], [7, "id28"], [7, "id29"], [7, "id37"], [7, "id39"], [7, "id52"], [7, "id53"], [7, "id57"], [7, "id58"], [7, "id59"], [7, "id60"], [7, "id64"], [7, "id65"], [7, "id66"], [7, "id67"], [7, "id71"], [7, "id72"], [7, "id75"], [7, "id78"], [7, "id81"], [7, "id86"], [7, "id87"], [7, "id88"], [7, "id89"], [7, "id92"]], "MONARCH format": [[3, "module-nes.nes_formats.monarch_format"]], "WRF CHEM format": [[3, "module-nes.nes_formats.wrf_chem_format"]], "Contents": [[4, "contents"]], "Methods": [[5, "methods"]], "Generic methods": [[5, "module-nes.methods.cell_measures"]], "Horizontal interpolation": [[5, "module-nes.methods.horizontal_interpolation"]], "Spatial join": [[5, "module-nes.methods.spatial_join"]], "Vertical interpolation": [[5, "module-nes.methods.vertical_interpolation"]], "The NES object": [[6, "the-nes-object"]], "Creating a NES object": [[6, "module-nes.create_nes"]], "Loading a NES object": [[6, "module-nes.load_nes"]], "Projections": [[7, "projections"]], "Default projection": [[7, "module-nes.nc_projections.default_nes"]], "Attributes": [[7, "attributes"], [7, "id51"], [7, "id56"], [7, "id63"], [7, "id70"], [7, "id76"], [7, "id82"], [7, "id85"]], "Regulat lat lon projection": [[7, "module-nes.nc_projections.latlon_nes"]], "LCC projection": [[7, "module-nes.nc_projections.lcc_nes"]], "Mercator projection": [[7, "module-nes.nc_projections.mercator_nes"]], "Points projection": [[7, "module-nes.nc_projections.points_nes"]], "GHOST projection": [[7, "module-nes.nc_projections.points_nes_ghost"]], "Providentia projection": [[7, "module-nes.nc_projections.points_nes_providentia"]], "Rotated projection": [[7, "module-nes.nc_projections.rotated_nes"]], "Rotated nested projection": [[7, "module-nes.nc_projections.rotated_nested_nes"]], "Introduction": [[8, "introduction"]], "About": [[8, "about"]], "How to clone": [[8, "how-to-clone"]], "How to run": [[8, "how-to-run"]]}, "indexentries": {"change_variable_attributes() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.change_variable_attributes"]], "change_variable_attributes() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.change_variable_attributes"]], "create_dimension_variables() (in module nes.nes_formats.cams_ra_format)": [[3, "nes.nes_formats.cams_ra_format.create_dimension_variables"]], "create_dimension_variables() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.create_dimension_variables"]], "create_dimension_variables() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.create_dimension_variables"]], "create_dimensions() (in module nes.nes_formats.cams_ra_format)": [[3, "nes.nes_formats.cams_ra_format.create_dimensions"]], "create_dimensions() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.create_dimensions"]], "create_dimensions() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.create_dimensions"]], "create_tflag() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.create_tflag"]], "create_times_var() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.create_times_var"]], "create_variables() (in module nes.nes_formats.cams_ra_format)": [[3, "nes.nes_formats.cams_ra_format.create_variables"]], "create_variables() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.create_variables"]], "create_variables() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.create_variables"]], "date2num() (in module nes.nes_formats.cams_ra_format)": [[3, "nes.nes_formats.cams_ra_format.date2num"]], "module": [[3, "module-nes.nes_formats.cams_ra_format"], [3, "module-nes.nes_formats.cmaq_format"], [3, "module-nes.nes_formats.monarch_format"], [3, "module-nes.nes_formats.wrf_chem_format"], [5, "module-nes.methods.cell_measures"], [5, "module-nes.methods.horizontal_interpolation"], [5, "module-nes.methods.spatial_join"], [5, "module-nes.methods.vertical_interpolation"], [6, "module-nes.create_nes"], [6, "module-nes.load_nes"], [7, "module-nes.nc_projections.default_nes"], [7, "module-nes.nc_projections.latlon_nes"], [7, "module-nes.nc_projections.lcc_nes"], [7, "module-nes.nc_projections.mercator_nes"], [7, "module-nes.nc_projections.points_nes"], [7, "module-nes.nc_projections.points_nes_ghost"], [7, "module-nes.nc_projections.points_nes_providentia"], [7, "module-nes.nc_projections.rotated_nes"], [7, "module-nes.nc_projections.rotated_nested_nes"]], "nes.nes_formats.cams_ra_format": [[3, "module-nes.nes_formats.cams_ra_format"]], "nes.nes_formats.cmaq_format": [[3, "module-nes.nes_formats.cmaq_format"]], "nes.nes_formats.monarch_format": [[3, "module-nes.nes_formats.monarch_format"]], "nes.nes_formats.wrf_chem_format": [[3, "module-nes.nes_formats.wrf_chem_format"]], "set_global_attributes() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.set_global_attributes"]], "set_global_attributes() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.set_global_attributes"]], "str_var_list() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.str_var_list"]], "to_cmaq_units() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.to_cmaq_units"]], "to_monarch_units() (in module nes.nes_formats.monarch_format)": [[3, "nes.nes_formats.monarch_format.to_monarch_units"]], "to_netcdf_cams_ra() (in module nes.nes_formats.cams_ra_format)": [[3, "nes.nes_formats.cams_ra_format.to_netcdf_cams_ra"]], "to_netcdf_cmaq() (in module nes.nes_formats.cmaq_format)": [[3, "nes.nes_formats.cmaq_format.to_netcdf_cmaq"]], "to_netcdf_monarch() (in module nes.nes_formats.monarch_format)": [[3, "nes.nes_formats.monarch_format.to_netcdf_monarch"]], "to_netcdf_wrf_chem() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.to_netcdf_wrf_chem"]], "to_wrf_chem_units() (in module nes.nes_formats.wrf_chem_format)": [[3, "nes.nes_formats.wrf_chem_format.to_wrf_chem_units"]], "add_4d_vertical_info() (in module nes.methods.vertical_interpolation)": [[5, "nes.methods.vertical_interpolation.add_4d_vertical_info"]], "calculate_cell_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.calculate_cell_area"]], "calculate_geometry_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.calculate_geometry_area"]], "calculate_grid_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.calculate_grid_area"]], "create_area_conservative_weight_matrix() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.create_area_conservative_weight_matrix"]], "create_nn_weight_matrix() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.create_nn_weight_matrix"]], "cross_product() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.cross_product"]], "get_bbox() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.get_bbox"]], "get_src_data() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.get_src_data"]], "get_weights_idx_t_axis() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.get_weights_idx_t_axis"]], "get_weights_idx_xy_axis() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.get_weights_idx_xy_axis"]], "interpolate_horizontal() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.interpolate_horizontal"]], "interpolate_vertical() (in module nes.methods.vertical_interpolation)": [[5, "nes.methods.vertical_interpolation.interpolate_vertical"]], "lon_lat_to_cartesian() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.lon_lat_to_cartesian"]], "lon_lat_to_cartesian() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.lon_lat_to_cartesian"]], "lon_lat_to_cartesian_ecef() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.lon_lat_to_cartesian_ecef"]], "mod_huiliers_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.mod_huiliers_area"]], "nes.methods.cell_measures": [[5, "module-nes.methods.cell_measures"]], "nes.methods.horizontal_interpolation": [[5, "module-nes.methods.horizontal_interpolation"]], "nes.methods.spatial_join": [[5, "module-nes.methods.spatial_join"]], "nes.methods.vertical_interpolation": [[5, "module-nes.methods.vertical_interpolation"]], "norm() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.norm"]], "prepare_external_shapefile() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.prepare_external_shapefile"]], "read_weight_matrix() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.read_weight_matrix"]], "spatial_join() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join"]], "spatial_join_centroid() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join_centroid"]], "spatial_join_intersection() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join_intersection"]], "spatial_join_nearest() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join_nearest"]], "tri_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.tri_area"]], "concatenate_netcdfs() (in module nes.load_nes)": [[6, "nes.load_nes.concatenate_netcdfs"]], "create_nes() (in module nes.create_nes)": [[6, "nes.create_nes.create_nes"]], "from_shapefile() (in module nes.create_nes)": [[6, "nes.create_nes.from_shapefile"]], "nes.create_nes": [[6, "module-nes.create_nes"]], "nes.load_nes": [[6, "module-nes.load_nes"]], "open_netcdf() (in module nes.load_nes)": [[6, "nes.load_nes.open_netcdf"]], "lccnes (class in nes.nc_projections.lcc_nes)": [[7, "nes.nc_projections.lcc_nes.LCCNes"]], "latlonnes (class in nes.nc_projections.latlon_nes)": [[7, "nes.nc_projections.latlon_nes.LatLonNes"]], "mercatornes (class in nes.nc_projections.mercator_nes)": [[7, "nes.nc_projections.mercator_nes.MercatorNes"]], "nes (class in nes.nc_projections.default_nes)": [[7, "nes.nc_projections.default_nes.Nes"]], "pointsnes (class in nes.nc_projections.points_nes)": [[7, "nes.nc_projections.points_nes.PointsNes"]], "pointsnesghost (class in nes.nc_projections.points_nes_ghost)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST"]], "pointsnesprovidentia (class in nes.nc_projections.points_nes_providentia)": [[7, "nes.nc_projections.points_nes_providentia.PointsNesProvidentia"]], "rotatednes (class in nes.nc_projections.rotated_nes)": [[7, "nes.nc_projections.rotated_nes.RotatedNes"]], "rotatednestednes (class in nes.nc_projections.rotated_nested_nes)": [[7, "nes.nc_projections.rotated_nested_nes.RotatedNestedNes"]], "add_4d_vertical_info() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.add_4d_vertical_info"]], "add_variables_to_shapefile() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.add_variables_to_shapefile"]], "add_variables_to_shapefile() (nes.nc_projections.points_nes.pointsnes method)": [[7, "nes.nc_projections.points_nes.PointsNes.add_variables_to_shapefile"]], "add_variables_to_shapefile() (nes.nc_projections.points_nes_ghost.pointsnesghost method)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST.add_variables_to_shapefile"]], "add_variables_to_shapefile() (nes.nc_projections.points_nes_providentia.pointsnesprovidentia method)": [[7, "nes.nc_projections.points_nes_providentia.PointsNesProvidentia.add_variables_to_shapefile"]], "append_time_step_data() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.append_time_step_data"]], "calculate_geometry_area() (nes.nc_projections.default_nes.nes static method)": [[7, "nes.nc_projections.default_nes.Nes.calculate_geometry_area"]], "calculate_grid_area() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.calculate_grid_area"]], "clear_communicator() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.clear_communicator"]], "close() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.close"]], "concatenate() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.concatenate"]], "copy() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.copy"]], "create_providentia_exp_centre_coordinates() (nes.nc_projections.latlon_nes.latlonnes method)": [[7, "nes.nc_projections.latlon_nes.LatLonNes.create_providentia_exp_centre_coordinates"]], "create_providentia_exp_centre_coordinates() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.create_providentia_exp_centre_coordinates"]], "create_providentia_exp_centre_coordinates() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.create_providentia_exp_centre_coordinates"]], "create_providentia_exp_centre_coordinates() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.create_providentia_exp_centre_coordinates"]], "create_providentia_exp_grid_edge_coordinates() (nes.nc_projections.latlon_nes.latlonnes method)": [[7, "nes.nc_projections.latlon_nes.LatLonNes.create_providentia_exp_grid_edge_coordinates"]], "create_providentia_exp_grid_edge_coordinates() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.create_providentia_exp_grid_edge_coordinates"]], "create_providentia_exp_grid_edge_coordinates() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.create_providentia_exp_grid_edge_coordinates"]], "create_providentia_exp_grid_edge_coordinates() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.create_providentia_exp_grid_edge_coordinates"]], "create_shapefile() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.create_shapefile"]], "create_shapefile() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.create_shapefile"]], "create_shapefile() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.create_shapefile"]], "create_shapefile() (nes.nc_projections.points_nes.pointsnes method)": [[7, "nes.nc_projections.points_nes.PointsNes.create_shapefile"]], "create_shapefile() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.create_shapefile"]], "create_single_spatial_bounds() (nes.nc_projections.default_nes.nes static method)": [[7, "nes.nc_projections.default_nes.Nes.create_single_spatial_bounds"]], "create_spatial_bounds() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.create_spatial_bounds"]], "create_spatial_bounds() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.create_spatial_bounds"]], "create_spatial_bounds() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.create_spatial_bounds"]], "create_spatial_bounds() (nes.nc_projections.points_nes.pointsnes method)": [[7, "nes.nc_projections.points_nes.PointsNes.create_spatial_bounds"]], "create_spatial_bounds() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.create_spatial_bounds"]], "daily_statistic() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.daily_statistic"]], "erase_flags() (nes.nc_projections.points_nes_ghost.pointsnesghost method)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST.erase_flags"]], "filter_coordinates_selection() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.filter_coordinates_selection"]], "filter_coordinates_selection() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.filter_coordinates_selection"]], "filter_coordinates_selection() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.filter_coordinates_selection"]], "filter_coordinates_selection() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.filter_coordinates_selection"]], "find_time_id() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.find_time_id"]], "free_vars() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.free_vars"]], "get_centroids_from_coordinates() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_centroids_from_coordinates"]], "get_centroids_from_coordinates() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.get_centroids_from_coordinates"]], "get_centroids_from_coordinates() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.get_centroids_from_coordinates"]], "get_centroids_from_coordinates() (nes.nc_projections.points_nes.pointsnes method)": [[7, "nes.nc_projections.points_nes.PointsNes.get_centroids_from_coordinates"]], "get_centroids_from_coordinates() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.get_centroids_from_coordinates"]], "get_climatology() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_climatology"]], "get_coordinate_id() (nes.nc_projections.default_nes.nes static method)": [[7, "nes.nc_projections.default_nes.Nes.get_coordinate_id"]], "get_earth_radius() (nes.nc_projections.default_nes.nes static method)": [[7, "nes.nc_projections.default_nes.Nes.get_earth_radius"]], "get_fids() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_fids"]], "get_full_levels() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_full_levels"]], "get_full_times() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_full_times"]], "get_idx_intervals() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_idx_intervals"]], "get_read_axis_limits() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_read_axis_limits"]], "get_read_axis_limits_balanced() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_read_axis_limits_balanced"]], "get_read_axis_limits_unbalanced() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_read_axis_limits_unbalanced"]], "get_spatial_bounds_mesh_format() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_spatial_bounds_mesh_format"]], "get_standard_metadata() (nes.nc_projections.points_nes_ghost.pointsnesghost method)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST.get_standard_metadata"]], "get_time_id() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_time_id"]], "get_time_interval() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_time_interval"]], "get_write_axis_limits() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_write_axis_limits"]], "get_write_axis_limits_balanced() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_write_axis_limits_balanced"]], "get_write_axis_limits_unbalanced() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.get_write_axis_limits_unbalanced"]], "interpolate_horizontal() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.interpolate_horizontal"]], "interpolate_vertical() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.interpolate_vertical"]], "keep_vars() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.keep_vars"]], "last_time_step() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.last_time_step"]], "load() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.load"]], "lon_lat_to_cartesian_ecef() (nes.nc_projections.default_nes.nes static method)": [[7, "nes.nc_projections.default_nes.Nes.lon_lat_to_cartesian_ecef"]], "nes.nc_projections.default_nes": [[7, "module-nes.nc_projections.default_nes"]], "nes.nc_projections.latlon_nes": [[7, "module-nes.nc_projections.latlon_nes"]], "nes.nc_projections.lcc_nes": [[7, "module-nes.nc_projections.lcc_nes"]], "nes.nc_projections.mercator_nes": [[7, "module-nes.nc_projections.mercator_nes"]], "nes.nc_projections.points_nes": [[7, "module-nes.nc_projections.points_nes"]], "nes.nc_projections.points_nes_ghost": [[7, "module-nes.nc_projections.points_nes_ghost"]], "nes.nc_projections.points_nes_providentia": [[7, "module-nes.nc_projections.points_nes_providentia"]], "nes.nc_projections.rotated_nes": [[7, "module-nes.nc_projections.rotated_nes"]], "nes.nc_projections.rotated_nested_nes": [[7, "module-nes.nc_projections.rotated_nested_nes"]], "new() (nes.nc_projections.default_nes.nes static method)": [[7, "nes.nc_projections.default_nes.Nes.new"]], "new() (nes.nc_projections.latlon_nes.latlonnes static method)": [[7, "nes.nc_projections.latlon_nes.LatLonNes.new"]], "new() (nes.nc_projections.lcc_nes.lccnes static method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.new"]], "new() (nes.nc_projections.mercator_nes.mercatornes static method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.new"]], "new() (nes.nc_projections.points_nes.pointsnes static method)": [[7, "nes.nc_projections.points_nes.PointsNes.new"]], "new() (nes.nc_projections.points_nes_ghost.pointsnesghost static method)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST.new"]], "new() (nes.nc_projections.points_nes_providentia.pointsnesprovidentia static method)": [[7, "nes.nc_projections.points_nes_providentia.PointsNesProvidentia.new"]], "new() (nes.nc_projections.rotated_nes.rotatednes static method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.new"]], "open() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.open"]], "reverse_level_direction() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.reverse_level_direction"]], "rolling_mean() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.rolling_mean"]], "rotated2latlon() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.rotated2latlon"]], "sel() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.sel"]], "sel_time() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.sel_time"]], "set_climatology() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_climatology"]], "set_communicator() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_communicator"]], "set_level_direction() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_level_direction"]], "set_levels() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_levels"]], "set_strlen() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_strlen"]], "set_time() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_time"]], "set_time_bnds() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_time_bnds"]], "set_time_resolution() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.set_time_resolution"]], "spatial_join() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.spatial_join"]], "str2char() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.str2char"]], "sum_axis() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.sum_axis"]], "to_dtype() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.to_dtype"]], "to_grib2() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.to_grib2"]], "to_grib2() (nes.nc_projections.latlon_nes.latlonnes method)": [[7, "nes.nc_projections.latlon_nes.LatLonNes.to_grib2"]], "to_grib2() (nes.nc_projections.lcc_nes.lccnes method)": [[7, "nes.nc_projections.lcc_nes.LCCNes.to_grib2"]], "to_grib2() (nes.nc_projections.mercator_nes.mercatornes method)": [[7, "nes.nc_projections.mercator_nes.MercatorNes.to_grib2"]], "to_grib2() (nes.nc_projections.points_nes.pointsnes method)": [[7, "nes.nc_projections.points_nes.PointsNes.to_grib2"]], "to_grib2() (nes.nc_projections.rotated_nes.rotatednes method)": [[7, "nes.nc_projections.rotated_nes.RotatedNes.to_grib2"]], "to_netcdf() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.to_netcdf"]], "to_netcdf() (nes.nc_projections.points_nes_ghost.pointsnesghost method)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST.to_netcdf"]], "to_netcdf() (nes.nc_projections.points_nes_providentia.pointsnesprovidentia method)": [[7, "nes.nc_projections.points_nes_providentia.PointsNesProvidentia.to_netcdf"]], "to_points() (nes.nc_projections.points_nes_ghost.pointsnesghost method)": [[7, "nes.nc_projections.points_nes_ghost.PointsNesGHOST.to_points"]], "to_providentia() (nes.nc_projections.points_nes.pointsnes method)": [[7, "nes.nc_projections.points_nes.PointsNes.to_providentia"]], "to_shapefile() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.to_shapefile"]], "write_shapefile() (nes.nc_projections.default_nes.nes method)": [[7, "nes.nc_projections.default_nes.Nes.write_shapefile"]]}})
\ No newline at end of file
+Search.setIndex({"docnames": ["authors", "changelog", "contributing", "formats", "index", "methods", "object", "projections", "readme"], "filenames": ["authors.rst", "changelog.rst", "contributing.rst", "formats.rst", "index.rst", "methods.rst", "object.rst", "projections.rst", "readme.rst"], "titles": ["Authors", "CHANGELOG", "Contributing", "Formats", "Contents", "Methods", "The NES object", "Projections", "Introduction"], "terms": {"carl": [0, 2], "tena": 0, "ctwebpag": 0, "alba": [0, 2], "vilanova": 0, "cortez\u00f3n": 0, "avcwebpag": 0, "releas": [1, 8], "date": 1, "unknown": 1, "chang": [1, 2, 3, 7], "new": [1, 2, 5, 7, 8], "featur": [1, 8], "statist": [1, 7], "roll": [1, 7], "mean": [1, 7], "document": 1, "remov": [1, 6, 7], "neg": 1, "valu": [1, 3, 5, 6, 7], "horizont": [1, 3, 4, 7], "interpol": [1, 4, 7], "due": 1, "unmap": 1, "nan": 1, "improv": 1, "load_n": [1, 6], "py": 1, "redund": 1, "code": [1, 2], "fix": [1, 2, 5, 7], "vertic": [1, 4, 7], "descend": 1, "level": [1, 5, 6, 7], "pressur": 1, "71": 1, "http": [1, 5, 7, 8], "earth": [1, 5, 7, 8], "bsc": [1, 5, 8], "e": [1, 2, 5, 7, 8], "gitlab": [1, 5, 8], "ne": [1, 2, 3, 4, 5, 7, 8], "issu": [1, 2], "lat": [1, 3, 4, 5], "lon": [1, 3, 4, 5], "dimens": [1, 3, 7], "netcdf": [1, 3, 5, 6, 7, 8], "project": [1, 3, 4, 5, 6], "need": [1, 5, 7], "them": [1, 7], "2023": 1, "06": 1, "16": [1, 3], "rotat": [1, 4], "nest": [1, 4], "function": [1, 5, 7], "get_fid": [1, 7], "climatologi": 1, "option": [1, 7], "ad": [1, 7], "millisecond": 1, "second": [1, 5], "minut": 1, "dai": [1, 7], "time": [1, 2, 3, 6, 7], "unit": [1, 3, 7], "accept": [1, 5, 6, 7], "resolut": 1, "bug": [1, 2], "The": [1, 4, 7], "input": [1, 3], "argument": 1, "have": [1, 7], "been": [1, 2], "correct": 1, "month": 1, "05": 1, "15": 1, "minor": [1, 5, 7], "tutori": 1, "updat": [1, 2], "write": [1, 5, 6, 7, 8], "format": [1, 4, 5, 7], "cmaq": [1, 4], "monarch": [1, 4], "wrf_chem": 1, "63": 1, "04": 1, "12": 1, "sum": 1, "object": [1, 3, 4, 5, 7], "48": 1, "2d": [1, 5, 7], "string": [1, 3, 5, 7], "data": [1, 3, 5, 6, 7, 8], "save": [1, 7], "variabl": [1, 3, 5, 6, 7], "from": [1, 2, 3, 5, 6, 7], "shapefil": [1, 5, 6, 7], "after": 1, "do": 1, "spatial": [1, 4, 6, 7], "join": [1, 4, 6], "49": 1, "conserv": [1, 5, 7], "memori": 1, "usag": 1, "when": [1, 7], "calcul": [1, 5, 7], "weight": [1, 5, 7], "matrix": [1, 5, 7], "54": 1, "concatenate_netcdf": [1, 6], "55": 1, "step": [1, 3, 6, 7], "avoid": [1, 7], "57": 1, "flux": [1, 5, 7], "60": 1, "cell_method": 1, "serial": [1, 7], "53": 1, "avoid_first_hour": [1, 6, 7], "where": [1, 5, 7], "filter": [1, 5, 7], "read": [1, 5, 6, 7, 8], "59": 1, "while": [1, 7], "mask": 1, "grid_map": 1, "integ": 1, "instead": 1, "charact": 1, "03": 1, "02": 1, "cartesian": [1, 5, 7], "coordin": [1, 5, 7], "method": [1, 3, 4, 6, 7], "us": [1, 3, 5, 6, 7, 8], "providentia": [1, 4, 5], "to_shapefil": [1, 7], "creat": [1, 2, 3, 4, 5, 7], "without": [1, 2, 7], "lose": 1, "origin": [1, 7], "grid": [1, 3, 5, 6, 7], "being": 1, "abl": 1, "select": [1, 7], "from_shapefil": [1, 6], "create_shapefil": [1, 7], "can": [1, 7, 8], "now": 1, "parallel": [1, 5, 6, 7], "calculate_grid_area": [1, 5, 7], "area": [1, 5, 7], "each": [1, 5, 7], "cell": [1, 5, 7], "calculate_geometry_area": [1, 5, 7], "given": [1, 7], "set": [1, 3, 5, 7], "geometri": [1, 5, 7], "get_spatial_bounds_mesh_format": [1, 7], "get": [1, 5, 6, 7, 8], "boundari": [1, 5, 7], "mesh": [1, 7], "pcolormesh": [1, 7], "result": [1, 5, 7], "point": [1, 4, 5], "dataset": [1, 3, 6, 7], "ani": [1, 2, 7], "amend": 1, "take": 1, "account": 1, "case": [1, 2], "which": [1, 7], "distanc": [1, 5, 7], "among": 1, "equal": 1, "zero": 1, "wai": [1, 5], "we": [1, 5, 7], "retriev": 1, "posit": [1, 5, 7], "how": [1, 4], "bound": [1, 5, 7], "lcc": [1, 4], "mercat": [1, 4], "were": 1, "flip": [1, 7], "all": [1, 2, 5, 6, 7], "axi": [1, 5, 7], "limit": [1, 7], "centroid": [1, 5, 7], "creation": [1, 7], "geopanda": 1, "rais": 1, "warn": 1, "possibl": [1, 2, 7], "error": 1, "enabl": 1, "type": [1, 5, 7], "appear": [1, 2], "try": 1, "file": [1, 3, 5, 6, 7, 8], "2022": 1, "11": 1, "24": 1, "first": [1, 5, 6, 7], "beta": 1, "open": [1, 3, 6, 7], "regular": [1, 7], "latitud": [1, 5, 7], "longitud": [1, 5, 7], "lambert": 1, "conform": 1, "conic": 1, "ghost": [1, 4], "balanc": [1, 6, 7], "unbalanc": 1, "By": 1, "y": [1, 3, 5, 6, 7], "x": [1, 3, 5, 6, 7], "cam": [1, 4], "reanalysi": 1, "grib2": [1, 7], "nearest": [1, 5, 6, 7], "neighbour": [1, 5, 7], "daily_mean": 1, "daily_max": 1, "daily_min": 1, "last": [1, 6, 7], "concaten": [1, 6, 7], "same": [1, 5, 7], "period": 1, "differ": [1, 6, 7], "an": [2, 5, 7], "complet": [2, 7], "descript": [2, 7], "much": 2, "estim": 2, "correspond": [2, 7], "mileston": 2, "assign": 2, "person": 2, "etc": 2, "branch": [2, 8], "master": [2, 7, 8], "directli": 2, "Its": 2, "name": [2, 3, 7], "should": 2, "start": 2, "develop": 2, "follow": [2, 7, 8], "number": [2, 5, 6, 7], "titl": 2, "default": [2, 4, 5, 6], "clone": [2, 4], "checkout": [2, 8], "modif": 2, "nord3v2": 2, "It": [2, 5, 7], "i": [2, 5, 6, 7, 8], "recommend": [2, 5], "run": [2, 4], "some": [2, 7], "test": [2, 8], "ensur": 2, "current": [2, 7], "behavior": 2, "modifi": [2, 3, 7], "simul": 2, "import": 2, "prepend": 2, "path": [2, 3, 5, 6, 7], "pythonpath": 2, "g": 2, "export": 2, "gpf": 2, "scratch": [2, 6, 7], "bsc32": 2, "bsc32538": 2, "specif": 2, "your": 2, "folder": 2, "changelog": [2, 4], "rst": 2, "includ": [2, 5, 7], "inform": [2, 5, 7], "wiki": [2, 8], "merg": 2, "To": [2, 5, 7], "ha": [2, 7], "ar": [2, 7, 8], "request": 2, "avilanov": 2, "ctena": 2, "who": 2, "review": 2, "nes_format": 3, "cams_ra_format": 3, "create_dimension_vari": 3, "self": [3, 5, 7], "sourc": [3, 5, 6, 7], "time_bnd": [3, 7], "lev": [3, 7], "lat_bnd": [3, 7], "lon_bnd": [3, 7], "netcdf4": [3, 7], "python": [3, 7, 8], "create_dimens": 3, "create_vari": 3, "i_lev": 3, "date2num": 3, "time_arrai": 3, "time_unit": 3, "none": [3, 5, 6, 7], "time_calendar": 3, "to_netcdf_cams_ra": 3, "one": [3, 5, 7], "anoth": [3, 5, 7], "str": [3, 5, 6, 7], "output": [3, 7], "cmaq_format": 3, "change_variable_attribut": 3, "emiss": 3, "list": [3, 5, 6, 7], "consist": 3, "model": [3, 5, 7], "create_tflag": 3, "content": 3, "tflag": 3, "numpi": [3, 7], "ndarrai": [3, 7], "arrai": [3, 5, 7], "set_global_attribut": 3, "global": [3, 7], "attribut": 3, "str_var_list": 3, "transform": [3, 7], "element": [3, 7], "white": 3, "space": 3, "to_cmaq_unit": 3, "accord": [3, 5], "convent": 3, "dict": [3, 7], "to_netcdf_cmaq": 3, "chunk": [3, 6, 7], "fals": [3, 5, 6, 7], "keep_open": [3, 7], "bool": [3, 5, 6, 7], "indic": [3, 5, 6, 7], "you": [3, 5, 6, 7, 8], "want": [3, 5, 6, 7], "keep": [3, 7], "netcdh": [3, 7], "fill": [3, 7], "monarch_format": 3, "to_monarch_unit": 3, "to_netcdf_monarch": 3, "wrf_chem_format": 3, "create_times_var": 3, "to_netcdf_wrf_chem": 3, "to_wrf_chem_unit": 3, "introduct": 4, "about": 4, "load": [4, 7], "gener": 4, "ra": 4, "wrf": 4, "chem": 4, "regulat": 4, "contribut": 4, "1": [4, 5, 7], "4": [4, 5, 7], "3": 4, "2": [4, 7], "0": [4, 5, 6, 7], "author": 4, "cell_measur": 5, "calculate_cell_area": 5, "grid_corner_lon": 5, "grid_corner_lat": 5, "earth_radius_minor_axi": [5, 7], "6356752": [5, 7], "3142": [5, 7], "earth_radius_major_axi": [5, 7], "6378137": [5, 7], "np": [5, 7], "float": [5, 7], "radiu": [5, 7], "major": [5, 7], "geometry_list": [5, 7], "call": [5, 7], "polygon": [5, 7], "cross_product": 5, "b": 5, "cross": 5, "product": [5, 8], "between": [5, 7], "two": [5, 7], "lon_lat_to_cartesian": 5, "sphere": 5, "mod_huiliers_area": 5, "cell_corner_lon": 5, "cell_corner_lat": 5, "huilier": 5, "": [5, 7], "theorem": 5, "refer": [5, 7], "cdo": 5, "ce": 5, "norm": 5, "cp": 5, "normal": 5, "oper": [5, 7], "tri_area": 5, "point_0": 5, "point_1": 5, "point_2": 5, "three": 5, "form": [5, 6], "triangl": 5, "third": 5, "horizontal_interpol": 5, "create_area_conservative_weight_matrix": 5, "dst_ne": 5, "wm_path": 5, "info": [5, 6, 7], "final": [5, 7], "print": [5, 6, 7], "extra": [5, 7], "dure": [5, 7], "process": [5, 7, 8], "create_nn_weight_matrix": 5, "dst_grid": [5, 7], "n_neighbour": [5, 7], "int": [5, 6, 7], "kind": [5, 7], "nearestneighbour": [5, 7], "get_src_data": 5, "comm": [5, 6, 7], "var_data": 5, "idx": 5, "parallel_method": [5, 6, 7], "obtain": [5, 7], "src": 5, "mpi": [5, 6, 7], "commun": [5, 6, 7], "rank": [5, 7], "index": [5, 6, 7], "flatten": 5, "get_weights_idx_t_axi": 5, "weight_matrix_path": [5, 7], "only_cr": 5, "wm": [5, 7], "through": [5, 7], "t": [5, 6, 7], "onli": [5, 6, 7], "tupl": [5, 7], "get_weights_idx_xy_axi": 5, "interpolate_horizont": [5, 7], "to_providentia": [5, 7], "only_create_wm": [5, 7], "deprec": 5, "lon_lat_to_cartesian_ecef": [5, 7], "convert": [5, 7], "observ": [5, 7], "geograph": [5, 7], "ecef": [5, 7], "centr": [5, 7], "assum": [5, 7], "wgs84": [5, 7], "datum": [5, 7], "ellipsoid": [5, 7], "height": [5, 7], "coordiant": [5, 7], "repres": [5, 7], "meter": [5, 7], "z": [5, 7], "approxim": [5, 7], "surfac": [5, 7], "revolut": [5, 7], "thi": [5, 7], "convers": [5, 7], "subsequ": [5, 7], "euclidean": [5, 7], "gridcel": [5, 7], "station": [5, 7], "defin": [5, 7], "simpli": [5, 7], "pair": [5, 7], "could": [5, 7], "lead": [5, 7], "inaccur": [5, 7], "depend": [5, 7], "deg": [5, 7], "vari": [5, 7], "read_weight_matrix": 5, "spatial_join": [5, 7], "get_bbox": 5, "box": 5, "lon_min": [5, 7], "lat_min": [5, 7], "lon_max": [5, 7], "lat_max": [5, 7], "prepare_external_shapefil": 5, "ext_shp": [5, 7], "var_list": [5, 7], "apply_bbox": [5, 7], "true": [5, 7], "prepar": 5, "extern": 5, "high": 5, "pass": 5, "becaus": 5, "clip": 5, "alreadi": 5, "standard": [5, 7], "geodatafram": [5, 7], "comput": [5, 7], "reduc": [5, 7], "bbox": [5, 7], "overlai": [5, 6, 7], "intersect": [5, 6, 7], "geopandasdatafram": [5, 7], "spatial_join_centroid": 5, "perform": [5, 7], "spatial_join_intersect": 5, "spatial_join_nearest": 5, "vertical_interpol": 5, "add_4d_vertical_info": [5, 7], "info_to_add": [5, 7], "add": [5, 6, 7], "other": [5, 7], "contain": [5, 7], "interpolate_vert": [5, 7], "new_level": [5, 7], "new_src_vert": [5, 7], "linear": [5, 7], "extrapol": [5, 7], "overwrit": [5, 7], "non": [5, 7], "create_n": [6, 7], "avoid_last_hour": [6, 7], "first_level": [6, 7], "last_level": [6, 7], "kwarg": [6, 7], "class": [6, 7], "cannot": [6, 7], "written": [6, 7], "mode": [6, 7], "hour": [6, 7], "nessy_list": 6, "open_netcdf": [6, 7], "xarrai": [6, 7], "comm_world": 6, "Not": [6, 7], "work": [6, 7], "stdout": [6, 7], "lazi": [6, 7], "metadata": [6, 7], "nc_project": 7, "default_n": 7, "base": 7, "size": 7, "is_xarrai": 7, "__ini_path": 7, "hours_start": 7, "hours_end": 7, "xr": 7, "store": 7, "dictionari": 7, "var_nam": 7, "kei": 7, "_time": 7, "_lev": 7, "rest": 7, "_lat": 7, "_lon": 7, "_": 7, "chosen": 7, "read_axis_limit": 7, "4d": 7, "t_min": 7, "t_max": 7, "z_min": 7, "z_max": 7, "y_min": 7, "y_max": 7, "x_min": 7, "x_max": 7, "write_axis_limit": 7, "datetim": 7, "portion": 7, "global_attr": 7, "_var_dim": 7, "_lat_dim": 7, "_lon_dim": 7, "pyproj": 7, "proj": 7, "projection_data": 7, "add_variables_to_shapefil": 7, "idx_lev": 7, "idx_tim": 7, "append_time_step_data": 7, "i_tim": 7, "out_format": 7, "static": 7, "clear_commun": 7, "eras": 7, "close": 7, "aux_nessi": 7, "var": 7, "copi": [7, 8], "copy_var": 7, "nessi": 7, "datafram": 7, "create_single_spatial_bound": 7, "inc": 7, "spatial_nv": 7, "invers": 7, "degre": 7, "increment": 7, "mandatori": 7, "must": 7, "For": [7, 8], "mani": 7, "coord": 7, "create_spatial_bound": 7, "daily_statist": 7, "op": 7, "type_op": 7, "calendar": 7, "daili": 7, "max": 7, "min": 7, "alltstep": 7, "withoutt0": 7, "singl": 7, "filter_coordinates_select": 7, "find_time_id": 7, "find": 7, "free_var": 7, "get_centroids_from_coordin": 7, "centroids_gdf": 7, "get_climatologi": 7, "get_coordinate_id": 7, "search": 7, "get_earth_radiu": 7, "ellp": 7, "system": 7, "fid": 7, "get_full_level": 7, "get_full_tim": 7, "get_idx_interv": 7, "interv": 7, "get_read_axis_limit": 7, "get_read_axis_limits_balanc": 7, "get_read_axis_limits_unbalanc": 7, "see": 7, "matplotlib": 7, "org": 7, "stabl": [7, 8], "api": 7, "_as_gen": 7, "pyplot": 7, "html": 7, "lon_bnds_mesh": 7, "lat_bnds_mesh": 7, "get_time_id": 7, "get_time_interv": 7, "interrv": 7, "get_write_axis_limit": 7, "get_write_axis_limits_balanc": 7, "get_write_axis_limits_unbalanc": 7, "choic": 7, "keep_var": 7, "last_time_step": 7, "That": 7, "initi": 7, "over": 7, "exist": 7, "substitut": 7, "ones": 7, "reverse_level_direct": 7, "rolling_mean": 7, "8": 7, "window": 7, "sel": 7, "time_min": 7, "time_max": 7, "lev_min": 7, "lev_max": 7, "slice": 7, "minimum": 7, "maximum": 7, "sel_tim": 7, "stamp": 7, "te": 7, "set_climatologi": 7, "is_climatologi": 7, "set_commun": 7, "set_level_direct": 7, "new_direct": 7, "set_level": 7, "set_strlen": 7, "strlen": 7, "75": 7, "length": 7, "set_tim": 7, "time_list": 7, "set_time_bnd": 7, "set_time_resolut": 7, "new_resolut": 7, "str2char": 7, "sum_axi": 7, "to_dtyp": 7, "data_typ": 7, "float32": 7, "cast": 7, "to_grib2": 7, "grib_kei": 7, "grib_template_path": 7, "lat_flip": 7, "templat": 7, "to_netcdf": 7, "compression_level": 7, "compress": 7, "9": 7, "avail": 7, "cams_ra": 7, "independ": 7, "write_shapefil": 7, "latlon_n": 7, "latlonn": 7, "create_providentia_exp_centre_coordin": 7, "model_centre_lat": 7, "model_centre_lon": 7, "create_providentia_exp_grid_edge_coordin": 7, "edg": 7, "outlin": 7, "grid_edge_lat": 7, "grid_edge_lon": 7, "lcc_ne": 7, "lccne": 7, "_y": 7, "_x": 7, "mercator_n": 7, "mercatorn": 7, "points_n": 7, "pointsn": 7, "_station": 7, "pointsnesprovidentia": 7, "points_nes_providentia": 7, "points_nes_ghost": 7, "pointsnesghost": 7, "_qa": 7, "qualiti": 7, "flag": 7, "check": 7, "_flag": 7, "provid": 7, "erase_flag": 7, "get_standard_metadata": 7, "ghost_vers": 7, "version": [7, 8], "metadata_vari": 7, "certain": 7, "to_point": 7, "_model_centre_lon": 7, "_model_centre_lat": 7, "_grid_edge_lon": 7, "_grid_edge_lat": 7, "rotated_n": 7, "rotatedn": 7, "_rlat": 7, "_rlon": 7, "rlat": 7, "rlon": 7, "rotated2latlon": 7, "lon_deg": 7, "lat_deg": 7, "180": 7, "unrot": 7, "360": 7, "almd": 7, "aphd": 7, "rotated_nested_n": 7, "rotatednestedn": 7, "scienc": 8, "o": 8, "librari": 8, "sne": 8, "framework": 8, "implement": 8, "post": 8, "pipelin": 8, "depart": 8, "command": 8, "repositori": 8, "git": 8, "latest": 8, "access": 8, "also": 8, "upcom": 8, "pleas": 8, "instruct": 8}, "objects": {"nes": [[6, 0, 0, "-", "create_nes"], [6, 0, 0, "-", "load_nes"]], "nes.create_nes": [[6, 1, 1, "", "create_nes"], [6, 1, 1, "", "from_shapefile"]], "nes.load_nes": [[6, 1, 1, "", "concatenate_netcdfs"], [6, 1, 1, "", "open_netcdf"]], "nes.methods": [[5, 0, 0, "-", "cell_measures"], [5, 0, 0, "-", "horizontal_interpolation"], [5, 0, 0, "-", "spatial_join"], [5, 0, 0, "-", "vertical_interpolation"]], "nes.methods.cell_measures": [[5, 1, 1, "", "calculate_cell_area"], [5, 1, 1, "", "calculate_geometry_area"], [5, 1, 1, "", "calculate_grid_area"], [5, 1, 1, "", "cross_product"], [5, 1, 1, "", "lon_lat_to_cartesian"], [5, 1, 1, "", "mod_huiliers_area"], [5, 1, 1, "", "norm"], [5, 1, 1, "", "tri_area"]], "nes.methods.horizontal_interpolation": [[5, 1, 1, "", "create_area_conservative_weight_matrix"], [5, 1, 1, "", "create_nn_weight_matrix"], [5, 1, 1, "", "get_src_data"], [5, 1, 1, "", "get_weights_idx_t_axis"], [5, 1, 1, "", "get_weights_idx_xy_axis"], [5, 1, 1, "", "interpolate_horizontal"], [5, 1, 1, "", "lon_lat_to_cartesian"], [5, 1, 1, "", "lon_lat_to_cartesian_ecef"], [5, 1, 1, "", "read_weight_matrix"]], "nes.methods.spatial_join": [[5, 1, 1, "", "get_bbox"], [5, 1, 1, "", "prepare_external_shapefile"], [5, 1, 1, "", "spatial_join"], [5, 1, 1, "", "spatial_join_centroid"], [5, 1, 1, "", "spatial_join_intersection"], [5, 1, 1, "", "spatial_join_nearest"]], "nes.methods.vertical_interpolation": [[5, 1, 1, "", "add_4d_vertical_info"], [5, 1, 1, "", "interpolate_vertical"]], "nes.nc_projections": [[7, 0, 0, "-", "default_nes"], [7, 0, 0, "-", "latlon_nes"], [7, 0, 0, "-", "lcc_nes"], [7, 0, 0, "-", "mercator_nes"], [7, 0, 0, "-", "points_nes"], [7, 0, 0, "-", "points_nes_ghost"], [7, 0, 0, "-", "points_nes_providentia"], [7, 0, 0, "-", "rotated_nes"], [7, 0, 0, "-", "rotated_nested_nes"]], "nes.nc_projections.default_nes": [[7, 2, 1, "", "Nes"]], "nes.nc_projections.default_nes.Nes": [[7, 3, 1, "", "add_4d_vertical_info"], [7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "append_time_step_data"], [7, 3, 1, "", "calculate_geometry_area"], [7, 3, 1, "", "calculate_grid_area"], [7, 3, 1, "", "clear_communicator"], [7, 3, 1, "", "close"], [7, 3, 1, "", "concatenate"], [7, 3, 1, "", "copy"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_single_spatial_bounds"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "daily_statistic"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "find_time_id"], [7, 3, 1, "", "free_vars"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "get_climatology"], [7, 3, 1, "", "get_coordinate_id"], [7, 3, 1, "", "get_earth_radius"], [7, 3, 1, "", "get_fids"], [7, 3, 1, "", "get_full_levels"], [7, 3, 1, "", "get_full_times"], [7, 3, 1, "", "get_idx_intervals"], [7, 3, 1, "", "get_read_axis_limits"], [7, 3, 1, "", "get_read_axis_limits_balanced"], [7, 3, 1, "", "get_read_axis_limits_unbalanced"], [7, 3, 1, "", "get_spatial_bounds_mesh_format"], [7, 3, 1, "", "get_time_id"], [7, 3, 1, "", "get_time_interval"], [7, 3, 1, "", "get_write_axis_limits"], [7, 3, 1, "", "get_write_axis_limits_balanced"], [7, 3, 1, "", "get_write_axis_limits_unbalanced"], [7, 3, 1, "", "interpolate_horizontal"], [7, 3, 1, "", "interpolate_vertical"], [7, 3, 1, "", "keep_vars"], [7, 3, 1, "", "last_time_step"], [7, 3, 1, "", "load"], [7, 3, 1, "", "lon_lat_to_cartesian_ecef"], [7, 3, 1, "", "new"], [7, 3, 1, "", "open"], [7, 3, 1, "", "reverse_level_direction"], [7, 3, 1, "", "rolling_mean"], [7, 3, 1, "", "sel"], [7, 3, 1, "", "sel_time"], [7, 3, 1, "", "set_climatology"], [7, 3, 1, "", "set_communicator"], [7, 3, 1, "", "set_level_direction"], [7, 3, 1, "", "set_levels"], [7, 3, 1, "", "set_strlen"], [7, 3, 1, "", "set_time"], [7, 3, 1, "", "set_time_bnds"], [7, 3, 1, "", "set_time_resolution"], [7, 3, 1, "", "spatial_join"], [7, 3, 1, "", "str2char"], [7, 3, 1, "", "sum_axis"], [7, 3, 1, "", "to_dtype"], [7, 3, 1, "", "to_grib2"], [7, 3, 1, "", "to_netcdf"], [7, 3, 1, "", "to_shapefile"], [7, 3, 1, "", "write_shapefile"]], "nes.nc_projections.latlon_nes": [[7, 2, 1, "", "LatLonNes"]], "nes.nc_projections.latlon_nes.LatLonNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.lcc_nes": [[7, 2, 1, "", "LCCNes"]], "nes.nc_projections.lcc_nes.LCCNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.mercator_nes": [[7, 2, 1, "", "MercatorNes"]], "nes.nc_projections.mercator_nes.MercatorNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.points_nes": [[7, 2, 1, "", "PointsNes"]], "nes.nc_projections.points_nes.PointsNes": [[7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_grib2"], [7, 3, 1, "", "to_providentia"]], "nes.nc_projections.points_nes_ghost": [[7, 2, 1, "", "PointsNesGHOST"]], "nes.nc_projections.points_nes_ghost.PointsNesGHOST": [[7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "erase_flags"], [7, 3, 1, "", "get_standard_metadata"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_netcdf"], [7, 3, 1, "", "to_points"]], "nes.nc_projections.points_nes_providentia": [[7, 2, 1, "", "PointsNesProvidentia"]], "nes.nc_projections.points_nes_providentia.PointsNesProvidentia": [[7, 3, 1, "", "add_variables_to_shapefile"], [7, 3, 1, "", "new"], [7, 3, 1, "", "to_netcdf"]], "nes.nc_projections.rotated_nes": [[7, 2, 1, "", "RotatedNes"]], "nes.nc_projections.rotated_nes.RotatedNes": [[7, 3, 1, "", "create_providentia_exp_centre_coordinates"], [7, 3, 1, "", "create_providentia_exp_grid_edge_coordinates"], [7, 3, 1, "", "create_shapefile"], [7, 3, 1, "", "create_spatial_bounds"], [7, 3, 1, "", "filter_coordinates_selection"], [7, 3, 1, "", "get_centroids_from_coordinates"], [7, 3, 1, "", "new"], [7, 3, 1, "", "rotated2latlon"], [7, 3, 1, "", "to_grib2"]], "nes.nc_projections.rotated_nested_nes": [[7, 2, 1, "", "RotatedNestedNes"]], "nes.nes_formats": [[3, 0, 0, "-", "cams_ra_format"], [3, 0, 0, "-", "cmaq_format"], [3, 0, 0, "-", "monarch_format"], [3, 0, 0, "-", "wrf_chem_format"]], "nes.nes_formats.cams_ra_format": [[3, 1, 1, "", "create_dimension_variables"], [3, 1, 1, "", "create_dimensions"], [3, 1, 1, "", "create_variables"], [3, 1, 1, "", "date2num"], [3, 1, 1, "", "to_netcdf_cams_ra"]], "nes.nes_formats.cmaq_format": [[3, 1, 1, "", "change_variable_attributes"], [3, 1, 1, "", "create_dimension_variables"], [3, 1, 1, "", "create_dimensions"], [3, 1, 1, "", "create_tflag"], [3, 1, 1, "", "create_variables"], [3, 1, 1, "", "set_global_attributes"], [3, 1, 1, "", "str_var_list"], [3, 1, 1, "", "to_cmaq_units"], [3, 1, 1, "", "to_netcdf_cmaq"]], "nes.nes_formats.monarch_format": [[3, 1, 1, "", "to_monarch_units"], [3, 1, 1, "", "to_netcdf_monarch"]], "nes.nes_formats.wrf_chem_format": [[3, 1, 1, "", "change_variable_attributes"], [3, 1, 1, "", "create_dimension_variables"], [3, 1, 1, "", "create_dimensions"], [3, 1, 1, "", "create_times_var"], [3, 1, 1, "", "create_variables"], [3, 1, 1, "", "set_global_attributes"], [3, 1, 1, "", "to_netcdf_wrf_chem"], [3, 1, 1, "", "to_wrf_chem_units"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"]}, "titleterms": {"author": 0, "changelog": 1, "1": 1, "4": 1, "3": 1, "2": 1, "0": 1, "contribut": 2, "format": 3, "cam": 3, "ra": 3, "paramet": [3, 5, 6, 7], "cmaq": 3, "return": [3, 5, 6, 7], "monarch": 3, "wrf": 3, "chem": 3, "content": 4, "method": 5, "gener": 5, "horizont": 5, "interpol": 5, "spatial": 5, "join": 5, "vertic": 5, "The": 6, "ne": 6, "object": 6, "creat": 6, "load": 6, "project": 7, "default": 7, "attribut": 7, "regulat": 7, "lat": 7, "lon": 7, "lcc": 7, "mercat": 7, "point": 7, "ghost": 7, "providentia": 7, "rotat": 7, "nest": 7, "introduct": 8, "about": 8, "how": 8, "clone": 8, "run": 8}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 60}, "alltitles": {"Authors": [[0, "authors"]], "CHANGELOG": [[1, "changelog"]], "1.1.4": [[1, "id1"]], "1.1.3": [[1, "id2"]], "1.1.2": [[1, "id3"]], "1.1.1": [[1, "id4"]], "1.1.0": [[1, "id5"]], "1.0.0": [[1, "id6"]], "Contributing": [[2, "contributing"]], "Formats": [[3, "formats"]], "CAMS RA format": [[3, "module-nes.nes_formats.cams_ra_format"]], "Parameters": [[3, "parameters"], [3, "id1"], [3, "id2"], [3, "id3"], [3, "id4"], [3, "id5"], [3, "id6"], [3, "id7"], [3, "id8"], [3, "id9"], [3, "id10"], [3, "id12"], [3, "id14"], [3, "id15"], [3, "id17"], [3, "id18"], [3, "id19"], [3, "id20"], [3, "id21"], [3, "id23"], [3, "id24"], [3, "id25"], [3, "id26"], [6, "parameters"], [6, "id1"], [6, "id2"], [6, "id3"], [7, "parameters"], [7, "id1"], [7, "id2"], [7, "id3"], [7, "id4"], [7, "id5"], [7, "id8"], [7, "id10"], [7, "id11"], [7, "id13"], [7, "id15"], [7, "id17"], [7, "id24"], [7, "id30"], [7, "id31"], [7, "id32"], [7, "id33"], [7, "id34"], [7, "id35"], [7, "id36"], [7, "id38"], [7, "id40"], [7, "id41"], [7, "id42"], [7, "id43"], [7, "id44"], [7, "id45"], [7, "id46"], [7, "id47"], [7, "id48"], [7, "id49"], [7, "id50"], [7, "id54"], [7, "id55"], [7, "id61"], [7, "id62"], [7, "id68"], [7, "id69"], [7, "id73"], [7, "id74"], [7, "id77"], [7, "id79"], [7, "id80"], [7, "id83"], [7, "id84"], [7, "id90"], [7, "id91"], [7, "id93"], [5, "parameters"], [5, "id1"], [5, "id2"], [5, "id3"], [5, "id4"], [5, "id5"], [5, "id6"], [5, "id7"], [5, "id8"], [5, "id9"], [5, "id11"], [5, "id13"], [5, "id15"], [5, "id17"], [5, "id18"], [5, "id19"], [5, "id20"], [5, "id22"], [5, "id24"], [5, "id26"], [5, "id27"], [5, "id28"], [5, "id29"], [5, "id30"], [5, "id31"]], "CMAQ format": [[3, "module-nes.nes_formats.cmaq_format"]], "Returns": [[3, "returns"], [3, "id11"], [3, "id13"], [3, "id16"], [3, "id22"], [3, "id27"], [6, "returns"], [6, "id4"], [7, "returns"], [7, "id6"], [7, "id7"], [7, "id9"], [7, "id12"], [7, "id14"], [7, "id16"], [7, "id18"], [7, "id19"], [7, "id20"], [7, "id21"], [7, "id22"], [7, "id23"], [7, "id25"], [7, "id26"], [7, "id27"], [7, "id28"], [7, "id29"], [7, "id37"], [7, "id39"], [7, "id52"], [7, "id53"], [7, "id57"], [7, "id58"], [7, "id59"], [7, "id60"], [7, "id64"], [7, "id65"], [7, "id66"], [7, "id67"], [7, "id71"], [7, "id72"], [7, "id75"], [7, "id78"], [7, "id81"], [7, "id86"], [7, "id87"], [7, "id88"], [7, "id89"], [7, "id92"], [5, "returns"], [5, "id10"], [5, "id12"], [5, "id14"], [5, "id16"], [5, "id21"], [5, "id23"], [5, "id25"]], "MONARCH format": [[3, "module-nes.nes_formats.monarch_format"]], "WRF CHEM format": [[3, "module-nes.nes_formats.wrf_chem_format"]], "Contents": [[4, "contents"]], "The NES object": [[6, "the-nes-object"]], "Creating a NES object": [[6, "module-nes.create_nes"]], "Loading a NES object": [[6, "module-nes.load_nes"]], "Projections": [[7, "projections"]], "Default projection": [[7, "module-nes.nc_projections.default_nes"]], "Attributes": [[7, "attributes"], [7, "id51"], [7, "id56"], [7, "id63"], [7, "id70"], [7, "id76"], [7, "id82"], [7, "id85"]], "Regulat lat lon projection": [[7, "module-nes.nc_projections.latlon_nes"]], "LCC projection": [[7, "module-nes.nc_projections.lcc_nes"]], "Mercator projection": [[7, "module-nes.nc_projections.mercator_nes"]], "Points projection": [[7, "module-nes.nc_projections.points_nes"]], "GHOST projection": [[7, "module-nes.nc_projections.points_nes_ghost"]], "Providentia projection": [[7, "module-nes.nc_projections.points_nes_providentia"]], "Rotated projection": [[7, "module-nes.nc_projections.rotated_nes"]], "Rotated nested projection": [[7, "module-nes.nc_projections.rotated_nested_nes"]], "Introduction": [[8, "introduction"]], "About": [[8, "about"]], "How to clone": [[8, "how-to-clone"]], "How to run": [[8, "how-to-run"]], "Methods": [[5, "methods"]], "Generic methods": [[5, "module-nes.methods.cell_measures"]], "Horizontal interpolation": [[5, "module-nes.methods.horizontal_interpolation"]], "Spatial join": [[5, "module-nes.methods.spatial_join"]], "Vertical interpolation": [[5, "module-nes.methods.vertical_interpolation"]]}, "indexentries": {"add_4d_vertical_info() (in module nes.methods.vertical_interpolation)": [[5, "nes.methods.vertical_interpolation.add_4d_vertical_info"]], "calculate_cell_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.calculate_cell_area"]], "calculate_geometry_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.calculate_geometry_area"]], "calculate_grid_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.calculate_grid_area"]], "create_area_conservative_weight_matrix() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.create_area_conservative_weight_matrix"]], "create_nn_weight_matrix() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.create_nn_weight_matrix"]], "cross_product() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.cross_product"]], "get_bbox() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.get_bbox"]], "get_src_data() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.get_src_data"]], "get_weights_idx_t_axis() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.get_weights_idx_t_axis"]], "get_weights_idx_xy_axis() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.get_weights_idx_xy_axis"]], "interpolate_horizontal() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.interpolate_horizontal"]], "interpolate_vertical() (in module nes.methods.vertical_interpolation)": [[5, "nes.methods.vertical_interpolation.interpolate_vertical"]], "lon_lat_to_cartesian() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.lon_lat_to_cartesian"]], "lon_lat_to_cartesian() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.lon_lat_to_cartesian"]], "lon_lat_to_cartesian_ecef() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.lon_lat_to_cartesian_ecef"]], "mod_huiliers_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.mod_huiliers_area"]], "module": [[5, "module-nes.methods.cell_measures"], [5, "module-nes.methods.horizontal_interpolation"], [5, "module-nes.methods.spatial_join"], [5, "module-nes.methods.vertical_interpolation"]], "nes.methods.cell_measures": [[5, "module-nes.methods.cell_measures"]], "nes.methods.horizontal_interpolation": [[5, "module-nes.methods.horizontal_interpolation"]], "nes.methods.spatial_join": [[5, "module-nes.methods.spatial_join"]], "nes.methods.vertical_interpolation": [[5, "module-nes.methods.vertical_interpolation"]], "norm() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.norm"]], "prepare_external_shapefile() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.prepare_external_shapefile"]], "read_weight_matrix() (in module nes.methods.horizontal_interpolation)": [[5, "nes.methods.horizontal_interpolation.read_weight_matrix"]], "spatial_join() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join"]], "spatial_join_centroid() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join_centroid"]], "spatial_join_intersection() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join_intersection"]], "spatial_join_nearest() (in module nes.methods.spatial_join)": [[5, "nes.methods.spatial_join.spatial_join_nearest"]], "tri_area() (in module nes.methods.cell_measures)": [[5, "nes.methods.cell_measures.tri_area"]]}})
\ No newline at end of file
diff --git a/nes/methods/cell_measures.py b/nes/methods/cell_measures.py
index 2866b8b9b2856898d189300a4131ef6fa0b8cd0d..3e561c554f604eb9acf9e5b8fdaa9ffdf708dc2e 100644
--- a/nes/methods/cell_measures.py
+++ b/nes/methods/cell_measures.py
@@ -134,14 +134,14 @@ def calculate_cell_area(grid_corner_lon, grid_corner_lat,
def mod_huiliers_area(cell_corner_lon, cell_corner_lat):
"""
Calculate the area of each cell according to Huilier's theorem.
- Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/)
+ Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/).
Parameters
----------
cell_corner_lon : np.array
- Longitude boundaries of each cell
+ Longitude boundaries of each cell.
cell_corner_lat : np.array
- Latitude boundaries of each cell
+ Latitude boundaries of each cell.
"""
sum = 0
@@ -176,7 +176,7 @@ def mod_huiliers_area(cell_corner_lon, cell_corner_lat):
def tri_area(point_0, point_1, point_2):
"""
Calculate area between three points that form a triangle.
- Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/)
+ Reference: CDO (https://earth.bsc.es/gitlab/ces/cdo/).
Parameters
----------
diff --git a/nes/methods/horizontal_interpolation.py b/nes/methods/horizontal_interpolation.py
index 1142884d2929b517b5cd9250e38a1beb9e1219c7..3887bd905b1dc47b8fac119a31fb9a331484b56e 100644
--- a/nes/methods/horizontal_interpolation.py
+++ b/nes/methods/horizontal_interpolation.py
@@ -46,10 +46,11 @@ def interpolate_horizontal(self, dst_grid, weight_matrix_path=None, kind='Neares
only_create_wm : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
"""
+
if info and self.master:
print("Creating Weight Matrix")
# Obtain weight matrix
@@ -164,6 +165,7 @@ def get_src_data(comm, var_data, idx, parallel_method):
Parameters
----------
comm : MPI.Communicator.
+ MPI communicator.
var_data : np.array
Rank source data.
idx : np.array
@@ -219,15 +221,16 @@ def get_weights_idx_t_axis(self, dst_grid, weight_matrix_path, kind, n_neighbour
only_create : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
Returns
-------
tuple
Weights and source data index.
"""
+
if wm is not None:
weight_matrix = wm
@@ -316,15 +319,16 @@ def get_weights_idx_xy_axis(self, dst_grid, weight_matrix_path, kind, n_neighbou
only_create : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
Returns
-------
tuple
Weights and source data index.
"""
+
if isinstance(dst_grid, nes.PointsNes) and weight_matrix_path is not None:
if self.master:
warn("To point weight matrix cannot be saved.")
@@ -426,6 +430,7 @@ def read_weight_matrix(weight_matrix_path, comm=None, parallel_method='T'):
nes.Nes
Weight matrix.
"""
+
weight_matrix = nes.open_netcdf(path=weight_matrix_path, comm=comm, parallel_method=parallel_method, balanced=True)
weight_matrix.load()
@@ -435,6 +440,7 @@ def read_weight_matrix(weight_matrix_path, comm=None, parallel_method='T'):
weight_matrix.variables['weight']['data'][weight_matrix.variables['weight']['data'] <= 0] = np.nan
weight_matrix.variables['weight']['data'][weight_matrix.variables['idx']['data'] <= 0] = np.nan
+
return weight_matrix
@@ -451,7 +457,7 @@ def create_nn_weight_matrix(self, dst_grid, n_neighbours=4, wm_path=None, info=F
n_neighbours : int
Used if kind == NearestNeighbour. Number of nearest neighbours to interpolate. Default: 4.
wm_path : str
- Path where write the weight matrix
+ Path where write the weight matrix.
info: bool
Indicates if you want to print extra info during the methods process.
@@ -545,9 +551,9 @@ def create_area_conservative_weight_matrix(self, dst_nes, wm_path=None, flux=Fal
dst_nes : nes.Nes
Final projection Nes object.
wm_path : str
- Path where write the weight matrix
+ Path where write the weight matrix.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
info: bool
Indicates if you want to print extra info during the methods process.
@@ -556,6 +562,7 @@ def create_area_conservative_weight_matrix(self, dst_nes, wm_path=None, flux=Fal
nes.Nes
Weight matrix.
"""
+
if info and self.master:
print("\tCreating area conservative Weight Matrix")
sys.stdout.flush()
@@ -727,15 +734,15 @@ def lon_lat_to_cartesian(lon, lat, radius=6378137.0):
def lon_lat_to_cartesian_ecef(lon, lat):
"""
- # convert observational/model geographic longitude/latitude coordinates to cartesian ECEF (Earth Centred,
- # Earth Fixed) coordinates, assuming WGS84 datum and ellipsoid, and that all heights = 0.
- # ECEF coordiantes represent positions (in meters) as X, Y, Z coordinates, approximating the earth surface
- # as an ellipsoid of revolution.
- # This conversion is for the subsequent calculation of euclidean distances of the model gridcell centres
- # from each observational station.
- # Defining the distance between two points on the earth's surface as simply the euclidean distance
- # between the two lat/lon pairs could lead to inaccurate results depending on the distance
- # between two points (i.e. 1 deg. of longitude varies with latitude).
+ Convert observational/model geographic longitude/latitude coordinates to cartesian ECEF (Earth Centred,
+ Earth Fixed) coordinates, assuming WGS84 datum and ellipsoid, and that all heights = 0.
+ ECEF coordiantes represent positions (in meters) as X, Y, Z coordinates, approximating the earth surface
+ as an ellipsoid of revolution.
+ This conversion is for the subsequent calculation of euclidean distances of the model gridcell centres
+ from each observational station.
+ Defining the distance between two points on the earth's surface as simply the euclidean distance
+ between the two lat/lon pairs could lead to inaccurate results depending on the distance
+ between two points (i.e. 1 deg. of longitude varies with latitude).
Parameters
----------
diff --git a/nes/methods/spatial_join.py b/nes/methods/spatial_join.py
index 4de3eff4abe3ea082131d84c8809e467c58166af..52c51ed7fece30164a173903f56ff7a43a36024f 100644
--- a/nes/methods/spatial_join.py
+++ b/nes/methods/spatial_join.py
@@ -17,6 +17,7 @@ def spatial_join(self, ext_shp, method=None, var_list=None, info=False, apply_bb
Parameters
----------
self : nes.Nes
+ Nes Object.
ext_shp : GeoPandasDataFrame or str
File or path from where the data will be obtained on the intersection.
method : str
@@ -24,9 +25,9 @@ def spatial_join(self, ext_shp, method=None, var_list=None, info=False, apply_bb
var_list : List or None or str
Variables that will be included in the resulting shapefile.
info : bool
- Indicates if you want to print the process info
+ Indicates if you want to print the process info.
apply_bbox : bool
- Indicates if you want to reduce the shapefile to a bbox
+ Indicates if you want to reduce the shapefile to a bbox.
"""
if self.master and info:
@@ -75,19 +76,20 @@ def prepare_external_shapefile(self, ext_shp, var_list, info=False, apply_bbox=T
Parameters
----------
self : nes.Nes
+ Nes Object.
ext_shp : GeoDataFrame or str
- External shapefile or path to it
+ External shapefile or path to it.
var_list : List[str] or None
- External shapefile variables to be computed
+ External shapefile variables to be computed.
info : bool
- Indicates if you want to print the information
+ Indicates if you want to print the information.
apply_bbox : bool
- Indicates if you want to reduce the shapefile to a bbox
+ Indicates if you want to reduce the shapefile to a bbox.
Returns
-------
GeoDataFrame
- External shapefile
+ External shapefile.
"""
if isinstance(ext_shp, str):
@@ -121,13 +123,12 @@ def prepare_external_shapefile(self, ext_shp, var_list, info=False, apply_bbox=T
def get_bbox(self):
"""
- Obtain the bounding box of the rank data
-
- (lon_min, lat_min, lon_max, lat_max)
+ Obtain the bounding box of the rank data (lon_min, lat_min, lon_max, lat_max).
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
@@ -143,15 +144,16 @@ def get_bbox(self):
def spatial_join_nearest(self, ext_shp, info=False):
"""
- Perform the spatial join using the nearest method
+ Perform the spatial join using the nearest method.
Parameters
----------
self : nes.Nes
+ Nes Object.
ext_shp : GeoDataFrame
- External shapefile
+ External shapefile.
info : bool
- Indicates if you want to print the information
+ Indicates if you want to print the information.
"""
if self.master and info:
@@ -183,15 +185,16 @@ def spatial_join_nearest(self, ext_shp, info=False):
def spatial_join_centroid(self, ext_shp, info=False):
"""
- Perform the spatial join using the centroid method
+ Perform the spatial join using the centroid method.
Parameters
----------
self : nes.Nes
+ Nes Object.
ext_shp : GeoDataFrame
- External shapefile
+ External shapefile.
info : bool
- Indicates if you want to print the information
+ Indicates if you want to print the information.
"""
if self.master and info:
@@ -224,15 +227,16 @@ def spatial_join_centroid(self, ext_shp, info=False):
def spatial_join_intersection(self, ext_shp, info=False):
"""
- Perform the spatial join using the intersection method
+ Perform the spatial join using the intersection method.
Parameters
----------
self : nes.Nes
+ Nes Object.
ext_shp : GeoDataFrame
- External shapefile
+ External shapefile.
info : bool
- Indicates if you want to print the information
+ Indicates if you want to print the information.
"""
var_list = list(ext_shp.columns)
diff --git a/nes/methods/vertical_interpolation.py b/nes/methods/vertical_interpolation.py
index 60ef7e5863b8d3f2c9489b2ec6ce0ae336c4e989..1605ed7ddfc07f14b0b7b5ad40c5cae0a199f45a 100644
--- a/nes/methods/vertical_interpolation.py
+++ b/nes/methods/vertical_interpolation.py
@@ -37,7 +37,9 @@ def interpolate_vertical(self, new_levels, new_src_vertical=None, kind='linear',
Source Nes object.
new_levels : List
List of new vertical levels.
- new_src_vertical
+ new_src_vertical : nes.Nes, str
+ Nes object with the vertical information as variable or str with the path to the NetCDF file that contains
+ the vertical data.
kind : str
Vertical methods type.
extrapolate : None, tuple, str
@@ -45,8 +47,9 @@ def interpolate_vertical(self, new_levels, new_src_vertical=None, kind='linear',
info: None, bool
Indicates if you want to print extra information.
overwrite: bool
- Indicates if you want to compute the vertical interpolation in the same object or not
+ Indicates if you want to compute the vertical interpolation in the same object or not.
"""
+
if len(self.lev) == 1:
raise RuntimeError("1D data cannot be vertically interpolated.")
if not overwrite:
diff --git a/nes/nc_projections/default_nes.py b/nes/nc_projections/default_nes.py
index 0c64e6ba2f0d3e7def86e154c74d191b213055d6..6861678e4f4878f3d86a2253925a9adc0dc4df02 100644
--- a/nes/nc_projections/default_nes.py
+++ b/nes/nc_projections/default_nes.py
@@ -28,6 +28,7 @@ class Nes(object):
Attributes
----------
comm : MPI.Communicator.
+ MPI communicator.
rank : int
MPI rank.
master : bool
@@ -1053,8 +1054,7 @@ class Nes(object):
Statistic to perform. Accepted values: "max", "mean" and "min".
type_op : str
Type of statistic to perform. Accepted values: "calendar", "alltsteps", and "withoutt0".
- - "calendar": Calculate the statistic using the time metadata.
- It will avoid single time step by day calculations
+ - "calendar": Calculate the statistic using the time metadata. It will avoid single time step by day calculations
- "alltsteps": Calculate a single time statistic with all the time steps.
- "withoutt0": Calculate a single time statistic with all the time steps avoiding the first one.
"""
@@ -3601,7 +3601,9 @@ class Nes(object):
Source Nes object.
new_levels : List
New vertical levels.
- new_src_vertical
+ new_src_vertical : nes.Nes, str
+ Nes object with the vertical information as variable or str with the path to the NetCDF file that contains
+ the vertical data.
kind : str
Vertical methods type.
extrapolate : None, tuple, str
@@ -3609,7 +3611,7 @@ class Nes(object):
info: None, bool
Indicates if you want to print extra information.
overwrite: bool
- Indicates if you want to compute the vertical interpolation in the same object or not
+ Indicates if you want to compute the vertical interpolation in the same object or not.
"""
return vertical_interpolation.interpolate_vertical(
@@ -3638,9 +3640,9 @@ class Nes(object):
only_create_wm : bool
Indicates if you want to only create the Weight Matrix.
wm : Nes
- Weight matrix Nes File
+ Weight matrix Nes File.
flux : bool
- Indicates if you want to calculate the weight matrix for flux variables
+ Indicates if you want to calculate the weight matrix for flux variables.
"""
return horizontal_interpolation.interpolate_horizontal(
@@ -3660,9 +3662,9 @@ class Nes(object):
var_list : List or None
Variables that will be included in the resulting shapefile.
info : bool
- Indicates if you want to print the process info
+ Indicates if you want to print the process info.
apply_bbox : bool
- Indicates if you want to reduce the shapefile to a bbox
+ Indicates if you want to reduce the shapefile to a bbox.
"""
return spatial_join(self, ext_shp=ext_shp, method=method, var_list=var_list, info=info,
@@ -3677,7 +3679,7 @@ class Nes(object):
self : nes.Nes
Source projection Nes Object.
overwrite : bool
- Indicates if we want to overwrite the grid area
+ Indicates if we want to overwrite the grid area.
"""
if ('cell_area' not in self.cell_measures.keys()) or (overwrite):
@@ -3726,13 +3728,14 @@ class Nes(object):
def get_fids(self):
"""
- Obtain the FIDs in a 2D format
+ Obtain the FIDs in a 2D format.
Returns
-------
np.array
- 2D array with the FID data
+ 2D array with the FID data.
"""
+
fids = np.arange(self._lat['data'].shape[0] * self._lon['data'].shape[-1])
fids = fids.reshape((self._lat['data'].shape[0], self._lon['data'].shape[-1]))
fids = fids[self.write_axis_limits['y_min']:self.write_axis_limits['y_max'],
diff --git a/nes/nes_formats/cams_ra_format.py b/nes/nes_formats/cams_ra_format.py
index d5b8a6b47ef36e97886603154a5c094b243a172e..1c1718a15102676a3d051a7f584aaf531d8229ab 100644
--- a/nes/nes_formats/cams_ra_format.py
+++ b/nes/nes_formats/cams_ra_format.py
@@ -19,7 +19,7 @@ def to_netcdf_cams_ra(self, path):
self : nes.Nes
Source projection Nes Object.
path : str
- Path to the output netCDF file.
+ Path to the output netCDF file.
"""
if not isinstance(self, nes.LatLonNes):
diff --git a/nes/nes_formats/cmaq_format.py b/nes/nes_formats/cmaq_format.py
index f27bc777219b9da404b856cb25990d518c5fbedb..f715b765562da6a544fc1075138f01a1e8964785 100644
--- a/nes/nes_formats/cmaq_format.py
+++ b/nes/nes_formats/cmaq_format.py
@@ -27,8 +27,9 @@ def to_netcdf_cmaq(self, path, chunking=False, keep_open=False):
chunking: bool
Indicates if you want to chunk the output netCDF.
keep_open : bool
- Indicates if you want to keep open the NetCDH to fill the data by time-step
+ Indicates if you want to keep open the NetCDH to fill the data by time-step.
"""
+
self.to_dtype(np.float32)
set_global_attributes(self)
@@ -73,7 +74,9 @@ def change_variable_attributes(self):
Parameters
----------
self : nes.Nes
+ Nes Object.
"""
+
for var_name in self.variables.keys():
if self.variables[var_name]['units'] == 'mol.s-1':
@@ -88,6 +91,7 @@ def change_variable_attributes(self):
else:
raise TypeError("The unit '{0}' of specie {1} is not defined correctly. ".format(
self.variables[var_name]['units'], var_name) + "Should be 'mol.s-1' or 'g.s-1'")
+
return None
@@ -98,12 +102,14 @@ def to_cmaq_units(self):
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
dict
- Variable in the MONARCH units
+ Variable in the MONARCH units.
"""
+
self.calculate_grid_area(overwrite=False)
for var_name in self.variables.keys():
if isinstance(self.variables[var_name]['data'], np.ndarray):
@@ -126,17 +132,19 @@ def to_cmaq_units(self):
def create_tflag(self):
"""
- Create the content of the CMAQ variable TFLAG
+ Create the content of the CMAQ variable TFLAG.
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
numpy.ndarray
- Array with the content of TFLAG
+ Array with the content of TFLAG.
"""
+
t_flag = np.empty((len(self.time), len(self.variables), 2))
for i_d, aux_date in enumerate(self.time):
@@ -156,12 +164,14 @@ def str_var_list(self):
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
str
List of variable names transformed on string.
"""
+
str_var_list = ""
for var in self.variables.keys():
str_var_list += "{:<16}".format(var)
@@ -171,12 +181,14 @@ def str_var_list(self):
def set_global_attributes(self):
"""
- Set the NetCDF global attributes
+ Set the NetCDF global attributes.
Parameters
----------
self : nes.Nes
+ Nes Object.
"""
+
now = datetime.now()
if len(self.time) > 1:
tstep = ((self.time[1] - self.time[0]).seconds // 3600) * 10000
@@ -270,9 +282,11 @@ def create_dimensions(self, netcdf):
Parameters
----------
self : nes.Nes
+ Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
netcdf.createDimension('TSTEP', len(self._time))
netcdf.createDimension('DATE-TIME', 2)
netcdf.createDimension('LAY', len(self._lev['data']))
@@ -291,6 +305,7 @@ def create_dimension_variables(self, netcdf):
Parameters
----------
self : nes.Nes
+ Nes Object.
netcdf : Dataset
NetCDF object.
"""
@@ -310,9 +325,11 @@ def create_variables(self, netcdf):
Parameters
----------
self : nes.Nes
+ Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
for var_name, var_info in self.variables.items():
var = netcdf.createVariable(var_name, 'f', ('TSTEP', 'LAY', 'ROW', 'COL',),
zlib=self.zip_lvl > 0, complevel=self.zip_lvl)
diff --git a/nes/nes_formats/monarch_format.py b/nes/nes_formats/monarch_format.py
index 00874722c852e1bccba1f0c160e26d619216289e..a8f5e24753395200911efa47f3b3a9e2c139227f 100644
--- a/nes/nes_formats/monarch_format.py
+++ b/nes/nes_formats/monarch_format.py
@@ -20,7 +20,7 @@ def to_netcdf_monarch(self, path, chunking=False, keep_open=False):
chunking: bool
Indicates if you want to chunk the output netCDF.
keep_open : bool
- Indicates if you want to keep open the NetCDH to fill the data by time-step
+ Indicates if you want to keep open the NetCDH to fill the data by time-step.
"""
self.to_dtype(np.float32)
@@ -82,17 +82,19 @@ def to_netcdf_monarch(self, path, chunking=False, keep_open=False):
def to_monarch_units(self):
"""
- Change the data values according to the MONARCH conventions
+ Change the data values according to the MONARCH conventions.
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
dict
- Variable in the MONARCH units
+ Variable in the MONARCH units.
"""
+
for var_name in self.variables.keys():
if isinstance(self.variables[var_name]['data'], np.ndarray):
if self.variables[var_name]['units'] == 'mol.s-1.m-2':
diff --git a/nes/nes_formats/wrf_chem_format.py b/nes/nes_formats/wrf_chem_format.py
index 77bf937325ace7de52216abca6a1aadc76e700a6..f37a74d4618be1c83889b5dc1c3e0bd7fad19a77 100644
--- a/nes/nes_formats/wrf_chem_format.py
+++ b/nes/nes_formats/wrf_chem_format.py
@@ -35,8 +35,9 @@ def to_netcdf_wrf_chem(self, path, chunking=False, keep_open=False):
chunking: bool
Indicates if you want to chunk the output netCDF.
keep_open : bool
- Indicates if you want to keep open the NetCDH to fill the data by time-step
+ Indicates if you want to keep open the NetCDH to fill the data by time-step.
"""
+
self.to_dtype(np.float32)
set_global_attributes(self)
@@ -81,7 +82,9 @@ def change_variable_attributes(self):
Parameters
----------
self : nes.Nes
+ Nes Object.
"""
+
for var_name in self.variables.keys():
if self.variables[var_name]['units'] == 'mol.h-1.km-2':
self.variables[var_name]['FieldType'] = np.int32(104)
@@ -111,17 +114,19 @@ def change_variable_attributes(self):
def to_wrf_chem_units(self):
"""
- Change the data values according to the WRF-CHEM conventions
+ Change the data values according to the WRF-CHEM conventions.
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
dict
- Variable in the MONARCH units
+ Variable in the MONARCH units.
"""
+
self.calculate_grid_area(overwrite=False)
for var_name in self.variables.keys():
if isinstance(self.variables[var_name]['data'], np.ndarray):
@@ -146,17 +151,19 @@ def to_wrf_chem_units(self):
def create_times_var(self):
"""
- Create the content of the WRF-CHEM variable times
+ Create the content of the WRF-CHEM variable times.
Parameters
----------
self : nes.Nes
+ Nes Object.
Returns
-------
numpy.ndarray
- Array with the content of TFLAG
+ Array with the content of TFLAG.
"""
+
aux_times = np.chararray((len(self.time), 19), itemsize=1)
for i_d, aux_date in enumerate(self.time):
@@ -172,7 +179,9 @@ def set_global_attributes(self):
Parameters
----------
self : nes.Nes
+ Nes Object.
"""
+
now = datetime.now()
if len(self.time) > 1:
tstep = ((self.time[1] - self.time[0]).seconds // 3600) * 10000
@@ -316,9 +325,11 @@ def create_dimensions(self, netcdf):
Parameters
----------
self : nes.Nes
+ Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
netcdf.createDimension('Time', len(self._time))
netcdf.createDimension('DateStrLen', 19)
netcdf.createDimension('emissions_zdim', len(self._lev['data']))
@@ -336,6 +347,7 @@ def create_dimension_variables(self, netcdf):
Parameters
----------
self : nes.Nes
+ Nes Object.
netcdf : Dataset
NetCDF object.
"""
@@ -353,9 +365,11 @@ def create_variables(self, netcdf):
Parameters
----------
self : nes.Nes
+ Nes Object.
netcdf : Dataset
netcdf4-python open dataset.
"""
+
for var_name, var_info in self.variables.items():
var = netcdf.createVariable(var_name, 'f', ('Time', 'emissions_zdim', 'south_north', 'west_east',),
zlib=self.zip_lvl > 0, complevel=self.zip_lvl)