Commit 34b8d337 authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

access all external APIs through model object; removed time_treatment and...

access all external APIs through model object; removed time_treatment and other deprecated constructs
parent f533b6dd
......@@ -325,15 +325,17 @@
#if _HORIZONTAL_DIMENSION_COUNT_>0
# define _INDEX_HORIZONTAL_LOCATION_ (_HORIZONTAL_LOCATION_)
# define _DIMENSION_GLOBAL_HORIZONTAL_ ,dimension(_HORIZONTAL_LOCATION_DIMENSIONS_)
# define _ARGUMENTS_HORIZONTAL_LOCATION_ ,_HORIZONTAL_LOCATION_
# define _ARG_HORIZONTAL_LOCATION_ _HORIZONTAL_LOCATION_
# define _ARGUMENTS_HORIZONTAL_LOCATION_ ,_ARG_HORIZONTAL_LOCATION_
# define _ARGUMENTS_HORIZONTAL_LOCATION_RANGE_ ,_HORIZONTAL_LOCATION_RANGE_
# define _PREARG_HORIZONTAL_LOCATION_ _HORIZONTAL_LOCATION_,
# define _PREARG_HORIZONTAL_LOCATION_ _ARG_HORIZONTAL_LOCATION_,
# define _PREARG_HORIZONTAL_LOCATION_DIMENSIONS_ _HORIZONTAL_LOCATION_DIMENSIONS_,
# define _DECLARE_ARGUMENTS_HORIZONTAL_LOCATION_ integer,intent(in) :: _HORIZONTAL_LOCATION_
# define _DECLARE_ARGUMENTS_HORIZONTAL_LOCATION_RANGE_ integer,intent(in) :: _HORIZONTAL_LOCATION_RANGE_
#else
# define _INDEX_HORIZONTAL_LOCATION_
# define _DIMENSION_GLOBAL_HORIZONTAL_
# define _ARG_HORIZONTAL_LOCATION_
# define _ARGUMENTS_HORIZONTAL_LOCATION_
# define _ARGUMENTS_HORIZONTAL_LOCATION_RANGE_
# define _PREARG_HORIZONTAL_LOCATION_
......@@ -349,7 +351,7 @@
#if _FABM_DIMENSION_COUNT_>0
# define _INDEX_LOCATION_ (_LOCATION_)
# define _DIMENSION_GLOBAL_ ,dimension(_LOCATION_DIMENSIONS_)
# define _ARGUMENTS_LOCATION_ ,_LOCATION_
# define _POSTARG_LOCATION_ ,_LOCATION_
# define _ARGUMENTS_LOCATION_RANGE_ ,_LOCATION_RANGE_
# define _PREARG_LOCATION_ _LOCATION_,
# define _PREARG_LOCATION_DIMENSIONS_ _LOCATION_DIMENSIONS_,
......@@ -359,7 +361,7 @@
#else
# define _INDEX_LOCATION_
# define _DIMENSION_GLOBAL_
# define _ARGUMENTS_LOCATION_
# define _POSTARG_LOCATION_
# define _ARGUMENTS_LOCATION_RANGE_
# define _PREARG_LOCATION_
# define _PREARG_LOCATION_DIMENSIONS_
......@@ -410,15 +412,17 @@
# else
# define _ARG_INTERIOR_FIXED_LOCATION_
# endif
# define _ARGUMENTS_INTERIOR_LENGTH_ ,_N_
# define _ARGUMENTS_INTERIOR_IN_ ,_START_,_STOP_ _ARG_INTERIOR_FIXED_LOCATION_
# define _ARG_INTERIOR_IN_ _START_,_STOP_ _ARG_INTERIOR_FIXED_LOCATION_
# define _POSTARG_INTERIOR_IN_ ,_ARG_INTERIOR_IN_
# define _PREARG_INTERIOR_IN_ _ARG_INTERIOR_IN_,
# define _DECLARE_ARGUMENTS_INTERIOR_IN_ integer,intent(in) :: _START_,_STOP_ _ARG_INTERIOR_FIXED_LOCATION_
#else
! ---------------------------------------------------------------------------------
! INTERIOR procedures operate on one point at a time.
! ---------------------------------------------------------------------------------
# define _ARGUMENTS_INTERIOR_LENGTH_
# define _ARGUMENTS_INTERIOR_IN_ _ARGUMENTS_LOCATION_
# define _ARG_INTERIOR_IN_ _LOCATION_
# define _POSTARG_INTERIOR_IN_ _POSTARG_LOCATION_
# define _PREARG_INTERIOR_IN_ _PREARG_LOCATION_
# define _DECLARE_ARGUMENTS_INTERIOR_IN_ _DECLARE_ARGUMENTS_LOCATION_
#endif
......@@ -432,16 +436,17 @@
# else
# define _ARG_HORIZONTAL_FIXED_LOCATION_
# endif
# define _ARGUMENTS_HORIZONTAL_LENGTH_ _ARGUMENTS_INTERIOR_LENGTH_
# define _ARGUMENTS_HORIZONTAL_IN_ ,_START_,_STOP_ _ARG_HORIZONTAL_FIXED_LOCATION_
# define _ARG_HORIZONTAL_IN_ _START_,_STOP_ _ARG_HORIZONTAL_FIXED_LOCATION_
# define _POSTARG_HORIZONTAL_IN_ ,_ARG_HORIZONTAL_IN_
# define _PREARG_HORIZONTAL_IN_ _ARG_HORIZONTAL_IN_,
# define _DECLARE_ARGUMENTS_HORIZONTAL_IN_ integer,intent(in) :: _START_,_STOP_ _ARG_HORIZONTAL_FIXED_LOCATION_
#else
! ---------------------------------------------------------------------------------
! HORIZONTAL procedures operate on one point at a time.
! ---------------------------------------------------------------------------------
# define _ARGUMENTS_HORIZONTAL_LENGTH_
# define _ARGUMENTS_HORIZONTAL_IN_ _ARGUMENTS_HORIZONTAL_LOCATION_
# define _ARG_HORIZONTAL_IN_ _ARG_HORIZONTAL_LOCATION_
# define _POSTARG_HORIZONTAL_IN_ _ARGUMENTS_HORIZONTAL_LOCATION_
# define _PREARG_HORIZONTAL_IN_ _PREARG_HORIZONTAL_LOCATION_
# define _DECLARE_ARGUMENTS_HORIZONTAL_IN_ _DECLARE_ARGUMENTS_HORIZONTAL_LOCATION_
#endif
......@@ -467,15 +472,17 @@
# else
# define _ARG_VERTICAL_FIXED_LOCATION_ ,_HORIZONTAL_LOCATION_
# endif
# define _ARGUMENTS_VERTICAL_LENGTH_ ,_N_
# define _ARGUMENTS_VERTICAL_IN_ ,_VERTICAL_START_,_VERTICAL_STOP_ _ARG_VERTICAL_FIXED_LOCATION_
# define _ARG_VERTICAL_IN_ _VERTICAL_START_,_VERTICAL_STOP_ _ARG_VERTICAL_FIXED_LOCATION_
# define _POSTARG_VERTICAL_IN_ ,_ARG_VERTICAL_IN_
# define _PREARG_VERTICAL_IN_ _ARG_VERTICAL_IN_,
# define _DECLARE_ARGUMENTS_VERTICAL_IN_ integer,intent(in) :: _VERTICAL_START_,_VERTICAL_STOP_ _ARG_VERTICAL_FIXED_LOCATION_
#else
! ---------------------------------------------------------------------------------
! VERTICAL procedures operate on one point at a time.
! ---------------------------------------------------------------------------------
# define _ARGUMENTS_VERTICAL_LENGTH_
# define _ARGUMENTS_VERTICAL_IN_ _ARGUMENTS_LOCATION_
# define _ARG_VERTICAL_IN_ _LOCATION_
# define _POSTARG_VERTICAL_IN_ _POSTARG_LOCATION_
# define _PREARG_VERTICAL_IN_ _PREARG_LOCATION_
# define _DECLARE_ARGUMENTS_VERTICAL_IN_ _DECLARE_ARGUMENTS_LOCATION_
#endif
......
This diff is collapsed.
......@@ -12,10 +12,10 @@ module fabm_expressions
private
public temporal_mean,vertical_mean,vertical_integral
public type_bulk_temporal_mean,type_horizontal_temporal_mean,type_vertical_integral
public temporal_mean, vertical_mean, vertical_integral
public type_interior_temporal_mean, type_horizontal_temporal_mean, type_vertical_integral
type,extends(type_bulk_expression) :: type_bulk_temporal_mean
type, extends(type_bulk_expression) :: type_interior_temporal_mean
real(rk) :: period ! Time period to average over (s)
integer :: n
real(rk) :: last_time, next_save_time
......@@ -28,7 +28,7 @@ module fabm_expressions
real(rke),allocatable _DIMENSION_GLOBAL_PLUS_1_ :: history
end type
type,extends(type_horizontal_expression) :: type_horizontal_temporal_mean
type, extends(type_horizontal_expression) :: type_horizontal_temporal_mean
real(rk) :: period ! Time period to average over (s)
integer :: n
real(rk) :: last_time, next_save_time
......@@ -39,7 +39,7 @@ module fabm_expressions
real(rke),allocatable _DIMENSION_GLOBAL_HORIZONTAL_PLUS_1_ :: history
end type
type,extends(type_horizontal_expression) :: type_vertical_integral
type, extends(type_horizontal_expression) :: type_vertical_integral
real(rk) :: minimum_depth = 0.0_rk ! Depth below surface in m (positive)
real(rk) :: maximum_depth = huge(1.0_rk) ! Depth below surface in m (positive)
logical :: average = .false. ! Whether to divide the depth integral by water depth, thus computing the vertical average
......@@ -49,7 +49,7 @@ module fabm_expressions
end type
interface temporal_mean
module procedure bulk_temporal_mean
module procedure interior_temporal_mean
module procedure horizontal_temporal_mean
end interface
......@@ -64,39 +64,40 @@ module fabm_expressions
end interface
contains
function vertical_dependency_mean(input,minimum_depth,maximum_depth) result(expression)
function vertical_dependency_mean(input, minimum_depth, maximum_depth) result(expression)
type (type_dependency_id), intent(inout),target :: input
real(rk), intent(in), optional :: minimum_depth,maximum_depth
type (type_vertical_integral) :: expression
expression = vertical_integral(input,minimum_depth,maximum_depth,average=.true.)
end function
function vertical_state_mean(input,minimum_depth,maximum_depth) result(expression)
function vertical_state_mean(input, minimum_depth, maximum_depth) result(expression)
type (type_state_variable_id), intent(inout),target :: input
real(rk), intent(in), optional :: minimum_depth,maximum_depth
real(rk), intent(in), optional :: minimum_depth, maximum_depth
type (type_vertical_integral) :: expression
expression = vertical_integral_generic(input,minimum_depth,maximum_depth,average=.true.)
end function
function vertical_dependency_integral(input,minimum_depth,maximum_depth,average) result(expression)
function vertical_dependency_integral(input, minimum_depth, maximum_depth, average) result(expression)
type (type_dependency_id), intent(inout),target :: input
real(rk), intent(in), optional :: minimum_depth,maximum_depth
real(rk), intent(in), optional :: minimum_depth, maximum_depth
logical, intent(in), optional :: average
type (type_vertical_integral) :: expression
expression = vertical_integral_generic(input,minimum_depth,maximum_depth,average)
expression = vertical_integral_generic(input, minimum_depth, maximum_depth, average)
end function
function vertical_state_integral(input,minimum_depth,maximum_depth,average) result(expression)
function vertical_state_integral(input, minimum_depth, maximum_depth, average) result(expression)
type (type_state_variable_id), intent(inout),target :: input
real(rk), intent(in), optional :: minimum_depth,maximum_depth
real(rk), intent(in), optional :: minimum_depth, maximum_depth
logical, intent(in), optional :: average
type (type_vertical_integral) :: expression
expression = vertical_integral_generic(input,minimum_depth,maximum_depth,average)
type (type_vertical_integral) :: expression
expression = vertical_integral_generic(input, minimum_depth, maximum_depth, average)
end function
function vertical_integral_generic(input,minimum_depth,maximum_depth,average) result(expression)
function vertical_integral_generic(input, minimum_depth, maximum_depth, average) result(expression)
class (type_variable_id), intent(inout),target :: input
real(rk), intent(in), optional :: minimum_depth,maximum_depth
real(rk), intent(in), optional :: minimum_depth, maximum_depth
logical, intent(in), optional :: average
type (type_vertical_integral) :: expression
......@@ -130,13 +131,13 @@ contains
if (present(maximum_depth)) expression%maximum_depth = maximum_depth
end function
function bulk_temporal_mean(input,period,resolution,missing_value) result(expression)
type (type_dependency_id), intent(inout),target :: input
real(rk), intent(in) :: period,resolution
real(rk),optional, intent(in) :: missing_value
function interior_temporal_mean(input, period, resolution, missing_value) result(expression)
type (type_dependency_id), intent(inout), target :: input
real(rk), intent(in) :: period, resolution
real(rk),optional, intent(in) :: missing_value
type (type_interior_temporal_mean) :: expression
type (type_bulk_temporal_mean) :: expression
character(len=attribute_length) :: prefix,postfix
character(len=attribute_length) :: prefix, postfix
if (.not.associated(input%link)) call fatal_error('fabm_expressions::bulk_temporal_mean', &
'Input variable has not been registered yet.')
......@@ -152,12 +153,12 @@ contains
if (present(missing_value)) expression%missing_value = missing_value
end function
function horizontal_temporal_mean(input,period,resolution) result(expression)
type (type_horizontal_dependency_id),intent(inout),target :: input
real(rk), intent(in) :: period,resolution
function horizontal_temporal_mean(input, period, resolution) result(expression)
type (type_horizontal_dependency_id), intent(inout), target :: input
real(rk), intent(in) :: period, resolution
type (type_horizontal_temporal_mean) :: expression
type (type_horizontal_temporal_mean) :: expression
character(len=attribute_length) :: prefix,postfix
character(len=attribute_length) :: prefix, postfix
if (.not.associated(input%link)) call fatal_error('fabm_expressions::horizontal_temporal_mean', &
'Input variable has not been registered yet.')
......
......@@ -59,7 +59,6 @@
public type_expression, type_bulk_expression, type_horizontal_expression
public get_aggregate_variable_access, type_aggregate_variable_access, type_contribution
public time_treatment2output,output2time_treatment
public type_coupling_task
......@@ -123,12 +122,6 @@
output_time_step_averaged = 4, &
output_time_step_integrated = 8
! For pre 2014-01 backward compatibility only (please use output_* instead)
integer, parameter, public :: time_treatment_last = 0, &
time_treatment_integrated = 1, &
time_treatment_averaged = 2, &
time_treatment_step_integrated = 3
! ====================================================================================================
! Data types for pointers to variable values.
! ====================================================================================================
......@@ -1756,7 +1749,7 @@ end subroutine real_pointer_set_set_value
!
! !INTERFACE:
subroutine add_variable(self, variable, name, units, long_name, missing_value, minimum, maximum, &
initial_value, background_value, presence, output, time_treatment, &
initial_value, background_value, presence, output, &
act_as_state_variable, read_index, state_index, write_index, background, link)
!
! !DESCRIPTION:
......@@ -1770,7 +1763,7 @@ end subroutine real_pointer_set_set_value
character(len=*), target,intent(in) :: name
character(len=*), intent(in),optional :: long_name, units
real(rk), intent(in),optional :: minimum, maximum,missing_value,initial_value,background_value
integer, intent(in),optional :: presence, output, time_treatment
integer, intent(in),optional :: presence, output
logical, intent(in),optional :: act_as_state_variable
integer, target, optional :: read_index, state_index, write_index
real(rk), target, optional :: background
......@@ -1811,11 +1804,6 @@ end subroutine real_pointer_set_set_value
if (present(initial_value)) variable%initial_value = initial_value
if (present(presence)) variable%presence = presence
if (present(act_as_state_variable)) variable%fake_state_variable = act_as_state_variable
if (present(time_treatment)) then
call self%log_message('variable "'//trim(name)//'": "time_treatment" argument is deprecated; &
&please use "output" instead. For possible values, see time_treatment2output in fabm_types.F90.')
variable%output = time_treatment2output(time_treatment)
end if
if (present(output)) variable%output = output
variable%prefill_value = variable%missing_value
......@@ -1865,7 +1853,7 @@ end subroutine real_pointer_set_set_value
recursive subroutine add_interior_variable(self, name, units, long_name, missing_value, minimum, maximum, initial_value, &
background_value, specific_light_extinction, &
no_precipitation_dilution, no_river_dilution, standard_variable, presence, output, &
time_treatment, act_as_state_variable, source, &
act_as_state_variable, source, &
read_index, state_index, write_index, &
background, link)
!
......@@ -1881,7 +1869,7 @@ end subroutine real_pointer_set_set_value
real(rk), intent(in),optional :: specific_light_extinction
logical, intent(in),optional :: no_precipitation_dilution, no_river_dilution
type (type_bulk_standard_variable),intent(in),optional :: standard_variable
integer, intent(in),optional :: presence, output, time_treatment, source
integer, intent(in),optional :: presence, output, source
logical, intent(in),optional :: act_as_state_variable
integer, target,optional :: read_index, state_index, write_index
......@@ -1911,7 +1899,7 @@ end subroutine real_pointer_set_set_value
! Process remainder of fields and creation of link generically (i.e., irrespective of variable domain).
call add_variable(self, variable, name, units, long_name, missing_value, minimum, maximum, &
initial_value, background_value, presence, output, time_treatment, &
initial_value, background_value, presence, output, &
act_as_state_variable, read_index, state_index, write_index, background, link_)
if (present(link)) link => link_
......@@ -1925,7 +1913,7 @@ end subroutine real_pointer_set_set_value
!
! !INTERFACE:
recursive subroutine add_horizontal_variable(self,name,units,long_name, missing_value, minimum, maximum, initial_value, &
background_value, standard_variable, presence, output, time_treatment, &
background_value, standard_variable, presence, output, &
act_as_state_variable, domain, source, &
read_index, state_index, write_index, background, link)
!
......@@ -1940,7 +1928,7 @@ end subroutine real_pointer_set_set_value
real(rk), intent(in),optional :: minimum, maximum, missing_value
real(rk), intent(in),optional :: initial_value, background_value
type (type_horizontal_standard_variable), intent(in),optional :: standard_variable
integer, intent(in),optional :: presence, domain, output, time_treatment, source
integer, intent(in),optional :: presence, domain, output, source
logical, intent(in),optional :: act_as_state_variable
integer, target,optional :: read_index, state_index, write_index
......@@ -1974,7 +1962,7 @@ end subroutine real_pointer_set_set_value
! Process remainder of fields and creation of link generically (i.e., irrespective of variable domain).
call add_variable(self, variable, name, units, long_name, missing_value, minimum, maximum, &
initial_value, background_value, presence, output, time_treatment, &
initial_value, background_value, presence, output, &
act_as_state_variable, read_index, state_index, write_index, background, link_)
if (present(link)) link => link_
......@@ -1988,7 +1976,7 @@ end subroutine real_pointer_set_set_value
!
! !INTERFACE:
recursive subroutine add_scalar_variable(self, name, units, long_name, missing_value, minimum, maximum, initial_value, &
background_value, standard_variable, presence, output, time_treatment, &
background_value, standard_variable, presence, output, &
read_index, state_index, write_index, sms_index, background, link)
!
! !DESCRIPTION:
......@@ -2001,7 +1989,7 @@ end subroutine real_pointer_set_set_value
character(len=*), intent(in),optional :: long_name, units
real(rk), intent(in),optional :: minimum, maximum, missing_value, initial_value, background_value
type (type_global_standard_variable), intent(in),optional :: standard_variable
integer, intent(in),optional :: presence, output, time_treatment
integer, intent(in),optional :: presence, output
integer, target,optional :: read_index, state_index, write_index, sms_index
real(rk), target,optional :: background
......@@ -2023,7 +2011,7 @@ end subroutine real_pointer_set_set_value
! Process remainder of fields and creation of link generically (i.e., irrespective of variable domain).
call add_variable(self, variable, name, units, long_name, missing_value, minimum, maximum, &
initial_value, background_value, presence, output, time_treatment, &
initial_value, background_value, presence, output, &
.false., read_index, state_index, write_index, background, link)
end subroutine add_scalar_variable
!EOC
......@@ -2087,7 +2075,7 @@ end subroutine real_pointer_set_set_value
!
! !INTERFACE:
subroutine register_interior_diagnostic_variable(self, id, name, units, long_name, &
time_treatment, missing_value, standard_variable, output, source, &
missing_value, standard_variable, output, source, &
act_as_state_variable, prefill_value)
!
! !DESCRIPTION:
......@@ -2099,7 +2087,7 @@ end subroutine real_pointer_set_set_value
!
! !INPUT PARAMETERS:
character(len=*), intent(in) :: name, long_name, units
integer, intent(in),optional :: time_treatment, output, source
integer, intent(in),optional :: output, source
real(rk), intent(in),optional :: missing_value, prefill_value
type (type_bulk_standard_variable), intent(in),optional :: standard_variable
logical, intent(in),optional :: act_as_state_variable
......@@ -2112,7 +2100,7 @@ end subroutine real_pointer_set_set_value
'Identifier supplied for '//trim(name)//' is already associated with '//trim(id%link%name)//'.')
call self%add_interior_variable(name, units, long_name, missing_value, &
standard_variable=standard_variable, output=output, time_treatment=time_treatment, &
standard_variable=standard_variable, output=output, &
source=source, write_index=id%diag_index, link=id%link, act_as_state_variable=act_as_state_variable)
if (present(prefill_value)) then
id%link%target%prefill = prefill_constant
......@@ -2128,7 +2116,7 @@ end subroutine real_pointer_set_set_value
!
! !INTERFACE:
subroutine register_horizontal_diagnostic_variable(self, id, name, units, long_name, &
time_treatment, missing_value, standard_variable, output, source, &
missing_value, standard_variable, output, source, &
act_as_state_variable, domain)
!
! !DESCRIPTION:
......@@ -2140,7 +2128,7 @@ end subroutine real_pointer_set_set_value
!
! !INPUT PARAMETERS:
character(len=*), intent(in) :: name, long_name, units
integer, intent(in),optional :: time_treatment, output, source, domain
integer, intent(in),optional :: output, source, domain
real(rk), intent(in),optional :: missing_value
type (type_horizontal_standard_variable), intent(in),optional :: standard_variable
logical, intent(in),optional :: act_as_state_variable
......@@ -2152,7 +2140,7 @@ end subroutine real_pointer_set_set_value
'Identifier supplied for '//trim(name)//' is already associated with '//trim(id%link%name)//'.')
call self%add_horizontal_variable(name, units, long_name, missing_value, &
standard_variable=standard_variable, output=output, time_treatment=time_treatment, &
standard_variable=standard_variable, output=output, &
source=source, write_index=id%horizontal_diag_index, link=id%link, &
act_as_state_variable=act_as_state_variable, domain=domain)
......@@ -3136,29 +3124,6 @@ recursive subroutine abstract_model_factory_register_version(self,name,version_s
version%version_string = version_string
end subroutine abstract_model_factory_register_version
function time_treatment2output(time_treatment) result(output)
integer, intent(in) :: time_treatment
integer :: output
select case (time_treatment)
case (time_treatment_last); output = output_instantaneous
case (time_treatment_integrated); output = output_time_integrated
case (time_treatment_averaged); output = output_time_step_averaged
case (time_treatment_step_integrated); output = output_time_step_integrated
end select
end function
function output2time_treatment(output) result(time_treatment)
integer, intent(in) :: output
integer :: time_treatment
select case (output)
case (output_none); time_treatment = time_treatment_last
case (output_instantaneous); time_treatment = time_treatment_last
case (output_time_integrated); time_treatment = time_treatment_integrated
case (output_time_step_averaged); time_treatment = time_treatment_averaged
case (output_time_step_integrated); time_treatment = time_treatment_step_integrated
end select
end function
subroutine coupling_task_list_remove(self,task)
class (type_coupling_task_list),intent(inout) :: self
class (type_coupling_task),pointer :: task
......
......@@ -285,16 +285,11 @@ subroutine initialize(self,configunit)
fl_initial,minimum=0.0_rk)
! Register diagnostic variables
call self%register_diagnostic_variable(self%id_dPAR,'PAR','W/m**2','photosynthetically active radiation', &
time_treatment=time_treatment_averaged)
call self%register_diagnostic_variable(self%id_GPP,'GPP','mmol/m**3','gross primary production', &
time_treatment=time_treatment_step_integrated)
call self%register_diagnostic_variable(self%id_NCP,'NCP','mmol/m**3','net community production', &
time_treatment=time_treatment_step_integrated)
call self%register_diagnostic_variable(self%id_PPR,'PPR','mmol/m**3/d','gross primary production rate', &
time_treatment=time_treatment_averaged)
call self%register_diagnostic_variable(self%id_NPR,'NPR','mmol/m**3/d','net community production rate', &
time_treatment=time_treatment_averaged)
call self%register_diagnostic_variable(self%id_dPAR,'PAR','W/m**2','photosynthetically active radiation')
call self%register_diagnostic_variable(self%id_GPP,'GPP','mmol/m**3','gross primary production')
call self%register_diagnostic_variable(self%id_NCP,'NCP','mmol/m**3','net community production')
call self%register_diagnostic_variable(self%id_PPR,'PPR','mmol/m**3/d','gross primary production rate')
call self%register_diagnostic_variable(self%id_NPR,'NPR','mmol/m**3/d','net community production rate')
! Register environmental dependencies
call self%register_dependency(self%id_par, standard_variables%downwelling_photosynthetic_radiative_flux)
......
......@@ -320,8 +320,7 @@
endif
if ( self%use_par ) then
call self%register_diagnostic_variable(self%id_dPAR,'PAR','W/m**2','photosynthetically active radiation', &
time_treatment=time_treatment_averaged)
call self%register_diagnostic_variable(self%id_dPAR,'PAR','W/m**2','photosynthetically active radiation')
call self%register_dependency(self%id_par, standard_variables%downwelling_photosynthetic_radiative_flux)
endif
......
......@@ -134,10 +134,10 @@
! Register diagnostic variables
call self%register_diagnostic_variable(self%id_NFIX,'NFIX','mmol/m**3', &
'nitrogen fixation', &
time_treatment=time_treatment_step_integrated)
output=output_time_step_integrated)
call self%register_diagnostic_variable(self%id_dPAR,'PAR','W/m**2', &
'photosynthetically active radiation', &
time_treatment=time_treatment_averaged)
output=output_time_step_averaged)
! Register contribution to conserved quantities
call self%add_to_aggregate_variable(standard_variables%total_nitrogen,self%id_nut)
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment