pypromice 1.4.4__py3-none-any.whl → 1.5.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 pypromice might be problematic. Click here for more details.
- pypromice/process/L1toL2.py +13 -10
- pypromice/process/L2toL3.py +221 -221
- pypromice/process/aws.py +1 -39
- pypromice/process/join_l3.py +3 -3
- pypromice/process/resample.py +6 -5
- pypromice/process/value_clipping.py +0 -2
- pypromice/process/write.py +21 -37
- pypromice/resources/variable_aliases_GC-Net.csv +6 -6
- pypromice/resources/variables.csv +3 -3
- pypromice/tx/payload_formats.csv +1 -0
- {pypromice-1.4.4.dist-info → pypromice-1.5.1.dist-info}/METADATA +18 -8
- {pypromice-1.4.4.dist-info → pypromice-1.5.1.dist-info}/RECORD +16 -16
- {pypromice-1.4.4.dist-info → pypromice-1.5.1.dist-info}/WHEEL +1 -1
- {pypromice-1.4.4.dist-info → pypromice-1.5.1.dist-info}/LICENSE.txt +0 -0
- {pypromice-1.4.4.dist-info → pypromice-1.5.1.dist-info}/entry_points.txt +0 -0
- {pypromice-1.4.4.dist-info → pypromice-1.5.1.dist-info}/top_level.txt +0 -0
pypromice/process/L1toL2.py
CHANGED
|
@@ -92,7 +92,7 @@ def toL2(
|
|
|
92
92
|
baseline_elevation = (ds.gps_alt.to_series().resample('MS').median()
|
|
93
93
|
.reindex(ds.time.to_series().index, method='nearest')
|
|
94
94
|
.ffill().bfill())
|
|
95
|
-
mask = (np.abs(ds.gps_alt - baseline_elevation) < 100)
|
|
95
|
+
mask = (np.abs(ds.gps_alt - baseline_elevation) < 100) | ds.gps_alt.isnull()
|
|
96
96
|
ds[['gps_alt','gps_lon', 'gps_lat']] = ds[['gps_alt','gps_lon', 'gps_lat']].where(mask)
|
|
97
97
|
|
|
98
98
|
# removing dlr and ulr that are missing t_rad
|
|
@@ -102,16 +102,16 @@ def toL2(
|
|
|
102
102
|
|
|
103
103
|
# calculating realtive humidity with regard to ice
|
|
104
104
|
T_100 = _getTempK(T_0)
|
|
105
|
-
ds['
|
|
105
|
+
ds['rh_u_wrt_ice_or_water'] = adjustHumidity(ds['rh_u'], ds['t_u'],
|
|
106
106
|
T_0, T_100, ews, ei0)
|
|
107
107
|
|
|
108
108
|
if ds.attrs['number_of_booms']==2:
|
|
109
|
-
ds['
|
|
109
|
+
ds['rh_l_wrt_ice_or_water'] = adjustHumidity(ds['rh_l'], ds['t_l'],
|
|
110
110
|
T_0, T_100, ews, ei0)
|
|
111
111
|
|
|
112
112
|
if hasattr(ds,'t_i'):
|
|
113
113
|
if ~ds['t_i'].isnull().all():
|
|
114
|
-
ds['
|
|
114
|
+
ds['rh_i_wrt_ice_or_water'] = adjustHumidity(ds['rh_i'], ds['t_i'],
|
|
115
115
|
T_0, T_100, ews, ei0)
|
|
116
116
|
|
|
117
117
|
# Determiune cloud cover for on-ice stations
|
|
@@ -419,9 +419,12 @@ def calcTilt(tilt_x, tilt_y, deg2rad):
|
|
|
419
419
|
return phi_sensor_rad, theta_sensor_rad
|
|
420
420
|
|
|
421
421
|
|
|
422
|
-
def
|
|
423
|
-
'''
|
|
424
|
-
|
|
422
|
+
def adjustHumidity(rh, T, T_0, T_100, ews, ei0): #TODO figure out if T replicate is needed
|
|
423
|
+
'''Adjust relative humidity so that values are given with respect to
|
|
424
|
+
saturation over ice in subfreezing conditions, and with respect to
|
|
425
|
+
saturation over water (as given by the instrument) above the melting
|
|
426
|
+
point temperature. Saturation water vapors are calculated after
|
|
427
|
+
Groff & Gratch method.
|
|
425
428
|
|
|
426
429
|
Parameters
|
|
427
430
|
----------
|
|
@@ -440,7 +443,7 @@ def correctHumidity(rh, T, T_0, T_100, ews, ei0): #TODO f
|
|
|
440
443
|
|
|
441
444
|
Returns
|
|
442
445
|
-------
|
|
443
|
-
|
|
446
|
+
rh_wrt_ice_or_water : xarray.DataArray
|
|
444
447
|
Corrected relative humidity
|
|
445
448
|
'''
|
|
446
449
|
# Convert to hPa (Groff & Gratch)
|
|
@@ -458,8 +461,8 @@ def correctHumidity(rh, T, T_0, T_100, ews, ei0): #TODO f
|
|
|
458
461
|
freezing = (T < 0) & (T > -100).values
|
|
459
462
|
|
|
460
463
|
# Set to Groff & Gratch values when freezing, otherwise just rh
|
|
461
|
-
|
|
462
|
-
return
|
|
464
|
+
rh_wrt_ice_or_water = rh.where(~freezing, other = rh*(e_s_wtr / e_s_ice))
|
|
465
|
+
return rh_wrt_ice_or_water
|
|
463
466
|
|
|
464
467
|
|
|
465
468
|
def correctPrecip(precip, wspd):
|