windborne 1.0.2__tar.gz → 1.0.4__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: windborne
3
- Version: 1.0.2
3
+ Version: 1.0.4
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "windborne"
7
- version = "1.0.2"
7
+ version = "1.0.4"
8
8
  description = "A Python library for interacting with WindBorne Data and Forecasts API"
9
9
  readme = {file = "README.md", content-type = "text/markdown"}
10
10
  authors = [
@@ -357,6 +357,8 @@ def convert_to_netcdf(data, curtime, output_filename=None):
357
357
  if col in df.columns:
358
358
  df[col] = pd.to_numeric(df[col], errors='coerce')
359
359
 
360
+ df['id'] = pd.to_numeric(df['id'], downcast='integer')
361
+
360
362
  ds = xr.Dataset.from_dataframe(df)
361
363
 
362
364
  # Build the filename and save some variables for use later
@@ -389,7 +391,7 @@ def convert_to_netcdf(data, curtime, output_filename=None):
389
391
  ds = ds.assign_coords(time=("time", ds['time'].data))
390
392
 
391
393
  # Now that calculations are done, remove variables not needed in the netcdf output
392
- variables_to_drop = ['humidity', 'speed_x', 'speed_y', 'timestamp', 'mission_name']
394
+ variables_to_drop = ['humidity', 'speed_x', 'speed_y', 'timestamp']
393
395
  existing_vars = [var for var in variables_to_drop if var in ds]
394
396
  ds = ds.drop_vars(existing_vars)
395
397
 
@@ -463,7 +465,6 @@ def convert_to_netcdf(data, curtime, output_filename=None):
463
465
  '_FillValue': float('nan'),
464
466
  'processing_level': ''
465
467
  }
466
-
467
468
  ds['specific_humidity'].attrs = {
468
469
  'units': 'mg/kg',
469
470
  'long_name': 'Specific Humidity',
@@ -471,6 +472,11 @@ def convert_to_netcdf(data, curtime, output_filename=None):
471
472
  'processing_level': '',
472
473
  'Conventions': "CF-1.8, WMO-CF-1.0"
473
474
  }
475
+ ds['mission_name'].attrs = {
476
+ 'long_name': 'Mission name',
477
+ 'description': 'Which balloon collected the data',
478
+ '_FillValue': ''
479
+ }
474
480
 
475
481
  # Add Global Attributes synonymous across all UASDC providers
476
482
  if not is_multi_mission:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: windborne
3
- Version: 1.0.2
3
+ Version: 1.0.4
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
File without changes
File without changes
File without changes
File without changes