ocean_vcoord_destroy Subroutine

private subroutine ocean_vcoord_destroy(this)

Type Bound

ocean_vcoord_t

Arguments

Type IntentOptional Attributes Name
class(ocean_vcoord_t), intent(inout) :: this

Source Code

   subroutine ocean_vcoord_destroy(this)
      class(ocean_vcoord_t), intent(inout) :: this
      this%is_init = .false.
      if (allocated(this%dsig)) deallocate (this%dsig)
      if (allocated(this%z_ref_global)) deallocate (this%z_ref_global)
      if (allocated(this%target_h)) deallocate (this%target_h)
      if (allocated(this%z_ref)) deallocate (this%z_ref)
      if (allocated(this%z_top)) deallocate (this%z_top)
      if (allocated(this%z_fixed_zi)) deallocate (this%z_fixed_zi)
      if (allocated(this%z_fixed_dz)) deallocate (this%z_fixed_dz)
      this%z_fixed_use_profile = .false.
      if (allocated(this%rho_target)) deallocate (this%rho_target)
      if (allocated(this%remap_total_h)) deallocate (this%remap_total_h)
      if (allocated(this%remap_h_ref)) deallocate (this%remap_h_ref)
      if (allocated(this%remap_h_old)) deallocate (this%remap_h_old)
      if (allocated(this%remap_conc_t)) deallocate (this%remap_conc_t)
      if (allocated(this%remap_conc_s)) deallocate (this%remap_conc_s)
      this%nx_total = 0
      this%ny_total = 0
      this%nz_ml = 0
   end subroutine ocean_vcoord_destroy