nfdata 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,228 @@
1
+ # Setup
2
+ nanomaterial: TiO2 # Name of the nanomaterial. Not used in model.
3
+ output:
4
+ nc_file: ./data.nc # Where do you want the output NetCDF file to be stored?
5
+ constants_file: ./constants.nml # Where do you want the output constants file to be stored?
6
+ constants_file: ./data.example/thames_tio2_2015/constants.yaml # Where is the input constants file?
7
+ land_use_config: ./data.example/thames_tio2_2015/land_use.yaml # Where is the input land use config file?
8
+ root_dir: ./data.example/thames_tio2_2015/ # Root dir, can be used in path variables below as <root_dir>
9
+ iso3: GBR # iso3 code for country modelled
10
+ time:
11
+ n: 365 # Number of timesteps to run the model for
12
+ dt: 86400 # Length of each timestep in seconds
13
+ start_date: 2015-01-01 # Start date for the model run
14
+
15
+ # Meteorological and hydrological
16
+ flow_dir: # Flow direction is responsible for defining the grid system
17
+ type: raster # Type can be raster or csv (see docs)
18
+ path: <root_dir>flow_dir.tif # Path to file, <root_dir> variable can be used from above
19
+ crs: EPSG:27700 # Manually specify CRS if it is absent or ill-defined in file
20
+ dem: # Digital Elevation Model, which defines the height above sea level
21
+ type: raster # of each grid cell, in metres
22
+ units: dm
23
+ path: <root_dir>dem.grd
24
+ runoff: # Runoff, usually provided by a hydrological model
25
+ type: csv
26
+ path: <root_dir>runoff.csv
27
+ units: mm/day # What units is the file in? These will be converted automatically by Pint: https://pint.readthedocs.io/en/0.10.1/
28
+ quickflow: # Quickflow (sometimes called direct runoff, or overland flow) is the portion of runoff that travels overland,
29
+ type: csv # and is usually provided by a hydrological model
30
+ path: <root_dir>quickflow.csv
31
+ units: mm/day
32
+ precip: # Precipitation
33
+ type: raster
34
+ path: <root_dir>precip/rainfall_5km_2015-{t}.tif # If the variable is spatiotemporal, multiple raster files can be indexed by {t}, with one file per timestep
35
+ units: mm/day
36
+ t_min: 1 # What index should the multiple input files start at (default is 0)?
37
+ # Source and references can be provided and whilst these aren't used by the model, they will be added as attributes to the NetCDF file
38
+ source: Provided information about the source of the data here, and any data processing it has already been through (e.g. reprojection).
39
+ references: References to scientific papers.
40
+
41
+ # Soil
42
+ # Most soil properties can be obtained from the European Soil Data Center (ESDAC): https://esdac.jrc.ec.europa.eu/
43
+ soil_bulk_density:
44
+ type: raster
45
+ units: t/m**3
46
+ path: <root_dir>soil_bulk_density.tif
47
+ # Source example:
48
+ source: European Soil Data Centre topsoil physical properties resampled to OS National Grid (ESPG:27700) by bilinear interpolation. See https://esdac.jrc.ec.europa.eu/content/topsoil-physical-properties-europe-based-lucas-topsoil-data.
49
+ soil_water_content_field_capacity:
50
+ type: raster
51
+ path: <root_dir>soil_water_content_field_capacity.tif
52
+ soil_water_content_saturation:
53
+ type: raster
54
+ path: <root_dir>soil_water_content_saturation.tif
55
+ soil_hydraulic_conductivity:
56
+ type: raster
57
+ units: cm/day
58
+ path: <root_dir>soil_hydraulic_conductivity.tif
59
+ soil_texture_sand_content: # Sand content as a percentage. Sand + clay + silt must equal 100%
60
+ type: raster
61
+ path: <root_dir>soil_texture_sand_content.tif
62
+ soil_texture_clay_content:
63
+ type: raster
64
+ path: <root_dir>soil_texture_clay_content.tif
65
+ soil_texture_silt_content:
66
+ type: raster
67
+ path: <root_dir>soil_texture_silt_content.tif
68
+ soil_texture_coarse_frag_content:
69
+ type: raster
70
+ path: <root_dir>soil_texture_coarse_frag_content.tif
71
+ soil_usle_c_factor: # Universal Soil Loss Equation (USLE) cover management factor
72
+ type: raster
73
+ path: <root_dir>soil_usle_c_factor.tif
74
+ soil_usle_ls_factor: # USLE topography (slope length and steepness) factor
75
+ type: raster
76
+ path: <root_dir>soil_usle_ls_factor.tif
77
+ soil_usle_p_factor: # USLE support practices factor
78
+ type: raster
79
+ path: <root_dir>soil_usle_p_factor.tif
80
+
81
+ # Suspended sediment
82
+ bank_erosion_alpha:
83
+ type: raster
84
+ path: <root_dir>bank_erosion_alpha.tif
85
+ units: kg/m**5
86
+ bank_erosion_beta:
87
+ type: raster
88
+ path: <root_dir>bank_erosion_beta.tif
89
+ deposition_alpha:
90
+ type: raster
91
+ path: <root_dir>deposition_alpha.tif
92
+ deposition_beta:
93
+ type: raster
94
+ path: <root_dir>deposition_beta.tif
95
+ resuspension_alpha:
96
+ type: raster
97
+ path: <root_dir>resuspension_alpha.tif
98
+ resuspension_beta:
99
+ type: raster
100
+ path: <root_dir>resuspension_beta.tif
101
+ sediment_transport_a:
102
+ type: raster
103
+ path: <root_dir>sediment_transport_a.tif
104
+ sediment_transport_c:
105
+ type: raster
106
+ path: <root_dir>sediment_transport_c.tif
107
+
108
+ # Land use
109
+ land_use:
110
+ type: raster
111
+ path: <root_dir>land_use.tif
112
+ is_estuary: # Boolean raster indicating whether waterbodies within a cell are estuarine
113
+ type: raster
114
+ path: <root_dir>is_estuary.tif
115
+
116
+ # Emissions - areal
117
+ # Variables can be omitted and emissions for that variable will be set to zero (e.g. if a particular form is not relevant for the NM modelled)
118
+ emissions_areal_soil_pristine: # Areal emissions of pristine NM to soil
119
+ type: raster
120
+ path: <root_dir>emissions_areal_soil_pristine.tif
121
+ units: kg/m**2/year
122
+ emissions_areal_soil_matrixembedded: # Areal emissions of matrix-embedded NM to soil
123
+ type: raster
124
+ path: <root_dir>emissions_areal_soil_matrixembedded.tif
125
+ units: kg/m**2/year
126
+ emissions_areal_soil_transformed: # Areal emissions of transformed NM to soil
127
+ type: raster
128
+ path: <root_dir>emissions_areal_soil_transformed.tif
129
+ units: kg/m**2/year
130
+ #emissions_areal_soil_dissolved: # Areal emissions of dissolved NM to soil
131
+ # type: raster
132
+ # path: <root_dir>emissions_areal_soil_dissolved.tif
133
+ # units: kg/m**2/year
134
+ emissions_areal_water_pristine: # Areal emissions of pristine NM to water
135
+ type: raster
136
+ path: <root_dir>emissions_areal_water_pristine.tif
137
+ units: kg/m**2/year
138
+ emissions_areal_water_matrixembedded: # Areal emissions of matrix-embedded NM to water
139
+ type: raster
140
+ path: <root_dir>emissions_areal_water_matrixembedded.tif
141
+ units: kg/m**2/year
142
+ emissions_areal_water_transformed: # Areal emissions of transformed NM to water
143
+ type: raster
144
+ path: <root_dir>emissions_areal_water_transformed.tif
145
+ units: kg/m**2/year
146
+ #emissions_areal_water_dissolved: # Areal emissions of dissolved NM to water
147
+ # type: raster
148
+ # path: <root_dir>emissions_areal_water_dissolved.tif
149
+ # units: kg/m**2/year
150
+
151
+ # Emissions - point
152
+ emissions_point_water_pristine: # Point source emissions of pristine NM to water
153
+ type: shapefile # Point source emissions must be a shapefile
154
+ value_var: emission # Which variable in the shapefile gives the emission value?
155
+ path: <root_dir>emissions_point_water_pristine/point_sources_water_pristine_2015_osgb.shp # Path to .shp file. Sidecar files must be present too
156
+ source_type_col: profile # Which variable in the shapefile gives the profile of each point? See the docs
157
+ temporal_profile: # Temporal profile for these emissions
158
+ path: <root_dir>emissions_temporal-profile_2015.csv # Path to temporal profile CSV (see docs)
159
+ source_type_col: Emission_source_type # Which column gives the emission source type profile?
160
+ for_source_type: P2 # Which of these types does this temporal profile apply to?
161
+ factor_col: Factor # Which column gives the factor?
162
+ units: kg/year
163
+ emissions_point_water_matrixembedded: # Point source emissions of matrix-embedded NM to water
164
+ type: shapefile
165
+ value_var: emission
166
+ path: <root_dir>emissions_point_water_matrixembedded/point_sources_water_matrix-embedded_2015_osgb.shp
167
+ source_type_col: profile
168
+ temporal_profile:
169
+ path: <root_dir>emissions_temporal-profile_2015.csv
170
+ source_type_col: Emission_source_type
171
+ for_source_type: P2
172
+ factor_col: Factor
173
+ units: kg/year
174
+ emissions_point_water_transformed: # Point source emissions of transformed NM to water
175
+ type: shapefile
176
+ value_var: emission
177
+ path: <root_dir>emissions_point_water_transformed/point_sources_water_transformed_2015_osgb.shp
178
+ source_type_col: profile
179
+ temporal_profile:
180
+ path: <root_dir>emissions_temporal-profile_2015.csv
181
+ source_type_col: Emission_source_type
182
+ for_source_type: P2
183
+ factor_col: Factor
184
+ units: kg/year
185
+ #emissions_point_water_dissolved: # Point source emissions of dissolved NM to water
186
+ # type: shapefile
187
+ # value_var: emission
188
+ # path: <root_dir>point_sources_water_dissolved.shp
189
+ # source_type_col: profile
190
+ # temporal_profile:
191
+ # path: <root_dir>emissions_temporal-profile_2015.csv
192
+ # source_type_col: Emission_source_type
193
+ # for_source_type: P2
194
+ # factor_col: Factor
195
+ # units: kg/year
196
+
197
+ # Emissions - atmospheric
198
+ # Atmospheric deposition data can be provided as dry deposition (drydep) and wet deposition (wetdepo)
199
+ emissions_atmospheric_drydepo_pristine:
200
+ type: raster
201
+ path: <root_dir>emissions_atmospheric_drydepo_pristine/{t}.tif # {t} placeholder is used to iterate over files, with 1 file for each timestep
202
+ units: kg/m**2/s
203
+ t_min: 1
204
+ emissions_atmospheric_drydepo_matrixembedded:
205
+ type: raster
206
+ path: <root_dir>emissions_atmospheric_drydepo_matrix-embedded/{t}.tif
207
+ units: kg/m**2/s
208
+ t_min: 1
209
+ emissions_atmospheric_drydepo_transformed:
210
+ type: raster
211
+ path: <root_dir>emissions_atmospheric_drydepo_transformed/{t}.tif
212
+ units: kg/m**2/s
213
+ t_min: 1
214
+ emissions_atmospheric_wetdepo_pristine:
215
+ type: raster
216
+ path: <root_dir>emissions_atmospheric_wetdepo_pristine/{t}.tif
217
+ units: kg/m**2/s
218
+ t_min: 1
219
+ emissions_atmospheric_wetdepo_matrixembedded:
220
+ type: raster
221
+ path: <root_dir>emissions_atmospheric_wetdepo_matrix-embedded/{t}.tif
222
+ units: kg/m**2/s
223
+ t_min: 1
224
+ emissions_atmospheric_wetdepo_transformed:
225
+ type: raster
226
+ path: <root_dir>emissions_atmospheric_wetdepo_transformed/{t}.tif
227
+ units: kg/m**2/s
228
+ t_min: 1
@@ -0,0 +1,14 @@
1
+ input_nc_file: ./data.nc # Where is the input NetCDF file to edit?
2
+ output_nc_file: ./data_edited.nc # Where do you want to put the output NetCDF file? Defaults to same as input_nc_file
3
+ root_dir: ./data.example # Root dir, can be used in path variables below as <root_dir>
4
+ iso3: GBR # Required if editing point sources
5
+
6
+ # Include variables to edit in the same format as config.create.example.yaml.
7
+ soil_bulk_density:
8
+ type: raster
9
+ path: <root_dir>thames_random_raster.tif
10
+ units: t/m**3
11
+ emissions_areal_soil_pristine:
12
+ type: raster
13
+ path: <root_dir>thames_constant_raster.tif
14
+ units: kg/m**2/year
environment.yaml ADDED
@@ -0,0 +1,13 @@
1
+ name: nanofase-data
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - numpy
6
+ - pandas
7
+ - geopandas
8
+ - rasterio
9
+ - ruamel.yaml
10
+ - netCDF4
11
+ - shapely
12
+ - pint
13
+ - f90nml
nfdata/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ """
2
+ NanoFASE data module
3
+ ====================
4
+ Compile and edit input data for the NanoFASE model.
5
+ """
6
+ from importlib.metadata import version
7
+
8
+ # Get the version from the installed package metadata
9
+ __version__ = version(__name__)