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

Add tracers to dam break initialization #33

Closed
Closed
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
16 changes: 16 additions & 0 deletions components/mpas-ocean/src/mode_init/mpas_ocn_init_dam_break.F
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down