Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup compiler warnings and errors #666

Merged
merged 2 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to avoid IBM compiler warning with th as uninitialized function result:

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function ftc was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function dftcdpsi was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function dpsidth was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function th was not set within the function.
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesHydroWTFMod.F90", 1513-083 (E) Internal or module function psi was not set within the function.

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 @@ -3620,9 +3620,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))
Comment on lines -3623 to +3625
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesPlantHydraulicsMod.F90", line 3623.53: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesPlantHydraulicsMod.F90", line 3625.53: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/biogeophys/FatesPlantHydraulicsMod.F90", line 4986.54: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".


! Update water contents in the relevant plant compartments [m3/m3]
! -------------------------------------------------------------------------------
Expand Down Expand Up @@ -4983,7 +4983,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 @@ -567,7 +567,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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"/autofs/nccs-svm1_home1/azamat/repos/E3SM-tests/components/clm/src/external_models/fates/main/EDParamsMod.F90", line 570.31: 1512-047 (E) The L FORMAT edit descriptor, in literal FMT specifier, is missing a field width. A default value based on the edit descriptor and
the type of the data item being processed is assumed.

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