Skip to content

Commit

Permalink
Replace present() calls to provided() where appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaRady committed Aug 8, 2021
1 parent b754c9a commit 00959c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions biogeochem/FatesVegetationManagementMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2158,19 +2158,19 @@ subroutine plant(site, patch, bc_in, pft_index, density, dbh, height) !plant_sap
area = patch%area

! If not provided use the default initial plant density:
if (present(density) .and. (density /= vm_empty_real)) then
if (provided(density)) then
the_density = density
else
the_density = EDPftvarcon_inst%initd(pft_index)
end if

! Size:
! If DBH or height if provided (in that order), otherwise use the default height.
if (present(dbh) .and. (dbh /= vm_empty_real)) then
if (provided(dbh)) then
the_dbh = dbh
use_dbh = .true.
else
if (present(height) .and. (height /= vm_empty_real)) then
if (provided(height)) then
the_height = height
else
! Get the default from the parameter file:
Expand Down Expand Up @@ -3280,7 +3280,7 @@ subroutine hardwood_control(site, efficiency) ! method, where, area/patch_fracti
! ----------------------------------------------------------------------------------------------
if (debug) write(fates_log(), *) 'hardwood_control() beginning.'

if (present(efficiency) .and. efficiency /= vm_empty_real) then
if (provided(efficiency)) then
the_efficiency = efficiency
else
the_efficiency = 1.0_r8
Expand Down

0 comments on commit 00959c3

Please sign in to comment.