Hi Ted,

I'm looking at my results and the correction you suggested in mtclim.vic 
produce good results when I use an indexed radiation, but results in 
values twice as large when using radiation read from a file... Honestly 
I didn't understand well the change you suggested and trusted it, but I 
think I'll have to revise it. Together with my simulations.

The only parts that seem affected are the sensible heat and net radiation.

Homero

Javier Homero Flores Cervantes
Research Associate
Civil and Environmental
Engineering
University of Washington
Wilson 202 D, Box 352700
Seattle, WA 98195-2700
homefc@uw.edu
206 685-3202

On 05/29/2013 02:42 PM, tbohn wrote:
>
> In src/mtclim_wrapper.c:
>
> > @@ -242,7 +242,15 @@ void mtclim_to_vic(double hour_offset,
> >      // tiny_radfrac = fraction of total daily sw falling in each SRADDT interval
> >      // hourlyrad = SW flux (W/m2) over each hour = total_daily_sw * sum_over_hour(tiny_radfract) / 3600
> >      //                                           = tmp_rad * sum_over_hour(tiny_radfract)
> > -    tmp_rad = mtclim_data->s_srad[i] * mtclim_data->s_dayl[i] / 3600.;
> > +
> > +    //if radiation read from input file, assume it's a 24 hours average,
>
> Hi Homero,
>
> OK, so, data->s_srad[] supplied by the user is also accessed once in 
> mtclim_vic.c. Could you add the following change to your pull request?
>
> In mtclim_vic.c, change lines 1170-1173 from:
>
> if (data->s_potrad[i]>0 && data->s_srad[i]>0) {
> data->s_tfmax[i] = data->s_srad[i]/(data->s_potrad[i]*t_tmax);
> if (data->s_tfmax[i] > 1.0) data->s_tfmax[i] = 1.0;
> }
>
> to:
>
> if (data->s_potrad[i]>0 && data->s_srad[i]>0 && daylength[yday]>0) {
> data->s_tfmax[i] = 
> (data->s_srad[i]*24/daylength[yday])/(data->s_potrad[i]*t_tmax);
> if (data->s_tfmax[i] > 1.0) data->s_tfmax[i] = 1.0;
> }
> else {
> data->s_tfmax[i] = 1.0;
> }
>
> I think this would cover everything. Thanks,
> Ted
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/UW-Hydro/VIC/pull/3/files#r4446113>.
>