musica 0.12.2__cp313-cp313-win_amd64.whl → 0.13.0__cp313-cp313-win_amd64.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 musica might be problematic. Click here for more details.

Files changed (63) hide show
  1. musica/CMakeLists.txt +4 -0
  2. musica/_musica.cp313-win_amd64.pyd +0 -0
  3. musica/_version.py +1 -1
  4. musica/binding_common.cpp +6 -9
  5. musica/binding_common.hpp +17 -1
  6. musica/grid.cpp +206 -0
  7. musica/grid.py +98 -0
  8. musica/grid_map.cpp +117 -0
  9. musica/grid_map.py +167 -0
  10. musica/mechanism_configuration/__init__.py +18 -1
  11. musica/mechanism_configuration/ancillary.py +6 -0
  12. musica/mechanism_configuration/arrhenius.py +111 -269
  13. musica/mechanism_configuration/branched.py +116 -275
  14. musica/mechanism_configuration/emission.py +63 -52
  15. musica/mechanism_configuration/first_order_loss.py +73 -157
  16. musica/mechanism_configuration/mechanism.py +93 -0
  17. musica/mechanism_configuration/phase.py +44 -33
  18. musica/mechanism_configuration/phase_species.py +58 -0
  19. musica/mechanism_configuration/photolysis.py +77 -67
  20. musica/mechanism_configuration/reaction_component.py +54 -0
  21. musica/mechanism_configuration/reactions.py +17 -58
  22. musica/mechanism_configuration/species.py +45 -71
  23. musica/mechanism_configuration/surface.py +78 -74
  24. musica/mechanism_configuration/taylor_series.py +136 -0
  25. musica/mechanism_configuration/ternary_chemical_activation.py +138 -330
  26. musica/mechanism_configuration/troe.py +138 -330
  27. musica/mechanism_configuration/tunneling.py +105 -229
  28. musica/mechanism_configuration/user_defined.py +79 -68
  29. musica/mechanism_configuration.cpp +54 -162
  30. musica/musica.cpp +2 -5
  31. musica/profile.cpp +294 -0
  32. musica/profile.py +93 -0
  33. musica/profile_map.cpp +117 -0
  34. musica/profile_map.py +167 -0
  35. musica/test/examples/v1/full_configuration/full_configuration.json +91 -233
  36. musica/test/examples/v1/full_configuration/full_configuration.yaml +191 -290
  37. musica/test/integration/test_chapman.py +2 -2
  38. musica/test/integration/test_tuvx.py +72 -15
  39. musica/test/unit/test_grid.py +137 -0
  40. musica/test/unit/test_grid_map.py +126 -0
  41. musica/test/unit/test_parser.py +10 -10
  42. musica/test/unit/test_profile.py +169 -0
  43. musica/test/unit/test_profile_map.py +137 -0
  44. musica/test/unit/test_serializer.py +17 -16
  45. musica/test/unit/test_state.py +17 -4
  46. musica/test/unit/test_util_full_mechanism.py +78 -298
  47. musica/tuvx.cpp +94 -15
  48. musica/tuvx.py +92 -22
  49. musica/types.py +13 -5
  50. {musica-0.12.2.dist-info → musica-0.13.0.dist-info}/METADATA +14 -14
  51. musica-0.13.0.dist-info/RECORD +80 -0
  52. musica/mechanism_configuration/aqueous_equilibrium.py +0 -274
  53. musica/mechanism_configuration/condensed_phase_arrhenius.py +0 -309
  54. musica/mechanism_configuration/condensed_phase_photolysis.py +0 -88
  55. musica/mechanism_configuration/henrys_law.py +0 -44
  56. musica/mechanism_configuration/mechanism_configuration.py +0 -234
  57. musica/mechanism_configuration/simpol_phase_transfer.py +0 -217
  58. musica/mechanism_configuration/wet_deposition.py +0 -52
  59. musica-0.12.2.dist-info/RECORD +0 -70
  60. {musica-0.12.2.dist-info → musica-0.13.0.dist-info}/WHEEL +0 -0
  61. {musica-0.12.2.dist-info → musica-0.13.0.dist-info}/entry_points.txt +0 -0
  62. {musica-0.12.2.dist-info → musica-0.13.0.dist-info}/licenses/AUTHORS.md +0 -0
  63. {musica-0.12.2.dist-info → musica-0.13.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,295 +1,196 @@
1
- ---
2
1
  version: 1.0.0
3
2
  name: Full Configuration
4
3
  species:
5
- - name: A
6
- __absolute tolerance: 1.0e-30
7
- - name: B
8
- tracer type: AEROSOL
9
- - name: C
10
- tracer type: THIRD_BODY
11
- - name: M
12
- - name: H2O2
13
- HLC(298K) [mol m-3 Pa-1]: 1.011596348
14
- HLC exponential factor [K]: 6340
15
- diffusion coefficient [m2 s-1]: 1.46e-05
16
- N star: 1.74
17
- molecular weight [kg mol-1]: 0.0340147
18
- density [kg m-3]: 1000
19
- __absolute tolerance: 1.0e-10
20
- - name: ethanol
21
- diffusion coefficient [m2 s-1]: 9.5e-06
22
- N star: 2.55
23
- molecular weight [kg mol-1]: 0.04607
24
- __absolute tolerance: 1.0e-20
25
- - name: ethanol_aq
26
- molecular weight [kg mol-1]: 0.04607
27
- density [kg m-3]: 1000
28
- __absolute tolerance: 1.0e-20
29
- - name: H2O2_aq
30
- molecular weight [kg mol-1]: 0.0340147
31
- density [kg m-3]: 1000
32
- __absolute tolerance: 1.0e-10
33
- - name: H2O_aq
34
- density [kg m-3]: 1000
35
- molecular weight [kg mol-1]: 0.01801
36
- - name: aerosol stuff
37
- molecular weight [kg mol-1]: 0.5
38
- density [kg m-3]: 1000
39
- __absolute tolerance: 1.0e-20
40
- - name: more aerosol stuff
41
- molecular weight [kg mol-1]: 0.2
42
- density [kg m-3]: 1000
43
- __absolute tolerance: 1.0e-20
4
+ - name: A
5
+ molecular weight [kg mol-1]: 0.02897
6
+ __absolute tolerance: 1.0e-30
7
+ - name: B
8
+ constant concentration [mol m-3]: 1.0e19
9
+ - name: C
10
+ constant mixing ratio [mol mol-1]: 1.0e-20
11
+ - name: M
12
+ is third body: true
13
+ - name: H2O2
14
+ molecular weight [kg mol-1]: 0.0340147
15
+ __absolute tolerance: 1.0e-10
16
+ - name: ethanol
17
+ molecular weight [kg mol-1]: 0.04607
18
+ __absolute tolerance: 1.0e-20
44
19
  phases:
45
- - name: gas
46
- species:
47
- - A
48
- - B
49
- - C
50
- - ethanol
51
- - name: aqueous aerosol
52
- species:
53
- - H2O2_aq
54
- - H2O_aq
55
- - ethanol_aq
56
- - A
57
- - B
58
- - C
59
- - name: surface reacting phase
60
- species:
61
- - aerosol stuff
62
- - more aerosol stuff
63
- - name: cloud
64
- species:
65
- - B
66
- - C
20
+ - name: gas
21
+ species:
22
+ - name: A
23
+ diffusion coefficient [m2 s-1]: 1.0
24
+ - name: B
25
+ - name: C
26
+ - name: ethanol
27
+ - name: H2O2
67
28
  reactions:
68
- - type: SIMPOL_PHASE_TRANSFER
69
- gas phase: gas
70
- gas-phase species: ethanol
71
- condensed phase: aqueous aerosol
72
- condensed-phase species: ethanol_aq
73
- B:
74
- - -1970
75
- - 2.91
76
- - 0.00196
77
- - -0.496
78
- name: my simpol
79
- __irrelevant: "2"
80
- - type: AQUEOUS_EQUILIBRIUM
81
- condensed phase: aqueous aerosol
82
- condensed-phase water: H2O_aq
83
- A: 0.0114
84
- C: 2300
85
- k_reverse: 0.32
86
- reactants:
87
- - species name: A
88
- coefficient: 2
89
- products:
90
- - species name: B
91
- coefficient: 1
92
- - species name: C
93
- coefficient: 1
94
- name: my aqueous eq
95
- __irrelevant: "2"
96
- - type: CONDENSED_PHASE_ARRHENIUS
97
- condensed phase: aqueous aerosol
98
- A: 123.45
99
- Ea: 123.45
100
- B: 1.3
101
- D: 300
102
- E: 6.0e-06
103
- reactants:
104
- - species name: H2O2_aq
105
- coefficient: 1
106
- - species name: H2O_aq
107
- coefficient: 1
108
- products:
109
- - species name: ethanol_aq
110
- coefficient: 1
111
- name: my condensed arrhenius
112
- __irrelevant: "2"
113
- - type: CONDENSED_PHASE_ARRHENIUS
114
- condensed phase: aqueous aerosol
115
- A: 123.45
116
- C: 123.45
117
- B: 1.3
118
- D: 300
119
- E: 6.0e-06
120
- reactants:
121
- - species name: H2O2_aq
122
- coefficient: 1
123
- - species name: H2O_aq
124
- coefficient: 1
125
- products:
126
- - species name: ethanol_aq
127
- coefficient: 1
128
- name: my other condensed arrhenius
129
- - type: CONDENSED_PHASE_PHOTOLYSIS
130
- condensed phase: aqueous aerosol
131
- reactants:
132
- - species name: H2O2_aq
133
- coefficient: 1
134
- products:
135
- - species name: ethanol_aq
136
- coefficient: 1
137
- scaling factor: 12.3
138
- name: condensed photo B
139
- __irrelevant: "2"
140
- - type: EMISSION
141
- gas phase: gas
142
- products:
143
- - species name: B
144
- coefficient: 1
145
- name: my emission
146
- scaling factor: 12.3
147
- __irrelevant: "2"
148
- - type: FIRST_ORDER_LOSS
149
- gas phase: gas
150
- reactants:
151
- - species name: C
152
- coefficient: 1
153
- name: my first order loss
154
- scaling factor: 12.3
155
- __irrelevant: "2"
156
- - type: PHOTOLYSIS
157
- gas phase: gas
158
- reactants:
159
- - species name: B
160
- coefficient: 1
161
- products:
162
- - species name: C
163
- coefficient: 1
164
- name: photo B
165
- scaling factor: 12.3
166
- __irrelevant: "2"
167
- - type: SURFACE
168
- gas phase: gas
169
- gas-phase species: A
170
- reaction probability: 0.02
171
- gas-phase products:
172
- - species name: B
173
- coefficient: 1
174
- - species name: C
175
- coefficient: 1
176
- condensed phase: surface reacting phase
177
- name: my surface
178
- __irrelevant: "2"
179
- - type: TROE
180
- gas phase: gas
181
- reactants:
182
- - species name: B
183
- coefficient: 1
184
- - species name: M
185
- coefficient: 1
186
- products:
187
- - species name: C
188
- coefficient: 1
189
- k0_A: 1.2e-12
190
- k0_B: 167
191
- k0_C: 3
192
- kinf_A: 136
193
- kinf_B: 5
194
- kinf_C: 24
195
- Fc: 0.9
196
- N: 0.8
197
- name: my troe
198
- __irrelevant: "2"
199
- - type: TERNARY_CHEMICAL_ACTIVATION
200
- gas phase: gas
201
- name: my ternary chemical activation
202
- reactants:
203
- - species name: B
204
- coefficient: 1
205
- - species name: M
206
- coefficient: 1
207
- products:
208
- - species name: C
209
- coefficient: 1
210
- k0_A: 32.1
211
- k0_B: -2.3
212
- k0_C: 102.3
213
- kinf_A: 63.4
214
- kinf_B: -1.3
215
- kinf_C: 908.5
216
- Fc: 1.3
217
- "N": 32.1
218
- __irrelevant: "2"
219
- - type: BRANCHED_NO_RO2
220
- gas phase: gas
221
- reactants:
222
- - species name: A
223
- coefficient: 1
224
- alkoxy products:
225
- - species name: B
226
- coefficient: 1
227
- nitrate products:
228
- - species name: C
229
- coefficient: 1
230
- X: 0.00012
231
- Y: 167
232
- a0: 0.15
233
- "n": 9
234
- name: my branched
235
- __irrelevant: "2"
236
- - gas phase: gas
237
- type: TUNNELING
238
- name: "my tunneling"
239
- A: 123.45
240
- B: 1200
241
- C: 100000000
242
- reactants:
243
- - species name: B
244
- coefficient: 1
245
- products:
246
- - species name: C
247
- coefficient: 1
248
- __irrelevant: "2"
249
- - type: WET_DEPOSITION
250
- condensed phase: cloud
251
- name: rxn cloud
252
- scaling factor: 12.3
253
- __irrelevant: "2"
254
- - type: ARRHENIUS
255
- gas phase: gas
256
- reactants:
257
- - species name: B
258
- coefficient: 1
259
- products:
260
- - species name: C
261
- coefficient: 1
262
- A: 32.1
263
- B: -2.3
264
- C: 102.3
265
- D: 63.4
266
- E: -1.3
267
- name: my arrhenius
268
- __irrelevant: "2"
269
- - type: ARRHENIUS
270
- gas phase: gas
271
- reactants:
272
- - species name: A
273
- coefficient: 1
274
- products:
275
- - species name: B
276
- coefficient: 1.2
277
- A: 29.3
278
- B: -1.5
279
- Ea: 101.2
280
- D: 82.6
281
- E: -0.98
282
- name: my other arrhenius
283
- - type: USER_DEFINED
284
- gas phase: gas
285
- reactants:
286
- - species name: A
287
- coefficient: 1
288
- - species name: B
289
- coefficient: 1
290
- products:
291
- - species name: C
292
- coefficient: 1.3
293
- name: my user defined
294
- scaling factor: 12.3
295
- __irrelevant: "2"
29
+ - type: EMISSION
30
+ name: my emission
31
+ scaling factor: 12.3
32
+ gas phase: gas
33
+ products:
34
+ - species name: B
35
+ coefficient: 1
36
+ __irrelevant: 2
37
+ - type: FIRST_ORDER_LOSS
38
+ name: my first order loss
39
+ scaling factor: 12.3
40
+ gas phase: gas
41
+ reactants:
42
+ - species name: C
43
+ coefficient: 1
44
+ __irrelevant: 2
45
+ - type: PHOTOLYSIS
46
+ name: photo B
47
+ scaling factor: 12.3
48
+ gas phase: gas
49
+ reactants:
50
+ - species name: B
51
+ coefficient: 1
52
+ products:
53
+ - species name: C
54
+ coefficient: 1
55
+ __irrelevant: 2
56
+ - type: SURFACE
57
+ name: my surface
58
+ reaction probability: 2.0e-2
59
+ gas phase: gas
60
+ gas-phase species: A
61
+ gas-phase products:
62
+ - species name: B
63
+ coefficient: 1
64
+ - species name: C
65
+ coefficient: 1
66
+ __irrelevant: 2
67
+ - type: TROE
68
+ name: my troe
69
+ k0_A: 1.2e-12
70
+ k0_B: 167
71
+ k0_C: 3
72
+ kinf_A: 136
73
+ kinf_B: 5
74
+ kinf_C: 24
75
+ Fc: 0.9
76
+ N: 0.8
77
+ gas phase: gas
78
+ reactants:
79
+ - species name: B
80
+ coefficient: 1
81
+ - species name: M
82
+ coefficient: 1
83
+ products:
84
+ - species name: C
85
+ coefficient: 1
86
+ __irrelevant: 2
87
+ - type: TERNARY_CHEMICAL_ACTIVATION
88
+ name: my ternary chemical activation
89
+ gas phase: gas
90
+ k0_A: 32.1
91
+ k0_B: -2.3
92
+ k0_C: 102.3
93
+ kinf_A: 63.4
94
+ kinf_B: -1.3
95
+ kinf_C: 908.5
96
+ Fc: 1.3
97
+ N: 32.1
98
+ reactants:
99
+ - species name: B
100
+ coefficient: 1
101
+ - species name: M
102
+ coefficient: 1
103
+ products:
104
+ - species name: C
105
+ coefficient: 1
106
+ __irrelevant: 2
107
+ - type: BRANCHED_NO_RO2
108
+ name: my branched
109
+ X: 1.2e-4
110
+ Y: 167
111
+ a0: 0.15
112
+ n: 9
113
+ gas phase: gas
114
+ reactants:
115
+ - species name: A
116
+ coefficient: 1
117
+ alkoxy products:
118
+ - species name: B
119
+ coefficient: 1
120
+ nitrate products:
121
+ - species name: C
122
+ coefficient: 1
123
+ __irrelevant: 2
124
+ - type: TUNNELING
125
+ name: my tunneling
126
+ A: 123.45
127
+ B: 1200.0
128
+ C: 1.0e8
129
+ gas phase: gas
130
+ reactants:
131
+ - species name: B
132
+ coefficient: 1
133
+ products:
134
+ - species name: C
135
+ coefficient: 1
136
+ __irrelevant: 2
137
+ - type: ARRHENIUS
138
+ name: my arrhenius
139
+ gas phase: gas
140
+ A: 32.1
141
+ B: -2.3
142
+ C: 102.3
143
+ D: 63.4
144
+ E: -1.3
145
+ reactants:
146
+ - species name: B
147
+ coefficient: 1
148
+ products:
149
+ - species name: C
150
+ coefficient: 1
151
+ __irrelevant: 2
152
+ - type: ARRHENIUS
153
+ name: my other arrhenius
154
+ A: 29.3
155
+ B: -1.5
156
+ Ea: 101.2
157
+ D: 82.6
158
+ E: -0.98
159
+ gas phase: gas
160
+ reactants:
161
+ - species name: A
162
+ coefficient: 1
163
+ products:
164
+ - species name: B
165
+ coefficient: 1.2
166
+ - type: USER_DEFINED
167
+ name: my user defined
168
+ scaling factor: 12.3
169
+ gas phase: gas
170
+ reactants:
171
+ - species name: A
172
+ coefficient: 1
173
+ - species name: B
174
+ coefficient: 1
175
+ products:
176
+ - species name: C
177
+ coefficient: 1.3
178
+ __irrelevant: 2
179
+ - type: TAYLOR_SERIES
180
+ name: my taylor series
181
+ A: 12.3
182
+ B: -1.5
183
+ C: 1.0e-6
184
+ D: 340.0
185
+ E: 0.00032
186
+ taylor coefficients:
187
+ - 1.0
188
+ - 0.1
189
+ - -0.01
190
+ gas phase: gas
191
+ reactants:
192
+ - species name: B
193
+ coefficient: 1
194
+ products:
195
+ - species name: C
196
+ coefficient: 1
@@ -73,8 +73,8 @@ def TestSolve(solver):
73
73
 
74
74
 
75
75
  def GetMechanism():
76
- M = mc.Species(tracer_type="THIRD_BODY")
77
- O2 = mc.Species(name="O2", tracer_type="CONSTANT")
76
+ M = mc.Species(is_third_body=True)
77
+ O2 = mc.Species(name="O2")
78
78
  O = mc.Species(name="O", other_properties={
79
79
  "__absolute_tolerance": "1e-12"})
80
80
  O1D = mc.Species(name="O1D", other_properties={
@@ -18,19 +18,64 @@ def test_full_tuvx(monkeypatch):
18
18
  tuvx = musica.TUVX(file)
19
19
  assert tuvx is not None
20
20
 
21
- heating_rates = tuvx.heating_rate_names
22
- photolysis_rates = tuvx.photolysis_rate_names
23
- rates = tuvx.run()
21
+ photolysis_rates, heating_rates, dose_rates = tuvx.run()
22
+
23
+ assert len(tuvx.heating_rate_names) == 0, "Heating rate names should be empty for this config"
24
+ assert len(tuvx.photolysis_rate_names) > 0, "No photolysis rate names found"
25
+ assert len(tuvx.dose_rate_names) > 0, "No dose rate names found"
26
+ assert len(heating_rates) == 2, "Number of solar zenith angles should be 2 for heating rates"
27
+ assert len(photolysis_rates) == 2, "Number of solar zenith angles should be 2 for photolysis rates"
28
+ assert len(dose_rates) == 2, "Number of solar zenith angles should be 2 for dose rates"
29
+ assert heating_rates.shape[1] == 121, "Number of layers should be 121 for heating rates"
30
+ assert photolysis_rates.shape[1] == 121, "Number of layers should be 121 for photolysis rates"
31
+ assert dose_rates.shape[1] == 121, "Number of layers should be 121 for dose rates"
32
+ assert heating_rates.shape[2] == 0, "Should be no heating rates for this config"
33
+ assert photolysis_rates.shape[2] == len(tuvx.photolysis_rate_names), "Photolysis rates shape mismatch"
34
+ assert dose_rates.shape[2] == len(tuvx.dose_rate_names), "Dose rates shape mismatch"
35
+
36
+
37
+ def test_fixed_tuvx_from_file(monkeypatch):
38
+ monkeypatch.chdir("src")
39
+ file = "test/data/tuvx/fixed/config.json"
40
+ tuvx = musica.TUVX(config_path=file)
41
+ assert tuvx is not None
42
+
43
+ # Access properties multiple times
44
+ photolysis_names_1 = tuvx.photolysis_rate_names
45
+ photolysis_names_2 = tuvx.photolysis_rate_names
46
+ heating_names_1 = tuvx.heating_rate_names
47
+ heating_names_2 = tuvx.heating_rate_names
48
+ dose_names_1 = tuvx.dose_rate_names
49
+ dose_names_2 = tuvx.dose_rate_names
24
50
 
25
- assert len(rates) > 0, "No photolysis rates found"
26
- assert len(heating_rates) == 0, "Heating rates should be empty for this config"
27
- assert len(photolysis_rates) > 0, "No photolysis rates found"
51
+ # Verify they return the same object (cached)
52
+ assert photolysis_names_1 is photolysis_names_2
53
+ assert heating_names_1 is heating_names_2
54
+ assert dose_names_1 is dose_names_2
55
+
56
+ assert len(photolysis_names_1) == 3, "Unexpected number of photolysis rates found"
57
+ assert len(heating_names_1) == 2, "Unexpected number of heating rates found"
58
+ assert len(dose_names_1) == 3, "Unexpected number of dose rates found"
59
+
60
+ photolysis_rates, heating_rates, dose_rates = tuvx.run()
28
61
 
62
+ assert len(photolysis_rates) == 5, "Unexpected number of solar zenith angles for photolysis rates"
63
+ assert len(heating_rates) == 5, "Unexpected number of solar zenith angles for heating rates"
64
+ assert len(dose_rates) == 5, "Unexpected number of solar zenith angles for dose rates"
65
+ assert photolysis_rates.shape[1] == 4, "Unexpected number of layers for photolysis rates"
66
+ assert heating_rates.shape[1] == 4, "Unexpected number of layers for heating rates"
67
+ assert dose_rates.shape[1] == 4, "Unexpected number of layers for dose rates"
68
+ assert photolysis_rates.shape[2] == len(photolysis_names_1), "Photolysis rates shape mismatch"
69
+ assert heating_rates.shape[2] == len(heating_names_1), "Heating rates shape mismatch"
70
+ assert dose_rates.shape[2] == len(dose_names_1), "Dose rates shape mismatch"
29
71
 
30
- def test_fixed_tuvx(monkeypatch):
72
+
73
+ def test_fixed_tuvx_from_string(monkeypatch):
31
74
  monkeypatch.chdir("src")
32
75
  file = "test/data/tuvx/fixed/config.json"
33
- tuvx = musica.TUVX(file)
76
+ with open(file, 'r') as f:
77
+ config_str = f.read()
78
+ tuvx = musica.TUVX(config_string=config_str)
34
79
  assert tuvx is not None
35
80
 
36
81
  # Access properties multiple times
@@ -38,17 +83,29 @@ def test_fixed_tuvx(monkeypatch):
38
83
  photolysis_names_2 = tuvx.photolysis_rate_names
39
84
  heating_names_1 = tuvx.heating_rate_names
40
85
  heating_names_2 = tuvx.heating_rate_names
86
+ dose_names_1 = tuvx.dose_rate_names
87
+ dose_names_2 = tuvx.dose_rate_names
41
88
 
42
89
  # Verify they return the same object (cached)
43
90
  assert photolysis_names_1 is photolysis_names_2
44
91
  assert heating_names_1 is heating_names_2
45
-
46
- assert len(heating_names_1) > 0, "No heating rates found"
47
- assert len(photolysis_names_1) > 0, "No photolysis rates found"
48
-
49
- # these fail to run due to missing solar zenith angle, but that's not required and these should be able to run
50
- # rates = tuvx.run()
51
- # print(f"Rates: {rates}")
92
+ assert dose_names_1 is dose_names_2
93
+
94
+ assert len(photolysis_names_1) == 3, "Unexpected number of photolysis rates found"
95
+ assert len(heating_names_1) == 2, "Unexpected number of heating rates found"
96
+ assert len(dose_names_1) == 3, "Unexpected number of dose rates found"
97
+
98
+ photolysis_rates, heating_rates, dose_rates = tuvx.run()
99
+
100
+ assert len(photolysis_rates) == 5, "Unexpected number of solar zenith angles for photolysis rates"
101
+ assert len(heating_rates) == 5, "Unexpected number of solar zenith angles for heating rates"
102
+ assert len(dose_rates) == 5, "Unexpected number of solar zenith angles for dose rates"
103
+ assert photolysis_rates.shape[1] == 4, "Unexpected number of layers for photolysis rates"
104
+ assert heating_rates.shape[1] == 4, "Unexpected number of layers for heating rates"
105
+ assert dose_rates.shape[1] == 4, "Unexpected number of layers for dose rates"
106
+ assert photolysis_rates.shape[2] == len(photolysis_names_1), "Photolysis rates shape mismatch"
107
+ assert heating_rates.shape[2] == len(heating_names_1), "Heating rates shape mismatch"
108
+ assert dose_rates.shape[2] == len(dose_names_1), "Dose rates shape mismatch"
52
109
 
53
110
 
54
111
  def test_tuvx_initialization_errors():