From 5e45e7f78085b53e0eb450a75a21da7ba682ec85 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Mon, 22 Jan 2024 13:27:01 -0500 Subject: [PATCH] Fix bugs --- base/NCIO.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/NCIO.F90 b/base/NCIO.F90 index f0609442e846..f05e1b1b8ddd 100644 --- a/base/NCIO.F90 +++ b/base/NCIO.F90 @@ -713,7 +713,8 @@ subroutine MAPL_VarWriteNCpar_R4_3d(formatter, name, A, ARRDES, oClients, RC) integer :: i1, j1, in, jn, global_dim(3) type(ArrayReference) :: ref - if (present(oClients)) then + if (present(arrdes)) then + if (present(oClients)) then _ASSERT(present(oClients), "output server is needed") call MAPL_GridGet(arrdes%grid,globalCellCountPerDim=global_dim,rc=status) _VERIFY(status) @@ -3298,6 +3299,9 @@ subroutine MAPL_BundleWriteNCPar(Bundle, arrdes, CLOCK, filename, oClients, rc) logical :: is_stretched character(len=ESMF_MAXSTR) :: positive type(StringVector) :: flip_vars + logical :: have_oclients + + have_oclients = present(oClients) call ESMF_FieldBundleGet(Bundle,FieldCount=nVars, name=BundleName, rc=STATUS) _VERIFY(STATUS)