<p><b>laura@ucar.edu</b> 2010-05-20 14:33:43 -0600 (Thu, 20 May 2010)</p><p>Added pre-compiler statements and modified calls to different subroutines to include physics parameterizations.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/driver/module_subdriver.F
===================================================================
--- branches/atmos_physics/src/driver/module_subdriver.F        2010-05-20 20:20:35 UTC (rev 293)
+++ branches/atmos_physics/src/driver/module_subdriver.F        2010-05-20 20:33:43 UTC (rev 294)
@@ -17,11 +17,18 @@
real (kind=RKIND), intent(in) :: dt
end subroutine mpas_init
- subroutine mpas_timestep(domain, itimestep, dt)
+ subroutine mpas_timestep(domain, itimestep, dt &
+#ifdef DO_PHYSICS
+ , n_physics &
+#endif
+ )
use grid_types
type (domain_type), intent(inout) :: domain
integer, intent(in) :: itimestep
real (kind=RKIND), intent(in) :: dt
+#ifdef DO_PHYSICS
+ integer, intent(in) :: n_physics
+#endif
end subroutine mpas_timestep
end interface
@@ -47,13 +54,18 @@
type (block_type), pointer :: block_ptr
type (io_output_object) :: output_obj
type (io_output_object) :: restart_obj
+#ifdef DO_PHYSICS
+ integer:: n_physics
+#endif
! Eventually, dt should be domain specific
dt = config_dt
ntimesteps = config_ntimesteps
+#ifdef DO_PHYSICS
+ n_physics = config_n_physics
+#endif
-
! Compute diagnostic fields needed in solve loop, and initialize
! simulation time to 0 for all blocks
block_ptr => domain % blocklist
@@ -73,9 +85,12 @@
! During integration, time level 1 stores the model state at the beginning of the
! time step, and time level 2 stores the state advanced dt in time by timestep(...)
do itimestep = 1,ntimesteps
- write(0,*) 'Doing timestep ', itimestep
call timer_start("time integration")
- call mpas_timestep(domain, itimestep, dt)
+ call mpas_timestep(domain, itimestep, dt &
+#ifdef DO_PHYSICS
+ ,n_physics &
+#endif
+ )
call timer_stop("time integration")
! Move time level 2 fields back into time level 1 for next time step
@@ -94,6 +109,13 @@
call output_state_finalize(output_obj, domain % dminfo)
if (restart_frame > 1) call output_state_finalize(restart_obj, domain % dminfo)
+ ! Finalize time integration:
+ !block_ptr => domain % blocklist
+ !do while (associated(block_ptr))
+ ! call mpas_finalize(block_ptr, block_ptr % mesh, dt)
+ ! block_ptr => block_ptr % next
+ !end do
+
end subroutine solve
</font>
</pre>