15 USE mo_kind,
ONLY : dp
41 real(dp),
intent(in) :: meteo_val_day
43 real(dp),
intent(in) :: meteo_val_weights
45 real(dp),
intent(out) :: meteo_val
47 real(dp),
intent(in),
optional :: weights_correction
49 real(dp) :: weights_correction_
52 weights_correction_ = 0.0_dp
54 if (
present(weights_correction) ) weights_correction_ = weights_correction
57 meteo_val = (meteo_val_day + weights_correction_) * meteo_val_weights - weights_correction_
77 logical,
intent(in) :: isday
79 real(dp),
intent(in) :: ntimesteps_day
81 real(dp),
intent(in) :: meteo_val_day
83 real(dp),
intent(in) :: fday_meteo_val
85 real(dp),
intent(in) :: fnight_meteo_val
87 real(dp),
intent(out) :: meteo_val
90 if(ntimesteps_day .gt. 1.0_dp)
then
92 meteo_val = 2.0_dp * meteo_val_day * fday_meteo_val / ntimesteps_day
94 meteo_val = 2.0_dp * meteo_val_day * fnight_meteo_val / ntimesteps_day
98 meteo_val = meteo_val_day
120 logical,
intent(in) :: isday
122 real(dp),
intent(in) :: ntimesteps_day
124 real(dp),
intent(in) :: meteo_val_day
126 real(dp),
intent(in) :: fday_meteo_val
128 real(dp),
intent(in) :: fnight_meteo_val
130 real(dp),
intent(out) :: meteo_val
132 logical,
intent(in),
optional :: add_correction
134 logical :: add_correction_
137 add_correction_ = .false.
139 if (
present(add_correction) ) add_correction_ = add_correction
142 if(ntimesteps_day .gt. 1.0_dp)
then
143 if ( add_correction_ )
then
145 meteo_val = meteo_val_day + fday_meteo_val
147 meteo_val = meteo_val_day + fnight_meteo_val
151 meteo_val = 2.0_dp * meteo_val_day * fday_meteo_val
153 meteo_val = 2.0_dp * meteo_val_day * fnight_meteo_val
158 meteo_val = meteo_val_day