fill_ssh Subroutine

public subroutine fill_ssh(state_handle, buf)

SSH = total column thickness minus bathymetry depth, into the k=1 plane of buf. Multilayer or barotropic path per use_multilayer. Public only for the unit-test suite.

Arguments

Type IntentOptional Attributes Name
class(*), intent(in) :: state_handle
real(kind=wp), intent(inout) :: buf(:,:,:)

Calls

proc~~fill_ssh~~CallsGraph proc~fill_ssh fill_ssh proc~fill_ssh_bt_impl fill_ssh_bt_impl proc~fill_ssh->proc~fill_ssh_bt_impl proc~fill_ssh_ml_impl fill_ssh_ml_impl proc~fill_ssh->proc~fill_ssh_ml_impl local local proc~fill_ssh_ml_impl->local

Source Code

   subroutine fill_ssh(state_handle, buf)
      !! SSH = total column thickness minus bathymetry depth, into the k=1
      !! plane of `buf`.  Multilayer or barotropic path per `use_multilayer`.
      !! Public only for the unit-test suite.
      class(*), intent(in) :: state_handle
      real(wp), intent(inout) :: buf(:, :, :)
      select type (state => state_handle)
      class is (ocean_state_t)
         if (state%use_multilayer .and. allocated(state%multilayer%h_layer)) then
            call fill_ssh_ml_impl(state%multilayer%h_layer, state%barotropic%b, &
                                  state%multilayer%nz_ml, buf)
         else
            call fill_ssh_bt_impl(state%barotropic%h, state%barotropic%b, buf)
         end if
      end select
   end subroutine fill_ssh