Skip to content

Commit

Permalink
Update to latest code from development version.
Browse files Browse the repository at this point in the history
  • Loading branch information
radosuav committed Sep 28, 2017
1 parent ac3fe78 commit 3425596
Show file tree
Hide file tree
Showing 41 changed files with 7,280 additions and 5,054 deletions.
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
Expand All @@ -22,7 +23,9 @@ var/
*.egg-info/
.installed.cfg
*.egg

src/*.egg-info*
src/*.egg*
src/*.egg-info/
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand All @@ -41,7 +44,9 @@ htmlcov/
.cache
nosetests.xml
coverage.xml
*,cover
*.cover

.hypothesis/

# Translations
*.mo
Expand All @@ -58,6 +63,16 @@ target/

# Temporary files
*.*~
*~

# Auxiliary image files
*.tif.*
Output/*.tif.*
Input/*.tif.*

# Jupyter Notebooks Checkpoints
.ipynb_checkpoints/

#Ipython Notebook
.ipynb_checkpoints

37 changes: 36 additions & 1 deletion CITATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,41 @@ In BibTeX format:
Number = {7},
Pages = {2809--2825},
Volume = {17},

Doi = {10.5194/hess-17-2809-2013}
}

If you use the Dual Angle inversion approach for obtaining canopy and soil temperature with 4SAIL you *must* cite the following paper

Guzinski, R., Nieto, H., Stisen, S., & Fensholt, R. (2015) Inter-comparison of energy balance and hydrological models for land surface energy flux estimation over a whole river catchment, Hydrology and Earth System Sciences, 19, 2017-2036.

In BibTeX format:

@Article{Guzinski2015,
Title = {Inter-comparison of energy balance and hydrological models for land surface energy flux estimation over a whole river catchment},
Author = {Guzinski, R. and Nieto, H. and Stisen, S. and Fensholt, R.},
Journal = {Hydrology and Earth System Sciences},
Year = {2015},
Number = {4},
Pages = {2017--2036},
Volume = {19},
Doi = {10.5194/hess-19-2017-2015},
Url = {http://www.hydrol-earth-syst-sci.net/19/2017/2015/}
}

If you use different coefficients for the Kustas and Norman resistances you *must* cite the following paper.

William P. Kustas, Hector Nieto, Laura Morillas, Martha C. Anderson, Joseph G. Alfieri, Lawrence E. Hipps, Luis Villagarcía, Francisco Domingo, Monica Garcia: Revisiting the paper “Using radiometric surface temperature for surface energy flux estimation in Mediterranean drylands from a two-source perspective”, Remote Sensing of Environment, In Press. doi:10.1016/j.rse.2016.07.024.

In BibTeX format:

@Article{Kustas2016,
Title = {Revisiting the paper “Using radiometric surface temperature for surface energy flux estimation in Mediterranean drylands from a two-source perspective” },
Author = {William P. Kustas and Hector Nieto and Laura Morillas and Martha C. Anderson and Joseph G. Alfieri and Lawrence E. Hipps and Luis Villagarcía and Francisco Domingo and Monica Garcia},
Journal = {Remote Sensing of Environment },
Year = {2016},
Pages = { - },
Doi = {http://dx.doi.org/10.1016/j.rse.2016.07.024},
ISSN = {0034-4257},
Url = {http://www.sciencedirect.com/science/article/pii/S0034425716302814}
}

86 changes: 47 additions & 39 deletions Config_LocalImage.txt
Original file line number Diff line number Diff line change
@@ -1,103 +1,111 @@
# TSEB model to run: [TSEB_PT: Kustas and Norman 1999 Priestley-Taylor TSEB, DTD: Norman et al. 2003 Dual Time Differenced TSEB, TSEB_2T: Component temperatures TSEB (To be implemented the patched/parallel very high resolution TSEB]
TSEB_MODEL=TSEB_PT
model=TSEB_PT

#==============================================================================
# Input Files with full path (any valid gdal raster file is accepcted (not HDF or NetCDF!!!)
# Use forward slash '/' for path separators, even using Windows
#==============================================================================
# Input land surface temperature in Kelvin # mandatory file
#If running DTD the input LST should contain at least 2 bands: [band 1: LST at time 1, band 2: LST at time 0 (sunrise)]
#If running TSEB_2A the input LST should contain at least 2 bands: [band 1: Canopy temperature, band 2: soil temperature]

Input_LST=./Input/ExampleImage_Trad_pm_am.tif
# Input land surface temperature in Kelvin # mandatory file
# If running DTD both T_R0 (sunrise) and T_R1 inputs are required
# If running TSEB_2A the input T_R1 should contain at least 2 bands: [band 1: Canopy temperature, band 2: soil temperature]
T_R1=./Input/ExampleImage_Trad_pm.tif
T_R0=./Input/ExampleImage_Trad_am.tif

# View Zenith Angle (degrees) # Optional, type either a full-path file or a single value for a constant value acroos the area
Input_VZA=0.0
VZA=0.0

# Processing Mask (boolean) # Optional, type a full-path file for processing only on non-masked pixels (all pixels with values > 0 in the mask image will be processed)
USE_MASK=0
input_mask=0

# Effective Leaf Area Index (m2/m2) # Optional, type either a full-path file or a single value for a constant value acroos the area
Input_LAI=./Input/ExampleImage_LAI.tif
LAI=./Input/ExampleImage_LAI.tif

# Vegetation Fractional Cover # Optional, type either a full-path file or a single value for a constant value acroos the area
Input_Fc=./Input/ExampleImage_Fc.tif
f_c=./Input/ExampleImage_Fc.tif

# Canopy height (m)# Optional, type either a full-path file or a single value for a constant value along the area
Input_Hc=2.4
h_C=2.4

# Canopy height/with ratio (wc/hc) # Optional, type either a full-path file or a single value for a constant value along the area
Input_Wc=1
w_C=1

# Green Fraction # Optional, type either a full-path file or a single value for a constant value along the area
Input_Fg=1
f_g=1

#==============================================================================
# Output File
#==============================================================================
# full path to output directory, The output GeoTIFF files will be stored in that folder with a standard name : Output_<TSEB_MODEL>.tif and Output_<TSEB_MODEL>_ancillary.tif
OutputFile=./Output/test_image.tif
output_file=./Output/test_image.tif

#==============================================================================
# Site Description
#==============================================================================
lat=38.289355
lon=-121.117794
altitude=97
alt=97
stdlon=-105.0
z_t=5
z_T=5
z_u=5


#==============================================================================
# Meteorology
#==============================================================================
DOY=221
Time=10.9992
Ta_0=291.11
Ta_1=299.18
time=10.9992
T_A0=291.11
T_A1=./Input/ExampleImage_Ta.tif
u=2.15
p=1011
ea=13.4
Sdn=861.74
Ldn=''
S_dn=861.74
L_dn=

#==============================================================================
# Canopy and Soil spectra
#==============================================================================
emisVeg=0.98 # leaf emissivity
emisGrd=0.95 # soil emissivity
emis_C=0.98 # leaf emissivity
emis_S=0.95 # soil emissivity

# Leaf spectral properties:{rho_leaf_vis: visible reflectance,tau_leaf_vis: visible transmittance, rho_leaf_nir: NIR reflectance, tau_leaf_nir: NIR transmittance}
rhovis=0.07
tauvis=0.08
rhonir=0.32
taunir=0.33
# Leaf spectral properties:{rho_vis_C: visible reflectance, tau_vis_C: visible transmittance, rho_nir_C: NIR reflectance, tau_nir_C: NIR transmittance}
rho_vis_C=0.07
tau_vis_C=0.08
rho_nir_C=0.32
tau_nir_C=0.33

# Leaf spectral properties:{rsoilv: visible reflectance, rsoiln: NIR reflectance}
rsoilv=0.15
rsoiln=0.25
# Soil spectral properties:{rho_vis_S: visible reflectance, rho_nir_S: NIR reflectance}
rho_vis_S=0.15
rho_nir_S=0.25

#==============================================================================
# Canopy and soil parameters
#==============================================================================
# Initial value for Priestley Taylor canopy transpiration
Max_alpha_PT=1.26
alpha_PT=1.26

# Cambpbell 1990 leaf inclination distribution parameter:[x_LAD=1 for spherical LIDF, x_LAD=0 for vertical LIDF, x_LAD=float(inf) for horzontal LIDF]
x_LAD=1

# Bare soil roughness lenght (m)
z0_soil=0.01

# Primary land cover CROP=11, GRASS=2, SHRUB=5, CONIFER=4, BROADLEAVED=3
LANDCOVER=3
# Primary land cover IGBP Land Cover Type Classification: CROP=12, GRASS=10, SHRUB=6, CONIFER=1, BROADLEAVED=4
landcover=4

# leaf effective width (m)
leaf_width=0.1

# Green fraction
f_g=1

#==============================================================================
# Resistances
#==============================================================================
resistance_form=0 # Resistance formulations: 0 - Kustas & Norman 1999; 1 - Choudhury & Monteih 1998; 2 - McNaughton & Van der Hurk 1995
KN_b=0.012 # Kustas & Norman formulation parameter
KN_c=0.0025 # Kustas & Norman formulation parameter
KN_C_dash=90 # Kustas & Norman formulation parameter


#==============================================================================
# Additional options
Expand All @@ -106,9 +114,9 @@ f_g=1
#1: default, estimate G as a ratio of Rn_soil, default G_ratio=0.35
#0: Use a constant G, usually use G_Constant=0 to ignore the computation of G
#2: estimate G from Santanello and Friedl with GAmp the maximum ration amplitude, Gphase, the time shift between G and Rn (hours) and Gshape the typical diurnal shape (hours)
CalcG=0
G_form=1
G_ratio=0.35
G_constant=0
GAmp=0.35
Gphase=3
Gshape=24
G_amp=0.35
G_phase=3
G_shape=24
55 changes: 33 additions & 22 deletions Config_PointTimeSeries.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TSEB model to run:
# TSEB model to run:
# TSEB_PT: Kustas and Norman 1999 Priestley-Taylor TSEB, DTD: Norman et al. 2003 Dual Time Differenced TSEB, TSEB_2T: Component temperatures TSEB (To be implemented the patched / parallel very high resolution TSEB
TSEB_MODEL=TSEB_PT
model=TSEB_PT

#==============================================================================
# Input ASCII File with full path
Expand All @@ -14,48 +14,59 @@ TSEB_MODEL=TSEB_PT
# Additional input variables are: 'SAA': solar azimuth angle, 'SZA': solar zenith angle, 'Ldn': incoming longwave radiation, 'f_C': fractional cover, 'f_g': green fraction, 'wc': canopy width to height ratio, 'G': soil heat flux (see G_Calc flag below)
# Other variables included (accidentaly or on purpose) in the text file are ignored

InputFile=./Input/ExampleTableInput.txt# mandatory file
input_file=./Input/ExampleTableInput.txt# mandatory file

#==============================================================================
# Output paramters
#==============================================================================
# full path to the output file table
OutputFile=./Output/OutputTest.txt
output_file=./Output/OutputTest.txt

#==============================================================================
# Site Parameters
#==============================================================================
lat=31.74 # Site latitude (degrees)
lon= -110.05 # Site Longitue (degrees)
altitude=1371 # Site altitude (m)
alt=1371 # Site altitude (m)
stdlon=-105 # Standard longitude of time zone (degrees)
z_t=4.0 # Measurement height of air temperature (m)
z_T=4.0 # Measurement height of air temperature (m)
z_u=4.3 # Measurement height of wind speed (m)

#==============================================================================
# Canopy and Soil spectra
#==============================================================================
emisVeg=0.98 # leaf emissivity
emisGrd=0.95 # soil emissivity
emis_C=0.98 # leaf emissivity
emis_S=0.95 # soil emissivity

# Leaf spectral properties:{rho_leaf_vis: visible reflectance,tau_leaf_vis: visible transmittance, rho_leaf_nir: NIR reflectance, tau_leaf_nir: NIR transmittance}
rhovis=0.094
tauvis=0.021
rhonir=0.345
taunir=0.203
# Leaf spectral properties:{rho_vis_C: visible reflectance, tau_vis_C: visible transmittance, rho_nir_C: NIR reflectance, tau_nir_C: NIR transmittance}
rho_vis_C=0.094
tau_vis_C=0.021
rho_nir_C=0.345
tau_nir_C=0.203

# Leaf spectral properties:{rsoilv: visible reflectance, rsoiln: NIR reflectance}
rsoilv=0.111
rsoiln=0.410
# Soil spectral properties:{rho_vis_S: visible reflectance, rho_nir_S: NIR reflectance}
rho_vis_S=0.111
rho_nir_S=0.410

#==============================================================================
# Canopy and soil parameters
#==============================================================================
Max_alpha_PT=1.26# Initial value for Priestley Taylor canopy transpiration
alpha_PT=1.26 # Initial value for Priestley Taylor canopy transpiration
x_LAD=1 # Cambpbell 1990 leaf inclination distribution parameter:[x_LAD=1 for spherical LIDF, x_LAD=0 for vertical LIDF, x_LAD=float(inf) for horzontal LIDF]
z0_soil=0.05 # Bare soil roughness lenght (m)
LANDCOVER=5 # Primary land cover CROP=11, GRASS=2, SHRUB=5, CONIFER=4, BROADLEAVED=3
landcover=6 # Primary land cover according to IGBP Land Cover Type Classification: CROP=12, GRASS=10, SHRUB=6, CONIFER=1, BROADLEAVED=4
leaf_width=0.01 # leaf effective width (m)
f_c=1 # Fractional cover
f_g=1 # Green vegetation fraction
w_C=1 # Canopy width to height ratio

#==============================================================================
# Resistances
#==============================================================================
resistance_form=0 # Resistance formulations: 0 - Kustas & Norman 1999; 1 - Choudhury & Monteih 1998; 2 - McNaughton & Van der Hurk 1995
KN_b=0.012 # Kustas & Norman formulation parameter
KN_c=0.0025 # Kustas & Norman formulation parameter
KN_C_dash=90 # Kustas & Norman formulation parameter

#==============================================================================
# Additional options
Expand All @@ -64,9 +75,9 @@ leaf_width=0.01 # leaf effective width (m)
#1: default, estimate G as a ratio of Rn_soil, default G_ratio=0.35
#0: Use a constant G, usually use G_Constant=0 to ignore the computation of G
#2: estimate G from Santanello and Friedl with GAmp the maximum ration amplitude, Gphase, the time shift between G and Rn (hours) and Gshape the typical diurnal shape (hours)
CalcG=0
G_form=0
G_ratio=0.35
G_constant=0
GAmp=0.35
Gphase=3
Gshape=24
G_amp=0.35
G_phase=3
G_shape=24
Binary file added Input/ExampleImage_Ta.tif
Binary file not shown.
Binary file added Input/ExampleImage_Trad_am.tif
Binary file not shown.
Binary file added Input/ExampleImage_Trad_pm.tif
Binary file not shown.
Binary file removed Input/ExampleImage_Trad_pm_am.tif
Binary file not shown.
2 changes: 1 addition & 1 deletion Input/ExampleTableInput.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Site Year DOY Time Sdn Rn G H LE Ta u Ts Tc Trad RH ea LAI hc fc VZA Ta_0 Trad_0
Site year DOY time S_dn Rn G H LE T_A1 u T_S T_C T_R1 RH ea LAI h_C f_c VZA T_A0 T_R0
1 1990 209 0.5 0 -60 -87 12 -40 293.75 1.56 290.68 290.08 289.59 52 12.61139746 0.5 0.5 0.28 0 295.69 294.17
1 1990 209 1.5 0 -57 -85 18 -45 292.67 2.11 290.1 289.74 289.12 58 13.15634245 0.5 0.5 0.28 0 295.69 294.17
1 1990 209 2.5 0 -47 -77 17 -48 293.2 2 290.54 290.12 289.51 55 12.89308837 0.5 0.5 0.28 0 295.69 294.17
Expand Down
26 changes: 13 additions & 13 deletions Input/ExampleTableInput_Headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

Year Year (YYYY)
DOY Day of the Year (0-366)
Time Decimal time (hrs), use the stdlong parameter to set the time zone
Trad Radiometric composite temperature (Kelvin)
Trad_0 Radiometric composite temperature near sunrise (Kelvin). OPTIONAL, only needed for DTD model.
Tc Canopy component temperature (Kelvin). OPTIONAL only needed for the TSEB-2T model
Ts Soil component temperature (Kelvin). OPTIONAL only needed for the TSEB-2T model
time Decimal time (hrs), use the stdlong parameter to set the time zone
T_R1 Radiometric composite temperature (Kelvin)
T_R0 Radiometric composite temperature near sunrise (Kelvin). OPTIONAL, only needed for DTD model.
T_C Canopy component temperature (Kelvin). OPTIONAL only needed for the TSEB-2T model
T_S Soil component temperature (Kelvin). OPTIONAL only needed for the TSEB-2T model
VZA View Zenith Angle (Degrees)
SZA Solar Zenith Angle (Degrees). OPTIONAL, will be estimated otherwise
SAA Solar Azimuth Angle (Degrees). OPTIONAL, will be estimated otherwise
Ta Air temperature (Kelvin)
Ta_0 Air temperature near sunrise (Kelvin). OPTIONAL only needed for DTD model
T_A1 Air temperature (Kelvin)
T_A0 Air temperature near sunrise (Kelvin). OPTIONAL only needed for DTD model
u Wind speed (m/s)
ea Vapor pressure (mb)
p Atmospheric pressure (mb). OPTIONAL, will be estimated otherwise
Sdn Incoming shortwave irradiance (W/m2)
Ldn Incoming longwave irradiance (W/m2). OPTIONAL will be estimated otherwise
S_dn Incoming shortwave irradiance (W/m2)
L_dn Incoming longwave irradiance (W/m2). OPTIONAL will be estimated otherwise
LAI Effective Leaf Area Index (m2/m2)
hc Canopy height (m)
fc Fractional cover (0-1). OPTIONAL, will be set to full cover (fc=1) otherwise
fg Green fraction (0-1). OPTIONAL, will be set to full green vegetation (fg=1) otherwise
wc Canopy with to height ratio (m/m). OPTIONAL, will be set to spherical/squared canopies (wc=1) otherwise
h_C Canopy height (m)
f_c Fractional cover (0-1). OPTIONAL, will be set to full cover (fc=1) otherwise
f_g Green fraction (0-1). OPTIONAL, will be set to full green vegetation (fg=1) otherwise
w_C Canopy with to height ratio (m/m). OPTIONAL, will be set to spherical/squared canopies (wc=1) otherwise
G Soil heat flux (W/m2). OPTIONAL, will be estimated otherwise
Loading

0 comments on commit 3425596

Please sign in to comment.