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

Bugfix in subroutine init_atm_case_mtn_wave regarding parallel execution #1257

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions src/core_init_atmosphere/mpas_init_atm_cases.F
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ subroutine init_atm_setup_case(domain, stream_manager)
call mpas_pool_get_subpool(block_ptr % structs, 'diag', diag)

call mpas_log_write(' calling test case setup ')
call init_atm_case_mtn_wave(mesh, nCells, nVertLevels, state, diag, block_ptr % configs)
call init_atm_case_mtn_wave(domain % dminfo, mesh, nCells, nVertLevels, state, diag, block_ptr % configs)
call decouple_variables(mesh, nCells, nVertLevels, state, diag)
call mpas_log_write(' returned from test case setup ')
block_ptr => block_ptr % next
Expand Down Expand Up @@ -1969,13 +1969,15 @@ end subroutine init_atm_case_squall_line
!----------------------------------------------------------------------------------------------------------


subroutine init_atm_case_mtn_wave(mesh, nCells, nVertLevels, state, diag, configs)
subroutine init_atm_case_mtn_wave(dminfo, mesh, nCells, nVertLevels, state, diag, configs)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Setup baroclinic wave test case from Jablonowski and Williamson 2008 (QJRMS)
! Setup mountain wave test case from Schär et al. (2001): A New Terrain-Following Vertical
! Coordinate Formulation for Atmospheric Prediction Models
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

implicit none

type (dm_info), intent(in) :: dminfo
type (mpas_pool_type), intent(inout) :: mesh
integer, intent(in) :: nCells
integer, intent(in) :: nVertLevels
Expand Down Expand Up @@ -2159,7 +2161,8 @@ subroutine init_atm_case_mtn_wave(mesh, nCells, nVertLevels, state, diag, config
! for hx computation
xa = 5000. !SHP - should be changed based on grid distance
xla = 4000.
xc = maxval (xCell(:))/2.
call mpas_dmpar_max_real(dminfo, maxval(xCell(:)), xc)
xc = xc * 0.5

! metrics for hybrid coordinate and vertical stretching
str = 1.0
Expand Down