diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..f9212d6 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,31 @@ +# This workflows will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: pypi + +on: + release: + types: [created] + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERS }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/REFERENCES.txt b/REFERENCES.txt index 84a15e9..13ba961 100644 --- a/REFERENCES.txt +++ b/REFERENCES.txt @@ -1,4 +1,20 @@ -References for PT-JPL (arid): +# References : + +## Common + +Campbell, G. S., & Norman, J. M. + Introduction to environmental biophysics (2nd ed.) (1998) + New York: Springer, pp. 168-169 + http://dx.doi.org/10.1007/978-1-4612-1626-1 + +Joseph A. Santanello Jr. and Mark A. Friedl. + Diurnal Covariation in Soil Heat Flux and Net Radiation (2003) + J. Appl. Meteor., 42, pp. 851-862. + Remote Sensing of Environment, 112 (3), pp. 901-919. + http://dx.doi.org/10.1175/1520-0450(2003)042<0851:DCISHF>2.0.CO;2 + + +## PT-JPL Allen, R.G., Pereira, L.S., Raes, D., Smith, M. Crop evapotranspiration —guidelines for computing crop water requirements @@ -12,11 +28,6 @@ Aragon, B., Houborg, R., Tu, K., Fisher, J.B., McCabe, M. Remote Sensing, 10 (12), art. no. 1867. http://dx.doi.org/10.3390/rs10121867 -Campbell, G. S., & Norman, J. M. - Introduction to environmental biophysics (2nd ed.) (1998) - New York: Springer, pp. 168-169 - http://dx.doi.org/10.1007/978-1-4612-1626-1 - Carlson, T.N., Capehart, W.J., Gillies, R.R. A new look at the simplified method for remote sensing of daily evapotranspiration (1995) @@ -47,8 +58,32 @@ Priestley, C.H.B. and Taylor, R.J. Parameters (1972) Monthly Weather Review, 100, 81-92. http://dx.doi.org/10.1175/1520-0493(1972)100<0081:OTAOSH>2.3.CO;2 -Joseph A. Santanello Jr. and Mark A. Friedl. - Diurnal Covariation in Soil Heat Flux and Net Radiation (2003) - J. Appl. Meteor., 42, pp. 851-862. - Remote Sensing of Environment, 112 (3), pp. 901-919. - http://dx.doi.org/10.1175/1520-0450(2003)042<0851:DCISHF>2.0.CO;2 \ No newline at end of file + +## TSEB: + +Colaizzi, P. D., Kustas, William P., Anderson, Martha C., +Agam, Nurit, Tolk, Judy A., Evett, Steven R., Howell, Terry A., +Gowda, Prasanna H., and O’Shaughnessy, Susan A. + Two-source energy balance model estimates of evapotranspiration using + component and composite surface temperatures (2012) + Advances in Water Resources, 50, pp. 134-151. + https://doi.org/10.1016/j.advwatres.2012.06.004 + +Kustas, W. P. and J. M. Norman + Evaluation of soil and vegetation heat flux predictions using a + simple two-source model with radiometric temperatures for partial + canopy cover (1999) + Agricultural and Forest Meteorology, 94(1), pp. 13-29. + https://doi.org/10.1016/S0168-1923(99)00005-2 + +Norman, J. M., Kustas, W. P., and Humes, K. S. + Source approach for estimating soil and vegetation energy fluxes in + observations of directional radiometric surface temperature (1995) + Agricultural and Forest Meteorology, 77(3), pp. 263-293. + https://doi.org/10.1016/0168-1923(95)02265-Y + +Zhuang, Q. and B. Wu + Estimating Evapotranspiration from an Improved Two-Source Energy + Balance Model Using ASTER Satellite Imagery (2015) + Water, 7(12), pp. 6673-6688. + https://doi.org/10.3390/w7126653 \ No newline at end of file diff --git a/geeet/tseb.py b/geeet/tseb.py index 19c56da..f092362 100644 --- a/geeet/tseb.py +++ b/geeet/tseb.py @@ -548,4 +548,50 @@ def tseb_series_iteration(img, list): et_tseb_out = LE, LEs, LEc, Hs, Hc, G, Rn, Rns, Rnc, Ts, Tc, Tac, ra, rs, rx, it et_tseb_out_keys = ['LE', 'LEs', 'LEc', 'Hs', 'Hc', 'G', 'Rn', 'Rns', 'Rnc', 'Ts', 'Tc', 'Tac', 'Ra', 'Rs', 'Rx', 'iteration'] et_tseb_out = dict(zip(et_tseb_out_keys, et_tseb_out)) - return et_tseb_out \ No newline at end of file + return et_tseb_out + +main_ref="Norman, J.M., et al. (1995). \"Source approach for estimating soil and \ +vegetation energy fluxes in observations of directional radiometric surface \ +temperature\". Agricultural and Forest Meteorology, 77(3), pp. 263-293. \ +https://doi.org/10.1016/0168-1923(95)02265-Y" + +# Citation: +# cite() - main reference only +def cite(): + print(main_ref) +#cite_all() - all references +def cite_all(): + for ref in all_refs: + print(ref) + +all_refs=["Campbell, G. S., & Norman, J. M. \ +\"Introduction to environmental biophysics (2nd ed.) (1998)\"\ +New York: Springer, pp. 168-169\ +http://dx.doi.org/10.1007/978-1-4612-1626-1", +"Colaizzi, P. D., Kustas, William P., Anderson, Martha C., \ +Agam, Nurit, Tolk, Judy A., Evett, Steven R., Howell, Terry A., \ +Gowda, Prasanna H., and O\'Shaughnessy, Susan A. \ +\"Two-source energy balance model estimates of evapotranspiration \ +using component and composite surface temperatures\" (2012) \ +Advances in Water Resources, 50, pp. 134-151. \ +https://doi.org/10.1016/j.advwatres.2012.06.004", +"Kustas, W. P. and J. M. Norman \ +\"Evaluation of soil and vegetation heat flux predictions using a \ +simple two-source model with radiometric temperatures for partial \ +canopy cover\" (1999) Agricultural and Forest Meteorology, 94(1), \ +pp. 13-29. https://doi.org/10.1016/S0168-1923(99)00005-2", +"Norman, J. M., Kustas, W. P., and Humes, K. S. \ +\"Source approach for estimating soil and vegetation energy fluxes in \ +observations of directional radiometric surface temperature\" (1995) \ +Agricultural and Forest Meteorology, 77(3), pp. 263-293. \ +https://doi.org/10.1016/0168-1923(95)02265-Y", +"Joseph A. Santanello Jr. and Mark A. Friedl. \ +\"Diurnal Covariation in Soil Heat Flux and Net Radiation\" (2003) \ +J. Appl. Meteor., 42, pp. 851-862. Remote Sensing of Environment, \ +112 (3), pp. 901-919., \ +http://dx.doi.org/10.1175/1520-0450(2003)042<0851:DCISHF>2.0.CO;2", +"Zhuang, Q. and B. Wu \ +\"Estimating Evapotranspiration from an Improved Two-Source Energy \ +Balance Model Using ASTER Satellite Imagery\" (2015) \ +Water, 7(12), pp. 6673-6688. \ +https://doi.org/10.3390/w7126653"] \ No newline at end of file diff --git a/geeet/vegetation.py b/geeet/vegetation.py index 3fba240..461b86a 100644 --- a/geeet/vegetation.py +++ b/geeet/vegetation.py @@ -371,7 +371,8 @@ def compute_Rns(Rn, LAI, solar_angles=None, use_zenith = False, k=0.6, LAI_thre References: ---------- - Zhuangi and Wu, 2015 Fisher et al., 2008 + Zhuang and Wu, 2015 + Fisher et al., 2008 Aragon et al., 2018 """ DTORAD = np.pi/180 @@ -409,12 +410,4 @@ def compute_Rns(Rn, LAI, solar_angles=None, use_zenith = False, k=0.6, LAI_thre exp_term = exp_term/(np.sqrt(2*np.cos(zenith*DTORAD))) Rns = Rn*np.exp(exp_term) Rns = np.array(Rns) - return Rns - -""" References -Zhuang, Q.; Wu, B. Estimating Evapotranspiration from an Improved Two-Source Energy -Balance Model Using ASTER Satellite Imagery. Water 2015, 7, 6673-6688. -https://doi.org/10.3390/w7126653 - - -""" \ No newline at end of file + return Rns \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 1a24c0a..301ae0d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.1 +current_version = 0.0.2 commit = True tag = True