Commit 45e9c9e6 authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

use _ADD_/_ADD_HORIZONTAL_ in other preprocessor definitions

parent 0a2b4220
......@@ -257,17 +257,17 @@
#define _ADD_HORIZONTAL_(variable,value) cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%horizontal_sum_index) = cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%horizontal_sum_index) + (value)
! For BGC models: Expressions for setting space-dependent FABM variables defined on the full spatial domain.
#define _SET_ODE_(variable,value) cache%write _INDEX_SLICE_PLUS_1_(variable%sms%sum_index) = cache%write _INDEX_SLICE_PLUS_1_(variable%sms%sum_index) + (value)*self%rdt_
#define _SET_BOTTOM_ODE_(variable,value) cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%bottom_sms%horizontal_sum_index) = cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%bottom_sms%horizontal_sum_index) + (value)*self%rdt_
#define _SET_SURFACE_ODE_(variable,value) cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%surface_sms%horizontal_sum_index) = cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%surface_sms%horizontal_sum_index) + (value)*self%rdt_
#define _SET_BOTTOM_EXCHANGE_(variable,value) cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%bottom_flux%horizontal_sum_index) = cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%bottom_flux%horizontal_sum_index) + (value)*self%rdt_
#define _SET_SURFACE_EXCHANGE_(variable,value) cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%surface_flux%horizontal_sum_index) = cache%write_hz _INDEX_HORIZONTAL_SLICE_PLUS_1_(variable%surface_flux%horizontal_sum_index) + (value)*self%rdt_
#define _SET_ODE_(variable,value) _ADD_(variable%sms,(value)*self%rdt_)
#define _SET_BOTTOM_ODE_(variable,value) _ADD_HORIZONTAL_(variable%bottom_sms,(value)*self%rdt_)
#define _SET_SURFACE_ODE_(variable,value) _ADD_HORIZONTAL_(variable%surface_sms,(value)*self%rdt_)
#define _SET_BOTTOM_EXCHANGE_(variable,value) _ADD_HORIZONTAL_(variable%bottom_flux,(value)*self%rdt_)
#define _SET_SURFACE_EXCHANGE_(variable,value) _ADD_HORIZONTAL_(variable%surface_flux,(value)*self%rdt_)
#define _SET_DD_(variable1,variable2,value) dd _INDEX_SLICE_PLUS_2_(variable1%state_index,variable2%state_index) = dd _INDEX_SLICE_PLUS_2_(variable1%state_index,variable2%state_index) + (value)*self%rdt_
#define _SET_PP_(variable1,variable2,value) pp _INDEX_SLICE_PLUS_2_(variable1%state_index,variable2%state_index) = pp _INDEX_SLICE_PLUS_2_(variable1%state_index,variable2%state_index) + (value)*self%rdt_
#define _SET_EXTINCTION_(value) _ADD_(self%extinction_id,value)
#define _SCALE_DRAG_(value) _ADD_HORIZONTAL_(self%surface_drag_id,(value)-1.0_rk)
#define _SET_ALBEDO_(value) _ADD_HORIZONTAL_(self%albedo_id,(value))
#define _SET_VERTICAL_MOVEMENT_(variable,value) cache%write _INDEX_SLICE_PLUS_1_(variable%movement%sum_index) = cache%write _INDEX_SLICE_PLUS_1_(variable%movement%sum_index) + value*self%rdt_
#define _SET_ALBEDO_(value) _ADD_HORIZONTAL_(self%albedo_id,value)
#define _SET_VERTICAL_MOVEMENT_(variable,value) _ADD_(variable%movement,(value)*self%rdt_)
#define _INVALIDATE_STATE_ cache%valid = .false.
#define _REPAIR_STATE_ cache%repair
......
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