Skip to content

Commit 8fd3ad4

Browse files
committed
feat: add along-track GLA12 test product
fix: add boundary case in constant time fit
1 parent 0ebc7d7 commit 8fd3ad4

5 files changed

Lines changed: 911 additions & 20 deletions

File tree

GZ/calculate_GZ_ICESat_GLA12.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
utilities.py: download and management utilities for syncing files
4949
5050
UPDATE HISTORY:
51-
Updated 06/2024: renamed GLAH12 quality summary variable to d_qa_sum
51+
Updated 06/2024: renamed GLAH12 quality summary variable to qa_sum_flg
5252
save output HDF5 files as trajectory type for visualization
5353
Written 05/2024
5454
"""
@@ -144,7 +144,7 @@ def campaign_bias_correction(campaign: str):
144144
campaign: str
145145
ICESat campaign
146146
"""
147-
#
147+
# corrections for each laser number
148148
correction = dict(laser1=0.0, laser2=-0.017, laser3=0.011)
149149
# find the laser number from the campaign
150150
laser, = re.findall(r'\d', campaign)
@@ -279,7 +279,7 @@ def calculate_GZ_ICESat(base_dir, INPUT_FILE,
279279
d_ocElv = fid['Data_40HZ']['Geophysical']['d_ocElv'][:]
280280
d_ocElv[d_ocElv == fv] = 0.0
281281
# mask for reducing to valid values
282-
quality_summary = fid1['Data_40HZ']['Quality']['d_qa_sum'][:]
282+
quality_summary = fid1['Data_40HZ']['Quality']['qa_sum_flg'][:]
283283
# get the transform for converting to the latest ITRF
284284
transform = gz.crs.tp_itrf2008_to_wgs84_itrf2020()
285285
# transform the data to WGS84 ellipsoid in ITRF2020

grounding_zones/fit.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
u"""
33
fit.py
4-
Written by Tyler Sutterley (05/2024)
4+
Written by Tyler Sutterley (06/2025)
55
66
Utilities for creating models from surface elevation data
77
@@ -10,6 +10,7 @@
1010
scipy: Scientific Tools for Python (https://docs.scipy.org/doc/)
1111
1212
UPDATE HISTORY:
13+
Updated 06/2025: added boundary case for constant temporal fit
1314
Updated 05/2024: add function to build the complete design matrix
1415
add function to build the constraints for the least-squares fit
1516
add function to validate the columns in the design matrix
@@ -959,7 +960,11 @@ def _build_constraints(t_in, x_in, y_in, d_in, **kwargs):
959960
ub[0] = dmax + dsigma
960961
# time-variable constraints
961962
FIT_TYPE = kwargs['FIT_TYPE'].lower()
962-
if (FIT_TYPE == 'polynomial') and (n_time > 1):
963+
if (n_time == 1):
964+
# no constraints for constant time-variable fit
965+
pass
966+
elif (FIT_TYPE == 'polynomial') and (n_time > 1):
967+
# bounds for polynomial fit
963968
lb[1] = (dmin - dmax - 2.0*dsigma)/(tmax - tmin)
964969
ub[1] = (dmax - dmin + 2.0*dsigma)/(tmax - tmin)
965970
elif (FIT_TYPE == 'chebyshev'):

0 commit comments

Comments
 (0)