Skip to content

Commit

Permalink
updated change log and removed print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
nlensse1 committed Apr 18, 2024
1 parent 50b8504 commit ecf02f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated
### Removed
### Fixed
- [issue/258](https://github.com/podaac/l2ss-py/issues/258): fix line 1206 so that ScanTime is what determines a GPM file
### Security


Expand Down
6 changes: 1 addition & 5 deletions podaac/subsetter/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,6 @@ def compute_time_variable_name(dataset: xr.Dataset, lat_var: xr.Variable, total_
# first check if any variables are named 'time'
for var_name in list(dataset.data_vars.keys()):
var_name_time = var_name.strip(GROUP_DELIM).split(GROUP_DELIM)[-1]
print (var_name_time)
print (dataset[var_name].squeeze().dims)
print (lat_var.squeeze().dims)

if len(dataset[var_name].squeeze().dims) == 0:
continue
if var_name not in total_time_vars and ('time' == var_name_time.lower() or 'timeMidScan' == var_name_time) and dataset[var_name].squeeze().dims[0] in lat_var.squeeze().dims:
Expand Down Expand Up @@ -1203,7 +1199,7 @@ def subset(file_to_subset: str, bbox: np.ndarray, output_file: str,

if '.HDF5' == file_extension:
# GPM files will have a timeMidScan time variable present
if 'timeMidScan' in [var.split('__')[-1] for var in list(nc_dataset.variables.keys())]:
if 'ScanTime' in [var.split('__')[-2] for var in list(nc_dataset.variables.keys())]:
gc.change_var_dims(nc_dataset, variables)
hdf_type = 'GPM'

Expand Down

0 comments on commit ecf02f6

Please sign in to comment.