Skip to content

Commit

Permalink
feat: include ATL14 files in lineage
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutterley committed May 21, 2024
1 parent c7478a9 commit 9882a26
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions DEM/interp_ATL14_DEM_ICESat2_ATL06.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ def interp_ATL14_DEM_ICESat2(INPUT_FILE,
# write to output HDF5 file
HDF5_ATL06_dem_write(IS2_atl06_dem, IS2_atl06_dem_attrs,
FILENAME=OUTPUT_FILE,
INPUT=GRANULE,
INPUT=[GRANULE, *DEM_MODEL],
FILL_VALUE=IS2_atl06_fill,
DIMENSIONS=IS2_atl06_dims,
CLOBBER=True)
# change the permissions mode
OUTPUT_FILE.chmod(mode=MODE)

# PURPOSE: outputting the interpolated DEM data for ICESat-2 data to HDF5
def HDF5_ATL06_dem_write(IS2_atl06_dem, IS2_atl06_attrs, INPUT=None,
def HDF5_ATL06_dem_write(IS2_atl06_dem, IS2_atl06_attrs, INPUT=[],
FILENAME='', FILL_VALUE=None, DIMENSIONS=None, CLOBBER=True):
# setting HDF5 clobber attribute
if CLOBBER:
Expand Down Expand Up @@ -445,8 +445,8 @@ def HDF5_ATL06_dem_write(IS2_atl06_dem, IS2_atl06_attrs, INPUT=None,
fileID.attrs['source'] = 'Spacecraft'
fileID.attrs['references'] = 'https://nsidc.org/data/icesat-2'
fileID.attrs['processing_level'] = '4'
# add attributes for input ATL06 file
fileID.attrs['lineage'] = pathlib.Path(INPUT).name
# add attributes for input files
fileID.attrs['lineage'] = [pathlib.Path(i).name for i in INPUT]
# find geospatial and temporal ranges
lnmn,lnmx,ltmn,ltmx,tmn,tmx = (np.inf,-np.inf,np.inf,-np.inf,np.inf,-np.inf)
for gtx in beams:
Expand Down
8 changes: 4 additions & 4 deletions DEM/interp_ATL14_DEM_ICESat2_ATL11.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,15 @@ def interp_ATL14_DEM_ICESat2(INPUT_FILE,
# write to output HDF5 file
HDF5_ATL11_dem_write(IS2_atl11_dem, IS2_atl11_dem_attrs,
FILENAME=OUTPUT_FILE,
INPUT=GRANULE,
INPUT=[GRANULE, *DEM_MODEL],
FILL_VALUE=IS2_atl11_fill,
DIMENSIONS=IS2_atl11_dims,
CLOBBER=True)
# change the permissions mode
OUTPUT_FILE.chmod(mode=MODE)

# PURPOSE: outputting the interpolated DEM data for ICESat-2 data to HDF5
def HDF5_ATL11_dem_write(IS2_atl11_dem, IS2_atl11_attrs, INPUT=None,
def HDF5_ATL11_dem_write(IS2_atl11_dem, IS2_atl11_attrs, INPUT=[],
FILENAME='', FILL_VALUE=None, DIMENSIONS=None, CLOBBER=True):
# setting HDF5 clobber attribute
if CLOBBER:
Expand Down Expand Up @@ -448,8 +448,8 @@ def HDF5_ATL11_dem_write(IS2_atl11_dem, IS2_atl11_attrs, INPUT=None,
fileID.attrs['source'] = 'Spacecraft'
fileID.attrs['references'] = 'https://nsidc.org/data/icesat-2'
fileID.attrs['processing_level'] = '4'
# add attributes for input ATL11 files
fileID.attrs['lineage'] = pathlib.Path(INPUT).name
# add attributes for input files
fileID.attrs['lineage'] = [pathlib.Path(i).name for i in INPUT]
# find geospatial and temporal ranges
lnmn,lnmx,ltmn,ltmx,tmn,tmx = (np.inf,-np.inf,np.inf,-np.inf,np.inf,-np.inf)
for ptx in pairs:
Expand Down
5 changes: 4 additions & 1 deletion DEM/interp_ATL14_DEM_ICESat_GLA12.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,14 @@ def interp_ATL14_DEM_ICESat(INPUT_FILE,
HDF5_GLA12_dem_write(IS_gla12_dem, IS_gla12_dem_attrs,
FILENAME=OUTPUT_FILE,
FILL_VALUE=IS_gla12_fill,
INPUT=[GRANULE, *DEM_MODEL],
CLOBBER=True)
# change the permissions mode
OUTPUT_FILE.chmod(mode=MODE)

# PURPOSE: outputting the DEM values for ICESat data to HDF5
def HDF5_GLA12_dem_write(IS_gla12_tide, IS_gla12_attrs,
FILENAME='', FILL_VALUE=None, CLOBBER=False):
FILENAME='', INPUT=[], FILL_VALUE=None, CLOBBER=False):
# setting HDF5 clobber attribute
if CLOBBER:
clobber = 'w'
Expand All @@ -334,6 +335,8 @@ def HDF5_GLA12_dem_write(IS_gla12_tide, IS_gla12_attrs,
# add software information
fileID.attrs['software_reference'] = gz.version.project_name
fileID.attrs['software_version'] = gz.version.full_version
# add attributes for input files
fileID.attrs['lineage'] = [pathlib.Path(i).name for i in INPUT]

# create Data_40HZ group
fileID.create_group('Data_40HZ')
Expand Down

0 comments on commit 9882a26

Please sign in to comment.