From e523db847246467fad93e923e089aaee2a6c72ea Mon Sep 17 00:00:00 2001 From: Jean-Michel Campin Date: Wed, 25 Dec 2024 23:42:45 -0500 Subject: [PATCH] new logical run-time param "solveForDeltaP" --- model/inc/PARAMS.h | 25 ++++++++++++++----------- model/src/config_summary.F | 6 ++++++ model/src/ini_parms.F | 6 +++--- model/src/set_defaults.F | 5 +++-- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/model/inc/PARAMS.h b/model/inc/PARAMS.h index 9b289608ef..dd49dcb8e8 100644 --- a/model/inc/PARAMS.h +++ b/model/inc/PARAMS.h @@ -357,14 +357,16 @@ C useSRCGSolver :: Set to true to use conjugate gradient C solver with single reduction (only one call of C s/r mpi_allreduce), default is false C- Time-stepping & free-surface params: -C rigidLid :: Set to true to use rigid lid +C rigidLid :: Set to true to use rigid lid C implicitFreeSurface :: Set to true to use implicit free surface -C uniformLin_PhiSurf :: Set to true to use a uniform Bo_surf in the -C linear relation Phi_surf = Bo_surf*eta -C uniformFreeSurfLev :: TRUE if free-surface level-index is uniform (=1) -C exactConserv :: Set to true to conserve exactly the total Volume -C linFSConserveTr :: Set to true to correct source/sink of tracer -C at the surface due to Linear Free Surface +C exactConserv :: Set to true to conserve exactly the total Volume +C solveForDeltaP :: solve for pressure increment (deltaP= P^{n+1} - P^n ) +C instead of for future time-step pressure P^{n+1} +C uniformLin_PhiSurf :: Set to true to use a uniform Bo_surf in the +C linear relation Phi_surf = Bo_surf*eta +C uniformFreeSurfLev :: TRUE if free-surface level-index is uniform (=1) +C linFSConserveTr :: Set to true to correct source/sink of tracer +C at the surface due to Linear Free Surface C useRealFreshWaterFlux :: if True (=Natural BCS), treats P+R-E flux C as a real Fresh Water (=> changes the Sea Level) C if F, converts P+R-E to salt flux (no SL effect) @@ -438,9 +440,9 @@ C & Last iteration, in addition multiple of dumpFreq iter & saltAdvection, saltVertDiff4, saltIsActiveTr, saltForcing, & maskIniTemp, maskIniSalt, checkIniTemp, checkIniSalt, & useNSACGSolver, useSRCGSolver, - & rigidLid, implicitFreeSurface, - & uniformLin_PhiSurf, uniformFreeSurfLev, - & exactConserv, linFSConserveTr, useRealFreshWaterFlux, + & rigidLid, implicitFreeSurface, exactConserv, + & solveForDeltaP, uniformLin_PhiSurf, uniformFreeSurfLev, + & linFSConserveTr, useRealFreshWaterFlux, & storePhiHyd4Phys, quasiHydrostatic, nonHydrostatic, & use3Dsolver, implicitIntGravWave, staggerTimeStep, & applyExchUV_early, doResetHFactors, @@ -520,9 +522,10 @@ C & Last iteration, in addition multiple of dumpFreq iter LOGICAL useSRCGSolver LOGICAL rigidLid LOGICAL implicitFreeSurface + LOGICAL exactConserv + LOGICAL solveForDeltaP LOGICAL uniformLin_PhiSurf LOGICAL uniformFreeSurfLev - LOGICAL exactConserv LOGICAL linFSConserveTr LOGICAL useRealFreshWaterFlux LOGICAL storePhiHyd4Phys diff --git a/model/src/config_summary.F b/model/src/config_summary.F index 74ace8bba2..357057cae7 100644 --- a/model/src/config_summary.F +++ b/model/src/config_summary.F @@ -360,6 +360,12 @@ SUBROUTINE CONFIG_SUMMARY( myThid ) CALL WRITE_0D_RL( implicDiv2DFlow, INDEX_NONE, & 'implicDiv2DFlow =', & ' /* Barot. Flow Div. implicit factor (0-1) */') +c CALL WRITE_0D_L( exactConserv, INDEX_NONE, +c & 'exactConserv =', +c & ' /* Exact Volume Conservation on/off flag */') + CALL WRITE_0D_L( solveForDeltaP, INDEX_NONE, + & 'solveForDeltaP =', + & ' /* solve for Pressure Increment on/off flag */') CALL WRITE_0D_L( uniformLin_PhiSurf, INDEX_NONE, & 'uniformLin_PhiSurf =', & ' /* use uniform Bo_surf on/off flag */') diff --git a/model/src/ini_parms.F b/model/src/ini_parms.F index 8e46e98e7d..fdbabc8543 100644 --- a/model/src/ini_parms.F +++ b/model/src/ini_parms.F @@ -232,9 +232,9 @@ SUBROUTINE INI_PARMS( myThid ) & tempDiffusion, tempAdvection, tempForcing, temp_stayPositive, & saltDiffusion, saltAdvection, saltForcing, salt_stayPositive, & implicSurfPress, implicDiv2DFlow, implicitNHPress, - & implicitFreeSurface, rigidLid, freeSurfFac, + & rigidLid, implicitFreeSurface, freeSurfFac, exactConserv, + & solveForDeltaP, uniformLin_PhiSurf, linFSConserveTr, & hFacMin, hFacMinDz, hFacMinDp, hFacMinDr, - & exactConserv, linFSConserveTr, uniformLin_PhiSurf, & nonlinFreeSurf, hFacInf, hFacSup, select_rStar, & nonHydrostatic, selectNHfreeSurf, quasiHydrostatic, & implicitIntGravWave, staggerTimeStep, doResetHFactors, @@ -261,7 +261,7 @@ SUBROUTINE INI_PARMS( myThid ) & cg2dMaxIters, cg2dMinItersNSA, cg2dChkResFreq, cg2dUseMinResSol, & cg2dTargetResidual, cg2dTargetResWunit, & cg2dpcOffDFac, cg2dPreCondFreq, - & cg3dMaxIters, cg3dChkResFreq, + & cg3dMaxIters, cg3dChkResFreq, & cg3dTargetResidual, cg3dTargetResWunit, & useNSACGSolver, useSRCGSolver, printResidualFreq diff --git a/model/src/set_defaults.F b/model/src/set_defaults.F index 5ac6eec11b..ea1b46c703 100644 --- a/model/src/set_defaults.F +++ b/model/src/set_defaults.F @@ -247,13 +247,14 @@ SUBROUTINE SET_DEFAULTS( ENDIF C-- Set (free)surface-related parameters - implicitFreeSurface = .FALSE. rigidLid = .FALSE. + implicitFreeSurface = .FALSE. implicSurfPress = 1. _d 0 implicDiv2DFlow = 1. _d 0 exactConserv = .FALSE. - linFSConserveTr = .FALSE. + solveForDeltaP = .FALSE. uniformLin_PhiSurf = .TRUE. + linFSConserveTr = .FALSE. nonlinFreeSurf = 0 hFacInf = 0.2 _d 0 hFacSup = 2.0 _d 0