not_used

This files are not used anymore but might be handy for plotting or calculations.

Brightness_T(H)
vangenuchten(input, thetares, thetasat, alpha, n, option)

h = vangenuchten(input,thetares, thetasat, alpha,n,option); if option not specified, or option <>1, h = input, and theta is calculated, otherwise theta = input, and h is calculated

calculate_vert_profiles(profiles, canopy)

this function is incomplete and apparently never called

These are useful for the visualization of results

plot_directional_figure4_function(directory)

Use: plot_directional_figure4(directory) makes BRDF, BFDF and bidirectional temperature polar plots from a SCOPE output directory (string ‘directory’) of directional data.

resizefigure(spfig, nx, ny, xo, yo, xi, yi, xend, yend)
progressbar(varargin)
Description:

progressbar() provides an indication of the progress of some task using

graphics and text. Calling progressbar repeatedly will update the figure and automatically estimate the amount of time remaining.

This implementation of progressbar is intended to be extremely simple to use

while providing a high quality user experience.

Features:
  • Can add progressbar to existing m-files with a single line of code.

  • Supports multiple bars in one figure to show progress of nested loops.

  • Optional labels on bars.

  • Figure closes automatically when task is complete.

  • Only one figure can exist so old figures don’t clutter the desktop.

  • Remaining time estimate is accurate even if the figure gets closed.

  • Minimal execution time. Won’t slow down code.

  • Randomized color. When a programmer gets bored…

Example Function Calls For Single Bar Usage:

progressbar % Initialize/reset progressbar(0) % Initialize/reset progressbar(‘Label’) % Initialize/reset and label the bar progressbar(0.5) % Update progressbar(1) % Close

Example Function Calls For Multi Bar Usage:

progressbar(0, 0) % Initialize/reset two bars progressbar(‘A’, ‘’) % Initialize/reset two bars with one label progressbar(‘’, ‘B’) % Initialize/reset two bars with one label progressbar(‘A’, ‘B’) % Initialize/reset two bars with two labels progressbar(0.3) % Update 1st bar progressbar(0.3, []) % Update 1st bar progressbar([], 0.3) % Update 2nd bar progressbar(0.7, 0.9) % Update both bars progressbar(1) % Close progressbar(1, []) % Close progressbar(1, 0.4) % Close

Notes:

For best results, call progressbar with all zero (or all string) inputs

before any processing. This sets the proper starting time reference to calculate time remaining.

Bar color is choosen randomly when the figure is created or reset. Clicking

the bar will cause a random color change.

Demos:

% Single bar m = 500; progressbar % Init single bar for i = 1:m

pause(0.01) % Do something important progressbar(i/m) % Update progress bar

end

% Simple multi bar (update one bar at a time) m = 4; n = 3; p = 100; progressbar(0,0,0) % Init 3 bars for i = 1:m

progressbar([],0) % Reset 2nd bar for j = 1:n

progressbar([],[],0) % Reset 3rd bar for k = 1:p

pause(0.01) % Do something important progressbar([],[],k/p) % Update 3rd bar

end progressbar([],j/n) % Update 2nd bar

end progressbar(i/m) % Update 1st bar

end

% Fancy multi bar (use labels and update all bars at once) m = 4; n = 3; p = 100; progressbar(‘Monte Carlo Trials’,’Simulation’,’Component’) % Init 3 bars for i = 1:m

for j = 1:n
for k = 1:p

pause(0.01) % Do something important % Update all bars frac3 = k/p; frac2 = ((j-1) + frac3) / n; frac1 = ((i-1) + frac2) / m; progressbar(frac1, frac2, frac3)

end

end

end

Author:

Steve Hoelzer

Revisions: 2002-Feb-27 Created function 2002-Mar-19 Updated title text order 2002-Apr-11 Use floor instead of round for percentdone 2002-Jun-06 Updated for speed using patch (Thanks to waitbar.m) 2002-Jun-19 Choose random patch color when a new figure is created 2002-Jun-24 Click on bar or axes to choose new random color 2002-Jun-27 Calc time left, reset progress bar when fractiondone == 0 2002-Jun-28 Remove extraText var, add position var 2002-Jul-18 fractiondone input is optional 2002-Jul-19 Allow position to specify screen coordinates 2002-Jul-22 Clear vars used in color change callback routine 2002-Jul-29 Position input is always specified in pixels 2002-Sep-09 Change order of title bar text 2003-Jun-13 Change ‘min’ to ‘m’ because of built in function ‘min’ 2003-Sep-08 Use callback for changing color instead of string 2003-Sep-10 Use persistent vars for speed, modify titlebarstr 2003-Sep-25 Correct titlebarstr for 0% case 2003-Nov-25 Clear all persistent vars when percentdone = 100 2004-Jan-22 Cleaner reset process, don’t create figure if percentdone = 100 2004-Jan-27 Handle incorrect position input 2004-Feb-16 Minimum time interval between updates 2004-Apr-01 Cleaner process of enforcing minimum time interval 2004-Oct-08 Seperate function for timeleftstr, expand to include days 2004-Oct-20 Efficient if-else structure for sec2timestr 2006-Sep-11 Width is a multiple of height (don’t stretch on widescreens) 2010-Sep-21 Major overhaul to support multiple bars and add labels

This functions are present inside RTMo as nested functions

e2phot(lambda, E)

molphotons = e2phot(lambda,E) calculates the number of moles of photons corresponding to E Joules of energy of wavelength lambda (m)

ephoton(lambda)

E = phot2e(lambda) calculates the energy content (J) of 1 photon of wavelength lambda (m)