
Appendix C. CR3000/CR5000 Program that Controls the Heater
BeginProg
Scan (1,Sec,0,0)
'Control the net radiometer heater.
PWM (duty_cycle,4,250,mSec)
'Datalogger panel temperature.
PanelTemp (panel_temp,250)
'Measure battery voltage.
Battery (batt_volt)
'Measure the HMP45C temperature and relative humidity.
VoltDiff (t_hmp,1,mV1000C,5,TRUE,200,250,0.1,-40)
VoltDiff (rh_hmp,1,mV1000C,6,TRUE,200,250,0.1,0)
'Measure NR 01 Net Radiometer.
Resistance (t_nr01,1,mV200,10,Ix1,1,1675,TRUE,TRUE,200,250,1,0)
VoltDiff (Rs_downwell,1,mV20C,11,TRUE,200,250,NR01_SHORT_DW_CAL,0)
VoltDiff (Rs_upwell,1,mV20C,12,TRUE,200,250,NR01_SHORT_UW_CAL,0)
VoltDiff (Rl_down_meas,1,mV20C,13,TRUE,200,250,NR01_LONG_DW_CAL,0)
VoltDiff (Rl_up_meas,1,mV20C,14,TRUE,200,250,NR01_LONG_UW_CAL,0)
'Find the HMP45C vapor pressure and saturation vapor pressure (kPa).
VaporPressure (e_hmp,t_hmp,rh_hmp)
SatVP (e_sat_hmp,t_hmp)
'Compute net radiation, albedo, downwelling and upwelling longwave radiation.
t_nr01 = t_nr01/100
PRT (t_nr01,1,t_nr01,1,273.15)
Rn = Rs_downwell-Rs_upwell+Rl_down_meas-Rl_up_meas
albedo = Rs_upwell/Rs_downwell
Rl_downwell = Rl_down_meas+(5.67e-8*t_nr01*t_nr01*t_nr01*t_nr01)
Rl_upwell = Rl_up_meas+(5.67e-8*t_nr01*t_nr01*t_nr01*t_nr01)
CallTable (scratch)
If ( scratch.Output(1,1) ) Then
GetRecord (scratch_out(1),scratch,1)
rh_hmp_mean = 100*e_hmp_mean/e_sat_hmp_mean
DewPoint (t_dew_hmp_mean,t_hmp_mean,rh_hmp_mean)
'Control the NR 01 heater using 4 Hz pulse width modulation. Below the dew
' point temperature applies 100% power. Above the dew point, power is reduced
' linearly to 20% until the dew point plus DELTA_SET_POINT_1. After the dew
' point plus DELTA_SET_POINT_1 and until the dew point plus
' DELTA_SET_POINT_2 plus DELTA_SET_POINT_2, the power is reduced linearly to 0%.
If ( (t_nr01 <> NaN) AND (t_dew_hmp_mean <> NaN) AND (no_heat_flag <> TRUE) ) Then
set_point_temperature = t_dew_hmp_mean+273.15
Select Case t_nr01
Case Is < ( set_point_temperature )
duty_cycle = 1
Case Is < ( set_point_temperature+DELTA_SET_POINT_1 )
duty_cycle = MAX_DUTY_CYCLE_1+(t_nr01-(t_dew_hmp_mean+273.15))*SLOPE_1
Case Is < ( set_point_temperature+DELTA_SET_POINT_1+DELTA_SET_POINT_2 )
duty_cycle = MAX_DUTY_CYCLE_2+(t_nr01-
(t_dew_hmp_mean+273.15+DELTA_SET_POINT_1))*SLOPE_2
C-4
Comentarios a estos manuales