[mpas-developers] new subroutine call in mpas.F

Michael Duda duda at ucar.edu
Tue Oct 19 11:58:42 MDT 2010


Actually, I suppose what I proposed might not work if the values of,
say, maxLevelEdge were needed in the test case setup; we've actually
run into an issue similar to this in the non-hydrostatic core.
Sorry for any misdirection!

Cheers,
Michael


On Tue, Oct 19, 2010 at 11:55:21AM -0600, Michael Duda wrote:
> Hi, Mark.
> 
> What you've proposed below sounds reasonable, and I have no objections
> to committing the changes. Just for your consideration, though, one other 
> possible approach would be to pass the dminfo type as a new argument
> to mpas_init().
> 
> Cheers,
> Michael
> 
> 
> On Mon, Oct 18, 2010 at 04:49:56PM -0600, Mark Petersen wrote:
> > 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
> > 
> > 
> > 
> > 
> > _______________________________________________
> > mpas-developers mailing list
> > mpas-developers at mailman.ucar.edu
> > http://mailman.ucar.edu/mailman/listinfo/mpas-developers
> _______________________________________________
> mpas-developers mailing list
> mpas-developers at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/mpas-developers


More information about the mpas-developers mailing list