Skip to content

Commit

Permalink
new logical run-time param "solveForDeltaP"
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-c committed Dec 26, 2024
1 parent f74dcfd commit e523db8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
25 changes: 14 additions & 11 deletions model/inc/PARAMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions model/src/config_summary.F
Original file line number Diff line number Diff line change
Expand Up @@ -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 */')
Expand Down
6 changes: 3 additions & 3 deletions model/src/ini_parms.F
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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

Expand Down
5 changes: 3 additions & 2 deletions model/src/set_defaults.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e523db8

Please sign in to comment.