<p><b>mpetersen@lanl.gov</b> 2012-02-16 16:32:25 -0700 (Thu, 16 Feb 2012)</p><p>Added ztilde to Split Explicit timestepping.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ztilde/src/core_ocean/Registry
===================================================================
--- branches/ocean_projects/ztilde/src/core_ocean/Registry        2012-02-16 18:06:00 UTC (rev 1511)
+++ branches/ocean_projects/ztilde/src/core_ocean/Registry        2012-02-16 23:32:25 UTC (rev 1512)
@@ -22,9 +22,9 @@
namelist character grid config_vert_grid_type isopycnal
namelist character grid config_pressure_type pressure
namelist real grid config_rho0 1028
-namelist real grid config_div_low_freq_time 86400.0
-namelist real grid config_hhf_restore_time 86400.0
-namelist real grid config_h_high_freq_diff 1.0e-5
+namelist real grid config_Dlf_restore_time 432000.0
+namelist real grid config_hhf_restore_time 432000.0
+namelist real grid config_hhf_diff 100
namelist integer split_explicit_ts config_n_ts_iter 2
namelist integer split_explicit_ts config_n_bcl_iter_beg 2
namelist integer split_explicit_ts config_n_bcl_iter_mid 2
@@ -195,8 +195,8 @@
var persistent real temperature ( nVertLevels nCells Time ) 2 iro temperature state tracers dynamics
var persistent real salinity ( nVertLevels nCells Time ) 2 iro salinity state tracers dynamics
var persistent real tracer1 ( nVertLevels nCells Time ) 2 iro tracer1 state tracers testing
-var persistent real hHighFreq ( nVertLevels nCells Time ) 2 r hHighFreq state - -
-var persistent real divergenceLowFreq ( nVertLevels nCells Time ) 2 r divergenceLowFreq state - -
+var persistent real hHighFreq ( nVertLevels nCells Time ) 2 ro hHighFreq state - -
+var persistent real divergenceLowFreq ( nVertLevels nCells Time ) 2 ro divergenceLowFreq state - -
% Tendency variables: neither read nor written to any files
var persistent real tend_u ( nVertLevels nEdges Time ) 1 - u tend - -
@@ -248,7 +248,7 @@
var persistent real uReconstructMeridional ( nVertLevels nCells Time ) 2 o uReconstructMeridional state - -
var persistent real MontPot ( nVertLevels nCells Time ) 2 - MontPot state - -
var persistent real pressure ( nVertLevels nCells Time ) 2 - pressure state - -
-var persistent real wTop ( nVertLevelsP1 nCells Time ) 2 - wTop state - -
+var persistent real wTop ( nVertLevelsP1 nCells Time ) 2 o wTop state - -
var persistent real rhoDisplaced ( nVertLevels nCells Time ) 2 - rhoDisplaced state - -
% Other diagnostic variables: neither read nor written to any files
@@ -256,8 +256,8 @@
var persistent real circulation ( nVertLevels nVertices Time ) 2 - circulation state - -
var persistent real gradPVt ( nVertLevels nEdges Time ) 2 - gradPVt state - -
var persistent real gradPVn ( nVertLevels nEdges Time ) 2 - gradPVn state - -
-var persistent real div_hu ( nVertLevels nCells Time ) 2 - div_hu state - -
-var persistent real div_hu_btr ( nCells Time ) 2 - div_hu_btr state - -
+var persistent real div_hu ( nVertLevels nCells Time ) 2 o div_hu state - -
+var persistent real div_hu_btr ( nCells Time ) 2 o div_hu_btr state - -
% Globally reduced diagnostic variables: only written to output
var persistent real areaCellGlobal ( Time ) 2 o areaCellGlobal state - -
Modified: branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_tendency.F
===================================================================
--- branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_tendency.F        2012-02-16 18:06:00 UTC (rev 1511)
+++ branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_tendency.F        2012-02-16 23:32:25 UTC (rev 1512)
@@ -534,7 +534,7 @@
do iCell=1,nCells
do k=1,maxLevelCell(iCell)
tend_divergenceLowFreq(k,iCell) = &
- -2.0*pii/config_div_low_freq_time &
+ -2.0*pii/config_Dlf_restore_time &
*(divergenceLowFreq(k,iCell) - div_hu(k,iCell) + div_hu_btr(iCell))
end do
end do
Modified: branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_time_integration_rk4.F
===================================================================
--- branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_time_integration_rk4.F        2012-02-16 18:06:00 UTC (rev 1511)
+++ branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_time_integration_rk4.F        2012-02-16 23:32:25 UTC (rev 1512)
@@ -109,19 +109,32 @@
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(:,:)
- if (config_vert_grid_type.eq.'ztilde') then
- block % state % time_levs(2) % state % hHighFreq % array(:,:) = block % state % time_levs(1) % state % hHighFreq % array(:,:)
- block % state % time_levs(2) % state % divergenceLowFreq % array(:,:) = block % state % time_levs(1) % state % divergenceLowFreq % array(:,:)
- endif
+ 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(:,:)
+
do iCell=1,block % mesh % nCells ! couple tracers to h
- do k=1,block % mesh % maxLevelCell % array(iCell)
- 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)
+ do k=1,block % mesh % maxLevelCell % array(iCell)
+
+ 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)
+
end do
end do
+ if (config_vert_grid_type.eq.'ztilde') then
+
+ block % state % time_levs(2) % state % hHighFreq % array(:,:) &
+ = block % state % time_levs(1) % state % hHighFreq % array(:,:)
+
+ block % state % time_levs(2) % state % divergenceLowFreq % array(:,:) &
+ = block % state % time_levs(1) % state % divergenceLowFreq % array(:,:)
+
+ endif
+
call mpas_copy_state(provis, block % state % time_levs(1) % state)
block => block % next
@@ -173,7 +186,7 @@
do while (associated(block))
if (config_vert_grid_type.eq.'ztilde') then
- call ocn_tend_hHighFreq(block % tend, provis, block % mesh)
+ call ocn_tend_hHighFreq (block % tend, provis, block % mesh)
call ocn_tend_divergenceLowFreq(block % tend, provis, block % mesh)
endif
Modified: branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_time_integration_split.F
===================================================================
--- branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_time_integration_split.F        2012-02-16 18:06:00 UTC (rev 1511)
+++ branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_time_integration_split.F        2012-02-16 23:32:25 UTC (rev 1512)
@@ -148,6 +148,16 @@
end do
end do
+ if (config_vert_grid_type.eq.'ztilde') then
+
+ block % state % time_levs(2) % state % hHighFreq % array(:,:) &
+ = block % state % time_levs(1) % state % hHighFreq % array(:,:)
+
+ block % state % time_levs(2) % state % divergenceLowFreq % array(:,:) &
+ = block % state % time_levs(1) % state % divergenceLowFreq % array(:,:)
+
+ endif
+
block => block % next
end do
@@ -720,6 +730,11 @@
block => domain % blocklist
do while (associated(block))
+ if (config_vert_grid_type.eq.'ztilde') then
+ call ocn_tend_hHighFreq (block % tend, block % state % time_levs(1) % state, block % mesh)
+ call ocn_tend_divergenceLowFreq(block % tend, block % state % time_levs(1) % state, block % mesh)
+ endif
+
call ocn_div_hu(block % state % time_levs(1) % state,block % state % time_levs(2) % state, block % mesh)
call ocn_wtop(block % state % time_levs(1) % state,block % state % time_levs(2) % state, block % mesh,block % tend )
@@ -733,6 +748,7 @@
call mpas_timer_start("se halo h", .false., timer_halo_h)
block => domain % blocklist
do while (associated(block))
+
call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % h % array(:,:), &
block % mesh % nVertLevels, block % mesh % nCells, &
block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
@@ -740,6 +756,17 @@
call mpas_dmpar_exch_halo_field3d_real(domain % dminfo, block % tend % tracers % array(:,:,:), &
block % tend % num_tracers, block % mesh % nVertLevels, block % mesh % nCells, &
block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+
+ if (config_vert_grid_type.eq.'ztilde') then
+
+ call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % hHighFreq % array(:,:), &
+ block % mesh % nVertLevels, block % mesh % nCells, &
+ block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+ call mpas_dmpar_exch_halo_field2d_real(domain % dminfo, block % tend % divergenceLowFreq % array(:,:), &
+ block % mesh % nVertLevels, block % mesh % nCells, &
+ block % parinfo % cellsToSend, block % parinfo % cellsToRecv)
+ endif
+
block => block % next
end do
call mpas_timer_stop("se halo h", timer_halo_h)
@@ -747,6 +774,44 @@
block => domain % blocklist
do while (associated(block))
+ do iCell=1,block % mesh % nCells
+ do k=1,block % mesh % maxLevelCell % array(iCell)
+
+ ! this is h_{n+1}
+ block % state % time_levs(2) % state % h % array(k,iCell) &
+ = block % state % time_levs(1) % state % h % array(k,iCell) &
+ + dt* block % tend % h % array(k,iCell)
+
+ ! This is Phi at n+1
+ do i=1,block % state % time_levs(1) % state % num_tracers
+ block % state % time_levs(2) % state % tracers % array(i,k,iCell) &
+ = (block % state % time_levs(1) % state % tracers % array(i,k,iCell) &
+ * block % state % time_levs(1) % state % h % array(k,iCell) &
+ + dt * block % tend % tracers % array(i,k,iCell)) &
+ / block % state % time_levs(2) % state % h % array(k,iCell)
+
+ enddo
+ end do
+ end do
+
+ if (config_vert_grid_type.eq.'ztilde') then
+ do iCell=1,block % mesh % nCells
+ do k=1,block % mesh % maxLevelCell % array(iCell)
+
+ ! this is h^{hf}_{n+1}
+ block % state % time_levs(2) % state % hHighFreq % array(k,iCell) &
+ = block % state % time_levs(1) % state % hHighFreq % array(k,iCell) &
+ + dt* block % tend % hHighFreq % array(k,iCell)
+
+ ! this is D^{lf}_{n+1}
+ block % state % time_levs(2) % state % divergenceLowFreq % array(k,iCell) &
+ = block % state % time_levs(1) % state % divergenceLowFreq % array(k,iCell) &
+ + dt* block % tend % divergenceLowFreq % array(k,iCell)
+
+ end do
+ end do
+ end if
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! If iterating, reset variables for next iteration
@@ -763,30 +828,18 @@
! sshNew is a pointer, defined above.
do k=1,block % mesh % maxLevelCell % array(iCell)
- ! this is h_{n+1}
- temp_h &
- = block % state % time_levs(1) % state % h % array(k,iCell) &
- + dt* block % tend % h % array(k,iCell)
-
! this is h_{n+1/2}
block % state % time_levs(2) % state % h % array(k,iCell) &
= 0.5*( &
block % state % time_levs(1) % state % h % array(k,iCell) &
- + temp_h)
+ + block % state % time_levs(2) % state % h % array(k,iCell))
do i=1,2
- ! This is Phi at n+1
- temp = ( &
- block % state % time_levs(1) % state % tracers % array(i,k,iCell) &
- * block % state % time_levs(1) % state % h % array(k,iCell) &
- + dt * block % tend % tracers % array(i,k,iCell)) &
- / temp_h
-
! This is Phi at n+1/2
block % state % time_levs(2) % state % tracers % array(i,k,iCell) &
= 0.5*( &
block % state % time_levs(1) % state % tracers % array(i,k,iCell) &
- + temp )
+ + block % state % time_levs(2) % state % tracers % array(i,k,iCell) )
end do
end do
end do ! iCell
@@ -809,26 +862,6 @@
!TDR: should we move this code into a subroutine called "compute_final_values_at_nplus1"?
!TDR: this could be within a contains statement in this routine
- do iCell=1,block % mesh % nCells
- do k=1,block % mesh % maxLevelCell % array(iCell)
-
- ! this is h_{n+1}
- block % state % time_levs(2) % state % h % array(k,iCell) &
- = block % state % time_levs(1) % state % h % array(k,iCell) &
- + dt* block % tend % h % array(k,iCell)
-
- ! This is Phi at n+1
- do i=1,block % state % time_levs(1) % state % num_tracers
- block % state % time_levs(2) % state % tracers % array(i,k,iCell) &
- = (block % state % time_levs(1) % state % tracers % array(i,k,iCell) &
- * block % state % time_levs(1) % state % h % array(k,iCell) &
- + dt * block % tend % tracers % array(i,k,iCell)) &
- / block % state % time_levs(2) % state % h % array(k,iCell)
-
- enddo
- end do
- end do
-
! Recompute final u to go on to next step.
! u_{n+1} = uBtr_{n+1} + uBcl_{n+1}
! Right now uBclNew is at time n+1/2, so back compute to get uBcl at time n+1
Modified: branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_tracer_hmix_del2.F
===================================================================
--- branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_tracer_hmix_del2.F        2012-02-16 18:06:00 UTC (rev 1511)
+++ branches/ocean_projects/ztilde/src/core_ocean/mpas_ocn_tracer_hmix_del2.F        2012-02-16 23:32:25 UTC (rev 1512)
@@ -272,7 +272,7 @@
invAreaCell1 = 1.0/areaCell(cell1)
invAreaCell2 = 1.0/areaCell(cell2)
- r_tmp = meshScalingDel2(iEdge) * config_h_high_freq_diff * dvEdge(iEdge) / dcEdge(iEdge)
+ r_tmp = meshScalingDel2(iEdge) * config_hhf_diff * dvEdge(iEdge) / dcEdge(iEdge)
do k=1,maxLevelEdgeTop(iEdge)
! </font>
<font color="black">abla h^{hf} on edge
</font>
</pre>