<p><b>ringler@lanl.gov</b> 2009-12-23 10:16:33 -0700 (Wed, 23 Dec 2009)</p><p><br>
added wind stress forcing (u_src) to Registry<br>
and to the RHS of the momentum equation in<br>
module_time_integration.F<br>
<br>
namelist.input is set up to run the double-gyre<br>
test case as the default<br>
<br>
Makefile is set up for ifort as the default<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean/Makefile
===================================================================
--- branches/ocean/Makefile        2009-12-21 19:25:43 UTC (rev 95)
+++ branches/ocean/Makefile        2009-12-23 17:16:33 UTC (rev 96)
@@ -12,25 +12,25 @@
#CFLAGS = -g
#LDFLAGS = -g -C
+#FC = mpif90
+#CC = mpicc
+#SFC = pgf90
+#SCC = pgcc
+#FFLAGS = -r8 -O3
+#CFLAGS = -O3
+#LDFLAGS = -O3
+
+#ifort (for Intel Macs and Quad-Core AMD Opteron Clusters)
FC = mpif90
-CC = mpicc
-SFC = pgf90
-SCC = pgcc
-FFLAGS = -r8 -O3
-CFLAGS = -O3
+CC = gcc
+SFC = ifort
+SCC = gcc
+FFLAGS = -real-size 64 -O3
+CFLAGS = -O3 -m64
LDFLAGS = -O3
-#ifort (for Intel Macs and Quad-Core AMD Opteron Clusters)
-#FC = mpif90
-#CC = gcc
-#SFC = ifort
-#SCC = gcc
-#FFLAGS = -real-size 64 -O3
-#CFLAGS = -O3 -m64
-#LDFLAGS = -O3
+CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -DUNDERSCORE -DOFFSET64BIT
-CPPFLAGS = -DRKIND=8 $(MODEL_FORMULATION) $(EXPAND_LEVELS) -D_MPI -DUNDERSCORE # -DOFFSET64BIT
-
CPPINCLUDES = -I../inc -I$(NETCDF)/include
FCINCLUDES = -I../inc -I$(NETCDF)/include
LIBS = -L$(NETCDF)/lib -lnetcdf
Modified: branches/ocean/Registry/Registry
===================================================================
--- branches/ocean/Registry/Registry        2009-12-21 19:25:43 UTC (rev 95)
+++ branches/ocean/Registry/Registry        2009-12-23 17:16:33 UTC (rev 96)
@@ -75,6 +75,7 @@
# Boundary conditions: read from input, saved in restart and written to output
var integer uBC ( nVertLevels nEdges ) iro uBC - -
+var real u_src ( nVertLevels nEdges ) iro u_src - -
# Prognostic variables: read from input, saved in restart, and written to output
var real u ( nVertLevels nEdges Time ) iro u - -
Modified: branches/ocean/namelist.input
===================================================================
--- branches/ocean/namelist.input        2009-12-21 19:25:43 UTC (rev 95)
+++ branches/ocean/namelist.input        2009-12-23 17:16:33 UTC (rev 96)
@@ -1,14 +1,14 @@
&sw_model
- config_test_case = 5
+ config_test_case = 0
config_time_integration = 'RK4'
- config_dt = 172.8
- config_ntimesteps = 7500
- config_output_interval = 500
- config_visc = 0.0
+ config_dt = 300.0
+ config_ntimesteps = 288000
+ config_output_interval = 288
+ config_visc = 4.0
/
&restart
- config_restart_interval = 3000
+ config_restart_interval = 864000
config_do_restart = .false.
config_restart_time = 1036800.0
/
Modified: branches/ocean/src/module_time_integration.F
===================================================================
--- branches/ocean/src/module_time_integration.F        2009-12-21 19:25:43 UTC (rev 95)
+++ branches/ocean/src/module_time_integration.F        2009-12-23 17:16:33 UTC (rev 96)
@@ -247,6 +247,11 @@
real (kind=RKIND) :: u_diffusion, visc
+!ocean
+ real (kind=RKIND), dimension(:,:), pointer :: u_src
+ real (kind=RKIND), parameter :: rho_ref = 1000.0
+!ocean
+
visc = config_visc
h => s % h % array
@@ -286,7 +291,11 @@
nVertices = grid % nVertices
nVertLevels = grid % nVertLevels
+!ocean
+ u_src => grid % u_src % array
+!ocean
+
!
! Compute height tendency for each cell
!
@@ -346,6 +355,11 @@
- ( ke(k,cell2) - ke(k,cell1) + &
gravity * (h(k,cell2) + h_s(cell2) - h(k,cell1) - h_s(cell1)) &
) / dcEdge(iEdge)
+
+!ocean
+ tend_u(k,iEdge) = tend_u(k,iEdge) + u_src(k,iEdge)/rho_ref/h_edge(k,iEdge)
+!ocean
+
end do
end do
#endif
</font>
</pre>