From 4ad3a5cf29e15cfe940c8240e458c7b1e0bd027b Mon Sep 17 00:00:00 2001 From: mjreno Date: Thu, 5 Dec 2024 13:13:19 -0500 Subject: [PATCH] add "in" suffix to netcdf export name when in validate mode --- src/Utilities/Export/NCModel.f90 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Utilities/Export/NCModel.f90 b/src/Utilities/Export/NCModel.f90 index c9e4924557b..5150c0f0af8 100644 --- a/src/Utilities/Export/NCModel.f90 +++ b/src/Utilities/Export/NCModel.f90 @@ -9,8 +9,9 @@ module NCModelExportModule use KindModule, only: DP, I4B, LGP use ConstantsModule, only: LINELENGTH, LENCOMPONENTNAME, LENMODELNAME, & - LENMEMPATH, LENBIGLINE, LENVARNAME, DIS, DISU, DISV - use SimVariablesModule, only: errmsg + LENMEMPATH, LENBIGLINE, LENVARNAME, MVALIDATE, & + DIS, DISU, DISV + use SimVariablesModule, only: isim_mode, idm_context, errmsg use SimModule, only: store_error, store_error_filename use InputLoadTypeModule, only: ModelDynamicPkgsType use ModflowInputModule, only: ModflowInputType @@ -232,6 +233,10 @@ subroutine set(this, modelname, modeltype, modelfname, nctype) call store_error_filename(modelfname) end select + if (isim_mode == MVALIDATE) then + this%title = trim(this%title)//' array input' + end if + ! set export type if (nctype == NETCDF_UGRID) then this%grid = 'LAYERED MESH' @@ -257,9 +262,7 @@ end subroutine set !< subroutine export_init(this, modelname, modeltype, modelfname, disenum, & nctype, iout) - use SimVariablesModule, only: isim_mode, idm_context use TdisModule, only: datetime0, nstp - use ConstantsModule, only: MVALIDATE use MemoryManagerModule, only: mem_setptr use MemoryHelperModule, only: create_mem_path use MemoryManagerExtModule, only: mem_set_value @@ -286,7 +289,6 @@ subroutine export_init(this, modelname, modeltype, modelfname, disenum, & this%modelname = modelname this%modeltype = modeltype this%modelfname = modelfname - this%nc_fname = trim(modelname)//'.nc' this%gridmap_name = '' this%ncf_mempath = '' this%ogc_wkt = '' @@ -303,6 +305,12 @@ subroutine export_init(this, modelname, modeltype, modelfname, disenum, & this%iout = iout this%chunking_active = .false. + ! set export file name + if (isim_mode /= MVALIDATE) then + this%nc_fname = trim(modelname)//'.nc' + else + this%nc_fname = trim(modelname)//'.in.nc' + end if call lowcase(this%nc_fname) ! set file scoped attributes