Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mortenwh/nansat
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh committed Aug 30, 2024
2 parents 3e98589 + 7e576c3 commit ae61f24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nansat/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ def _post_proc_thredds(self,
fill_value = None
if '_FillValue' in inp_var.ncattrs():
fill_value = inp_var._FillValue
if '_FillValue' in band_metadata[inp_var_name]:
fill_value = band_metadata['_FillValue']
elif '_FillValue' in band_metadata[inp_var_name]:
fill_value = band_metadata[inp_var_name]['_FillValue']
dimensions = ('time', ) + inp_var.dimensions
out_var = Exporter._copy_nc_var(inp_var, nc_out, inp_var_name, inp_var.dtype,
dimensions, fill_value=fill_value, zlib=zlib)
Expand Down
6 changes: 5 additions & 1 deletion nansat/mappers/sentinel1.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ def test2(gcp_dim):

logging.debug("GCPY size: %d" % gcp_y)
logging.debug("GCPX size: %d" % gcp_x)
logging.debug("Pixel(s) size: %d" % pixel.size)

if gcp_y*gcp_x != pixel.size:
raise ValueError("GCP dimension mismatch")
if gcp_y*gcp_x > pixel.size:
gcp_x, gcp_y = test1(gcp_x-1, gcp_y-1)
if gcp_y*gcp_x != pixel.size:
raise ValueError("GCP dimension mismatch")

return int(gcp_y), int(gcp_x)

Expand Down

0 comments on commit ae61f24

Please sign in to comment.