Skip to content

Commit

Permalink
Merge pull request #666 from amametjanov/azamat/e3sm/cleanup-cpr-warn…
Browse files Browse the repository at this point in the history
…ings

Cleanup compiler warnings and errors
  • Loading branch information
glemieux authored Jun 24, 2020
2 parents e4b344a + 334195c commit 70dda4c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ subroutine check_patch_area( currentSite )
! !USES:
!
! !ARGUMENTS:
type(ed_site_type), intent(in), target :: currentSite
type(ed_site_type), intent(inout), target :: currentSite
!
! !LOCAL VARIABLES:
real(r8) :: areatot
Expand Down
5 changes: 5 additions & 0 deletions biogeophys/FatesHydroWTFMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ function th_from_psi_base(this,psi) result(th)
class(wrf_type) :: this
real(r8),intent(in) :: psi
real(r8) :: th
th = 0._r8
write(fates_log(),*) 'The base water retention function'
write(fates_log(),*) 'should never be actualized'
write(fates_log(),*) 'check how the class pointer was setup'
Expand All @@ -219,6 +220,7 @@ function psi_from_th_base(this,th) result(psi)
class(wrf_type) :: this
real(r8),intent(in) :: th
real(r8) :: psi
psi = 0._r8
write(fates_log(),*) 'The base water retention function'
write(fates_log(),*) 'should never be actualized'
write(fates_log(),*) 'check how the class pointer was setup'
Expand All @@ -228,6 +230,7 @@ function dpsidth_from_th_base(this,th) result(dpsidth)
class(wrf_type) :: this
real(r8),intent(in) :: th
real(r8) :: dpsidth
dpsidth = 0._r8
write(fates_log(),*) 'The base water retention function'
write(fates_log(),*) 'should never be actualized'
write(fates_log(),*) 'check how the class pointer was setup'
Expand All @@ -237,6 +240,7 @@ function ftc_from_psi_base(this,psi) result(ftc)
class(wkf_type) :: this
real(r8),intent(in) :: psi
real(r8) :: ftc
ftc = 0._r8
write(fates_log(),*) 'The base water retention function'
write(fates_log(),*) 'should never be actualized'
write(fates_log(),*) 'check how the class pointer was setup'
Expand All @@ -246,6 +250,7 @@ function dftcdpsi_from_psi_base(this,psi) result(dftcdpsi)
class(wkf_type) :: this
real(r8),intent(in) :: psi
real(r8) :: dftcdpsi
dftcdpsi = 0._r8
write(fates_log(),*) 'The base water retention function'
write(fates_log(),*) 'should never be actualized'
write(fates_log(),*) 'check how the class pointer was setup'
Expand Down
6 changes: 3 additions & 3 deletions biogeophys/FatesPlantHydraulicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3604,9 +3604,9 @@ subroutine ImTaylorSolve1D(site_hydr,cohort,cohort_hydr,dtime,q_top, &
end if

! Save the number of times we refined our sub-step counts (iterh1)
cohort_hydr%iterh1 = max(cohort_hydr%iterh1,real(iter))
cohort_hydr%iterh1 = max(cohort_hydr%iterh1,real(iter,r8))
! Save the number of sub-steps we ultimately used
cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nsteps))
cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nsteps,r8))

! Update water contents in the relevant plant compartments [m3/m3]
! -------------------------------------------------------------------------------
Expand Down Expand Up @@ -4967,7 +4967,7 @@ subroutine MatSolve2D(site_hydr,cohort,cohort_hydr, &
cohort_hydr%iterh1 = cohort_hydr%iterh1 + 1

! Save the max number of Newton iterations needed
cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nwtn_iter))
cohort_hydr%iterh2 = max(cohort_hydr%iterh2,real(nwtn_iter,r8))

print*,'Completed a newton solve'
print*,psi_node(:)
Expand Down
2 changes: 1 addition & 1 deletion main/EDParamsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ subroutine FatesReportParams(is_master)
write(fates_log(),fmt0) 'q10_mr = ',q10_mr
write(fates_log(),fmt0) 'q10_froz = ',q10_froz
write(fates_log(),fmt0) 'cg_strikes = ',cg_strikes
write(fates_log(),'(a,L)') 'active_crown_fire = ',active_crown_fire
write(fates_log(),'(a,L2)') 'active_crown_fire = ',active_crown_fire
write(fates_log(),*) '------------------------------------------------------'

end if
Expand Down
1 change: 1 addition & 0 deletions parteh/PRTGenericMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ function GetCoordVal(this, organ_id, element_id ) result(prt_val)
integer,intent(in) :: element_id
real(r8) :: prt_val

prt_val = 0._r8
write(fates_log(),*)'Init must be extended by a child class.'
call endrun(msg=errMsg(sourcefile, __LINE__))

Expand Down

0 comments on commit 70dda4c

Please sign in to comment.