Skip to content

Commit

Permalink
Merge branch 'hotfix_v3.2'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
douglasjacobsen committed Dec 17, 2014
2 parents c5c6ae2 + 969756a commit 6f438f6
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MPAS-v3.1
MPAS-v3.2
====

The Model for Prediction Across Scales (MPAS) is a collaborative project for
Expand Down
2 changes: 1 addition & 1 deletion src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="atmosphere" version="3.1">
<registry model="mpas" core="atmosphere" version="3.2">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down
2 changes: 1 addition & 1 deletion src/core_init_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="init_atmosphere" version="3.1">
<registry model="mpas" core="init_atmosphere" version="3.2">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down
2 changes: 1 addition & 1 deletion src/core_landice/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="landice" version="3.1">
<registry model="mpas" core="landice" version="3.2">


<!-- ======================================================================= -->
Expand Down
2 changes: 1 addition & 1 deletion src/core_ocean/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="ocean" version="3.1">
<registry model="mpas" core="ocean" version="3.2">

<dims>
<dim name="nCells" units="unitless"
Expand Down
5 changes: 3 additions & 2 deletions src/core_ocean/mode_forward/mpas_ocn_mpas_core.F
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ subroutine mpas_core_init(domain, stream_manager, startTimeStamp)!{{{
call MPAS_stream_mgr_read(stream_manager, streamID='input', ierr=err)
end if
call mpas_stream_mgr_reset_alarms(stream_manager, streamID='input', ierr=err)
call MPAS_stream_mgr_reset_alarms(stream_manager, streamID='restart', ierr=err)
call mpas_stream_mgr_reset_alarms(stream_manager, streamID='restart', ierr=err)
call mpas_stream_mgr_reset_alarms(stream_manager, direction=MPAS_STREAM_OUTPUT, ierr=err)

! Initialize submodules before initializing blocks.
call ocn_timestep_init(err)
Expand Down Expand Up @@ -932,7 +933,7 @@ subroutine mpas_core_setup_packages(configPool, packagePool, ierr)!{{{
frazilIceActive = .true.
end if

if (config_pressure_gradient_type.eq.'common_level_eos') then
if (config_pressure_gradient_type.eq.'Jacobian_from_TS') then
inSituEOSActive = .true.
end if

Expand Down
30 changes: 22 additions & 8 deletions src/core_ocean/mode_forward/mpas_ocn_time_integration_rk4.F
Original file line number Diff line number Diff line change
Expand Up @@ -401,17 +401,31 @@ subroutine ocn_time_integrator_rk4(domain, dt)!{{{
call mpas_pool_get_array(provisStatePool, 'highFreqThickness', highFreqThicknessProvis, 1)

! advection of u uses u, while advection of layerThickness and tracers use normalTransportVelocity.
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur,layerThicknessEdge, normalVelocityProvis, &
sshCur, highFreqThicknessProvis, rk_substep_weights(rk_step), &
vertAleTransportTop, err)
if (associated(highFreqThicknessProvis)) then
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur,layerThicknessEdge, normalVelocityProvis, &
sshCur, rk_substep_weights(rk_step), &
vertAleTransportTop, err, highFreqThicknessProvis)
else
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur,layerThicknessEdge, normalVelocityProvis, &
sshCur, rk_substep_weights(rk_step), &
vertAleTransportTop, err)
endif

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

call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
sshCur, highFreqThicknessProvis, rk_substep_weights(rk_step), &
vertAleTransportTop, err)
if (associated(highFreqThicknessProvis)) then
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
sshCur, rk_substep_weights(rk_step), &
vertAleTransportTop, err, highFreqThicknessProvis)
else
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
sshCur, rk_substep_weights(rk_step), &
vertAleTransportTop, err)
endif

call ocn_tend_thick(tendPool, forcingPool, diagnosticsPool, meshPool)

Expand Down
24 changes: 18 additions & 6 deletions src/core_ocean/mode_forward/mpas_ocn_time_integration_split.F
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,15 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
! compute vertAleTransportTop. Use u (rather than normalTransportVelocity) for momentum advection.
! Use the most recent time level available.
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalVelocityCur, &
sshCur, highFreqThicknessNew, dt, vertAleTransportTop, err)
if (associated(highFreqThicknessNew)) then
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalVelocityCur, &
sshCur, dt, vertAleTransportTop, err, highFreqThicknessNew)
else
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalVelocityCur, &
sshCur, dt, vertAleTransportTop, err)
endif
call ocn_tend_vel(tendPool, statePool, forcingPool, diagnosticsPool, meshPool, scratchPool, stage1_tend_time)
Expand Down Expand Up @@ -1178,9 +1184,15 @@ subroutine ocn_time_integrator_split(domain, dt)!{{{
! compute vertAleTransportTop. Use normalTransportVelocity for advection of layerThickness and tracers.
! Use time level 1 values of layerThickness and layerThicknessEdge because
! layerThickness has not yet been computed for time level 2.
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
sshCur, highFreqThicknessNew, dt, vertAleTransportTop, err)
if (associated(highFreqThicknessNew)) then
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
sshCur, dt, vertAleTransportTop, err, highFreqThicknessNew)
else
call ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, &
layerThicknessCur, layerThicknessEdge, normalTransportVelocity, &
sshCur, dt, vertAleTransportTop, err)
endif

call ocn_tend_thick(tendPool, forcingPool, diagnosticsPool, meshPool)

Expand Down
12 changes: 8 additions & 4 deletions src/core_ocean/shared/mpas_ocn_diagnostics.F
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ subroutine ocn_diagnostic_solve(dt, statePool, forcingPool, meshPool, diagnostic
call mpas_timer_start("equation of state", .false., diagEOSTimer)

! compute in-place density
if (config_pressure_gradient_type.eq.'common_level_eos') then
if (config_pressure_gradient_type.eq.'Jacobian_from_TS') then
! only compute EOS derivatives if needed.
call mpas_pool_get_array(diagnosticsPool, 'inSituThermalExpansionCoeff',inSituThermalExpansionCoeff)
call mpas_pool_get_array(diagnosticsPool, 'inSituSalineContractionCoeff', inSituSalineContractionCoeff)
Expand Down Expand Up @@ -697,7 +697,7 @@ end subroutine ocn_diagnostic_solve!}}}
!
!-----------------------------------------------------------------------
subroutine ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, oldLayerThickness, layerThicknessEdge, &
normalVelocity, oldSSH, newHighFreqThickness, dt, vertAleTransportTop, err)!{{{
normalVelocity, oldSSH, dt, vertAleTransportTop, err, newHighFreqThickness)!{{{

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

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

real (kind=RKIND), intent(in) :: &
Expand Down Expand Up @@ -807,7 +807,11 @@ subroutine ocn_vert_transport_velocity_top(meshPool, verticalMeshPool, oldLayerT
!
! Compute desired thickness at new time
!
call ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, newHighFreqThickness, dt, ALE_thickness, err)
if (present(newHighFreqThickness)) then
call ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, dt, ALE_thickness, err, newHighFreqThickness)
else
call ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, dt, ALE_thickness, err)
endif

!
! Vertical transport through layer interfaces
Expand Down
2 changes: 1 addition & 1 deletion src/core_ocean/shared/mpas_ocn_tendency.F
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ subroutine ocn_tend_vel(tendPool, statePool, forcingPool, diagnosticsPool, meshP
! velocity tendency: pressure gradient
!
call mpas_timer_start("pressure grad", .false., velPgradTimer)
if (config_pressure_gradient_type.eq.'common_level_eos') then
if (config_pressure_gradient_type.eq.'Jacobian_from_TS') then
! only pass EOS derivatives if needed.
call mpas_pool_get_array(diagnosticsPool, 'inSituThermalExpansionCoeff',inSituThermalExpansionCoeff)
call mpas_pool_get_array(diagnosticsPool, 'inSituSalineContractionCoeff', inSituSalineContractionCoeff)
Expand Down
4 changes: 2 additions & 2 deletions src/core_ocean/shared/mpas_ocn_thick_ale.F
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module ocn_thick_ale
!> (z-tilde), and imposes a minimum layer thickness.
!
!-----------------------------------------------------------------------
subroutine ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, newHighFreqThickness, dt, ALE_thickness, err)!{{{
subroutine ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, dt, ALE_thickness, err, newHighFreqThickness)!{{{

!-----------------------------------------------------------------
!
Expand All @@ -87,7 +87,7 @@ subroutine ocn_ALE_thickness(meshPool, verticalMeshPool, oldSSH, div_hu_btr, new
oldSSH, &!< Input: sea surface height at old time
div_hu_btr !< Input: thickness-weighted barotropic divergence

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

real (kind=RKIND), intent(in) :: &
Expand Down
2 changes: 1 addition & 1 deletion src/core_sw/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="sw" version="3.1">
<registry model="mpas" core="sw" version="3.2">
<dims>
<dim name="nCells"/>
<dim name="nEdges"/>
Expand Down

0 comments on commit 6f438f6

Please sign in to comment.