*** REST2, version 7.1 *** REST2 is a two-band version of the previous REST model, and an improved version of the 25-year old CPCR2 model. The main differences between REST and REST2 are: - 2-band for REST2 rather than 1-band algorithm for REST - accepts a large range (0 to 2.5) of values for Angstrom's alpha, not just 1.3 - calculates all components (direct, diffuse, global) rather than just direct. Like REST, the transmittance functions are parameterizations based on SMARTS predictions. The SMARTS code is available from http://rredc.nrel.gov/solar/models/SMARTS/ A paper about REST2's derivation and validation has been published in Solar Energy. A conference paper about the derivation of version 4 was presented at the ASES 2004 meeting. It is now outdated in great part. The REST2 model can be used in different ways, depending on the available input data. (e.g., zenith angle or date + time, precipitable water or temperature + relative humidity, etc.). See SHORT USER'S MANUAL below. The sun position routine is the same as in SMARTS. Three complete sample runs (with both input and output files) are provided: Test1, Test2 and Test3. To use the code, just modify the input file REST2_inp.txt, save it and run the executable. The source code is not included in this release. It can be obtained from the author if justified by contractual or collaborative work. +++++++++++++++++++ SHORT USER'S MANUAL +++++++++++++++++++ c*** Inputs: c c alfa1, alfa2: Angsrom's wavelength exponents, for below and above c 0.7 µm, respectively [only needed if Iaer=0]; use -999.9 if unknown. c Each value must be between 0 and 2.5. They can be equal, e.g. to c 1.3, and are then equivalent to the usual "broadband" alpha. c Altit: Elevation in km (used only if p is missing), maximum 100 km; c use -999.9 or less if unknown. c beta: Angstrom's turbidity coefficient, must be between 0 and 1.1. c Day: integer day of month, e.g., 21 [only needed if Idata=1]. c Hour: Decimal Hour of the day (in LST or UT, depending on Ihour). c c Iaer: data switch to select the proper aerosol climatology c 0: alpha1, alpha2, pi01, pi02 are read sequentially c 1 if only single fixed values are available for the whole run c [see above and below for acceptable values of alpha and pi0!]. c c Ialbdo: indicates wether the ground albedo is available sequentially or not c 0 if available at each time increment and read sequentially c 1 if only a single fixed value is available for the whole run. c c Idata: main data switch c 0 if Z is input c 1 if date/time is input with Year/Month/Day/Hour (see also Ihour). c c Ipress: indicates wether the site pressure is available sequentially or not c 0 if available at each time increment and read sequentially c 1 if not available: c if Idata=0: a fixed value will be read up front c if Idata=1: will be calculated internally from Altit, Latit. c c Iwater: data switch for precipitable water c 0 if precipitable water is provided sequentially (see w) c 1 if not (will be calculated sequentially from T and RH). c c Jhour: selects the correct time reference [only used if Idata=1] c 0 for LST; c 1 for UT/GMT. c c Latit: location latitude, + for North, - for South (required, but c only needed if Idata=1, or if pressure value is missing); c use -999.9 if unknown. c Longit: location longitude, + for East, - for West (required, but c only needed if Idata=1); use -999.9 if unknown. c Month: integer month number, e.g., 3 for March [only needed if Idata=1]. c p: station pressure (mb or hPa). c pi01, pi02: Aerosol single-scattering albedo below and above 0.7 µm, c respectively [only needed if Iaer =0]; use -999.9 if unknown c Typical values are pi01=0.95, pi02=0.90. c RH: relative humidity (%) [only needed if Iwater=1]. c rog: regional ground albedo; use -999.9 if unknown. c T: air temperature (deg. C) [only needed if Iwater=1]. c un: reduced NO2 vertical pathlength (atm-cm). c uo: reduced ozone vertical pathlength (atm-cm); c should be < 0.6 atm-cm. Use -999.9 if unknown. c w: precipitable water (cm), should be < 10 cm. c Year: 4-digit integer, e.g., 2003 [only needed if Idata=1]. c z: sun's zenith angle (deg.) [only needed if Idata=0]. Should be c between 0 and 90 deg. c Zone: Time zone in hours from Greenwich, + for E, - for W [required, c but only used if Idata=1]; should be between -12 and +12, c use -999.9 if unknown. c c c c** Defaultable inputs c c If given a "missing" values of -999.9, c these inputs will be defaulted or calculated by the program, c according to: c c Altit: will be fixed at 0 (sea level) c alfa1, alfa2: will be both fixed at 1.3 if Iaer=0 c beta: will skip calculation for this data line! c Latit: will be fixed at 45.0 c Longit: will be fixed at 0 (Greenwich meridian) c p: will be calculated from elevation and latitude c Pi01, Pi02: will be fixed at 0.95 and 0.90, resp., if Iaer=0 c rog: will be fixed at 0.2 c uo: will be fixed at 0.3 atm-cm c un: will be fixed at 0.0002 atm-cm c w: will be fixed at 1.5 cm c Year: will be fixed at 2002 c Zone: will be fixed at 0 (Greenwich time zone) c c c** INPUT FORMAT c c The input file 'REST2_inp.txt' should read as follows: c c [Card 1] Comment (e.g., 'location_XY'), 96 characters max., no space c [Card 2] Idata, Iwater, Ipress, Iaer, Ialbdo c [Card 3--ONLY IF Iaer=1] Alfa1, Alfa2, Pi01, Pi02 c [Card 4--ONLY IF Idata NOT eq. 0] Jhour, Latit, Longit, Altit, zone c [Card 5--ONLY if Ialbdo=1] rog c [Card 6] un c [Card 7--ONLY if Ipress=1 and Idata=0] p c [Card 8a--ONLY IF Idata=0, Iwater=0, Ipress=0, Iaer=0 and Ialbdo=0] c Z,uo,beta,alfa1,alfa2,pi01,pi02,w,p,rog c [Card 8b--ONLY IF Idata=0, Iwater=0, Ipress=0, Iaer=0 and Ialbdo=1] c Z,uo,beta,alfa1,alfa2,pi01,pi02,w,p c [Card 8c--ONLY IF Idata=0, Iwater=0, Ipress=0, Iaer=1 and Ialbdo=0] c Z,uo,beta,w,p,rog c [Card 8d--ONLY IF Idata=0, Iwater=0, Ipress=0, Iaer=1 and Ialbdo=1] c Z,uo,beta,w,p c [Card 8e--ONLY IF Idata=0, Iwater=0, Ipress=1, Iaer=0 and Ialbdo=0] c Z,uo,beta,alfa1,alfa2,pi01,pi02,w,rog c [Card 8f--ONLY IF Idata=0, Iwater=0, Ipress=1, Iaer=0 and Ialbdo=1] c Z,uo,beta,alfa1,alfa2,pi01,pi02,w c [Card 8g--ONLY IF Idata=0, Iwater=0, Ipress=1, Iaer=1 and Ialbdo=0] c Z,uo,beta,w,rog c [Card 8h--ONLY IF Idata=0, Iwater=0, Ipress=1, Iaer=1 and Ialbdo=1] c Z,uo,beta,w c [Card 8i--ONLY IF Idata=0, Iwater=1, Ipress=0, Iaer=0 and Ialbdo=0] c Z,uo,beta,alfa1,alfa2,pi01,pi02,T,RH,p,rog c [Card 8j--ONLY IF Idata=0, Iwater=1, Ipress=0, Iaer=0 and Ialbdo=1] c Z,uo,beta,alfa1,alfa2,pi01,pi02,T,RH,p c [Card 8k--ONLY IF Idata=0, Iwater=1, Ipress=0, Iaer=1 and Ialbdo=0] c Z,uo,beta,T,RH,p,rog c [Card 8l--ONLY IF Idata=0, Iwater=1, Ipress=0, Iaer=1 and Ialbdo=1] c Z,uo,beta,T,RH,p c [Card 8m--ONLY IF Idata=0, Iwater=1, Ipress=1, Iaer=0 and Ialbdo=0] c Z,uo,beta,alfa1,alfa2,pi01,pi02,T,RH,rog c [Card 8n--ONLY IF Idata=0, Iwater=1, Ipress=1, Iaer=0 and Ialbdo=1] c Z,uo,beta,alfa1,alfa2,pi01,pi02,T,RH c [Card 8o--ONLY IF Idata=0, Iwater=1, Ipress=1, Iaer=1 and Ialbdo=0] c Z,uo,beta,T,RH,rog c [Card 8p--ONLY IF Idata=0, Iwater=1, Ipress=1, Iaer=1 and Ialbdo=1] c Z,uo,beta,T,RH c [Card 8q--ONLY IF Idata=1, Iwater=0, Ipress=0, Iaer=0 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,w,p,rog c [Card 8r--ONLY IF Idata=1, Iwater=0, Ipress=0, Iaer=0 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,w,p c [Card 8s--ONLY IF Idata=1, Iwater=0, Ipress=0, Iaer=1 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,w,p,rog c [Card 8t--ONLY IF Idata=1, Iwater=0, Ipress=0, Iaer=1 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,w,p c [Card 8u--ONLY IF Idata=1, Iwater=0, Ipress=1, Iaer=0 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,w,rog c [Card 8v--ONLY IF Idata=1, Iwater=0, Ipress=1, Iaer=0 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,w c [Card 8w--ONLY IF Idata=1, Iwater=0, Ipress=1, Iaer=1 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,w,rog c [Card 8x--ONLY IF Idata=1, Iwater=0, Ipress=1, Iaer=1 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,w c [Card 8y--ONLY IF Idata=1, Iwater=1, Ipress=0, Iaer=0 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,T,RH,p,rog c [Card 8z--ONLY IF Idata=1, Iwater=1, Ipress=0, Iaer=0 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,T,RH,p c [Card 8aa--ONLY IF Idata=1, Iwater=1, Ipress=0, Iaer=1 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,T,RH,p,rog c [Card 8ab--ONLY IF Idata=1, Iwater=1, Ipress=0, Iaer=1 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,T,RH,p c [Card 8ac--ONLY IF Idata=1, Iwater=1, Ipress=1, Iaer=0 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,T,RH,rog c [Card 8ad--ONLY IF Idata=1, Iwater=1, Ipress=1, Iaer=0 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,alfa1,alfa2,pi01,pi02,T,RH c [Card 8ae--ONLY IF Idata=1, Iwater=1, Ipress=1, Iaer=1 and Ialbdo=0] c Year,Month,Day,Hour,uo,beta,T,RH,rog c [Card 8af--ONLY IF Idata=1, Iwater=1, Ipress=1, Iaer=1 and Ialbdo=1] c Year,Month,Day,Hour,uo,beta,T,RH c c ======================================================================== c NOTE 1: As many Cards 8 as needed (up to 99,999) can be stacked up for c batch processing in a single run. c NOTE 2: If Idata=0, irradiances are calculated for the average sun-earth c distance. If Idata=1, they are calculated for the actual distance. c NOTE 3: In case of batch processing (multiple Cards 8), the information c in Cards 1 to 7 applies to all Cards 8 c ======================================================================== c c*** Outputs: c c Bnorm: Predicted Direct normal irradiance (W/m2) c Bhor: Predicted direct horizontal irradiance (W/m2) c Dhor: Predicted diffuse horizontal irradiance (W/m2) c Ghor: Predicted global horizontal irradiance (W/m2) c Blum: Predicted beam horizontal illuminance (klux) c Dlum: Predicted diffuse horizontal illuminance (klux) c Glum: Predicted global horizontal illuminance (klux) c Bpar: Predicted beam horizontal PAR (W/m2) c Dpar: Predicted diffuse horizontal PAR (W/m2) c Gpar: Predicted global horizontal PAR (W/m2) c tau550: Aerosol optical depth at 550 nm c tau: Broadband aerosol optical depth (aka Unsworth-Monteith coefficient) c SunriseLAT: Time of sunrise in LAT (or "Solar Time") c SolarNoonLST: Time of Solar Noon (i.e., 12:00 LAT) in LST c ET_Irrad: Extraterrestrial irrradiance at normal incidence (W/m2) c c ======================================================================== c NOTE 4: Each Card 8 will generate an output line, identified by 'Case#' c in sequential order. c If an essential variable is out of bound, the corresponding Case# c is skipped to avoid overflow problems or egregious errors. c ======================================================================== +++++++ HISTORY +++++++ CHANGES IN VERSION 2 - Better parameterizations at large air masses, now supporting cases with m>10 - Calculation of direct, diffuse and global illuminance has been added - Inconsistencies in commented input description have been corrected - More comments in the sample input files CHANGES IN VERSION 3 - Better parameterizations for all components of diffuse irradiance CHANGES IN VERSION 4 - Better parameterization of the albedo effect on backscattering; has minor effect on diffuse and zero effect on direct irradiance CHANGES IN VERSION 5 - Improved parameterization of the various components of the diffuse algorithm, now based on SMARTS 2.9.5 - Improvements in the illuminance algorithm - Addition of PAR calculations - Inputs and outputs have been streamlined CHANGES IN VERSION 6 - Corrections for wrong numbers in beta1, BR1, and BR2 CHANGES IN VERSION 7 - Corrected coding errors in calculations of Equation of Time, pressure and sunrise; - Replaced calculation of SunriseLST by SolarNoonLST; - Changed input options; - Removed outdated default values for alpha and pi0; - Used double precision throughout CHANGES IN VERSION 7 - Corrected error in calculation of solar zenith angle, which was inadvertently introduced in v7. ++++++++++++++++++++++++++ Your comments are welcome! ++++++++++++++++++++++++++ Christian A. Gueymard Solar Consulting Services, 2009 Email: Chris@SolarConsultingServices.com