Skip to content

Commit

Permalink
Merge branch 'master' into darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
jahn committed Jun 6, 2024
2 parents d775ee3 + 976081d commit 1e57208
Show file tree
Hide file tree
Showing 219 changed files with 20,199 additions and 9,333 deletions.
40 changes: 26 additions & 14 deletions doc/phys_pkgs/shelfice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ that is different from :math:`\rho_c`, the anomaly is zero.
+----------------------------------------+--------------------------------------------+---------------------------------------------------------------------------------------------------------+
| :varlink:`rhoShelfIce` | 917.0E+00 | (constant) mean density of ice shelf (kg/m\ :sup:`3`) |
+----------------------------------------+--------------------------------------------+---------------------------------------------------------------------------------------------------------+
| :varlink:`SHELFICEsalinity` | 0.0E+00 | (constant) salinity of ice shelf |
+----------------------------------------+--------------------------------------------+---------------------------------------------------------------------------------------------------------+
| :varlink:`SHELFICEheatTransCoeff` | 1.0E-04 | transfer coefficient (exchange velocity) for temperature (m/s) |
+----------------------------------------+--------------------------------------------+---------------------------------------------------------------------------------------------------------+
| :varlink:`SHELFICEsaltTransCoeff` | :varlink:`SHELFICEsaltToHeatRatio` * | transfer coefficient (exchange velocity) for salinity (m/s) |
Expand Down Expand Up @@ -473,19 +475,30 @@ to be substituted into :eq:`hellmersaltbalance`:
\Leftrightarrow 0 &= a_{0}\,(\epsilon_{1} + \epsilon_{3})\,S_{b}^{2}
+ \{ \epsilon_{q} - \epsilon_{2}
- a_{0}\,(\epsilon_{1} + \epsilon_{3})\,S_{I} \}\,S_{b}
+ \epsilon_{2}\,S - \epsilon_{q}\,S_{I}
+ \epsilon_{2}\,S - \epsilon_{q}\,S_{I} \\
\Leftrightarrow 0 &= A\,S_{b}^{2} + B\,S_{b} + C \\
\Rightarrow S_{b} &= \frac{-B \pm \sqrt{ B^{2} - 4AC }}{2A}
\end{aligned}
with the abbrevations

.. math::
\begin{aligned}
\epsilon_{1} &= c_{p} \, \rho_c \, \gamma_{T}, \quad
\epsilon_{2} = \rho_c L \, \gamma_{S}, \quad
\epsilon_{3} = \frac{\rho_{I} \, c_{p,I} \, \kappa}{h}, \quad
\epsilon_{4} = b_{0}p + c_{0}, \\
\epsilon_{q} &= \epsilon_{1}\,(\epsilon_{4} - T)
+ \epsilon_{3}\,(\epsilon_{4} - T_{S}), \\
A &= a_{0}\,(\epsilon_{1} + \epsilon_{3}), \quad
B = \epsilon_{q} - \epsilon_{2} - a_{0}\,(\epsilon_{1} +
\epsilon_{3})\,S_{I}, \quad
C = \epsilon_{2}\,S -\epsilon_{q}\,S_{I}.
\end{aligned}
where the abbrevations
:math:`\epsilon_{1} = c_{p} \, \rho_c \, \gamma_{T}`,
:math:`\epsilon_{2} = \rho_c L \, \gamma_{S}`, :math:`\epsilon_{3} =
\frac{\rho_{I} \, c_{p,I} \, \kappa}{h}`,
:math:`\epsilon_{4}=b_{0}p + c_{0}`,
:math:`\epsilon_{q} = \epsilon_{1}\,(\epsilon_{4} - T) +
\epsilon_{3}\,(\epsilon_{4} - T_{S})` have been introduced. The
quadratic equation in :math:`S_{b}` is solved and the smaller
non-negative root is used. In the MITgcm code, the ice shelf salinity
:math:`S_{I}` is always zero and the quadratic equation simplifies to
The smaller non-negative root of the quadratic equation in :math:`S_{b}` is
used. By default, the ice shelf salinity :math:`S_{I}` is zero and the
quadratic equation simplifies to

.. math::
\begin{aligned}
Expand All @@ -497,9 +510,8 @@ non-negative root is used. In the MITgcm code, the ice shelf salinity
{2\,a_{0}\,(\epsilon_{1} + \epsilon_{3})}
\end{aligned}
With :math:`S_b`, the boundary layer temperature :math:`T_b` and the
melt rate :math:`q` are known through :eq:`hellmerfreeze` and
:eq:`solvedmeltrate`.
With :math:`S_b`, the boundary layer temperature :math:`T_b` and the melt rate
:math:`q` are known through :eq:`hellmerfreeze` and :eq:`solvedmeltrate`.

.. _shelfice_isomip:

Expand Down
50 changes: 50 additions & 0 deletions doc/tag-index
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
Notes on tags used in MITgcmUV
==============================

checkpoint68y (2024/06/05)
o pkg/bling:
- fix bigR setting when option CARBONCHEM_TOTALPHSCALE is defined.
o pkg/steep_icecavity + shelfice:
- new package to be used together with pkg/shelfice to also account for
melting at the vertical faces of a steep ice-shelf interface ;
- allows to use non-zero (but constant) ice-shelf salinity ;
- new FWD and (TAF) AD secondary test exp. (in isomip) using new pkg.
o pkg/bling:
- fix/improve initialization of biomass for the 3 phytoplankton groups ;
- add 2D diagnostics of optically integrated chlorophyll concentration
within local-time window to be compared with satellite observation ;
- improve TAF store directives (reduce recomputations).
o pkg/obcs (tides):
- more efficient implementation of OB barotropic tidal velocity components,
with both Cos & Sin of phase times Amplitude stored in common block ;
- more flexible specification of OB tidal-components (only read-in components
with non-zero tidal period) ;
- allows to specify tangential component of barotropic tidal velocity at OB ;
- rename all OBC tidal component input parameter (period, amplitude and
phase of each OB barotropic tidal velocity component input files) ;
- upgrade OB tidal example (in seaice_obcs/input.tides) with fewer tidal
components (only 4) but including few tangential components.
o verification:
- changing domain decomposition (more tiles) in global_with_exf experiment
(both FWD & AD) and update ref. output ;
- use correct CD-Scheme time-stepping in FWD exp. global_ocean_ebm and update
ref. output ;
- simplify global_ocean.90x40x15/code_ad (undef ALLOW_GENTIM2D_CONTROL,
ALLOW_DIFFKR_CONTROL & ALLOW_3D_DIFFKR); remove kpp from global_oce_latlon
(from both TAF & Tapenade code) ;
- after adjusting new host experiment code, merge forward test:
flt_example --> exp4.with_flt
global_with_exf --> global_ocean_ebm.w_exf
global_with_exf.yearly --> global_ocean_ebm.yearly
natl_box --> lab_sea.natl_box
natl_box.longstep --> lab_sea.longstep
and TAF & Tapenade tests:
global_with_exf --> global_oce_latlon.w_exf
For now, keep original set-up in place and add symbolic links into new
host exp. for input dir and ref. output to run these as secondary test.
o pkg/obcs:
- fix unusual division by zero in all 4 (N,S,E,W) orlanski main S/R.
o pkg/diagnostics:
- new header file "DIAGNOSTICS_P2SHARE.h" (for now, just for useDiag4AdjOutp),
and remove DIAGNOSTICS.h in any src code outside pkg/diagnostics;
- new params "diag_dBugLevel" (default = main model "debugLevel");
- add new arg "seqFlag" to DIAGNOSTICS_SWITCH_ONOFF and DIAGNOSTICS_SUMMARY
and prevent "diagnostics_status" to be overwritten when using ADJ-diags.

checkpoint68x (2024/04/30)
o model/src:
- more precise specific-volume anomaly expression for Ocean in P-coord;
Expand Down
3 changes: 2 additions & 1 deletion model/inc/PARAMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,7 @@ C-- Logical flags for selecting packages
LOGICAL useSEAICE
LOGICAL useSALT_PLUME
LOGICAL useShelfIce
LOGICAL useSTIC
LOGICAL useStreamIce
LOGICAL useICEFRONT
LOGICAL useThSIce
Expand All @@ -1093,7 +1094,7 @@ C-- Logical flags for selecting packages
& useGrdchk, useSMOOTH, usePROFILES, useECCO, useCTRL,
& useSBO, useFLT, useAUTODIFF, useRADTRANS,
& usePTRACERS, useGCHEM, useRBCS, useOffLine, useMATRIX,
& useFRAZIL, useSEAICE, useSALT_PLUME, useShelfIce,
& useFRAZIL, useSEAICE, useSALT_PLUME, useShelfIce, useSTIC,
& useStreamIce, useICEFRONT, useThSIce, useLand,
& useATM2d, useAIM, useAtm_Phys, useFizhi, useGridAlt,
& useDiagnostics, useREGRID, useLayers, useMNC,
Expand Down
29 changes: 22 additions & 7 deletions model/src/do_oceanic_phys.F
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ SUBROUTINE DO_OCEANIC_PHYS(myTime, myIter, myThid)
C |
C |-- OCN_EXPORT_DATA
C |
C |-- STIC_THERMODYNAMICS
C |-- SHELFICE_THERMODYNAMICS
C |
C |-- ICEFRONT_THERMODYNAMICS
Expand Down Expand Up @@ -450,20 +451,34 @@ SUBROUTINE DO_OCEANIC_PHYS(myTime, myIter, myThid)

#ifdef ALLOW_SHELFICE
IF ( useShelfIce .AND. fluidIsWater ) THEN
#ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('SHELFICE_THERMODYNAMICS',myThid)
#endif
#ifdef ALLOW_AUTODIFF_TAMC
CADJ STORE salt, theta = comlev1, key=ikey_dynamics, kind=isbyte
CADJ STORE uvel, vvel = comlev1, key=ikey_dynamics, kind=isbyte
#endif
#ifdef ALLOW_STEEP_ICECAVITY
IF ( useSTIC ) THEN
# ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('STIC_THERMODYNAMICS',myThid)
# endif
C use stic_thermodynamics that includes icefront melt processes
CALL TIMER_START('STIC_THERMODYNAMICS [DO_OCEANIC_PHYS]',myThid)
CALL STIC_THERMODYNAMICS( myTime, myIter, myThid )
CALL TIMER_STOP ('STIC_THERMODYNAMICS [DO_OCEANIC_PHYS]',myThid)
ELSE
#else
IF ( .TRUE. ) THEN
#endif
#ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('SHELFICE_THERMODYNAMICS',myThid)
#endif
C compute temperature and (virtual) salt flux at the
C shelf-ice ocean interface
CALL TIMER_START('SHELFICE_THERMODYNAMICS [DO_OCEANIC_PHYS]',
CALL TIMER_START('SHELFICE_THERMODYNAMICS [DO_OCEANIC_PHYS]',
& myThid)
CALL SHELFICE_THERMODYNAMICS( myTime, myIter, myThid )
CALL TIMER_STOP( 'SHELFICE_THERMODYNAMICS [DO_OCEANIC_PHYS]',
& myThid)
CALL SHELFICE_THERMODYNAMICS( myTime, myIter, myThid )
CALL TIMER_STOP ('SHELFICE_THERMODYNAMICS [DO_OCEANIC_PHYS]',
& myThid)
ENDIF
ENDIF
#endif /* ALLOW_SHELFICE */

Expand Down
2 changes: 1 addition & 1 deletion model/src/forward_step.F
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ SUBROUTINE FORWARD_STEP( iloop, myTime, myIter, myThid )
C-- Switch on/off diagnostics for snap-shot output:
#ifdef ALLOW_DIAGNOSTICS
IF ( useDiagnostics ) THEN
CALL DIAGNOSTICS_SWITCH_ONOFF( myTime, myIter, myThid )
CALL DIAGNOSTICS_SWITCH_ONOFF( 1, myTime, myIter, myThid )
C-- State-variables diagnostics
CALL TIMER_START('DO_STATEVARS_DIAGS [FORWARD_STEP]',myThid)
CALL DO_STATEVARS_DIAGS( myTime, 0, myIter, myThid )
Expand Down
3 changes: 3 additions & 0 deletions model/src/ini_masks_etc.F
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ SUBROUTINE INI_MASKS_ETC( myThid )
I myThid )
ENDIF
#endif /* ALLOW_SHELFICE */
#ifdef ALLOW_STEEP_ICECAVITY
IF ( useSTIC ) CALL STIC_INIT_DEPTHS( myThid )
#endif /* ALLOW_STEEP_ICECAVITY */

IF ( selectSigmaCoord.EQ.0 ) THEN
C--- r-coordinate with partial-cell or full cell mask
Expand Down
5 changes: 5 additions & 0 deletions model/src/packages_boot.F
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ SUBROUTINE PACKAGES_BOOT( myThid )
& useSEAICE,
& useSALT_PLUME,
& useShelfIce,
& useSTIC,
& useStreamIce,
& useICEFRONT,
& useThSIce,
Expand Down Expand Up @@ -146,6 +147,7 @@ SUBROUTINE PACKAGES_BOOT( myThid )
useSEAICE =.FALSE.
useSALT_PLUME =.FALSE.
useShelfIce =.FALSE.
useSTIC =.FALSE.
useStreamIce =.FALSE.
useICEFRONT =.FALSE.
useThSIce =.FALSE.
Expand Down Expand Up @@ -363,6 +365,9 @@ SUBROUTINE PACKAGES_BOOT( myThid )
#ifdef ALLOW_SHELFICE
CALL PACKAGES_PRINT_MSG( useShelfIce, 'ShelfIce', ' ' )
#endif
#ifdef ALLOW_STEEP_ICECAVITY
CALL PACKAGES_PRINT_MSG( useSTIC, 'STEEP_ICECAVITY', ' ' )
#endif
#ifdef ALLOW_STREAMICE
CALL PACKAGES_PRINT_MSG( useStreamIce, 'StreamIce', ' ' )
#endif
Expand Down
9 changes: 9 additions & 0 deletions model/src/packages_check.F
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ SUBROUTINE PACKAGES_CHECK( myThid )
C |
C |-- SHELFICE_CHECK
C |
C |-- STIC_CHECK
C |
C |-- SMOOTH_CHECK
C |
C |-- STREAMICE_CHECK
Expand Down Expand Up @@ -360,6 +362,13 @@ SUBROUTINE PACKAGES_CHECK( myThid )
IF (useShelfIce) CALL PACKAGES_ERROR_MSG('ShelfIce',' ',myThid)
#endif

#ifdef ALLOW_STEEP_ICECAVITY
IF (useSTIC) CALL STIC_CHECK( myThid )
#else
IF (useSTIC) CALL PACKAGES_ERROR_MSG(
& 'STEEP_ICECAVITY','useSTIC=.T.', myThid )
#endif

#ifdef ALLOW_SMOOTH
IF (useSmooth) CALL SMOOTH_CHECK( myThid )
#else
Expand Down
11 changes: 11 additions & 0 deletions model/src/packages_init_fixed.F
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ SUBROUTINE PACKAGES_INIT_FIXED( myThid )
C |
C |-- SHELFICE_INIT_FIXED
C |
C |-- STIC_INIT_FIXED
C |
C |-- ICEFRONT_INIT_FIXED
C |
C |-- FRAZIL_INIT_FIXED
Expand Down Expand Up @@ -473,6 +475,15 @@ SUBROUTINE PACKAGES_INIT_FIXED( myThid )
ENDIF
#endif /* ALLOW_SHELFICE */

#ifdef ALLOW_STEEP_ICECAVITY
IF (useSTIC) THEN
# ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('STIC_INIT_FIXED',myThid)
# endif
CALL STIC_INIT_FIXED( myThid )
ENDIF
#endif /* ALLOW_STEEP_ICECAVITY */

#ifdef ALLOW_SMOOTH
IF (useSMOOTH) THEN
# ifdef ALLOW_DEBUG
Expand Down
21 changes: 21 additions & 0 deletions model/src/packages_init_variables.F
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ SUBROUTINE PACKAGES_INIT_VARIABLES( myThid )
C |
C |-- SHELFICE_INIT_VARIA
C |
C |-- STIC_INIT_VARIA
C |
C |-- ICEFRONT_INIT_VARIA
C |
C |-- FRAZIL_INIT_VARIA
Expand Down Expand Up @@ -149,6 +151,9 @@ SUBROUTINE PACKAGES_INIT_VARIABLES( myThid )
# ifdef ALLOW_SHELFICE
# include "SHELFICE.h"
# endif
# ifdef ALLOW_STEEP_ICECAVITY
# include "STIC.h"
# endif
# ifdef ALLOW_STREAMICE
# include "STREAMICE.h"
# endif
Expand Down Expand Up @@ -404,6 +409,22 @@ SUBROUTINE PACKAGES_INIT_VARIABLES( myThid )
# endif
#endif /* ALLOW_SHELFICE */

#ifdef ALLOW_STEEP_ICECAVITY
# ifdef ALLOW_AUTODIFF
C- Note: use same trick as for pkg/gmredi (call to GMREDI_INIT_VARIA) when
C compiling pkg/autodiff (with IF-statements inside stic_init_varia.F)
# else
IF (useSTIC) THEN
# endif
# ifdef ALLOW_DEBUG
IF (debugMode) CALL DEBUG_CALL('STIC_INIT_VARIA',myThid)
# endif
CALL STIC_INIT_VARIA( myThid )
# ifndef ALLOW_AUTODIFF
ENDIF
# endif
#endif /* ALLOW_STEEP_ICECAVITY */

#ifdef ALLOW_ICEFRONT
IF (useICEFRONT) THEN
# ifdef ALLOW_DEBUG
Expand Down
7 changes: 7 additions & 0 deletions model/src/packages_readparms.F
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ SUBROUTINE PACKAGES_READPARMS(myThid)
C |
C |-- SHELFICE_READPARMS
C |
C |-- STIC_READPARMS
C |
C |-- ICEFRONT_READPARMS
C |
C |-- SEAICE_READPARMS
Expand Down Expand Up @@ -290,6 +292,11 @@ SUBROUTINE PACKAGES_READPARMS(myThid)
CALL SHELFICE_READPARMS( myThid )
#endif

#ifdef ALLOW_STEEP_ICECAVITY
C-- if useSTIC=T, set STEEP_ICECAVITY parameters; otherwise just return
CALL STIC_READPARMS( myThid )
#endif

#ifdef ALLOW_ICEFRONT
C-- if useICEFRONT=T, set ICEFRONT parameters; otherwise just return
CALL ICEFRONT_READPARMS( myThid )
Expand Down
5 changes: 5 additions & 0 deletions model/src/the_main_loop.F
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,11 @@ SUBROUTINE THE_MAIN_LOOP( myTime, myIter, myThid )
# endif
# endif /* ALLOW_THSICE */
c--
# ifdef ALLOW_STEEP_ICECAVITY
CADJ INIT comlev1_stic_bibj_ijk = COMMON,
CADJ & nchklev_1*nSx*nSy*Nr*(2*OLy+sNy)*(2*OLx+sNx)
# endif
c--
# ifdef ALLOW_STREAMICE
CADJ INIT comlev1_stream_nl = COMMON,nchklev_1*streamice_max_nl
CADJ INIT comlev1_stream_front = COMMON,nchklev_1*4
Expand Down
16 changes: 13 additions & 3 deletions pkg/autodiff/adcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,21 @@ C Special Care: more forward vars in FWD common block ; check TAF AD-code !
_RL adshelficemass (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL adshicdragfld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL adshidragquadfld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
COMMON /adSHELFICE_FIELDS_RL/ adshelficemass,
& adshelficeforcingt, adshelficeforcings,
& adshicdragfld, adshidragquadfld

# ifdef ALLOW_SHITRANSCOEFF_3D
COMMON /adSHELFICE_GAMMA3D_RL/
& adshitranscoefft3d, adshitranscoeffs3d
_RL adshitranscoeffs3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
_RL adshitranscoefft3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
# else
COMMON /adSHELFICE_GAMMA_RL/
& adshitranscoefft, adshitranscoeffs
_RL adshitranscoeffs (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
_RL adshitranscoefft (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
COMMON /adSHELFICE_FIELDS_RL/ adshelficemass,
& adshelficeforcingt, adshelficeforcings, adshitranscoefft,
& adshitranscoeffs, adshicdragfld, adshidragquadfld
# endif
#endif

#endif /* ALLOW_AUTODIFF_MONITOR */
Loading

0 comments on commit 1e57208

Please sign in to comment.