From 14d2859211b60d99d300801418f144c8eb4b792c Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 5 Dec 2022 13:54:33 -0500 Subject: [PATCH] Added in time and space dimension coordinates to encounter dataset --- src/symba/symba_io.f90 | 3 +++ src/symba/symba_util.f90 | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/symba/symba_io.f90 b/src/symba/symba_io.f90 index c70fbf94a..92aafdb61 100644 --- a/src/symba/symba_io.f90 +++ b/src/symba/symba_io.f90 @@ -122,6 +122,9 @@ module subroutine symba_io_encounter_initialize_output(self, param) ! Take the file out of define mode call check( nf90_enddef(nciu%id), "symba_io_encounter_initialize_output nf90_enddef" ) + + ! Add in the space dimension coordinates + call check( nf90_put_var(nciu%id, nciu%space_varid, nciu%space_coords, start=[1], count=[NDIM]), "symba_io_encounter_initialize_output nf90_put_var space" ) end associate return diff --git a/src/symba/symba_util.f90 b/src/symba/symba_util.f90 index 6e0e46470..a7c4c6ae7 100644 --- a/src/symba/symba_util.f90 +++ b/src/symba/symba_util.f90 @@ -1389,6 +1389,8 @@ module subroutine symba_util_take_encounter_snapshot(self, param, t) if (npl_snap + ntp_snap == 0) return + snapshot%t = t + ! Save the snapshot self%encounter_history%iframe = self%encounter_history%iframe + 1 call self%resize_storage(self%encounter_history%iframe)