windborne 1.0.3__py3-none-any.whl → 1.0.5__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.
windborne/utils.py CHANGED
@@ -345,6 +345,7 @@ def convert_to_netcdf(data, curtime, output_filename=None):
345
345
  for obs_id, obs_data in data.items():
346
346
  # Convert 'None' strings to None type
347
347
  clean_data = {k: None if v == 'None' else v for k, v in obs_data.items()}
348
+
348
349
  data_list.append(clean_data)
349
350
 
350
351
  # Put the data in a panda dataframe in order to easily push to xarray then netcdf output
@@ -390,6 +391,9 @@ def convert_to_netcdf(data, curtime, output_filename=None):
390
391
 
391
392
  # Now that calculations are done, remove variables not needed in the netcdf output
392
393
  variables_to_drop = ['humidity', 'speed_x', 'speed_y', 'timestamp']
394
+ if 'id' in ds and pd.isna(ds['id']).all():
395
+ variables_to_drop.append('id')
396
+
393
397
  existing_vars = [var for var in variables_to_drop if var in ds]
394
398
  ds = ds.drop_vars(existing_vars)
395
399
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: windborne
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: A Python library for interacting with WindBorne Data and Forecasts API
5
5
  Author-email: WindBorne Systems <data@windbornesystems.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -3,9 +3,9 @@ windborne/cli.py,sha256=ZNqeIlWqlKE4iCo8kptUH6Wbish0T8O7-Hljt-gEi9Q,31031
3
3
  windborne/config.py,sha256=FYIBRiIuii5igAFQlOsHUa6u2i1kKnO1yZE7QfQJvUg,1688
4
4
  windborne/data_api.py,sha256=dnF54sLPYRU5dect3WxmonbHKUjihfE9dVdpaT-fylk,35560
5
5
  windborne/forecasts_api.py,sha256=AYuhFRls_XvzuNB55NF0w3y-_ocYwPxmI6C1lIyFkgM,16865
6
- windborne/utils.py,sha256=aEwZ1EPSA2j-1_tM99tIUqfXwliP7LJATBkOF8Y2yfU,38512
7
- windborne-1.0.3.dist-info/METADATA,sha256=sll2L3ENyBL4BaF4h_na-T-DKHXBFx0eyRh7HP5RaNM,1264
8
- windborne-1.0.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
- windborne-1.0.3.dist-info/entry_points.txt,sha256=j_YrqdCDrCd7p5MIwQ2BYwNXEi95VNANzLRJmcXEg1U,49
10
- windborne-1.0.3.dist-info/top_level.txt,sha256=PE9Lauriu5S5REf7JKhXprufZ_V5RiZ_TnfnrLGJrmE,10
11
- windborne-1.0.3.dist-info/RECORD,,
6
+ windborne/utils.py,sha256=UwcuMu2yj5lOR0G-LWSLcsyn024IHP83tkX9WEokTMY,38600
7
+ windborne-1.0.5.dist-info/METADATA,sha256=ICGFlsRSW6BP3u4bG6GYYFDYhhzIH5VJiDW6xyw0h2k,1264
8
+ windborne-1.0.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
+ windborne-1.0.5.dist-info/entry_points.txt,sha256=j_YrqdCDrCd7p5MIwQ2BYwNXEi95VNANzLRJmcXEg1U,49
10
+ windborne-1.0.5.dist-info/top_level.txt,sha256=PE9Lauriu5S5REf7JKhXprufZ_V5RiZ_TnfnrLGJrmE,10
11
+ windborne-1.0.5.dist-info/RECORD,,