Skip to content

Commit

Permalink
#525: adjusted netcdf-cf mapper to account for new attribute names wi…
Browse files Browse the repository at this point in the history
…thout 'GDAL_'
  • Loading branch information
mortenwh authored and akorosov committed Jan 5, 2023
1 parent 78ff81a commit 6915f11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nansat/mappers/mapper_netcdf_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ def __init__(self, filename, gdal_dataset, gdal_metadata, *args, **kwargs):
raise WrongMapperError

if 'NC_GLOBAL#GDAL_NANSAT_GCPY_000' in list(gdal_metadata.keys()) or \
'NC_GLOBAL#GDAL_NANSAT_GCPProjection' in list(gdal_metadata.keys()):
# Probably Nansat generated netcdf of swath data - see issue #192
'NC_GLOBAL#GDAL_NANSAT_GCPProjection' in list(gdal_metadata.keys()) or \
'NC_GLOBAL#NANSAT_GCPY_000' in list(gdal_metadata.keys()) or \
'NC_GLOBAL#NANSAT_GCPProjection' in list(gdal_metadata.keys()):
# Nansat generated netcdf of swath data is not standard CF
raise WrongMapperError

metadata = VRT._remove_strings_in_metadata_keys(gdal_metadata,
Expand Down

0 comments on commit 6915f11

Please sign in to comment.