sw_cleanup Subroutine

private subroutine sw_cleanup(me)

Clean up allocated memory

Type Bound

sw_data_type

Arguments

Type IntentOptional Attributes Name
class(sw_data_type), intent(inout) :: me

Called by

proc~~sw_cleanup~~CalledByGraph proc~sw_cleanup sw_data_type%sw_cleanup proc~jr_cleanup jacchia_roberts_type%jr_cleanup proc~jr_cleanup->proc~sw_cleanup proc~sw_init sw_data_type%sw_init proc~sw_init->proc~sw_cleanup proc~jr_init jacchia_roberts_type%jr_init proc~jr_init->proc~sw_init

Source Code

   subroutine sw_cleanup(me)
      class(sw_data_type), intent(inout) :: me
      if (allocated(me%mjd))           deallocate(me%mjd)
      if (allocated(me%f107_obs))      deallocate(me%f107_obs)
      if (allocated(me%f107_adj))      deallocate(me%f107_adj)
      if (allocated(me%f107a_obs_ctr)) deallocate(me%f107a_obs_ctr)
      if (allocated(me%f107a_adj_ctr)) deallocate(me%f107a_adj_ctr)
      if (allocated(me%kp))            deallocate(me%kp)
      if (allocated(me%ap_avg))        deallocate(me%ap_avg)
      me%initialized = .false.
      me%n_records = 0
      me%warn_epoch_before = .true.
      me%warn_epoch_after = .true.
   end subroutine sw_cleanup