Destroy a gravity model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(geopotential_model), | intent(inout) | :: | me |
subroutine destroy_geopotential_model(me) implicit none class(geopotential_model),intent(inout) :: me !common to all: if (allocated(me%name)) deallocate(me%name) if (allocated(me%filename)) deallocate(me%filename) me%nmax = 0 me%mmax = 0 me%re = zero me%mu = zero select type (me) class is (geopotential_model_vector_coeff) if (allocated(me%c)) deallocate(me%c) if (allocated(me%s)) deallocate(me%s) class is (geopotential_model_matrix_coeff) if (allocated(me%cnm)) deallocate(me%cnm) if (allocated(me%snm)) deallocate(me%snm) end select end subroutine destroy_geopotential_model