<p><b>laura@ucar.edu</b> 2010-07-23 15:59:09 -0600 (Fri, 23 Jul 2010)</p><p>update with new physics<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_nhyd_atmos/mpas_interface.F
===================================================================
--- branches/atmos_physics/src/core_nhyd_atmos/mpas_interface.F        2010-07-23 21:57:43 UTC (rev 429)
+++ branches/atmos_physics/src/core_nhyd_atmos/mpas_interface.F        2010-07-23 21:59:09 UTC (rev 430)
@@ -17,6 +17,11 @@
use grid_types
use advection
use time_integration
+#ifdef DO_PHYSICS
+ use module_physics_control
+ use module_physics_init
+ use module_physics_manager
+#endif
implicit none
@@ -30,6 +35,20 @@
call compute_solve_diagnostics(dt, block % time_levs(1) % state, mesh) ! ok for nonhydrostatic model
call initialize_advection_rk(mesh)
+#ifdef DO_PHYSICS
+ !check that all the physics options are correctly defined and that at least one physics
+ !parameterization is called (using the logical moist_physics):
+ call physics_namelist_check
+
+ !proceed with initialization of physics parameterization if moist_physics is set to true:
+ if(moist_physics) then
+!initialization of all physics variables in registry:
+ call physics_registry_init(config_do_restart, mesh, block % time_levs(1) % state)
+ call physics_wrf_interface(mesh)
+ call physics_init(mesh, block % time_levs(1) % state)
+ endif
+#endif
+
end subroutine mpas_init
@@ -51,6 +70,10 @@
use grid_types
use time_integration
+#ifdef DO_PHYSICS
+ use module_physics_driver
+ use module_physics_manager
+#endif
implicit none
@@ -58,7 +81,16 @@
integer, intent(in) :: itimestep
real (kind=RKIND), intent(in) :: dt
+#ifdef DO_PHYSICS
+ call physics_timetracker(itimestep)
+ if(l_physics) call physics_driver(domain,itimestep)
+ write(6,*) '--- back to mpas_interface:'
+ call timestep(domain, dt, itimestep)
+ write(6,*) '--- end timestep:'
+ write(6,*)
+#else
call timestep(domain, dt)
+#endif
end subroutine mpas_timestep
</font>
</pre>