[mpas-developers] vector reconstruction in MPAS trunk

Michael Duda duda at ucar.edu
Thu Mar 25 11:31:58 MDT 2010


Hi, All.

Xylar and Todd have completed a vector reconstruction module that
we'd like to be able to share between MPAS cores. I'm proposing to
add this module as part of an operators directory that can be
expanded in future to contain other non-infrastructure code that
is usable by any core for performing general computations on MPAS
grids. Essentially, then, the change to the trunk would create the
directory mpas/src/operators, add module_vector_reconstruction.F
to this directory and remove it from core_* directories, and make
the necessary changes to Makefiles to compile code in
src/operators as a library. Since a number of files will be
modified, and to make it easier for others to test, I've placed a
tar file in
http://www.mmm.ucar.edu/people/duda/files/mpas_vector_commit.tar.gz
that contains a checked-out version of trunk/mpas (so anyone can,
for example, use 'svn status' or 'svn diff <file>' to see the
changes) with the proposed changes included.

The only expected changes to results come from changes in the
vector reconstruction, which is currently commented out in the
ocean core and used only in the shallow water core.

I did make changes in the core_ocean directory, so ocean model
developers might want to give the changes a closer review.
Specifically:

* src/core_ocean/Registry - remove fields matrix_reconstruct, 
normal, and rbf_value, which are not needed by the new version of 
module_vector_reconstruction.F

* src/core_ocean/Makefile - remove rules and dependencies for
module_vector_reconstruction, which is now found in the
src/operators directory; add ../src/operators to the module search
path

* src/core_ocean/module_vector_reconstruction.F - remove this file
in order to use the shared version in the operators directory

I have checked that all three cores compile with these changes,
and I did a quick run with each, although I'm not entirely sure
what to look for in the ocean model output to check for
correctness. A couple of comments about the ocean core code to
consider: 

* In module_time_integration.F, MPI_Abort() is called directly,
and it would probably be better to use dmpar_abort() from
module_dmpar.F to keep as much code independent of the particular
message passing library as possible

* also in module_time_integration.F, there is a call to isNaN(), 
which isn't an intrinsic defined in the Fortran standard, causing
some compilers to balk; using IEEE_IS_NAN() from Fortran2003 might
be an option, although I don't know how many compilers currently
support the IEEE_ARITHMETIC module

* in the default namelist.input.ocean, the strings "grid.nc",
"restart.nc", and "output.nc" should be in quotes ("character
input must be delimited" according to the Fortran standard); 
executables produced by some compilers fail when reading
un-delimited strings in namelists.

If anyone has any comments or suggestions regarding the proposed
changes, please don't hesitate to let me know.

Cheers,
Michael


More information about the mpas-developers mailing list