pyholos 0.0.1__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.

Potentially problematic release.


This version of pyholos might be problematic. Click here for more details.

Files changed (55) hide show
  1. pyholos/__init__.py +0 -0
  2. pyholos/common.py +141 -0
  3. pyholos/common2.py +157 -0
  4. pyholos/components/__init__.py +0 -0
  5. pyholos/components/animals/__init__.py +0 -0
  6. pyholos/components/animals/beef.py +766 -0
  7. pyholos/components/animals/common.py +2301 -0
  8. pyholos/components/animals/dairy.py +341 -0
  9. pyholos/components/animals/sheep.py +412 -0
  10. pyholos/components/common.py +170 -0
  11. pyholos/components/land_management/__init__.py +0 -0
  12. pyholos/components/land_management/carbon/__init__.py +0 -0
  13. pyholos/components/land_management/carbon/climate.py +863 -0
  14. pyholos/components/land_management/carbon/management.py +21 -0
  15. pyholos/components/land_management/carbon/relative_biomass_information.py +410 -0
  16. pyholos/components/land_management/carbon/tillage.py +88 -0
  17. pyholos/components/land_management/common.py +220 -0
  18. pyholos/components/land_management/crop.py +1233 -0
  19. pyholos/components/land_management/field_system.py +458 -0
  20. pyholos/components/land_management/utils.py +66 -0
  21. pyholos/config.py +49 -0
  22. pyholos/core_constants.py +20 -0
  23. pyholos/defaults.py +116 -0
  24. pyholos/farm/__init__.py +0 -0
  25. pyholos/farm/enums.py +54 -0
  26. pyholos/farm/farm.py +101 -0
  27. pyholos/farm/farm_inputs.py +633 -0
  28. pyholos/farm/farm_settings.py +542 -0
  29. pyholos/launching.py +86 -0
  30. pyholos/postprocessing/__init__.py +0 -0
  31. pyholos/postprocessing/plots.py +164 -0
  32. pyholos/postprocessing/postprocessing.py +38 -0
  33. pyholos/resources/holos/Table_16_Livestock_Coefficients_BeefAndDairy_Cattle_Provider.csv +21 -0
  34. pyholos/resources/holos/Table_21_Average_Milk_Production_For_Dairy_Cows_By_Province.csv +23 -0
  35. pyholos/resources/holos/Table_22_Livestock_Coefficients_For_Sheep.csv +28 -0
  36. pyholos/resources/holos/Table_29_Percentage_Total_Manure_Produced_In_Systems.csv +56 -0
  37. pyholos/resources/holos/Table_30_Default_Bedding_Material_Composition_Provider.csv +28 -0
  38. pyholos/resources/holos/Table_50_Fuel_Energy_Requirement_Estimates_By_Region.csv +81 -0
  39. pyholos/resources/holos/Table_51_Herbicide_Energy_Requirement_Estimates_By_Region.csv +81 -0
  40. pyholos/resources/holos/Table_61_Fractions_of_dairy_cattle_N_volatilized.csv +25 -0
  41. pyholos/resources/holos/Table_62_Fractions_of_swine_N_volatilized.csv +25 -0
  42. pyholos/resources/holos/Table_6_Manure_Types_And_Default_Composition.csv +126 -0
  43. pyholos/resources/holos/Table_7_Relative_Biomass_Information.csv +112 -0
  44. pyholos/resources/holos/Table_9_Default_Values_For_Nitrogen_Lignin_In_Crops.csv +72 -0
  45. pyholos/resources/holos/Table_Tillage_Factor.csv +13 -0
  46. pyholos/resources/holos/feeds.csv +223 -0
  47. pyholos/resources/holos/main_tables.py +493 -0
  48. pyholos/resources/holos/small_area_yields.csv +167159 -0
  49. pyholos/resources/soil_landscapes_of_canada_v3r2.zip +0 -0
  50. pyholos/soil.py +439 -0
  51. pyholos/utils.py +83 -0
  52. pyholos-0.0.1.dist-info/METADATA +16 -0
  53. pyholos-0.0.1.dist-info/RECORD +55 -0
  54. pyholos-0.0.1.dist-info/WHEEL +4 -0
  55. pyholos-0.0.1.dist-info/licenses/LICENSE +677 -0
@@ -0,0 +1,493 @@
1
+ from pathlib import Path
2
+
3
+ from pandas import DataFrame
4
+
5
+ from pyholos.components.animals.common import AnimalType, BeddingMaterialType
6
+ from pyholos.components.land_management.common import TillageType
7
+ from pyholos.config import PathsHolosResources
8
+ from pyholos.core_constants import CoreConstants
9
+ from pyholos.soil import SoilFunctionalCategory
10
+
11
+
12
+ class _HolosTable:
13
+ def __init__(
14
+ self,
15
+ name: str,
16
+ data: list | DataFrame,
17
+ path: Path
18
+ ):
19
+ self.name = name
20
+ self.data = data
21
+ self.path = path
22
+
23
+ def write_data_to_csv(
24
+ self,
25
+ comments: list[str] | str = None
26
+ ) -> None:
27
+ if comments is None:
28
+ comments = []
29
+ elif isinstance(comments, str):
30
+ comments = [comments]
31
+
32
+ comments.insert(0, f'This table was automatically generated using "{Path(__file__).name}"')
33
+
34
+ with self.path.open(mode='w', newline='') as f:
35
+ for comment in comments:
36
+ f.write(f'# {comment}\n')
37
+ f.write('#\n')
38
+
39
+ DataFrame.from_records(self.data).to_csv(f, sep=',', decimal='.', index=False)
40
+
41
+
42
+ def set_table_16():
43
+ table_16 = _HolosTable(
44
+ name='Table_16_Livestock_Coefficients_BeefAndDairy_Cattle_Provider',
45
+ data=[
46
+ # Beef Cattle Data Sources :
47
+
48
+ # BaselineMaintenanceCoefficient = IPCC (2019, Table 10.4)
49
+ # GainCoefficient = IPCC (2019, Eq. 10.6)
50
+ # DefaultInitialWeight = Sheppard et al. (2015) , A.Alemu(pers.comm, 2022)
51
+ # DefaultFinalWeight = Sheppard et al. (2015) , A.Alemu(pers.comm, 2022)
52
+
53
+ dict(
54
+ AnimalType=AnimalType.beef_calf.value,
55
+ BaselineMaintenanceCoefficient=CoreConstants.NotApplicable,
56
+ GainCoefficient=CoreConstants.NotApplicable,
57
+ DefaultInitialWeight=39,
58
+ DefaultFinalWeight=260
59
+ ),
60
+ dict(
61
+ AnimalType=AnimalType.beef_cow_lactating.value,
62
+ BaselineMaintenanceCoefficient=0.386,
63
+ GainCoefficient=0.8,
64
+ DefaultInitialWeight=610,
65
+ DefaultFinalWeight=610
66
+ ),
67
+ dict(
68
+ AnimalType=AnimalType.beef_cow_dry.value,
69
+ BaselineMaintenanceCoefficient=0.322,
70
+ GainCoefficient=0.8,
71
+ DefaultInitialWeight=610,
72
+ DefaultFinalWeight=610
73
+ ),
74
+ dict(
75
+ AnimalType=AnimalType.beef_bulls.value,
76
+ BaselineMaintenanceCoefficient=0.370,
77
+ GainCoefficient=1.2,
78
+ DefaultInitialWeight=900,
79
+ DefaultFinalWeight=900
80
+ ),
81
+ dict(
82
+ AnimalType=AnimalType.beef_backgrounder_steer.value,
83
+ BaselineMaintenanceCoefficient=0.322,
84
+ GainCoefficient=1,
85
+ DefaultInitialWeight=250,
86
+ DefaultFinalWeight=380
87
+ ),
88
+ # Aklilu says these two animal groups have the same values
89
+ dict(
90
+ AnimalType=AnimalType.beef_backgrounder_heifer.value,
91
+ BaselineMaintenanceCoefficient=0.322,
92
+ GainCoefficient=0.8,
93
+ DefaultInitialWeight=240,
94
+ DefaultFinalWeight=360
95
+ ),
96
+ dict(
97
+ AnimalType=AnimalType.beef_replacement_heifers.value,
98
+ BaselineMaintenanceCoefficient=0.322,
99
+ GainCoefficient=0.8,
100
+ DefaultInitialWeight=240,
101
+ DefaultFinalWeight=360
102
+ ),
103
+ dict(
104
+ AnimalType=AnimalType.beef_finishing_steer.value,
105
+ BaselineMaintenanceCoefficient=0.322,
106
+ GainCoefficient=1.0,
107
+ DefaultInitialWeight=310,
108
+ DefaultFinalWeight=610
109
+ ),
110
+ dict(
111
+ AnimalType=AnimalType.beef_finishing_heifer.value,
112
+ BaselineMaintenanceCoefficient=0.322,
113
+ GainCoefficient=0.8,
114
+ DefaultInitialWeight=300,
115
+ DefaultFinalWeight=580
116
+ ),
117
+
118
+ # """
119
+ # Dairy Cattle
120
+ # Footnote 1
121
+ # Dairy Cattle Data Sources :
122
+ # BaselineMaintenanceCoefficient = IPCC (2019, Table 10.4)
123
+ # GainCoefficient = IPCC (2019, Eq. 10.6)
124
+ # DefaultInitialWeight = Lactanet (2020)
125
+ # DefaultFinalWeight = Lactanet (2020)
126
+ # """
127
+
128
+ dict(
129
+ AnimalType=AnimalType.dairy_lactating_cow.value,
130
+ BaselineMaintenanceCoefficient=0.386,
131
+ GainCoefficient=0.8,
132
+ DefaultInitialWeight=687,
133
+ DefaultFinalWeight=687
134
+ ),
135
+ dict(
136
+ AnimalType=AnimalType.dairy_dry_cow.value,
137
+ BaselineMaintenanceCoefficient=0.322,
138
+ GainCoefficient=0.8,
139
+ DefaultInitialWeight=687,
140
+ DefaultFinalWeight=687
141
+ ),
142
+ dict(
143
+ AnimalType=AnimalType.dairy_heifers.value,
144
+ BaselineMaintenanceCoefficient=0.322,
145
+ GainCoefficient=0.8,
146
+ DefaultInitialWeight=637,
147
+ DefaultFinalWeight=687
148
+ ),
149
+ dict(
150
+ AnimalType=AnimalType.dairy_bulls.value,
151
+ BaselineMaintenanceCoefficient=0.37,
152
+ GainCoefficient=1.2,
153
+ DefaultInitialWeight=1200,
154
+ DefaultFinalWeight=1200
155
+ ),
156
+ dict(
157
+ AnimalType=AnimalType.dairy_calves.value,
158
+ BaselineMaintenanceCoefficient=0,
159
+ GainCoefficient=0,
160
+ DefaultInitialWeight=45,
161
+ DefaultFinalWeight=127
162
+ )
163
+ ],
164
+ path=PathsHolosResources.Table_16_Livestock_Coefficients_BeefAndDairy_Cattle_Provider
165
+ )
166
+
167
+ table_16.write_data_to_csv(
168
+ comments=[
169
+ 'Table 16. Livestock coefficients for beef cattle and dairy cattle.',
170
+ 'source: https://github.com/holos-aafc/Holos/blob/396f1ab9bc7247e6d78766f9445c14d2eb7c0d9d/H.Core/Providers/Animals/Table_16_Livestock_Coefficients_BeefAndDairy_Cattle_Provider.cs#L13',
171
+ '',
172
+ 'The value of "DefaultFinalWeight" was modified from 260 kg to 90 kg, according to the default values set in the GUI.'
173
+ ])
174
+
175
+
176
+ def set_table_30():
177
+ """
178
+
179
+ Holos Source Code Footnotes:
180
+ Footnote 1: C, N and P composition values for straw (barley) and wood-chip bedding are averages of data recorded in 1998 and 1999 in Larney et al. (2008);
181
+ straw bedding application rates for beef cattle are from Chai et al. (2014), originally based on Larney et al. (2008) and Gilhespy et al. (2009)
182
+ * Footnote 2: Wood-chip bedding is a mixture of sawdust and bark peelings derived from 80% lodgepole pine (Pinus contorta var. latifolia Engelm.) and 20% white
183
+ spruce [Picea glauca (Moench)Voss].
184
+ * Footnote 3: “Drylot” refers to milking parlours, yards and exercise lots.
185
+ * Footnote 4: Values for bedding amounts are based on minimum values for recommended bedding per 450 kg animal weight from Lorimor et al. (2004, Table 13).
186
+ We assumed an average dairy cow weight of 687 kg (Lactanet, 2020) (sand for freestall barn: 15.9 kg/450 kg * 687 kg = 24.3 kg head-1 day-1;
187
+ shavings and sawdust for tie-stall barn: 1.4 kg/450 kg * 687 kg = 1.9 kg head-1 day-1) – due to a lack of available data, bedding application
188
+ rates for sand for freestall barns and shavings and sawdust for freestall barns were also applied to other dairy housing types. For swine, calculations
189
+ assumed an average weight for sows and boars of 198 kg (ECCC, 2022) (chopped straw: 1.8 kg/450 kg * 198 kg = 0.79 kg head-1 day-1;
190
+ long straw: 1.6 kg/450 kg * 198 kg = 0.7 kg head-1 day-1). For poultry we assumed an average weight of 0.9 kg for broilers, 1.8 kg for layers,
191
+ and 6.8 kg for turkeys (ECCC, 2022). For sawdust bedding this gave application rates of: broilers – 0.7 kg/450 kg * 0.9 kg = = 0.0014 kg head-1 day-1;
192
+ for layers – 0.7 kg/450 kg * 1.8 kg = 0.0028 kg head-1 day-1; for turkeys – 0.7 kg/450 kg * 6.8 kg = 0.011 kg head-1 day-1.
193
+ * Footnote 5: Dairy manure soilds separated from manure liquid using a screw press and composted and dried; also sometimes referred to as recycled manure solids,
194
+ dried manure solids, undigested feedstuffs or more commonly compost bedding (OMAFRA, 2015). Values from Misselbrook and Powell (2005, Table 1).
195
+ * Footnote 6: Values for long and chopped straw follow Chai et al. (2016) and are originally from Rotz et al. (2013).
196
+ * Footnote 7: Due to a lack of data, total C, total N, total P and C:N ratio values for wood-chip bedding from Larney et al. (2008) are used for wood shavings
197
+ and sawdust bedding for dairy cattle, sheep, swine and poultry.
198
+ * Footnote 8: Bedding application rates for sheep were obtained from the Canadian Sheep Foundation (2021), and applied to all bedding options. The application
199
+ rate of 0.57 was calculated as the midpoint of the recommended 0.45-0.68 kg head-1 day-1 range provided.
200
+ * Footnote 9: Following Chai et al. (2016), a total N content value of 0.0057 (derived from Larney et al., 2008) was used for chopped straw bedding for dairy
201
+ cattle; due to a lack of data, the total C, total N, total P and C:N ratio values for straw bedding from Larney et al. (2008) were applied to
202
+ long- and chopped-straw bedding for dairy cows, swine and poultry.
203
+ * Footnote 10: Bedding options for sheep were identified from the Canadian Sheep Foundation (2021). Nutrient concentration values for straw and wood shavings
204
+ for beef cattle were used for sheep in a drylot/corral and barn.
205
+ * Footnote 11: For Other livestock, straw was assumed to be the main bedding type and total C, total N, total P and C:N ratio values for straw bedding from
206
+ Larney et al. (2008) were applied. For llamas and alpacas and goats, the bedding application rate for sheep was used; for deer and elk, horses,
207
+ mules and bison, the bedding application rate for beef cattle (feedlot) was used as no data for these animals groups was available.
208
+ * Footnote 12: Values for moisture content of bedding from Ferraz et al. (2020). The moisture content for straw is the mean of values for barley straw (9.8%)
209
+ and wheat straw (9.33%); the moisture content for sawdust is the value for dried sawdust.
210
+
211
+ """
212
+ table_30 = _HolosTable(
213
+ name='Table_30_Default_Bedding_Material_Composition_Provider',
214
+ data=[
215
+ # Beef
216
+ dict(
217
+ AnimalType=AnimalType.beef.value,
218
+ BeddingMaterial=BeddingMaterialType.straw.value, # Footnote 1
219
+ TotalNitrogenKilogramsDryMatter=0.0057,
220
+ TotalCarbonKilogramsDryMatter=0.447,
221
+ TotalPhosphorusKilogramsDryMatter=0.000635,
222
+ CarbonToNitrogenRatio=90.5,
223
+ MoistureContent=9.57 # Footnote 12
224
+ ),
225
+ dict(
226
+ AnimalType=AnimalType.beef.value,
227
+ BeddingMaterial=BeddingMaterialType.wood_chip.value, # Footnotes 1, 2
228
+ TotalNitrogenKilogramsDryMatter=0.00185,
229
+ TotalCarbonKilogramsDryMatter=0.506,
230
+ TotalPhosphorusKilogramsDryMatter=0.000275,
231
+ CarbonToNitrogenRatio=329.5,
232
+ MoistureContent=12.82 # Footnote12
233
+ ),
234
+ # Dairy
235
+ dict(
236
+ AnimalType=AnimalType.dairy.value,
237
+ BeddingMaterial=BeddingMaterialType.sand.value, # Footnote 4
238
+
239
+ # set all following values to 0 to mimic the behavior in cs code
240
+ TotalNitrogenKilogramsDryMatter=0,
241
+ TotalCarbonKilogramsDryMatter=0,
242
+ TotalPhosphorusKilogramsDryMatter=0,
243
+ CarbonToNitrogenRatio=0,
244
+ MoistureContent=0 # Footnote12
245
+ ),
246
+ dict(
247
+ AnimalType=AnimalType.dairy.value,
248
+ BeddingMaterial=BeddingMaterialType.separated_manure_solid.value, # Footnote 5
249
+ TotalNitrogenKilogramsDryMatter=0.033,
250
+ TotalCarbonKilogramsDryMatter=0.395,
251
+ TotalPhosphorusKilogramsDryMatter=0,
252
+ CarbonToNitrogenRatio=12,
253
+ MoistureContent=0
254
+ ),
255
+ dict(
256
+ AnimalType=AnimalType.dairy.value,
257
+ BeddingMaterial=BeddingMaterialType.straw_long.value, # Footnote 6
258
+ TotalNitrogenKilogramsDryMatter=0.0057,
259
+ TotalCarbonKilogramsDryMatter=0.447,
260
+ TotalPhosphorusKilogramsDryMatter=0.000635,
261
+ CarbonToNitrogenRatio=90.5,
262
+ MoistureContent=9.57 # Footnote 12
263
+ ),
264
+ dict(
265
+ AnimalType=AnimalType.dairy.value,
266
+ BeddingMaterial=BeddingMaterialType.straw_chopped.value, # Footnote 6
267
+ TotalNitrogenKilogramsDryMatter=0.0057,
268
+ TotalCarbonKilogramsDryMatter=0.447,
269
+ TotalPhosphorusKilogramsDryMatter=0.000635,
270
+ CarbonToNitrogenRatio=90.5,
271
+ MoistureContent=9.57 # Footnote 12
272
+ ),
273
+ dict(
274
+ AnimalType=AnimalType.dairy.value,
275
+ BeddingMaterial=BeddingMaterialType.shavings.value, # Footnotes 4, 7
276
+ TotalNitrogenKilogramsDryMatter=0.00185,
277
+ TotalCarbonKilogramsDryMatter=0.506,
278
+ TotalPhosphorusKilogramsDryMatter=0.000275,
279
+ CarbonToNitrogenRatio=329.5,
280
+ MoistureContent=10.09 # Footnote 12
281
+ ),
282
+ dict(
283
+ AnimalType=AnimalType.dairy.value,
284
+ BeddingMaterial=BeddingMaterialType.sawdust.value, # Footnotes 4, 7
285
+ TotalNitrogenKilogramsDryMatter=0.00185,
286
+ TotalCarbonKilogramsDryMatter=0.506,
287
+ TotalPhosphorusKilogramsDryMatter=0.000275,
288
+ CarbonToNitrogenRatio=329.5,
289
+ MoistureContent=10.99 # Footnote 12
290
+ ),
291
+ # Swine
292
+ dict(
293
+ AnimalType=AnimalType.swine.value,
294
+ BeddingMaterial=BeddingMaterialType.straw_long.value, # Footnotes 4, 9
295
+ TotalNitrogenKilogramsDryMatter=0.0057,
296
+ TotalCarbonKilogramsDryMatter=0.447,
297
+ TotalPhosphorusKilogramsDryMatter=0.000635,
298
+ CarbonToNitrogenRatio=90.5,
299
+ MoistureContent=9.57 # Footnote 12
300
+ ),
301
+ dict(
302
+ AnimalType=AnimalType.swine.value,
303
+ BeddingMaterial=BeddingMaterialType.straw_chopped.value, # Footnotes 4, 9
304
+ TotalNitrogenKilogramsDryMatter=0.0057,
305
+ TotalCarbonKilogramsDryMatter=0.447,
306
+ TotalPhosphorusKilogramsDryMatter=0.000635,
307
+ CarbonToNitrogenRatio=90.5,
308
+ MoistureContent=9.57 # Footnote 12
309
+ ),
310
+ # Sheep
311
+ dict(
312
+ AnimalType=AnimalType.sheep.value,
313
+ BeddingMaterial=BeddingMaterialType.straw.value, # Footnote 7
314
+ TotalNitrogenKilogramsDryMatter=0.0057,
315
+ TotalCarbonKilogramsDryMatter=0.447,
316
+ TotalPhosphorusKilogramsDryMatter=0.000635,
317
+ CarbonToNitrogenRatio=90.5,
318
+ MoistureContent=9.57 # Footnote 12
319
+ ),
320
+ dict(
321
+ AnimalType=AnimalType.sheep.value,
322
+ BeddingMaterial=BeddingMaterialType.shavings.value, # Footnote 7
323
+ TotalNitrogenKilogramsDryMatter=0.00185,
324
+ TotalCarbonKilogramsDryMatter=0.506,
325
+ TotalPhosphorusKilogramsDryMatter=0.000275,
326
+ CarbonToNitrogenRatio=329.5,
327
+ MoistureContent=10.09 # Footnote 12
328
+ ),
329
+ # Poultry
330
+ dict(
331
+ AnimalType=AnimalType.poultry.value,
332
+ BeddingMaterial=BeddingMaterialType.straw.value, # Footnote 9
333
+ TotalNitrogenKilogramsDryMatter=0.0057,
334
+ TotalCarbonKilogramsDryMatter=0.447,
335
+ TotalPhosphorusKilogramsDryMatter=0.000635,
336
+ CarbonToNitrogenRatio=90.5,
337
+ MoistureContent=9.57 # Footnote 12
338
+ ),
339
+ dict(
340
+ AnimalType=AnimalType.poultry.value,
341
+ BeddingMaterial=BeddingMaterialType.shavings.value, # Footnote 9
342
+ TotalNitrogenKilogramsDryMatter=0.00185,
343
+ TotalCarbonKilogramsDryMatter=0.506,
344
+ TotalPhosphorusKilogramsDryMatter=0.000275,
345
+ CarbonToNitrogenRatio=329.5,
346
+ MoistureContent=10.09 # Footnote 12
347
+ ),
348
+ dict(
349
+ AnimalType=AnimalType.poultry.value,
350
+ BeddingMaterial=BeddingMaterialType.sawdust.value, # Footnotes 4, 7
351
+ TotalNitrogenKilogramsDryMatter=0.00185,
352
+ TotalCarbonKilogramsDryMatter=0.506,
353
+ TotalPhosphorusKilogramsDryMatter=0.000275,
354
+ CarbonToNitrogenRatio=329.5,
355
+ MoistureContent=10.99 # Footnote 12
356
+ ),
357
+ # Other Livestock
358
+ dict(
359
+ AnimalType=AnimalType.llamas.value,
360
+ BeddingMaterial=BeddingMaterialType.straw.value,
361
+ MoistureContent=9.57,
362
+ TotalNitrogenKilogramsDryMatter=0.0057,
363
+ TotalCarbonKilogramsDryMatter=0.447,
364
+ TotalPhosphorusKilogramsDryMatter=0.000635,
365
+ CarbonToNitrogenRatio=90.5 # Footnote 12
366
+ ),
367
+ dict(
368
+ AnimalType=AnimalType.alpacas.value,
369
+ BeddingMaterial=BeddingMaterialType.straw.value,
370
+ MoistureContent=9.57,
371
+ TotalNitrogenKilogramsDryMatter=0.0057,
372
+ TotalCarbonKilogramsDryMatter=0.447,
373
+ TotalPhosphorusKilogramsDryMatter=0.000635,
374
+ CarbonToNitrogenRatio=90.5 # Footnote 12
375
+ ),
376
+ dict(
377
+ AnimalType=AnimalType.deer.value,
378
+ BeddingMaterial=BeddingMaterialType.straw.value,
379
+ MoistureContent=9.57,
380
+ TotalNitrogenKilogramsDryMatter=0.0057,
381
+ TotalCarbonKilogramsDryMatter=0.447,
382
+ TotalPhosphorusKilogramsDryMatter=0.000635,
383
+ CarbonToNitrogenRatio=90.5 # Footnote 12
384
+ ),
385
+ dict(
386
+ AnimalType=AnimalType.elk.value,
387
+ BeddingMaterial=BeddingMaterialType.straw.value,
388
+ MoistureContent=9.57,
389
+ TotalNitrogenKilogramsDryMatter=0.0057,
390
+ TotalCarbonKilogramsDryMatter=0.447,
391
+ TotalPhosphorusKilogramsDryMatter=0.000635,
392
+ CarbonToNitrogenRatio=90.5 # Footnote 12
393
+ ),
394
+ dict(
395
+ AnimalType=AnimalType.goats.value,
396
+ BeddingMaterial=BeddingMaterialType.straw.value,
397
+ MoistureContent=9.57,
398
+ TotalNitrogenKilogramsDryMatter=0.0057,
399
+ TotalCarbonKilogramsDryMatter=0.447,
400
+ TotalPhosphorusKilogramsDryMatter=0.000635,
401
+ CarbonToNitrogenRatio=90.5 # Footnote 12
402
+ ),
403
+ dict(
404
+ AnimalType=AnimalType.horses.value,
405
+ BeddingMaterial=BeddingMaterialType.straw.value,
406
+ MoistureContent=9.57,
407
+ TotalNitrogenKilogramsDryMatter=0.0057,
408
+ TotalCarbonKilogramsDryMatter=0.447,
409
+ TotalPhosphorusKilogramsDryMatter=0.000635,
410
+ CarbonToNitrogenRatio=90.5 # Footnote 12
411
+ ),
412
+ dict(
413
+ AnimalType=AnimalType.mules.value,
414
+ BeddingMaterial=BeddingMaterialType.straw.value,
415
+ MoistureContent=9.57,
416
+ TotalNitrogenKilogramsDryMatter=0.0057,
417
+ TotalCarbonKilogramsDryMatter=0.447,
418
+ TotalPhosphorusKilogramsDryMatter=0.000635,
419
+ CarbonToNitrogenRatio=90.5 # Footnote 12
420
+ ),
421
+ dict(
422
+ AnimalType=AnimalType.bison.value,
423
+ BeddingMaterial=BeddingMaterialType.straw.value,
424
+ MoistureContent=9.57,
425
+ TotalNitrogenKilogramsDryMatter=0.0057,
426
+ TotalCarbonKilogramsDryMatter=0.447,
427
+ TotalPhosphorusKilogramsDryMatter=0.000635,
428
+ CarbonToNitrogenRatio=90.5 # Footnote 12
429
+ )
430
+ ],
431
+ path=PathsHolosResources.Table_30_Default_Bedding_Material_Composition_Provider)
432
+ table_30.write_data_to_csv(
433
+ comments=[
434
+ 'Table 30. Default bedding application rates and composition of bedding materials for all livestock groups.',
435
+ 'source: https://github.com/holos-aafc/Holos/blob/396f1ab9bc7247e6d78766f9445c14d2eb7c0d9d/H.Core/Providers/Animals/Table_30_Default_Bedding_Material_Composition_Provider.cs#L15'
436
+ ])
437
+ pass
438
+
439
+
440
+ def set_tillage_factor_table():
441
+ table_tillage = _HolosTable(
442
+ name='Table_Tillage_Factor',
443
+ data=[
444
+ dict(
445
+ SoilFunctionalCategory=SoilFunctionalCategory.Brown,
446
+ TillageType=TillageType.Intensive,
447
+ TillageFactor=1),
448
+ dict(
449
+ SoilFunctionalCategory=SoilFunctionalCategory.Brown,
450
+ TillageType=TillageType.Reduced,
451
+ TillageFactor=0.9),
452
+ dict(
453
+ SoilFunctionalCategory=SoilFunctionalCategory.Brown,
454
+ TillageType=TillageType.NoTill,
455
+ TillageFactor=0.8),
456
+ dict(
457
+ SoilFunctionalCategory=SoilFunctionalCategory.DarkBrown,
458
+ TillageType=TillageType.Intensive,
459
+ TillageFactor=1),
460
+ dict(
461
+ SoilFunctionalCategory=SoilFunctionalCategory.DarkBrown,
462
+ TillageType=TillageType.Reduced,
463
+ TillageFactor=0.85),
464
+ dict(
465
+ SoilFunctionalCategory=SoilFunctionalCategory.DarkBrown,
466
+ TillageType=TillageType.NoTill,
467
+ TillageFactor=0.7),
468
+ dict(
469
+ SoilFunctionalCategory=SoilFunctionalCategory.Black,
470
+ TillageType=TillageType.Intensive,
471
+ TillageFactor=1),
472
+ dict(
473
+ SoilFunctionalCategory=SoilFunctionalCategory.Black,
474
+ TillageType=TillageType.Reduced,
475
+ TillageFactor=0.8),
476
+ dict(
477
+ SoilFunctionalCategory=SoilFunctionalCategory.Black,
478
+ TillageType=TillageType.NoTill,
479
+ TillageFactor=0.6)
480
+
481
+ ],
482
+ path=PathsHolosResources.Table_Tillage_Factor)
483
+
484
+ table_tillage.write_data_to_csv(
485
+ comments=[
486
+ 'Holos source code: https://github.com/holos-aafc/Holos/blob/e644d8e52446faefe3d7503565a723563bba61fe/H.Core/Calculators/Tillage/TillageFactorCalculator.cs#L27',
487
+ ])
488
+
489
+
490
+ if __name__ == '__main__':
491
+ set_table_16()
492
+ set_table_30()
493
+ set_tillage_factor_table()