the initialization must be split form the linking as the masks are not yet calculated
subroutine fabm_initialize_state() !! the initialization must be split form the linking as the !! masks are not yet calculated integer :: j,k logical, save :: first=.true. if (.not. first) return ! careful if not full window first = .false. ! fill the surface state if (nsurface > 0) then do j = 2, jmt-1 call model%initialize_surface_state(2, imt-1, j) end do end if ! fill the interior state do j = 2, jmt-1 do k = 1, km call model%initialize_interior_state(2, imt-1, k, j) end do end do t(:,:,:,offset:,1) = t(:,:,:,offset:,0) ! initial values must be in tau+1 slice ! fill the bottom state if (nbottom > 0) then do j = 2, jmt-1 call model%initialize_bottom_state(2, imt-1, j) end do end if end subroutine fabm_initialize_state