Skip to content

Commit

Permalink
Merge pull request #45 from umr-lops/fix1
Browse files Browse the repository at this point in the history
remove useless files
  • Loading branch information
agrouaze authored Nov 21, 2023
2 parents 172508b + 6f88034 commit c5428e3
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 104 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/agrouaze/grdwindinversion/issues.
Report bugs at https://github.com/umr-lops/grdwindinversion/issues.

If you are reporting a bug, please include:

Expand Down Expand Up @@ -45,7 +45,7 @@ articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/agrouaze/grdwindinversion/issues.
The best way to send feedback is to file an issue at https://github.com/umr-lops/grdwindinversion/issues.

If you are proposing a feature:

Expand Down Expand Up @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines:
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check
https://travis-ci.com/agrouaze/grdwindinversion/pull_requests
https://travis-ci.com/umr-lops/grdwindinversion/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
Expand Down
7 changes: 3 additions & 4 deletions docs/examples/wind-inversion-from-grd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"metadata": {},
"outputs": [],
"source": [
"input_file = xsar.get_test_file('S1A_IW_GRDH_1SDV_20170907T103020_20170907T103045_018268_01EB76_Z010.SAFE')\n",
"input_file"
"input_file = xsar.get_test_file('S1A_IW_GRDH_1SDV_20170907T103020_20170907T103045_018268_01EB76_Z010.SAFE')\n"
]
},
{
Expand Down Expand Up @@ -105,8 +104,8 @@
"metadata": {},
"outputs": [],
"source": [
"out_file = makeL2(input_file,out_folder, config_path=config_file_s1)\n",
"out_file"
"out_file,outds = makeL2(input_file,out_folder, config_path=config_file_s1,overwrite=True)\n",
"outds"
]
}
],
Expand Down
8 changes: 5 additions & 3 deletions grdwindinversion/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ def makeL2(filename, out_folder, config_path, overwrite=False, generateCSV=True)
:param overwrite: bool True -> existing files will be overwritten
:return:
out_file: str
ds_1000: xarray.Dataset final dataset with wind speed variables
"""
# 1 - Find sensor, and associated config (GMFs to use, flattening or not)
ds_1000 = xr.Dataset()
sensor, sensor_longname, fct_meta, fct_dataset = getSensorMetaDataset(
filename)
map_model = None
Expand All @@ -140,7 +142,7 @@ def makeL2(filename, out_folder, config_path, overwrite=False, generateCSV=True)

if os.path.exists(out_file) and overwrite is False:
logging.info("out_file %s exists" % out_file)
return out_file
return out_file,ds_1000

# land mask
logging.debug('conf: %s', getConf())
Expand Down Expand Up @@ -524,8 +526,8 @@ def makeL2(filename, out_folder, config_path, overwrite=False, generateCSV=True)
df.reset_index(drop=False, inplace=True)
df.to_csv(out_file.replace(".nc", ".csv"))

ds_1000.close()
# ds_1000.close()

logging.info("OK for %s ", os.path.basename(filename))

return out_file
return out_file,ds_1000
2 changes: 1 addition & 1 deletion grdwindinversion/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def processor_starting_point():
config_file = args.config_file
out_folder = args.outputdir

out_file = makeL2(input_file, out_folder, config_file, overwrite=args.overwrite)
out_file,outputds = makeL2(input_file, out_folder, config_file, overwrite=args.overwrite)
logging.info('out_file: %s', out_file)
logging.info('current memory usage: %s ', get_memory_usage(var='current'))
logging.info('done in %1.3f min', (time.time() - t0) / 60.)
Expand Down
21 changes: 9 additions & 12 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
pip==19.2.3
bump2version==0.5.11
wheel==0.33.6
watchdog==0.9.0
flake8==3.7.8
tox==3.14.0
coverage==4.5.4
Sphinx==1.8.5
twine==1.14.0



pip
bump2version
wheel
watchdog
flake8
tox
coverage
Sphinx
twine
18 changes: 0 additions & 18 deletions setup.cfg.todelete

This file was deleted.

61 changes: 0 additions & 61 deletions setup.py.todelete

This file was deleted.

3 changes: 1 addition & 2 deletions tests/test_grdwindinversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@


import unittest

from grdwindinversion import grdwindinversion
import grdwindinversion


class TestGrdwindinversion(unittest.TestCase):
Expand Down

0 comments on commit c5428e3

Please sign in to comment.