Skip to content

Commit

Permalink
Fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorton-usgs committed Nov 27, 2019
1 parent 524a8b8 commit 0c8fcab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/prmslib/physics/sm_temperature_hru.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ module subroutine init_Temperature_hru(this, ctl_data, model_basin, model_summar

! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Open netcdf or ascii-base cbh files
if (tmax_day%s(index(tmax_day%s, '.')+1:) == 'nc') then
! if (tmax_day%s(index(tmax_day%s, '.')+1:) == 'nc') then
if (tmax_day%s(scan(trim(tmax_day%s),".", BACK= .true.)+1:) == 'nc') then
! Read a netcdf file
call open_netcdf_cbh_file(this%tmax_funit, this%tmax_varid, this%tmax_idx_offset, &
tmax_day%s, 'tmax', start_time, end_time, nhru)
Expand All @@ -70,7 +71,8 @@ module subroutine init_Temperature_hru(this, ctl_data, model_basin, model_summar
this%has_netcdf_tmax = .false.
endif

if (tmin_day%s(index(tmin_day%s, '.')+1:) == 'nc') then
! if (tmin_day%s(index(tmin_day%s, '.')+1:) == 'nc') then
if (tmin_day%s(scan(trim(tmin_day%s),".", BACK= .true.)+1:) == 'nc') then
call open_netcdf_cbh_file(this%tmin_funit, this%tmin_varid, this%tmin_idx_offset, &
tmin_day%s, 'tmin', start_time, end_time, nhru)
this%has_netcdf_tmin = .true.
Expand Down

0 comments on commit 0c8fcab

Please sign in to comment.