Skip to content

Commit

Permalink
addressed ripley warnings; different treatment of md_params_core and …
Browse files Browse the repository at this point in the history
…added dependency declaration for sofunutils in Makevars; untested on rhub.
  • Loading branch information
stineb committed Oct 31, 2023
1 parent 33d26a8 commit 6c01203
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 455 deletions.
5 changes: 2 additions & 3 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ $(SHLIB): $(FT_OBJS) $(C_OBJS)
sofun_r.o: interface_biosphere_pmodel.mod.o interface_biosphere_biomee.mod.o params_core.mod.o params_core.mod.o params_soil_biomee.mod.o params_siml_pmodel.mod.o params_siml_biomee.mod.o
interface_biosphere_pmodel.mod.o: forcing_siterun_pmodel.mod.o params_siml_pmodel.mod.o params_core.mod.o
interface_biosphere_biomee.mod.o: forcing_siterun_biomee.mod.o params_soil_biomee.mod.o params_siml_biomee.mod.o params_core.mod.o
params_siml_pmodel.mod.o: params_core.mod.o
params_siml_biomee.mod.o: params_core.mod.o
forcing_siterun_pmodel.mod.o: params_core.mod.o params_siml_pmodel.mod.o grid_siterun.mod.o sofunutils.mod.o
forcing_siterun_biomee.mod.o: params_core.mod.o params_siml_biomee.mod.o grid_siterun.mod.o
params_soil_biomee.mod.o: params_core.mod.o
Expand All @@ -33,13 +31,14 @@ biosphere_biomee.mod.o: params_core.mod.o interface_biosphere_biomee.mod.o datat
soil_biomee.mod.o: datatypes.mod.o
vegetation_biomee.mod.o: datatypes.mod.o soil_biomee.mod.o gpp_biomee.mod.o
datatypes.mod.o: interface_biosphere_biomee.mod.o params_core.mod.o classdefs.mod.o
sofunutils.mod.o: params_core.mod.o

# Source (object) of Fortran modules
# <modulename.mod>: <filename.o>
sofun_r_mod.mod: sofun_r.o
md_params_core.mod: params_core.mod.o
md_params_siml_pmodel.mod: params_siml_pmodel.mod.o
md_params_siml_biomee.mod: params_siml_biomee.mod.o
md_params_core.mod: params_core.mod.o
md_forcing_pmodel.mod: forcing_siterun_pmodel.mod.o
md_forcing_biomee.mod: forcing_siterun_biomee.mod.o
md_params_soil_biomee.mod: params_soil_biomee.mod.o
Expand Down
4 changes: 0 additions & 4 deletions src/forcing_siterun_biomee.mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ function getclimate( nt, ntstepsyear, forcing, climateyear_idx ) result ( out_cl
! arguments
integer, intent(in) :: nt ! number of time steps
integer, intent(in) :: ntstepsyear ! number of time steps per year of model
! integer, intent(in) :: ntstepsyear_forcing ! number of time steps per year of forcing data
real(kind=dp), dimension(nt,13), intent(in) :: forcing ! array containing all temporally varying forcing data (rows: time steps; columns: 1=air temperature, 2=rainfall, 3=vpd, 4=ppfd, 5=net radiation, 6=sunshine fraction, 7=snowfall, 8=co2, 9=N-deposition)
integer, intent(in) :: climateyear_idx
! logical, intent(in) :: do_agg_climate
Expand All @@ -51,9 +50,6 @@ function getclimate( nt, ntstepsyear, forcing, climateyear_idx ) result ( out_cl
! function return variable
type(climate_type), dimension(ntstepsyear) :: out_climate

! !print*,'ntstepsyear', ntstepsyear
! !print*,'ntstepsyear_forcing', ntstepsyear_forcing

idx_start = (climateyear_idx - 1) * ntstepsyear + 1
idx_end = idx_start + ntstepsyear - 1

Expand Down
2 changes: 0 additions & 2 deletions src/params_siml_biomee.mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ function getsteering( year, params_siml ) result( out_steering )
! simulation year (setting booleans for opening files, doing
! spinup etc.)
!----------------------------------------------------------------
use md_params_core, only: dummy

! arguments
integer, intent(in) :: year ! simulation year, starts counting from 1, starting at the beginning of spinup
type( paramstype_siml ), intent(in) :: params_siml
Expand Down
8 changes: 0 additions & 8 deletions src/params_siml_pmodel.mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ function getsteering( year, params_siml ) result( out_steering )
! simulation year (setting booleans for opening files, doing
! spinup etc.)
!----------------------------------------------------------------
use md_params_core, only: dummy

! arguments
integer, intent(in) :: year ! simulation year, starts counting from 1, starting at the beginning of spinup
type( paramstype_siml ), intent(in) :: params_siml
Expand Down Expand Up @@ -110,12 +108,6 @@ function getsteering( year, params_siml ) result( out_steering )
out_steering%forcingyear = year - params_siml%spinupyears + params_siml%firstyeartrend - 1
out_steering%forcingyear_idx = year - params_siml%spinupyears

! if (params_siml%const_clim_year/=int(dummy)) then
! ! constant climate year specified
! cycleyear = get_cycleyear( year, params_siml%spinupyears, params_siml%recycle )
! out_steering%climateyear = cycleyear + params_siml%const_clim_year - 1
! out_steering%climateyear_idx = cycleyear + params_siml%const_clim_year - params_siml%firstyeartrend

! else
! constant climate year not specified
out_steering%climateyear = out_steering%forcingyear
Expand Down
8 changes: 1 addition & 7 deletions src/photosynth_pmodel.mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module md_photosynth
! (gpp_biomee_pmodel, and gpp_pmodel) use it and interact with different
! model structures.
!------------------------------------------------------------------------
use md_params_core, only: kPo, c_molmass, dummy, eps
use md_params_core

implicit none

Expand Down Expand Up @@ -921,8 +921,6 @@ function calc_ftemp_inst_vcmax( tcleaf, tcgrowth, tcref ) result( fv )
!
! Ref: Wang Han et al. (in prep.)
!-----------------------------------------------------------------------
use md_params_core, only: kR ! Universal gas constant, J/mol/K

! arguments
real, intent(in) :: tcleaf
real, intent(in) :: tcgrowth
Expand Down Expand Up @@ -973,8 +971,6 @@ function calc_ftemp_inst_jmax( tcleaf, tcgrowth, tcref ) result( fv )
! photosynthesis: a reanalysis of data from 36 species, Plant, Cell and Environment,
! 30,1176–1190, 2007.
!-----------------------------------------------------------------------
use md_params_core, only: kR ! Universal gas constant, J/mol/K

! arguments
real, intent(in) :: tcleaf
real, intent(in) :: tcgrowth
Expand Down Expand Up @@ -1021,8 +1017,6 @@ function calc_ftemp_arrhenius( tk, dha, tkref ) result( ftemp )
!
! T_ref is 25 deg C (=298.13 K) per default.
!-----------------------------------------------------------------------
use md_params_core, only: kR ! Universal gas constant, J/mol/K

! arguments
real, intent(in) :: tk ! temperature (Kelvin)
real, intent(in) :: dha ! activation energy (J/mol)
Expand Down
Loading

0 comments on commit 6c01203

Please sign in to comment.