<p><b>duda</b> 2011-05-12 14:29:07 -0600 (Thu, 12 May 2011)</p><p>BRANCH COMMIT<br>
<br>
Add two new namelist options, config_nsmterrain and config_smooth_surfaces,<br>
to control the number of smoothing passes applied to the model terrain and to<br>
control whether or not coordinate surfaces are smoothed (through a smoothed hx),<br>
respectively.<br>
<br>
Also, add halo exchanges so that the smoothing of terrain and coordinate<br>
surfaces will work correctly in parallel.<br>
<br>
<br>
M src/core_init_nhyd_atmos/module_test_cases.F<br>
M src/core_init_nhyd_atmos/Registry<br>
M namelist.input.init_nhyd_atmos<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/namelist.input.init_nhyd_atmos
===================================================================
--- branches/atmos_physics/namelist.input.init_nhyd_atmos        2011-05-12 17:45:43 UTC (rev 830)
+++ branches/atmos_physics/namelist.input.init_nhyd_atmos        2011-05-12 20:29:07 UTC (rev 831)
@@ -16,7 +16,9 @@
/
&vertical_grid
- config_ztop = 28000.0
+ config_ztop = 30000.0
+ config_nsmterrain = 2
+ config_smooth_surfaces = .true.
/
&preproc_stages
Modified: branches/atmos_physics/src/core_init_nhyd_atmos/Registry
===================================================================
--- branches/atmos_physics/src/core_init_nhyd_atmos/Registry        2011-05-12 17:45:43 UTC (rev 830)
+++ branches/atmos_physics/src/core_init_nhyd_atmos/Registry        2011-05-12 20:29:07 UTC (rev 831)
@@ -37,6 +37,8 @@
namelist character data_sources config_met_prefix GFS
namelist character data_sources config_init_date 2010-05-26_12
namelist real vertical_grid config_ztop 24000.0
+namelist integer vertical_grid config_nsmterrain 2
+namelist logical vertical_grid config_smooth_surfaces true
namelist logical preproc_stages config_static_interp true
namelist logical preproc_stages config_vertical_grid true
namelist logical preproc_stages config_met_interp true
Modified: branches/atmos_physics/src/core_init_nhyd_atmos/module_test_cases.F
===================================================================
--- branches/atmos_physics/src/core_init_nhyd_atmos/module_test_cases.F        2011-05-12 17:45:43 UTC (rev 830)
+++ branches/atmos_physics/src/core_init_nhyd_atmos/module_test_cases.F        2011-05-12 20:29:07 UTC (rev 831)
@@ -91,7 +91,8 @@
write(0,*) ' real-data GFS test case '
block_ptr => domain % blocklist
do while (associated(block_ptr))
- call nhyd_test_case_gfs(domain % dminfo, block_ptr % mesh, block_ptr % fg, block_ptr % state % time_levs(1) % state, block_ptr % diag, config_test_case)
+ call nhyd_test_case_gfs(domain % dminfo, block_ptr % mesh, block_ptr % fg, block_ptr % state % time_levs(1) % state, &
+ block_ptr % diag, config_test_case, block_ptr % parinfo)
do i=2,nTimeLevs
call copy_state(block_ptr % state % time_levs(i) % state, block_ptr % state % time_levs(1) % state)
end do
@@ -1961,7 +1962,7 @@
end subroutine nhyd_test_case_mtn_wave
- subroutine nhyd_test_case_gfs(dminfo, grid, fg, state, diag, test_case)
+ subroutine nhyd_test_case_gfs(dminfo, grid, fg, state, diag, test_case, parinfo)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Real-data test case using GFS data
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1979,6 +1980,7 @@
type (state_type), intent(inout) :: state
type (diag_type), intent(inout) :: diag
integer, intent(in) :: test_case
+ type (parallel_info), pointer :: parinfo
real (kind=RKIND), parameter :: u0 = 35.0
real (kind=RKIND), parameter :: alpha_grid = 0. ! no grid rotation
@@ -2746,8 +2748,7 @@
! Fourth order smoother for terrain
- nsmterrain = 2
-! nsmterrain = 0 ! NO SMOOTHING WHEN USING GFS TERRAIN HEIGHT DIRECTLY
+ nsmterrain = config_nsmterrain
do i=1,nsmterrain
@@ -2771,6 +2772,11 @@
ter(iCell) = hs(iCell) - 0.125*ter(iCell)
end do
+ call dmpar_exch_halo_field1dReal(dminfo, ter(:), &
+ grid % nCells, &
+ parinfo % cellsToSend, parinfo % cellsToRecv)
+
+
end do
do iCell=1,grid % nCells
@@ -2867,7 +2873,7 @@
! Smoothing algorithm for coordinate surfaces
- smooth = .true.
+ smooth = config_smooth_surfaces
! smooth = .false.
if (smooth) then
@@ -2903,6 +2909,11 @@
hs(iCell) = hs1(iCell) - 0.*hs(iCell)
end do
+
+ call dmpar_exch_halo_field1dReal(dminfo, hs(:), &
+ grid % nCells, &
+ parinfo % cellsToSend, parinfo % cellsToRecv)
+
dzmina = minval(hs(:)-hx(k-1,:))
if (dzmina >= dzmin*(zw(k)-zw(k-1))) then
hx(k,:)=hs(:)
</font>
</pre>