From a88f16a557e418fef63ff88e82b4e6a8eaef2d4c Mon Sep 17 00:00:00 2001 From: Lauren Chilutti Date: Thu, 2 Jan 2025 11:08:39 -0500 Subject: [PATCH] add check that module variables are allocated before deallocating in astronomy_end --- astronomy/astronomy.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astronomy/astronomy.F90 b/astronomy/astronomy.F90 index 3809c98a8a..3386330b48 100644 --- a/astronomy/astronomy.F90 +++ b/astronomy/astronomy.F90 @@ -768,7 +768,7 @@ subroutine astronomy_end !---------------------------------------------------------------------- !> deallocate module variables. !---------------------------------------------------------------------- - deallocate (orb_angle) + if (allocated(orb_angle)) deallocate (orb_angle) if (allocated(cosz_ann) ) then deallocate (cosz_ann) deallocate (fracday_ann)