Created
May 1, 2013 18:11
-
-
Save w01fe/5497059 to your computer and use it in GitHub Desktop.
Solar radiation graph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:Ra (fnk [day-of-year lat] (solar-rad-et day-of-year lat)) | |
:Rs (fnk [tmax tmin {kRs 0.16} Ra] (-> (- tmax tmin) Math/sqrt (* kRs Ra))) | |
:Rso (fnk [alt Ra] (-> (* 2e-5 alt) (+ 0.75) (* Ra))) | |
:Rns (fnk [{a 0.23} Rs] (-> (- 1 a) (* Rs))) | |
:tmaxK (fnk [tmax] (to-kelvin tmax)) | |
:tminK (fnk [tmin] (to-kelvin tmin)) | |
:ea (fnk [tmin] (sat-vapour-pressure tmin)) | |
:term1 (fnk [tmaxK tminK {s 4.903e-9}] | |
(-> (Math/pow tmaxK 4) (+ (Math/pow tminK 4)) (* s) (/ 2))) | |
:term2 (fnk [ea] (-> (Math/sqrt ea) (* -0.14) (+ 0.34))) | |
:term3 (fnk [Rs Rso] (-> (* 1.35 Rs) (/ Rso) (- 0.35))) | |
:Rnl (fnk [term1 term2 term3] (* term1 term2 term3)) | |
:solar-radiation (fnk [Rns Rnl] (- Rns Rnl))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment