<p><b>ringler@lanl.gov</b> 2011-05-10 12:38:01 -0600 (Tue, 10 May 2011)</p><p><br>
write out each term in the pv evolution equation (advection, dissipation, forcing, drag)<br>
</p><hr noshade><pre><font color="gray">Modified: branches/pv_based_swm/mpas/src/core_pvsw/Registry
===================================================================
--- branches/pv_based_swm/mpas/src/core_pvsw/Registry        2011-05-10 15:55:23 UTC (rev 824)
+++ branches/pv_based_swm/mpas/src/core_pvsw/Registry        2011-05-10 18:38:01 UTC (rev 825)
@@ -141,6 +141,10 @@
var persistent real tend_tracers ( nTracers nVertLevels nCells Time ) 1 - tracers tend - -
var persistent real tend_pv ( nVertLevels nCells Time ) 1 - pv tend - -
var persistent real tend_div ( nVertLevels nCells Time ) 1 - div tend - -
+var persistent real tend_pv_advection ( nVertLevels nCells Time ) 1 - pv_advection tend - -
+var persistent real tend_pv_dissipation ( nVertLevels nCells Time ) 1 - pv_dissipation tend - -
+var persistent real tend_pv_forcing ( nVertLevels nCells Time ) 1 - pv_forcing tend - -
+var persistent real tend_pv_drag ( nVertLevels nCells Time ) 1 - pv_drag tend - -
# Diagnostic fields: only written to output
var persistent real v ( nVertLevels nEdges Time ) 2 - v state - -
@@ -152,3 +156,9 @@
var persistent real uReconstructZ ( nVertLevels nCells Time ) 2 - uReconstructZ state - -
var persistent real uReconstructZonal ( nVertLevels nCells Time ) 2 o uReconstructZonal state - -
var persistent real uReconstructMeridional ( nVertLevels nCells Time ) 2 o uReconstructMeridional state - -
+var persistent real dvordt ( nVertLevels nCells Time ) 2 o dvordt state - -
+var persistent real pv_advection ( nVertLevels nCells Time ) 2 o pv_advection state - -
+var persistent real pv_dissipation ( nVertLevels nCells Time ) 2 o pv_dissipation state - -
+var persistent real pv_forcing ( nVertLevels nCells Time ) 2 o pv_forcing state - -
+var persistent real pv_drag ( nVertLevels nCells Time ) 2 o pv_drag state - -
+
Modified: branches/pv_based_swm/mpas/src/core_pvsw/module_poisson_solver.F
===================================================================
--- branches/pv_based_swm/mpas/src/core_pvsw/module_poisson_solver.F        2011-05-10 15:55:23 UTC (rev 824)
+++ branches/pv_based_swm/mpas/src/core_pvsw/module_poisson_solver.F        2011-05-10 18:38:01 UTC (rev 825)
@@ -7,7 +7,7 @@
implicit none
- real (KIND=RKIND), parameter :: threshold = 1.0e-9
+ real (KIND=RKIND), parameter :: threshold = 1.0e-10
integer, parameter :: nIterPerGS = 2, nCheckPoisson = 25, nQuitPoisson = 5000
private
Modified: branches/pv_based_swm/mpas/src/core_pvsw/module_time_integration.F
===================================================================
--- branches/pv_based_swm/mpas/src/core_pvsw/module_time_integration.F        2011-05-10 15:55:23 UTC (rev 824)
+++ branches/pv_based_swm/mpas/src/core_pvsw/module_time_integration.F        2011-05-10 18:38:01 UTC (rev 825)
@@ -96,6 +96,11 @@
block % state % time_levs(2) % state % psi % array(:,:) = block % state % time_levs(1) % state % psi % array(:,:)
block % state % time_levs(2) % state % chi % array(:,:) = block % state % time_levs(1) % state % chi % array(:,:)
+ block % state % time_levs(2) % state % pv_advection % array(:,:) = 0.0
+ block % state % time_levs(2) % state % pv_dissipation % array(:,:) = 0.0
+ block % state % time_levs(2) % state % pv_forcing % array(:,:) = 0.0
+ block % state % time_levs(2) % state % pv_drag % array(:,:) = 0.0
+
do iCell=1,block % mesh % nCells ! couple tracers to h
do k=1,block % mesh % nVertLevels
block % state % time_levs(2) % state % tracers % array(:,k,iCell) = block % state % time_levs(1) % state % tracers % array(:,k,iCell) &
@@ -237,6 +242,18 @@
block % state % time_levs(2) % state % tracers % array(:,k,iCell) = &
block % state % time_levs(2) % state % tracers % array(:,k,iCell) &
+ rk_weights(rk_step) * block % tend % tracers % array(:,k,iCell)
+ block % state % time_levs(2) % state % pv_advection % array(k,iCell) = &
+ block % state % time_levs(2) % state % pv_advection % array(k,iCell) &
+ + rk_weights(rk_step) * block % tend % pv_advection % array(k,iCell) / dt
+ block % state % time_levs(2) % state % pv_dissipation % array(k,iCell) = &
+ block % state % time_levs(2) % state % pv_dissipation % array(k,iCell) &
+ + rk_weights(rk_step) * block % tend % pv_dissipation % array(k,iCell) / dt
+ block % state % time_levs(2) % state % pv_forcing % array(k,iCell) = &
+ block % state % time_levs(2) % state % pv_forcing % array(k,iCell) &
+ + rk_weights(rk_step) * block % tend % pv_forcing % array(k,iCell) / dt
+ block % state % time_levs(2) % state % pv_drag % array(k,iCell) = &
+ block % state % time_levs(2) % state % pv_drag % array(k,iCell) &
+ + rk_weights(rk_step) * block % tend % pv_drag % array(k,iCell) / dt
end do
end do
block => block % next
@@ -244,6 +261,7 @@
call timer_stop("increment prognostic")
end do
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! END RK loop
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -301,6 +319,14 @@
call deallocate_state(provis)
+! save the time-tendency of vorticity based on new and old time levels
+ block => domain % blocklist
+ do while (associated(block))
+ block % state % time_levs(2) % state % dvordt % array(:,:) =(block % state % time_levs(2) % state % vor % array (:,:) - &
+ block % state % time_levs(1) % state % vor % array (:,:)) / dt
+ block => block % next
+ end do
+
end subroutine rk4
@@ -416,6 +442,7 @@
real (kind=RKIND) :: d2fdx2_cell1, d2fdx2_cell2
real (kind=RKIND), dimension(:), pointer :: dvEdge, dcEdge, areaCell
real (kind=RKIND), dimension(:,:,:), pointer :: tracers, tracer_tend
+ real (kind=RKIND), dimension(:,:), pointer :: tend_pv_advection, tend_pv_dissipation, tend_pv_forcing, tend_pv_drag
integer, dimension(:,:), pointer :: cellsOnEdge, boundaryCell
real (kind=RKIND), dimension(:,:,:), pointer :: deriv_two
real (kind=RKIND) :: coef_3rd_order
@@ -432,6 +459,10 @@
boundaryEdge=> grid % boundaryEdge % array
areaCell => grid % areaCell % array
tracer_tend => tend % tracers % array
+ tend_pv_advection => tend % pv_advection % array
+ tend_pv_dissipation => tend % pv_dissipation % array
+ tend_pv_forcing => tend % pv_forcing % array
+ tend_pv_drag => tend % pv_drag % array
coef_3rd_order = 0.
if (config_tracer_adv_order == 3) coef_3rd_order = 1.0
@@ -565,6 +596,13 @@
endif ! if (config_tracer_adv_order == 2 )
+ ! store PV advection term (assumes that tracer_tend only holds advection at this point)
+ do iCell = 1,grid%nCells
+ do k=1,grid % nVertLevels
+ tend_pv_advection(k,iCell) = tracer_tend(1,k,iCell)
+ enddo
+ enddo
+
!
! tracer tendency: del2 horizontal tracer diffusion, div(h \kappa_2 </font>
<font color="gray">abla \phi)
!
@@ -667,6 +705,29 @@
end if
+ ! store PV dissipation term
+ do iCell = 1,grid%nCells
+ do k=1,grid % nVertLevels
+ tend_pv_dissipation(k,iCell) = tracer_tend(1,k,iCell) - tend_pv_advection(k,iCell)
+ enddo
+ enddo
+
+
+ ! store PV forcing term
+ do iCell = 1,grid%nCells
+ do k=1,grid % nVertLevels
+ tend_pv_forcing(k,iCell) = tracer_tend(1,k,iCell) - tend_pv_advection(k,iCell) - tend_pv_dissipation(k,iCell)
+ enddo
+ enddo
+
+ ! store PV drag term
+ do iCell = 1,grid%nCells
+ do k=1,grid % nVertLevels
+ tend_pv_drag(k,iCell) = tracer_tend(1,k,iCell) - tend_pv_advection(k,iCell) - tend_pv_dissipation(k,iCell) - tend_pv_forcing(k,iCell)
+ enddo
+ enddo
+
+
end subroutine compute_scalar_tend
</font>
</pre>