Skip to content

Commit

Permalink
removed duplicate warning information in soltab
Browse files Browse the repository at this point in the history
print tmaxf or tmaxc; tminf or tminc into CBH files depending on value of temp_units
  • Loading branch information
rsregan committed Dec 1, 2023
1 parent 9885462 commit 08a2bd6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
3 changes: 1 addition & 2 deletions GSFLOW/src/prms/soltab.f90
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,8 @@ SUBROUTINE compute_soltab(Obliquity, Solar_declination, Slope, Aspect, &
PRINT *, 'WARNING: solar table value for day:', jd, &
& ' computed as:', solt, ' set to', 0.0, &
& ' for HRU:', Id, ' hru_type:', Hru_type
PRINT *, 'slope, aspect, latitude, cossl', Slope, Aspect, Latitude, Cossl
PRINT *, 'slope, aspect, latitude, cossl, sunh', Slope, Aspect, Latitude, Cossl, sunh
solt = 0.0D0
PRINT *, Slope, Aspect, Latitude, Cossl, sunh
PRINT *, t0, t1, t2, t3, t6, t7, d
ENDIF
IF ( sunh<DNEARZERO ) sunh = 0.0D0
Expand Down
14 changes: 11 additions & 3 deletions GSFLOW/src/prms/write_climate_hru.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,23 @@ INTEGER FUNCTION write_climate_hru()
IF ( ios/=0 ) THEN
ierr = 1
ELSE
WRITE ( tmax_unit, 9001 ) 'tmaxf', Nhru
IF ( Temp_units==FAHRENHEIT ) THEN
WRITE ( tmax_unit, 9001 ) 'tmaxf', Nhru
ELSE
WRITE ( tmax_unit, 9001 ) 'tmaxc', Nhru
ENDIF
ENDIF

IF ( control_string(Tmin_day, 'tmin_day')/=0 ) CALL read_error(5, 'tmin_day')
CALL PRMS_open_output_file(tmin_unit, Tmin_day, 'tmin_day', 0, ios)
IF ( ios/=0 ) THEN
ierr = 1
ELSE
WRITE ( tmin_unit, 9001 ) 'tminf', Nhru
IF ( Temp_units==FAHRENHEIT ) THEN
WRITE ( tmin_unit, 9001 ) 'tminf', Nhru
ELSE
WRITE ( tmin_unit, 9001 ) 'tminc', Nhru
ENDIF
ENDIF
ENDIF

Expand Down Expand Up @@ -136,7 +144,7 @@ INTEGER FUNCTION write_climate_hru()

9001 FORMAT ( 'Generated for climate_hru module', /, A, I8, /, 40('#') )
9002 FORMAT ( 'Generated for climate_hru module', /, A, I8, /, 'orad 1', /, 40('#') )
9003 FORMAT ( '(I4,2I3,3I2,',I8,'E12.5)' )
9003 FORMAT ( '(I4,2I3,3I2,',I8,'F10.5)' )
9004 FORMAT ( '(I4,2I3,3I2,',I8,'I3)' )

END FUNCTION write_climate_hru

0 comments on commit 08a2bd6

Please sign in to comment.