Skip to content

Commit 6f438f6

Browse files
Merge branch 'hotfix_v3.2'
This merge introduces three fixes for the ocean core, which are listed below. * hotfix_v3.2: Updating version number to 3.2 Fix unitialized pointer bug. Update common_level_eos to Jacobian_from_TS. Reset output alarms on initialization
2 parents c5c6ae2 + 969756a commit 6f438f6

File tree

12 files changed

+60
-29
lines changed

12 files changed

+60
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MPAS-v3.1
1+
MPAS-v3.2
22
====
33

44
The Model for Prediction Across Scales (MPAS) is a collaborative project for

src/core_atmosphere/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="atmosphere" version="3.1">
2+
<registry model="mpas" core="atmosphere" version="3.2">
33

44
<!-- **************************************************************************************** -->
55
<!-- ************************************** Dimensions ************************************** -->

src/core_init_atmosphere/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="init_atmosphere" version="3.1">
2+
<registry model="mpas" core="init_atmosphere" version="3.2">
33

44
<!-- **************************************************************************************** -->
55
<!-- ************************************** Dimensions ************************************** -->

src/core_landice/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="landice" version="3.1">
2+
<registry model="mpas" core="landice" version="3.2">
33

44

55
<!-- ======================================================================= -->

src/core_ocean/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="ocean" version="3.1">
2+
<registry model="mpas" core="ocean" version="3.2">
33

44
<dims>
55
<dim name="nCells" units="unitless"

src/core_ocean/mode_forward/mpas_ocn_mpas_core.F

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ subroutine mpas_core_init(domain, stream_manager, startTimeStamp)!{{{
156156
call MPAS_stream_mgr_read(stream_manager, streamID='input', ierr=err)
157157
end if
158158
call mpas_stream_mgr_reset_alarms(stream_manager, streamID='input', ierr=err)
159-
call MPAS_stream_mgr_reset_alarms(stream_manager, streamID='restart', ierr=err)
159+
call mpas_stream_mgr_reset_alarms(stream_manager, streamID='restart', ierr=err)
160+
call mpas_stream_mgr_reset_alarms(stream_manager, direction=MPAS_STREAM_OUTPUT, ierr=err)
160161

161162
! Initialize submodules before initializing blocks.
162163
call ocn_timestep_init(err)
@@ -932,7 +933,7 @@ subroutine mpas_core_setup_packages(configPool, packagePool, ierr)!{{{
932933
frazilIceActive = .true.
933934
end if
934935

935-
if (config_pressure_gradient_type.eq.'common_level_eos') then
936+
if (config_pressure_gradient_type.eq.'Jacobian_from_TS') then
936937
inSituEOSActive = .true.
937938
end if
938939

src/core_ocean/mode_forward/mpas_ocn_time_integration_rk4.F

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -401,17 +401,31 @@ subroutine ocn_time_integrator_rk4(domain, dt)!{{{
401401
call mpas_pool_get_array(provisStatePool, 'highFreqThickness', highFreqThicknessProvis, 1)
402402

403403
! advection of u uses u, while advection of layerThickness and tracers use normalTransportVelocity.
404-
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
405-
layerThicknessCur,layerThicknessEdge, normalVelocityProvis, &
406-
sshCur, highFreqThicknessProvis, rk_substep_weights(rk_step), &
407-
vertAleTransportTop, err)
404+
if (associated(highFreqThicknessProvis)) then
405+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
406+
layerThicknessCur,layerThicknessEdge, normalVelocityProvis, &
407+
sshCur, rk_substep_weights(rk_step), &
408+
vertAleTransportTop, err, highFreqThicknessProvis)
409+
else
410+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
411+
layerThicknessCur,layerThicknessEdge, normalVelocityProvis, &
412+
sshCur, rk_substep_weights(rk_step), &
413+
vertAleTransportTop, err)
414+
endif
408415

409416
call ocn_tend_vel(tendPool, provisStatePool, forcingPool, diagnosticsPool, meshPool, scratchPool, 1)
410417

411-
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
412-
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
413-
sshCur, highFreqThicknessProvis, rk_substep_weights(rk_step), &
414-
vertAleTransportTop, err)
418+
if (associated(highFreqThicknessProvis)) then
419+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
420+
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
421+
sshCur, rk_substep_weights(rk_step), &
422+
vertAleTransportTop, err, highFreqThicknessProvis)
423+
else
424+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
425+
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
426+
sshCur, rk_substep_weights(rk_step), &
427+
vertAleTransportTop, err)
428+
endif
415429

416430
call ocn_tend_thick(tendPool, forcingPool, diagnosticsPool, meshPool)
417431

src/core_ocean/mode_forward/mpas_ocn_time_integration_split.F

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,15 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
420420
421421
! compute vertAleTransportTop. Use u (rather than normalTransportVelocity) for momentum advection.
422422
! Use the most recent time level available.
423-
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
424-
layerThicknessCur, layerThicknessEdge, normalVelocityCur, &
425-
sshCur, highFreqThicknessNew, dt, vertAleTransportTop, err)
423+
if (associated(highFreqThicknessNew)) then
424+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
425+
layerThicknessCur, layerThicknessEdge, normalVelocityCur, &
426+
sshCur, dt, vertAleTransportTop, err, highFreqThicknessNew)
427+
else
428+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
429+
layerThicknessCur, layerThicknessEdge, normalVelocityCur, &
430+
sshCur, dt, vertAleTransportTop, err)
431+
endif
426432
427433
call ocn_tend_vel(tendPool, statePool, forcingPool, diagnosticsPool, meshPool, scratchPool, stage1_tend_time)
428434
@@ -1178,9 +1184,15 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
11781184
! compute vertAleTransportTop. Use normalTransportVelocity for advection of layerThickness and tracers.
11791185
! Use time level 1 values of layerThickness and layerThicknessEdge because
11801186
! layerThickness has not yet been computed for time level 2.
1181-
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
1182-
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
1183-
sshCur, highFreqThicknessNew, dt, vertAleTransportTop, err)
1187+
if (associated(highFreqThicknessNew)) then
1188+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
1189+
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
1190+
sshCur, dt, vertAleTransportTop, err, highFreqThicknessNew)
1191+
else
1192+
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
1193+
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
1194+
sshCur, dt, vertAleTransportTop, err)
1195+
endif
11841196

11851197
call ocn_tend_thick(tendPool, forcingPool, diagnosticsPool, meshPool)
11861198

src/core_ocean/shared/mpas_ocn_diagnostics.F

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, diagnostic
471471
call mpas_timer_start("equation of state", .false., diagEOSTimer)
472472

473473
! compute in-place density
474-
if (config_pressure_gradient_type.eq.'common_level_eos') then
474+
if (config_pressure_gradient_type.eq.'Jacobian_from_TS') then
475475
! only compute EOS derivatives if needed.
476476
call mpas_pool_get_array(diagnosticsPool, 'inSituThermalExpansionCoeff',inSituThermalExpansionCoeff)
477477
call mpas_pool_get_array(diagnosticsPool, 'inSituSalineContractionCoeff', inSituSalineContractionCoeff)
@@ -697,7 +697,7 @@ end subroutine ocn_diagnostic_solve!}}}
697697
!
698698
!-----------------------------------------------------------------------
699699
subroutine ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, oldLayerThickness, layerThicknessEdge, &
700-
normalVelocity, oldSSH, newHighFreqThickness, dt, vertAleTransportTop, err)!{{{
700+
normalVelocity, oldSSH, dt, vertAleTransportTop, err, newHighFreqThickness)!{{{
701701

702702
!-----------------------------------------------------------------
703703
!
@@ -723,7 +723,7 @@ subroutine ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, oldLayerT
723723
real (kind=RKIND), dimension(:), intent(in) :: &
724724
oldSSH !< Input: sea surface height at old time
725725

726-
real (kind=RKIND), dimension(:,:), intent(in) :: &
726+
real (kind=RKIND), dimension(:,:), intent(in), optional :: &
727727
newHighFreqThickness !< Input: high frequency thickness. Alters ALE thickness.
728728

729729
real (kind=RKIND), intent(in) :: &
@@ -807,7 +807,11 @@ subroutine ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, oldLayerT
807807
!
808808
! Compute desired thickness at new time
809809
!
810-
call ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, newHighFreqThickness, dt, ALE_thickness, err)
810+
if (present(newHighFreqThickness)) then
811+
call ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, dt, ALE_thickness, err, newHighFreqThickness)
812+
else
813+
call ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, dt, ALE_thickness, err)
814+
endif
811815

812816
!
813817
! Vertical transport through layer interfaces

src/core_ocean/shared/mpas_ocn_tendency.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ subroutine ocn_tend_vel(tendPool, statePool, forcingPool, diagnosticsPool, meshP
265265
! velocity tendency: pressure gradient
266266
!
267267
call mpas_timer_start("pressure grad", .false., velPgradTimer)
268-
if (config_pressure_gradient_type.eq.'common_level_eos') then
268+
if (config_pressure_gradient_type.eq.'Jacobian_from_TS') then
269269
! only pass EOS derivatives if needed.
270270
call mpas_pool_get_array(diagnosticsPool, 'inSituThermalExpansionCoeff',inSituThermalExpansionCoeff)
271271
call mpas_pool_get_array(diagnosticsPool, 'inSituSalineContractionCoeff', inSituSalineContractionCoeff)

0 commit comments

Comments
 (0)