Skip to content

Commit

Permalink
relevant for doloadstate=TRUE and large areal fractions of LUs: forma…
Browse files Browse the repository at this point in the history
…t errors occured for very large areas
  • Loading branch information
TillF committed Jul 2, 2021
1 parent 40f2097 commit b260853
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Hillslope/model_state_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ subroutine save_all_conds(soil_conds_file, gw_conds_file, ic_conds_file, interfl
else
rtemp = 0. !in case of dummy subbasins
end if
WRITE(gw_file_hdle,'(2(I0,A1),F8.2,A1,F12.1)') id_subbas_extern(sb_counter), char(9),id_lu_extern(i_lu),&
WRITE(gw_file_hdle,'(2(I0,A1),F8.2,A1,F0.0)') id_subbas_extern(sb_counter), char(9),id_lu_extern(i_lu),&
char(9), rtemp,&
char(9),area(sb_counter)*frac_lu(lu_counter,sb_counter)*1e6 !tab separated output
endif
Expand Down Expand Up @@ -1121,7 +1121,7 @@ subroutine init_gw_conds(gw_conds_file)
do while (.TRUE.) !read whole file
IF (len(trim(error_msg))/=0) THEN !print error message, if occured
if (errors==0) then
write(*,'(A,/,3a12)')' Entities not found in current domain (ignored):','Line','subbasin','LU'
write(*,'(A,/,3a12)')' Format errors or entities not found in current domain (ignored):','Line','subbasin','LU'
end if
write(*,*)trim(error_msg)
error_msg=''
Expand All @@ -1137,7 +1137,7 @@ subroutine init_gw_conds(gw_conds_file)

READ(linestr,*, IOSTAT=i) i_subbasx,i_lux,gwvol_temp, x
IF (i/=0 .OR. isnan(0. + i_subbasx+i_lux + gwvol_temp + x)) THEN !format error
write(error_msg,'(i12,1a12,a)')line,'-',trim(linestr)
write(error_msg,'(i12,1a2,a)')line,' ',trim(linestr)
cycle !proceed with next line
END IF

Expand Down Expand Up @@ -1169,9 +1169,9 @@ subroutine init_gw_conds(gw_conds_file)
END DO
file_read=1
CLOSE(file_handle)
if (errors>0) then
return
end if
!if (errors>0) then
! return
!end if
end if

errors=0
Expand Down

0 comments on commit b260853

Please sign in to comment.