<p><b>sprice@lanl.gov</b> 2012-01-10 16:30:39 -0700 (Tue, 10 Jan 2012)</p><p>Branch Commit (land ice): Changes to registry and .F code to sub u w/ unorm and h w/ thck_layer. Not building yet as additional substitutions need to be made still.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice/mpas/src/core_land_ice/Registry
===================================================================
--- branches/land_ice/mpas/src/core_land_ice/Registry        2012-01-10 22:54:27 UTC (rev 1348)
+++ branches/land_ice/mpas/src/core_land_ice/Registry        2012-01-10 23:30:39 UTC (rev 1349)
@@ -127,14 +127,15 @@
var persistent real u_src ( nVertLevels nEdges ) 0 iro u_src mesh - -
% Prognostic variables: read from input, saved in restart, and written to output
-var persistent real u ( nVertLevels nEdges Time ) 2 iro u state - -
-var persistent real h ( nVertLevels nCells Time ) 2 iro h state - -
-var persistent real tracers ( nTracers nVertLevels nCells Time ) 2 iro tracers state - -
+!!!var persistent real u ( nVertLevels nEdges Time ) 2 iro u state - -
+!!!var persistent real h ( nVertLevels nCells Time ) 2 iro h state - -
+!!!var persistent real tracers ( nTracers nVertLevels nCells Time ) 2 iro tracers state - -
% Tendency variables
-var persistent real tend_u ( nVertLevels nEdges Time ) 1 - u tend - -
-var persistent real tend_h ( nVertLevels nCells Time ) 1 - h tend - -
-var persistent real tend_tracers ( nTracers nVertLevels nCells Time ) 1 - tracers tend - -
+!!!var persistent real tend_u ( nVertLevels nEdges Time ) 1 - u tend - -
+var persistent real tend_thck_layer ( nVertLevels nCells Time ) 1 - thck_layer tend - -
+!!!var persistent real tend_tracers ( nTracers nVertLevels nCells Time ) 1 - tracers tend - -
+var persistent real tend_temperature ( nVertLevels nCells Time ) 1 - temperature tend tracers dynamics
% Diagnostic fields: only written to output
var persistent real v ( nVertLevels nEdges Time ) 2 o v state - -
@@ -161,11 +162,16 @@
% Prognostic variables for land-ice model: read from input, saved in restart, and written to output
var persistent real thck ( nCells Time ) 2 iro thck state - -
-var persistent real usrf ( nCells Time ) 2 iro usrf state - -
+var persistent real lsrf ( nCells Time ) 2 iro lsrf state - -
var persistent real beta ( nCells Time ) 2 iro beta state - -
var persistent real temp ( nVertLevels nCells Time ) 2 iro temp state - -
%whl - temp should be nVertLevels + 1?
+!!!var persistent real tracers ( nTracers nVertLevels nCells Time ) 2 iro tracers state - -
+var persistent real thck_layer ( nVertLevels nCells Time ) 2 iro thck_layer state - -
+var persistent real temperature ( nVertLevels nCells Time ) 2 iro temperature state tracers dynamics
% Diagnostic fields for land-ice model: only written to output
var persistent real unorm ( nVertLevels nEdges Time ) 2 iro unorm state - -
+var persistent real usrf ( nCells Time ) 2 iro usrf state - -
+
Modified: branches/land_ice/mpas/src/core_land_ice/mpas_land_ice_global_diagnostics.F
===================================================================
--- branches/land_ice/mpas/src/core_land_ice/mpas_land_ice_global_diagnostics.F        2012-01-10 22:54:27 UTC (rev 1348)
+++ branches/land_ice/mpas/src/core_land_ice/mpas_land_ice_global_diagnostics.F        2012-01-10 23:30:39 UTC (rev 1349)
@@ -48,7 +48,8 @@
! Step 1
! 1. Define the array to integrate, and the variable for the value to be stored in after the integration
real (kind=RKIND), dimension(:), pointer :: areaCell, dcEdge, dvEdge, areaTriangle, h_s, fCell, fEdge
- real (kind=RKIND), dimension(:,:), pointer :: h, u, v, h_edge, &
+!!! real (kind=RKIND), dimension(:,:), pointer :: h, u, v, h_edge, &
+ real (kind=RKIND), dimension(:,:), pointer :: thck_layer, unorm, h_edge, &
!!! pv_edge, pv_vertex, pv_cell, &
h_vertex, weightsOnEdge
@@ -102,9 +103,9 @@
areaEdge = dcEdge(1:nEdgesSolve)*dvEdge(1:nEdgesSolve)
weightsOnEdge => grid % weightsOnEdge % array
- h => state % h % array
- u => state % u % array
- v => state % v % array
+ thck_layer => state % thck_layer % array
+ unorm => state % unorm % array
+!!! v => state % v % array
tracers => state % tracers % array
h_edge => state % h_edge % array
h_vertex => state % h_vertex % array
@@ -158,7 +159,7 @@
! eg. GlobalFluidThickness = Sum(h dA)/Sum(dA), See below for array filling
do iLevel = 1,nVertLevels
! eg. GlobalFluidThickness top (Sum( h dA)) = Sum(cellVolume)
- cellVolume(iLevel,:) = h(iLevel,1:nCellsSolve)*areaCell(1:nCellsSolve)
+ cellVolume(iLevel,:) = thck_layer(iLevel,1:nCellsSolve)*areaCell(1:nCellsSolve)
! eg. GlobalFluidThickness bot (Sum(dA)) = Sum(cellArea)
cellArea(iLevel,:) = areaCell(1:nCellsSolve)
!!! volumeWeightedPotentialVorticity(iLevel,:) = pv_vertex(iLevel,1:nVerticesSolve) &
@@ -170,7 +171,7 @@
!!! *h_edge(iLevel,1:nEdgesSolve)*areaEdge(1:nEdgesSolve)*0.5
!!! volumeWeightedPotentialEnergy(iLevel,:) = gravity*h(iLevel,1:nCellsSolve)*h(iLevel,1:nCellsSolve)*areaCell(1:nCellsSolve)*0.5
!!! volumeWeightedPotentialEnergyTopography(iLevel,:) = gravity*h(iLevel,1:nCellsSolve)*h_s(1:nCellsSolve)*areaCell(1:nCellsSolve)
- refAreaWeightedSurfaceHeight(iLevel,:) = areaCell(1:nCellsSolve)*(h(iLevel,1:nCellsSolve)+h_s(1:nCellsSolve))
+ refAreaWeightedSurfaceHeight(iLevel,:) = areaCell(1:nCellsSolve)*(thck_layer(iLevel,1:nCellsSolve)+h_s(1:nCellsSolve))
do iEdge = 1,nEdgesSolve
q = 0.0
Modified: branches/land_ice/mpas/src/core_land_ice/mpas_land_ice_time_integration.F
===================================================================
--- branches/land_ice/mpas/src/core_land_ice/mpas_land_ice_time_integration.F        2012-01-10 22:54:27 UTC (rev 1348)
+++ branches/land_ice/mpas/src/core_land_ice/mpas_land_ice_time_integration.F        2012-01-10 23:30:39 UTC (rev 1349)
@@ -28,13 +28,13 @@
type (block_type), pointer :: block
- if (trim(config_time_integration) == 'RK4') then
- call land_ice_rk4(domain, dt)
- else
- write(0,*) 'Unknown time integration option '//trim(config_time_integration)
- write(0,*) 'Currently, only ''RK4'' is supported.'
- stop
- end if
+! if (trim(config_time_integration) == 'RK4') then
+! call land_ice_rk4(domain, dt)
+! else
+! write(0,*) 'Unknown time integration option '//trim(config_time_integration)
+! write(0,*) 'Currently, only ''RK4'' is supported.'
+! stop
+! end if
block => domain % blocklist
do while (associated(block))
@@ -84,13 +84,15 @@
block => domain % blocklist
do while (associated(block))
- block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
- block % state % time_levs(2) % state % h % array(:,:) = block % state % time_levs(1) % state % h % array(:,:)
+ block % state % time_levs(2) % state % unorm % array(:,:) = block % state % time_levs(1) % state % unorm % array(:,:)
+
+ block % state % time_levs(2) % state % thck_layer % array(:,:) = block % state % time_levs(1) % state % thck_layer % array(:,:)
+
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) &
- * block % state % time_levs(1) % state % h % array(k,iCell)
+ * block % state % time_levs(1) % state % thck_layer % array(k,iCell)
end do
end do
@@ -149,10 +151,10 @@
block => domain % blocklist
do while (associated(block))
- call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % u % array(:,:), &
- block % mesh % nVertLevels, block % mesh % nEdges, &
- block % parinfo % edgesToSend, block % parinfo % edgesToRecv)
- call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % h % array(:,:), &
+! call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % unorm % array(:,:), &
+! block % mesh % nVertLevels, block % mesh % nEdges, &
+! block % parinfo % edgesToSend, block % parinfo % edgesToRecv)
+ call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % thck_layer % array(:,:), &
block % mesh % nVertLevels, block % mesh % nCells, &
block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
call mpas_dmpar_exch_halo_field3d_real(domain % dminfo, block % tend % tracers % array(:,:,:), &
@@ -166,21 +168,21 @@
if (rk_step < 4) then
block => domain % blocklist
do while (associated(block))
- provis % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:) &
- + rk_substep_weights(rk_step) * block % tend % u % array(:,:)
- provis % h % array(:,:) = block % state % time_levs(1) % state % h % array(:,:) &
- + rk_substep_weights(rk_step) * block % tend % h % array(:,:)
+! provis % unorm % array(:,:) = block % state % time_levs(1) % state % unorm % array(:,:) &
+! + rk_substep_weights(rk_step) * block % tend % unorm % array(:,:)
+ provis % thck_layer % array(:,:) = block % state % time_levs(1) % state % thck_layer % array(:,:) &
+ + rk_substep_weights(rk_step) * block % tend % thck_layer % array(:,:)
do iCell=1,block % mesh % nCells
do k=1,block % mesh % nVertLevels
provis % tracers % array(:,k,iCell) = ( &
- block % state % time_levs(1) % state % h % array(k,iCell) * &
+ block % state % time_levs(1) % state % thck_layer % array(k,iCell) * &
block % state % time_levs(1) % state % tracers % array(:,k,iCell) &
+ rk_substep_weights(rk_step) * block % tend % tracers % array(:,k,iCell) &
- ) / provis % h % array(k,iCell)
+ ) / provis % thck_layer % array(k,iCell)
end do
end do
if (config_test_case == 1) then ! For case 1, wind field should be fixed
- provis % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
+ provis % unorm % array(:,:) = block % state % time_levs(1) % state % unorm % array(:,:)
end if
call land_ice_compute_solve_diagnostics(dt, provis, block % mesh)
block => block % next
@@ -191,10 +193,10 @@
block => domain % blocklist
do while (associated(block))
- block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(2) % state % u % array(:,:) &
- + rk_weights(rk_step) * block % tend % u % array(:,:)
- block % state % time_levs(2) % state % h % array(:,:) = block % state % time_levs(2) % state % h % array(:,:) &
- + rk_weights(rk_step) * block % tend % h % array(:,:)
+! block % state % time_levs(2) % state % unorm % array(:,:) = block % state % time_levs(2) % state % unorm % array(:,:) &
+! + rk_weights(rk_step) * block % tend % unorm % array(:,:)
+ block % state % time_levs(2) % state % thck_layer % array(:,:) = block % state % time_levs(2) % state % thck_layer % array(:,:) &
+ + rk_weights(rk_step) * block % tend % thck_layer % array(:,:)
do iCell=1,block % mesh % nCells
do k=1,block % mesh % nVertLevels
block % state % time_levs(2) % state % tracers % array(:,k,iCell) = &
@@ -220,17 +222,17 @@
do k=1,block % mesh % nVertLevels
block % state % time_levs(2) % state % tracers % array(:,k,iCell) = &
block % state % time_levs(2) % state % tracers % array(:,k,iCell) &
- / block % state % time_levs(2) % state % h % array(k,iCell)
+ / block % state % time_levs(2) % state % thck_layer % array(k,iCell)
end do
end do
if (config_test_case == 1) then ! For case 1, wind field should be fixed
- block % state % time_levs(2) % state % u % array(:,:) = block % state % time_levs(1) % state % u % array(:,:)
+ block % state % time_levs(2) % state % unorm % array(:,:) = block % state % time_levs(1) % state % unorm % array(:,:)
end if
call land_ice_compute_solve_diagnostics(dt, block % state % time_levs(2) % state, block % mesh)
- call mpas_reconstruct(block % mesh, block % state % time_levs(2) % state % u % array, &
+ call mpas_reconstruct(block % mesh, block % state % time_levs(2) % state % unorm% array, &
block % state % time_levs(2) % state % uReconstructX % array, &
block % state % time_levs(2) % state % uReconstructY % array, &
block % state % time_levs(2) % state % uReconstructZ % array, &
@@ -269,7 +271,8 @@
real (kind=RKIND), dimension(:), pointer :: h_s, fVertex, fEdge, dvEdge, dcEdge, areaCell, areaTriangle, &
meshScalingDel2, meshScalingDel4
real (kind=RKIND), dimension(:,:), pointer :: vh, weightsOnEdge, kiteAreasOnVertex, &
- h_edge, h, u, v, tend_h, tend_u, &
+ h_edge, thck_layer, unorm, tend_h, tend_u, &
+!!! h_edge, h, u, v, tend_h, tend_u, &
!!! circulation, vorticity, ke, pv_edge, divergence, &
h_vertex
integer, dimension(:,:), pointer :: cellsOnEdge, cellsOnVertex, verticesOnEdge, edgesOnCell, edgesOnEdge, edgesOnVertex
@@ -286,9 +289,12 @@
real (kind=RKIND) :: ke_edge
- h => s % h % array
- u => s % u % array
- v => s % v % array
+!!! h => s % h % array
+!!! u => s % u % array
+!!! v => s % v % array
+ thck_layer => s % thck_layer % array
+ unorm => s % unorm % array
+
h_edge => s % h_edge % array
!!! circulation => s % circulation % array
!!! vorticity => s % vorticity % array
@@ -315,8 +321,8 @@
fVertex => grid % fVertex % array
fEdge => grid % fEdge % array
- tend_h => tend % h % array
- tend_u => tend % u % array
+ tend_thck_layer => tend % thck_layer % array
+! tend_u => tend % u % array
nCells = grid % nCells
nEdges = grid % nEdges
@@ -338,13 +344,13 @@
cell2 = cellsOnEdge(2,iEdge)
do k=1,nVertLevels
flux = u(k,iEdge) * dvEdge(iEdge) * h_edge(k,iEdge)
- tend_h(k,cell1) = tend_h(k,cell1) - flux
- tend_h(k,cell2) = tend_h(k,cell2) + flux
+ tend_thck_layer(k,cell1) = tend_thck_layer(k,cell1) - flux
+ tend_thck_layer(k,cell2) = tend_thck_layer(k,cell2) + flux
end do
end do
do iCell=1,grid % nCellsSolve
do k=1,nVertLevels
- tend_h(k,iCell) = tend_h(k,iCell) / areaCell(iCell)
+ tend_thck_layer(k,iCell) = tend_thck_layer(k,iCell) / areaCell(iCell)
end do
end do
@@ -419,7 +425,7 @@
!!! u_diffusion = meshScalingDel2(iEdge) * config_h_mom_eddy_visc2 * u_diffusion
!!! tend_u(k,iEdge) = tend_u(k,iEdge) + u_diffusion
!!! end do
-!!! end do
+!!!! end do
!!! end if
!
@@ -453,7 +459,7 @@
! vorticity using </font>
<font color="gray">abla^2 u
!!! delsq_circulation(:,:) = 0.0
-!!! do iEdge=1,nEdges
+!! do iEdge=1,nEdges
!!! vertex1 = verticesOnEdge(1,iEdge)
!!! vertex2 = verticesOnEdge(2,iEdge)
!!! do k=1,nVertLevels
@@ -541,7 +547,6 @@
end subroutine land_ice_compute_tend
-
subroutine land_ice_compute_scalar_tend(tend, s, grid)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
@@ -570,9 +575,9 @@
integer, dimension(:,:), pointer :: cellsOnEdge, boundaryCell
real (kind=RKIND), dimension(:,:,:), pointer :: deriv_two
real (kind=RKIND) :: coef_3rd_order
- real (kind=RKIND), dimension(:,:), pointer :: u, h_edge
+ real (kind=RKIND), dimension(:,:), pointer :: unorm, h_edge
- u => s % u % array
+ unorm => s % unorm % array
h_edge => s % h_edge % array
dcEdge => grid % dcEdge % array
deriv_two => grid % deriv_two % array
@@ -842,7 +847,8 @@
integer :: nCells, nEdges, nVertices, nVertLevels
real (kind=RKIND), dimension(:), pointer :: h_s, fVertex, fEdge, dvEdge, dcEdge, areaCell, areaTriangle
- real (kind=RKIND), dimension(:,:), pointer :: vh, weightsOnEdge, kiteAreasOnVertex, h_edge, h, u, v, tend_h, tend_u, &
+ real (kind=RKIND), dimension(:,:), pointer :: vh, weightsOnEdge, kiteAreasOnVertex, h_edge, thck_layer, unorm, tend_thck_layer, &
+!!! real (kind=RKIND), dimension(:,:), pointer :: vh, weightsOnEdge, kiteAreasOnVertex, h_edge, h, u, v, tend_h, tend_u, &
!!! circulation, vorticity, ke, pv_edge, pv_vertex, pv_cell, &
!!! gradPVn, gradPVt, divergence, vorticity_cell, &
h_vertex
@@ -855,14 +861,14 @@
real (kind=RKIND), dimension(:,:,:), pointer :: deriv_two
real (kind=RKIND) :: coef_3rd_order
- h => s % h % array
- u => s % u % array
- v => s % v % array
+ thck_layer => s % thck_layer % array
+ unorm => s % unorm % array
+!!! v => s % v % array
vh => s % vh % array
h_edge => s % h_edge % array
h_vertex => s % h_vertex % array
- tend_h => s % h % array
- tend_u => s % u % array
+ tend_thck_layer => s % thck_layer % array
+!!! tend_u => s % u % array
!!! circulation => s % circulation % array
!!! vorticity => s % vorticity % array
!!! divergence => s % divergence % array
</font>
</pre>