[mpas-developers] new subroutine call in mpas.F
Mark Petersen
mpetersen at lanl.gov
Mon Oct 18 16:49:56 MDT 2010
MPAS developers,
I would like to add a new subroutine call to mpas.F. This affects all
cores, so I need consent from other developers before I change the
trunk.
The new routine, mpas_init_domain, would be used to initialize grid
variables that are not in the netcdf input file. For example, we
compute maxLevelEdge and maxLevelVertex as derived quantities from a
maxLevelCell variable in the ocean core. This cannot be done in
mpas_setup_test_case because it needs to be done on restarts. It
cannot be done in mpas_init because I need to do a halo update on
these variables, and mpas_init is called by block.
I welcome any feedback or other ideas.
Mark
The changes would be:
lo1-fe> pwd
/usr/projects/climate/mpeterse/coy/mpas_100603/trunk/mpas
lo1-fe> svn update
At revision 565.
lo1-fe> svn diff
Index: src/driver/mpas.F
===================================================================
--- src/driver/mpas.F (revision 565)
+++ src/driver/mpas.F (working copy)
@@ -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")
Index: src/core_hyd_atmos/mpas_interface.F
===================================================================
--- src/core_hyd_atmos/mpas_interface.F (revision 565)
+++ src/core_hyd_atmos/mpas_interface.F (working copy)
@@ -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
Index: src/core_sw/mpas_interface.F
===================================================================
--- src/core_sw/mpas_interface.F (revision 565)
+++ src/core_sw/mpas_interface.F (working copy)
@@ -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
Index: src/core_ocean/mpas_interface.F
===================================================================
--- src/core_ocean/mpas_interface.F (revision 565)
+++ src/core_ocean/mpas_interface.F (working copy)
@@ -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
More information about the mpas-developers
mailing list