pydartdiags 0.0.4__py3-none-any.whl → 0.0.41__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 pydartdiags might be problematic. Click here for more details.

@@ -60,7 +60,8 @@ class obs_sequence:
60
60
  'AIRS observation',
61
61
  'GTSPP observation',
62
62
  'SST observation',
63
- 'observations']
63
+ 'observations',
64
+ 'WOD observation']
64
65
 
65
66
  def __init__(self, file):
66
67
  self.loc_mod = 'None'
@@ -29,7 +29,7 @@ def calculate_rank(df):
29
29
 
30
30
  Parameters:
31
31
  df (pd.DataFrame): A DataFrame with columns for mean, standard deviation, observed values,
32
- ensemble size, and observation type. The DataFrame should have one row per observation.
32
+ ensemble size, and observation type. The DataFrame should have one row per observation.
33
33
 
34
34
  Returns:
35
35
  tuple: A tuple containing the rank array, ensemble size, and a result DataFrame. The result
@@ -125,7 +125,9 @@ def mean_then_sqrt(x):
125
125
 
126
126
  Raises:
127
127
  TypeError: If the input is not an array-like object containing numeric values.
128
+ ValueError: If the input array is empty.
128
129
  """
130
+
129
131
  return np.sqrt(np.mean(x))
130
132
 
131
133
  def rmse_bias(df):
@@ -1,30 +1,36 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: pydartdiags
3
- Version: 0.0.4
3
+ Version: 0.0.41
4
4
  Summary: Observation Sequence Diagnostics for DART
5
+ Home-page: https://github.com/NCAR/pyDARTdiags.git
6
+ Author: Helen Kershaw
7
+ Author-email: Helen Kershaw <hkershaw@ucar.edu>
5
8
  Project-URL: Homepage, https://github.com/NCAR/pyDARTdiags.git
6
9
  Project-URL: Issues, https://github.com/NCAR/pyDARTdiags/issues
7
10
  Project-URL: Documentation, https://ncar.github.io/pyDARTdiags
8
- Author-email: Helen Kershaw <hkershaw@ucar.edu>
9
- License-File: LICENSE
11
+ Classifier: Programming Language :: Python :: 3
10
12
  Classifier: License :: OSI Approved :: Apache Software License
11
13
  Classifier: Operating System :: OS Independent
12
- Classifier: Programming Language :: Python :: 3
13
14
  Requires-Python: >=3.8
14
- Requires-Dist: numpy>=1.26
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
15
17
  Requires-Dist: pandas>=2.2.0
18
+ Requires-Dist: numpy>=1.26
16
19
  Requires-Dist: plotly>=5.22.0
17
- Description-Content-Type: text/markdown
20
+ Requires-Dist: pyyaml>=6.0.2
18
21
 
19
22
  # pyDARTdiags
20
23
 
21
- pyDARTdiags is a python library for obsevation space diagnostics for the Data Assimilation Research Testbed ([DART](https://github.com/NCAR/DART)).
24
+ pyDARTdiags is a Python library for obsevation space diagnostics for the Data Assimilation Research Testbed ([DART](https://github.com/NCAR/DART)).
22
25
 
23
26
  pyDARTdiags is under initial development, so please use caution.
24
27
  The MATLAB [observation space diagnostics](https://docs.dart.ucar.edu/en/latest/guide/matlab-observation-space.html) are available through [DART](https://github.com/NCAR/DART).
25
28
 
26
29
 
27
- pyDARTdiags can be installed through pip. We recommend installing pydartdiags in a virtual enviroment:
30
+ pyDARTdiags can be installed through pip: https://pypi.org/project/pydartdiags/
31
+ Documenation : https://ncar.github.io/pyDARTdiags/
32
+
33
+ We recommend installing pydartdiags in a virtual enviroment:
28
34
 
29
35
 
30
36
  ```
@@ -36,14 +42,14 @@ pip install pydartdiags
36
42
  ## Example importing the obs\_sequence and plots modules
37
43
 
38
44
  ```python
39
- from pydartdiags.obs_sequence import obs_sequence as obs_seq
45
+ from pydartdiags.obs_sequence import obs_sequence as obsq
40
46
  from pydartdiags.plots import plots
41
47
  ```
42
48
 
43
49
  ## Examining the dataframe
44
50
 
45
51
  ```python
46
- obs_seq = obs_seq.obs_sequence('obs_seq.final.ascii')
52
+ obs_seq = obsq.obs_sequence('obs_seq.final.ascii')
47
53
  obs_seq.df.head()
48
54
  ```
49
55
 
@@ -204,7 +210,7 @@ obs_seq.df.head()
204
210
  Find the numeber of assimilated (used) observations vs. possible observations by type
205
211
 
206
212
  ```python
207
- obs_seq.possible_vs_used(obs_seq.df)
213
+ obsq.possible_vs_used(obs_seq.df)
208
214
  ```
209
215
 
210
216
  <table border="1" class="dataframe">
@@ -361,7 +367,7 @@ obs_seq.possible_vs_used(obs_seq.df)
361
367
  * plot the rank histogram
362
368
 
363
369
  ```python
364
- df_qc0 = obs_seq.select_by_dart_qc(obs_seq.df, 0)
370
+ df_qc0 = obsq.select_by_dart_qc(obs_seq.df, 0)
365
371
  plots.plot_rank_histogram(df_qc0)
366
372
  ```
367
373
  ![Rank Histogram](docs/images/rankhist.png)
@@ -377,7 +383,7 @@ plots.plot_rank_histogram(df_qc0)
377
383
  hPalevels = [0.0, 100.0, 150.0, 200.0, 250.0, 300.0, 400.0, 500.0, 700, 850, 925, 1000]# float("inf")] # Pa?
378
384
  plevels = [i * 100 for i in hPalevels]
379
385
 
380
- df_qc0 = obs_seq.select_by_dart_qc(obs_seq.df, 0) # only qc 0
386
+ df_qc0 = obsq.select_by_dart_qc(obs_seq.df, 0) # only qc 0
381
387
  df_profile, figrmse, figbias = plots.plot_profile(df_qc0, plevels)
382
388
  ```
383
389
 
@@ -390,4 +396,4 @@ Contributions are welcome! If you have a feature request, bug report, or a sugge
390
396
 
391
397
  ## License
392
398
 
393
- DartLabPlot is released under the Apache License 2.0. For more details, see the LICENSE file in the root directory of this source tree or visit [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
399
+ pyDARTdiags is released under the Apache License 2.0. For more details, see the LICENSE file in the root directory of this source tree or visit [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
@@ -0,0 +1,10 @@
1
+ pydartdiags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ pydartdiags/obs_sequence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ pydartdiags/obs_sequence/obs_sequence.py,sha256=WrQ4lFymM1y9KVBl-_SzMR7E_VfPQJ8b4kHcVnIyEOc,21817
4
+ pydartdiags/plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ pydartdiags/plots/plots.py,sha256=_vZFgQ9qrmtwE_HAP6_nx3pV4JHRdnYckZ5xUxUH4io,6753
6
+ pydartdiags-0.0.41.dist-info/LICENSE,sha256=ROglds_Eg_ylXp-1MHmEawDqMw_UsCB4r9sk7z9PU9M,11377
7
+ pydartdiags-0.0.41.dist-info/METADATA,sha256=LP13-RMWfmd54Fifdp_r3GDhzfzvd3X-kMFAmR6cA5s,9345
8
+ pydartdiags-0.0.41.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
9
+ pydartdiags-0.0.41.dist-info/top_level.txt,sha256=LfMoPLnSd0VhhlWev1eeX9t6AzvyASOloag0LO_ppWg,12
10
+ pydartdiags-0.0.41.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.25.0
2
+ Generator: setuptools (74.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ pydartdiags
@@ -1,35 +0,0 @@
1
- acars_horizontal_wind:
2
- description: ACARS-derived Horizontal wind speed
3
- components:
4
- - acars_u_wind_component
5
- - acars_v_wind_component
6
-
7
- sat_horizontal_wind:
8
- description: Satellite-derived horizontal wind speed
9
- components:
10
- - sat_u_wind_component
11
- - sat_v_wind_component
12
-
13
- radiosonde_horizontal_wind:
14
- description: Radiosonde-derived horizontal wind speed
15
- components:
16
- - radiosonde_u_wind_component
17
- - radiosonde_v_wind_component
18
-
19
- aircraft_horizontal_wind:
20
- description: Aircraft-derived horizontal wind speed
21
- components:
22
- - aircraft_u_wind_component
23
- - aircraft_v_wind_component
24
-
25
- 10_m_horizontal_wind:
26
- description: 10 meter horizontal wind speed
27
- components:
28
- - 10m_u_wind_component
29
- - 10m_v_wind_component
30
-
31
- marine_sfc_horizontal_wind:
32
- description: Marine surface horizontal wind speed
33
- components:
34
- - marine_sfc_u_wind_component
35
- - marine_sfc_v_wind_component
@@ -1,18 +0,0 @@
1
- import pandas as pd
2
- import numpy as np
3
-
4
- # Example DataFrame setup
5
- data = {
6
- 'observation': [2.5, 3.0, 4.5], # Actual observation values
7
- 'obs_err_var': [0.1, 0.2, 0.3], # Variance of the observation error
8
- 'prior_ensemble_member1': [2.3, 3.1, 4.6],
9
- 'prior_ensemble_member2': [2.4, 2.9, 4.4],
10
- 'prior_ensemble_member3': [2.5, 3.2, 4.5]
11
- }
12
- df = pd.DataFrame(data)
13
-
14
- # Call the function
15
- rank, ens_size, _ = calculate_rank(df)
16
-
17
- print("Rank:", rank)
18
- print("Ensemble Size:", ens_size)
@@ -1,11 +0,0 @@
1
- pydartdiags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pydartdiags/obs_sequence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- pydartdiags/obs_sequence/composite_types.yaml,sha256=PVLMU6x6KcVMCwPB-U65C_e0YQUemfqUhYMpf1DhFOY,917
4
- pydartdiags/obs_sequence/obs_sequence.py,sha256=-TIUBfr8WGEWvEp94wlS6twNC7TNPMXKP3jrQ9isOiE,21774
5
- pydartdiags/plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- pydartdiags/plots/plots.py,sha256=8Tp1huRjnOPx24cFt8F92NwMKWUluGA-Ha8ixx6rCWk,6675
7
- pydartdiags/plots/tests/test_rank_histogram.py,sha256=qfws9oX6Sj0BwO3aFUa74smeHfHxzSR3-TloT4C8D_4,495
8
- pydartdiags-0.0.4.dist-info/METADATA,sha256=WmlqzRe1w3saI3CLlz0uIkaijJAGBl3Gl0emF16IlS4,9166
9
- pydartdiags-0.0.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
10
- pydartdiags-0.0.4.dist-info/licenses/LICENSE,sha256=ROglds_Eg_ylXp-1MHmEawDqMw_UsCB4r9sk7z9PU9M,11377
11
- pydartdiags-0.0.4.dist-info/RECORD,,