<p><b>mpetersen@lanl.gov</b> 2010-10-21 09:40:48 -0600 (Thu, 21 Oct 2010)</p><p>TRUNK COMMIT<br>
<br>
I have added a new subroutine, mpas_init_domain, to mpas_interface.F<br>
in all cores. It is called from mpas.F<br>
<br>
mpas_init_domain, may be used to initialize grid variables that are<br>
not in the netcdf input file. For example, in the ocean core we<br>
compute maxLevelEdge and maxLevelVertex as derived quantities from a<br>
maxLevelCell variable in the ocean core. This cannot be done in<br>
mpas_setup_test_case because it needs to be done on restarts. It<br>
cannot be done in mpas_init because I need to do a halo update on<br>
these variables, and mpas_init is called by block.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/mpas/src/core_hyd_atmos/mpas_interface.F
===================================================================
--- trunk/mpas/src/core_hyd_atmos/mpas_interface.F        2010-10-21 15:34:42 UTC (rev 575)
+++ trunk/mpas/src/core_hyd_atmos/mpas_interface.F        2010-10-21 15:40:48 UTC (rev 576)
@@ -12,6 +12,20 @@
end subroutine mpas_setup_test_case
+subroutine mpas_init_domain(domain)
+! Initialize grid variables that are computed from the netcdf input file.
+
+ use grid_types
+
+ implicit none
+
+ type (domain_type), intent(inout) :: domain
+
+ ! This is currently a stub.
+
+end subroutine mpas_init_domain
+
+
subroutine mpas_init(block, mesh, dt)
use grid_types
Modified: trunk/mpas/src/core_ocean/mpas_interface.F
===================================================================
--- trunk/mpas/src/core_ocean/mpas_interface.F        2010-10-21 15:34:42 UTC (rev 575)
+++ trunk/mpas/src/core_ocean/mpas_interface.F        2010-10-21 15:40:48 UTC (rev 576)
@@ -11,7 +11,19 @@
end subroutine mpas_setup_test_case
+subroutine mpas_init_domain(domain)
+! Initialize grid variables that are computed from the netcdf input file.
+ use grid_types
+
+ implicit none
+
+ type (domain_type), intent(inout) :: domain
+
+ ! This is currently a stub.
+
+end subroutine mpas_init_domain
+
subroutine mpas_init(block, mesh, dt)
use grid_types
Modified: trunk/mpas/src/core_sw/mpas_interface.F
===================================================================
--- trunk/mpas/src/core_sw/mpas_interface.F        2010-10-21 15:34:42 UTC (rev 575)
+++ trunk/mpas/src/core_sw/mpas_interface.F        2010-10-21 15:40:48 UTC (rev 576)
@@ -12,6 +12,20 @@
end subroutine mpas_setup_test_case
+subroutine mpas_init_domain(domain)
+! Initialize grid variables that are computed from the netcdf input file.
+
+ use grid_types
+
+ implicit none
+
+ type (domain_type), intent(inout) :: domain
+
+ ! This is currently a stub.
+
+end subroutine mpas_init_domain
+
+
subroutine mpas_init(block, mesh, dt)
use grid_types
Modified: trunk/mpas/src/driver/mpas.F
===================================================================
--- trunk/mpas/src/driver/mpas.F        2010-10-21 15:34:42 UTC (rev 575)
+++ trunk/mpas/src/driver/mpas.F        2010-10-21 15:40:48 UTC (rev 576)
@@ -32,6 +32,8 @@
call input_state_for_domain(domain)
+ call mpas_init_domain(domain)
+
if (.not. config_do_restart) call mpas_setup_test_case(domain)
call timer_stop("initialize")
</font>
</pre>