Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split seaSurfacePressure into atmosphericPressure and seaIcePressure #1291

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/mpas-o/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ if ( -e "$CASEROOT/SourceMods/src.mpaso/$STREAM_NAME" ) {
print $stream_file ' <var name="indexSurfaceLayerDepth"/>' . "\n";
print $stream_file ' <var name="surfaceFrictionVelocity"/>' . "\n";
print $stream_file ' <var name="surfaceBuoyancyForcing"/>' . "\n";
print $stream_file ' <var name="seaSurfacePressure"/>' . "\n";
print $stream_file ' <var name="atmosphericPressure"/>' . "\n";
print $stream_file ' <var name="seaIcePressure"/>' . "\n";
print $stream_file ' <var name="frazilLayerThicknessTendency"/>' . "\n";
print $stream_file ' <var_struct name="tracersSurfaceFlux"/>' . "\n";
print $stream_file ' <var name="surfaceStressMagnitude"/>' . "\n";
Expand Down
35 changes: 21 additions & 14 deletions components/mpas-o/driver/ocn_comp_mct.F
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,8 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
seaIceSalinityFluxField, &
riverRunoffFluxField, iceRunoffFluxField, &
shortWaveHeatFluxField, rainFluxField, &
seaSurfacePressureField, iceFractionField, &
windSpeedSquared10mField, &
atmosphericPressureField, iceFractionField, &
seaIcePressureField, windSpeedSquared10mField, &
iceFluxDICField, &
iceFluxDONField, &
iceFluxNO3Field, &
Expand All @@ -1417,8 +1417,8 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
seaIceSalinityFlux, &
riverRunoffFlux, iceRunoffFlux, &
shortWaveHeatFlux, rainFlux, &
seaSurfacePressure, iceFraction, &
windSpeedSquared10m, &
atmosphericPressure, iceFraction, &
seaIcePressure, windSpeedSquared10m, &
iceFluxDIC, &
iceFluxDON, &
iceFluxNO3, &
Expand Down Expand Up @@ -1485,7 +1485,8 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
call mpas_pool_get_field(forcingPool, 'iceRunoffFlux', iceRunoffFluxField)
call mpas_pool_get_field(forcingPool, 'shortWaveHeatFlux', shortWaveHeatFluxField)
call mpas_pool_get_field(forcingPool, 'rainFlux', rainFluxField)
call mpas_pool_get_field(forcingPool, 'seaSurfacePressure', seaSurfacePressureField)
call mpas_pool_get_field(forcingPool, 'atmosphericPressure', atmosphericPressureField)
call mpas_pool_get_field(forcingPool, 'seaIcePressure', seaIcePressureField)
call mpas_pool_get_field(forcingPool, 'iceFraction', iceFractionField)
call mpas_pool_get_field(forcingPool, 'iceRunoffFlux', iceRunoffFluxField)

Expand All @@ -1504,7 +1505,8 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
iceRunoffFlux => iceRunoffFluxField % array
shortWaveHeatFlux => shortWaveHeatFluxField % array
rainFlux => rainFluxField % array
seaSurfacePressure => seaSurfacePressureField % array
atmosphericPressure => atmosphericPressureField % array
seaIcePressure => seaIcePressureField % array
iceFraction => iceFractionField % array
iceRunoffFlux => iceRunoffFluxField % array

Expand Down Expand Up @@ -1607,11 +1609,12 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
if ( rainFluxField % isActive ) then
rainFlux(i) = x2o_o % rAttr(index_x2o_Faxa_rain, n)
end if
if ( seaSurfacePressureField % isActive ) then
! Set seaSurfacePressure to be the sum of atmospheric bottom pressure
! and a limited version of sea ice pressure where it limits it to 5m of pressure
seaSurfacePressure(i) = x2o_o % rAttr(index_x2o_Sa_pbot, n) &
+ min( x2o_o % rAttr(index_x2o_Si_bpress, n), config_density0 * gravity * 5.0_RKIND )
if ( atmosphericPressureField % isActive ) then
atmosphericPressure(i) = x2o_o % rAttr(index_x2o_Sa_pbot, n)
end if
if ( seaIcePressureField % isActive ) then
! Set seaIcePressure to be limited to 5m of pressure
seaIcePressure(i) = min( x2o_o % rAttr(index_x2o_Si_bpress, n), config_density0 * gravity * 5.0_RKIND )
end if
if ( iceFractionField % isActive ) then
iceFraction(i) = x2o_o % rAttr(index_x2o_Si_ifrac, n)
Expand Down Expand Up @@ -1694,7 +1697,8 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
call mpas_pool_get_field(forcingPool, 'iceRunoffFlux', iceRunoffFluxField)
call mpas_pool_get_field(forcingPool, 'shortWaveHeatFlux', shortWaveHeatFluxField)
call mpas_pool_get_field(forcingPool, 'rainFlux', rainFluxField)
call mpas_pool_get_field(forcingPool, 'seaSurfacePressure', seaSurfacePressureField)
call mpas_pool_get_field(forcingPool, 'atmosphericPressure', atmosphericPressureField)
call mpas_pool_get_field(forcingPool, 'seaIcePressure', seaIcePressureField)
call mpas_pool_get_field(forcingPool, 'iceFraction', iceFractionField)
call mpas_pool_get_field(forcingPool, 'iceRunoffFlux', iceRunoffFluxField)

Expand Down Expand Up @@ -1772,8 +1776,11 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
if ( rainFluxField % isActive ) then
call mpas_dmpar_exch_halo_field(rainFluxField)
end if
if ( seaSurfacePressureField % isActive ) then
call mpas_dmpar_exch_halo_field(seaSurfacePressureField)
if ( atmosphericPressureField % isActive ) then
call mpas_dmpar_exch_halo_field(atmosphericPressureField)
end if
if ( seaIcePressureField % isActive ) then
call mpas_dmpar_exch_halo_field(seaIcePressureField)
end if
if ( iceFractionField % isActive ) then
call mpas_dmpar_exch_halo_field(iceFractionField)
Expand Down