From 471b138c3d1f35d53e1363a20951e63eb0563d4a Mon Sep 17 00:00:00 2001 From: Carolyn Begeman Date: Fri, 4 Nov 2022 15:52:16 -0500 Subject: [PATCH] Add tracers to dam break initialization --- .../src/mode_init/mpas_ocn_init_dam_break.F | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/components/mpas-ocean/src/mode_init/mpas_ocn_init_dam_break.F b/components/mpas-ocean/src/mode_init/mpas_ocn_init_dam_break.F index bb86a221d3ce..5a2e3e2c9690 100644 --- a/components/mpas-ocean/src/mode_init/mpas_ocn_init_dam_break.F +++ b/components/mpas-ocean/src/mode_init/mpas_ocn_init_dam_break.F @@ -190,6 +190,8 @@ subroutine ocn_init_setup_dam_break(domain, iErr)!{{{ call mpas_pool_get_subpool(statePool, 'tracers', tracersPool) call mpas_pool_get_dimension(meshPool, 'nVertLevels', nVertLevels) + call mpas_pool_get_dimension(tracersPool, 'index_temperature', index_temperature) + call mpas_pool_get_dimension(tracersPool, 'index_salinity', index_salinity) call mpas_pool_get_dimension(meshPool, 'nCellsSolve', nCellsSolve) call mpas_pool_get_array(meshPool, 'xCell', xCell) call mpas_pool_get_array(meshPool, 'yCell', yCell) @@ -200,6 +202,7 @@ subroutine ocn_init_setup_dam_break(domain, iErr)!{{{ call mpas_pool_get_array(meshPool,'cullCell',cullCell) call mpas_pool_get_array(statePool,'layerThickness',layerThickness,1) + call mpas_pool_get_array(tracersPool, 'activeTracers', activeTracers, 1) call mpas_pool_get_array(statePool,'ssh',ssh,1) call mpas_pool_get_array(verticalMeshPool,'restingThickness',restingThickness) call mpas_pool_get_array(verticalMeshPool,'refZMid',refZMid) @@ -252,6 +255,19 @@ subroutine ocn_init_setup_dam_break(domain, iErr)!{{{ restingThickness(k,iCell) = layerThickness(k,iCell) enddo enddo + ! Set salinity + if ( associated(activeTracers) ) then + do iCell = 1, nCellsSolve + activeTracers(index_salinity, :, iCell) = 30.0_RKIND + end do + end if + + ! Set temperature + if ( associated(activeTracers) ) then + do iCell = 1, nCellsSolve + activeTracers(index_temperature, :, iCell) = 10.0_RKIND + end do + end if ! Determine global min and max values. call mpas_dmpar_min_real(domain % dminfo, yMin, yMinGlobal)