Commit 286a4026 authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

cosmetic tweaks

parent 22098324
...@@ -373,14 +373,14 @@ contains ...@@ -373,14 +373,14 @@ contains
initialize_ = .true. initialize_ = .true.
if (present(initialize)) initialize_ = initialize if (present(initialize)) initialize_ = initialize
if (initialize_) call model%initialize() if (initialize_) call model%initialize()
end function end function fabm_create_model
! -------------------------------------------------------------------------- ! --------------------------------------------------------------------------
! initialize: initialize a model object ! initialize: initialize a model object
! -------------------------------------------------------------------------- ! --------------------------------------------------------------------------
! This freezes the tree of biogeochemical modules; afterwards no new modules ! This freezes the tree of biogeochemical modules; afterwards no new modules
! can be added. This routine will be called automatically when reading ! can be added. This routine will be called automatically from
! a model configuration from fabm.yaml, unless explicitly deactivated. ! fabm_create_model unless called with initialize=.false.
! -------------------------------------------------------------------------- ! --------------------------------------------------------------------------
subroutine initialize(self) subroutine initialize(self)
class (type_fabm_model), target, intent(inout) :: self class (type_fabm_model), target, intent(inout) :: self
...@@ -500,12 +500,12 @@ contains ...@@ -500,12 +500,12 @@ contains
self%status = status_set_domain_done self%status = status_set_domain_done
#if _FABM_DIMENSION_COUNT_>0 #if _FABM_DIMENSION_COUNT_>0
self%domain%shape = (/_LOCATION_/) self%domain%shape(:) = (/_LOCATION_/)
self%domain%start(:) = 1 self%domain%start(:) = 1
self%domain%stop = self%domain%shape self%domain%stop(:) = self%domain%shape
#endif #endif
#if _HORIZONTAL_DIMENSION_COUNT_>0 #if _HORIZONTAL_DIMENSION_COUNT_>0
self%domain%horizontal_shape = (/_HORIZONTAL_LOCATION_/) self%domain%horizontal_shape(:) = (/_HORIZONTAL_LOCATION_/)
#endif #endif
if (present(seconds_per_time_unit)) then if (present(seconds_per_time_unit)) then
...@@ -620,12 +620,12 @@ contains ...@@ -620,12 +620,12 @@ contains
if (self%status < status_set_domain_done) & if (self%status < status_set_domain_done) &
call fatal_error('set_bottom_index', 'set_domain has not yet been called on this model object.') call fatal_error('set_bottom_index', 'set_domain has not yet been called on this model object.')
# if !defined(NDEBUG)&&_HORIZONTAL_DIMENSION_COUNT_>0 # if !defined(NDEBUG)&&_HORIZONTAL_DIMENSION_COUNT_>0
do i = 1, size(self%domain%horizontal_shape) do i = 1, size(self%domain%horizontal_shape)
if (size(indices, i) /= self%domain%horizontal_shape(i)) & if (size(indices, i) /= self%domain%horizontal_shape(i)) &
call fatal_error('set_bottom_index', 'shape of provided index array does not match domain extents provided to set_domain.') call fatal_error('set_bottom_index', 'shape of provided index array does not match domain extents provided to set_domain.')
end do end do
# endif # endif
self%domain%bottom_indices => indices self%domain%bottom_indices => indices
end subroutine set_bottom_index end subroutine set_bottom_index
...@@ -672,13 +672,11 @@ contains ...@@ -672,13 +672,11 @@ contains
end if end if
#endif #endif
#ifdef _FABM_DEPTH_DIMENSION_INDEX_ #if defined(_FABM_DEPTH_DIMENSION_INDEX_)&&_FABM_BOTTOM_INDEX_==-1
# if _FABM_BOTTOM_INDEX_==-1
if (.not. associated(self%domain%bottom_indices)) then if (.not. associated(self%domain%bottom_indices)) then
call log_message('bottom indices have not been set. Make sure to call set_bottom_index.') call log_message('bottom indices have not been set. Make sure to call set_bottom_index.')
ready = .false. ready = .false.
end if end if
# endif
#endif #endif
! Flag variables that have had data asssigned (by user, host or FABM). ! Flag variables that have had data asssigned (by user, host or FABM).
......
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