Understanding surfrad data

The Table 1 summarizes the content of a SURFRAD file and the description of each variable used. When open with NotePad++, the station name is on the first line, followed by the latitude, longitude and elevation on the second line. The other variables are organized in columns and each line represents a different measure at a certain time.

Table 1 Surfrad variables
Variable FORTRAN type Description
station_name Character (8 bits unsigned) Station Name (e. g., Goodwin Creek)
latitude Real (32 bits signed) Latitude in decimal degrees (e.g., 40.80)
longitude Real (32 bits signed) Longitude in decimal degrees (e.g., 105.12)
elevation Integer (32 bits signed) Integer elevation above sea level in meter
year Integer (32 bits signed) Integer year, i.e., 1995
jday Integer (32 bits signed) Integer Julian day (1 through 365 [or 366])
month Integer (32 bits signed) Integer number of the month (1-12)
day Integer (32 bits signed) Integer day of the month (1-31)
hour Integer (32 bits signed) Integer hour of the day (0-23)
min Integer (32 bits signed) Integer minute of the hour (0-59)
dt Real (32 bits signed) Decimal time (e.g., 23.5 = 2330)
zen Real (32 bits signed) Solar zenith angle (degrees)
dw_solar Real (32 bits signed) Downwelling global solar (Watts/m2)
uw_solar Real (32 bits signed) Upwelling global solar (Watts/m2)
direct_n Real (32 bits signed) Direct-normal solar (Watts/m2)
diffuse Real (32 bits signed) Downwelling diffuse solar (Watts/m2)
dw_ir Real (32 bits signed) Downwelling thermal infrared (Watts/m2)
dw_casetemp Real (32 bits signed) Downwelling IR case temp (K)
dw_dometemp Real (32 bits signed) downwelling IR dome temp. (K)
uw_ir Real (32 bits signed) Upwelling thermal infrared. (K)
uw_casetemp Real (32 bits signed) Upwelling IR case temp. (K)
uw_dome temp Real (32 bits signed) Upwelling IR dome temp. (K)
uvb Real (32 bits signed) global UVB (milliWatts/m2)
par Real (32 bits signed) Photosynthetically active radiation (Watts/m2)
netsolar Real (32 bits signed) net solar (dw_solar - uw_solar) (Watts/m2)
netir Real (32 bits signed) net infrared (dw_ir - uw_ir) (Watts/m2)
totalnet Real (32 bits signed) net radiation (netsolar+netir) (Watts/m2)
temp Real (32 bits signed) 10 meters air temperature (Celsius)
rh Real (32 bits signed) relative humidity (%)
windspd Real (32 bits signed) wind speed (m/s)
winddir Real (32 bits signed) wind direction (degrees, clockwise from North)
pressure Real (32 bits signed) station pressure (mb)

The Table 2 gives the name of the variables for each column in the SURFRAD file. As it’s possible to see after the dw_solar variable, there is a QC Flag variable because SURFRAD follows the quality control (QC) philosophy of the BSRN. A QC Flag of 0 indicates that the data is good and a value greater than 0 means that the data is questionable. This project doesn’t need these flags because in the function dataVerification, we automatically verify the data with our own restrictions. It is important to note that missing values are indicated by -9999.9 with a QC Flag of 1 and bad values are automatically deleted. For the missing values, the datetime array will continue to keep the minute or hour time step, but there will be NaN values for all the columns of the missing time.

Also, as explained in the READ ME file of SURFRAD, ‘’Reported times are the end times of the 1- or 3-min. averaging periods, i.e., the data given for 0000 UTC are averaged over the period from 2359 (or 2357) of the previous UTC day, to 0000 UTC.’’. All the files are organized in Universal Coordinated Time (UTC), so it’s important to know the offset with the Standard Time of your location for the script dataAnalysis.m.

As specified in the README file of SURFRAD, the data before January 1 are reported as 3-minutes average and those after, as 1-minute average. So, for the data before 2009, I duplicated the value of the 3-minute average. For example, the rows of 00:00, 00:01 and 00:02 have the same values as 00:00 and so on. For more details, I recommend reading the READ ME file of SURFRAD.

Then, the minute time step table of readSURFRAD.m has the same values as those in the original file. The only difference is that you can choose the data to import in readSURFRAD.m. For the hour time step table, the values of the hour 00:00 UTC, for example, are the mean values of 00:00 UTC to 00:59 UTC. As specified in the description of the function meanHour.m, the Flag values are the average of the NaN and bad values flagged with 1. If this average is over 0.25, all the lines in the hour time step table will be -1.

Table 2 Surfrad variables
Column Variable Column Variable
1 Year 25 uw_casetemp
2 Day number 26 QC Flag
3 Month 27 uw_dometemp
4 Day 28 QC Flag
5 Hour 29 uvb
6 Minute 30 QC Flag
7 dt 31 par
8 zen 32 QC Flag
9 dw_solar 33 netsolar
10 QC Flag 34 QC Flag
11 uw_solar 35 netir
12 QC Flag 36 QC Flag
13 direct_n 37 totalnet
14 QC Flag 38 QC Flag
15 diffuse 39 temp
16 QC Flag 40 QC Flag
17 dw_ir 41 rh
18 QC Flag 42 QC Flag
19 dw_casetemp 43 windspd
20 QC Flag 44 QC Flag
21 dw_dometemp 45 winddir
22 QC Flag 46 QC Flag
23 uw_ir 47 pressure
24 QC Flag 48 QC Flag

The Table 3 shows the variables for each column of an EPW file. Normally, there is a header in each file, but I automatically copy the one of the original file and write it in the new one with the function createEPW.m. So, if you have the original file from Energy Plus you just have to indicate to the function the names of the column that you want to change and it will create a new EPW file with the data that you indicated. It’s important to note that if you open the EPW file with Element, the hour will start at 00:00 to 23:00 while with Excel, they start at 1:00 to 24:00.

Table 3 EPW file variables
Column Description
1 Year
2 Month (1-12)
3 Day (1-31)
4 Hour (1-24 on Excel and 0-23 on Element)
5 Minute
6 DataSource
7 Dry Bulb Temperature [C]
8 Dew Point Temperature
9 Relative Humidity [%]
10 Atmospheric Pressure [Pa]
11 Extraterrestrial horizontal radiation [Wh/m2]
12 Extraterrestrial Direct-Normal Radiation [Wh/m2]
13 Horizontal infrared radiation intensity from sky [Wh/m2]
14 Global Horizontal Radiation [Wh/m2]
15 Direct Normal Radiation [Wh/m2]
16 Diffuse Horizontal Radiation [Wh/m2]
17 Global Horizontal Illuminance [lux]
18 Direct Normal Illuminance [lux]
19 Diffuse Horizontal Illuminance [lux]
20 Zenith Illuminance [lux]
21 Wind Direction [deg]
22 Wind Speed [m/s2]
23 Total Sky Cover [tenths]
24 Opaque Sky Cover [tenths]
25 Visibility [km]
26 Ceiling Height [m]
27 Present Weather Observation
28 Present Weather Code
29 Precipitable Water [mm]
30 Aerosol Optical Depth [thousandths]
31 Snow Depth [cm]
32 Days Since Last Snow
33 Albedo
34 Liquid Precip Depth [mm]
35 Liquid Precip Rate [Hour]