<p><b>dwj07@fsu.edu</b> 2013-04-12 20:00:46 -0600 (Fri, 12 Apr 2013)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Merging trunk to branch.<br>
</p><hr noshade><pre><font color="gray">Index: branches/history_attribute
===================================================================
--- branches/history_attribute        2013-04-12 16:07:24 UTC (rev 2742)
+++ branches/history_attribute        2013-04-13 02:00:46 UTC (rev 2743)
Property changes on: branches/history_attribute
___________________________________________________________________
Modified: svn:mergeinfo
## -34,3 +34,4 ##
/branches/source_renaming:1082-1113
/branches/time_manager:924-962
/branches/xml_registry:2610-2662
+/trunk/mpas:2698-2742
\ No newline at end of property
Modified: branches/history_attribute/Makefile
===================================================================
--- branches/history_attribute/Makefile        2013-04-12 16:07:24 UTC (rev 2742)
+++ branches/history_attribute/Makefile        2013-04-13 02:00:46 UTC (rev 2743)
@@ -193,9 +193,18 @@
        "USE_PAPI = $(USE_PAPI)" \
        "CPPFLAGS = $(MODEL_FORMULATION) -DUNDERSCORE $(FILE_OFFSET) $(ZOLTAN_DEFINE)" )
-CPPINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
-FCINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
-LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf
+CPPINCLUDES =
+FCINCLUDES =
+LIBS =
+ifneq ($(wildcard $(PIO)/lib), ) # Check for newer PIO version
+        CPPINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO)/include -I$(PNETCDF)/include
+        FCINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO)/include -I$(PNETCDF)/include
+        LIBS = -L$(PIO)/lib -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf
+else
+        CPPINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
+        FCINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include
+        LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf
+endif
NCLIB = -lnetcdf
NCLIBF = -lnetcdff
Modified: branches/history_attribute/src/framework/mpas_grid_types.F
===================================================================
--- branches/history_attribute/src/framework/mpas_grid_types.F        2013-04-12 16:07:24 UTC (rev 2742)
+++ branches/history_attribute/src/framework/mpas_grid_types.F        2013-04-13 02:00:46 UTC (rev 2743)
@@ -1,3 +1,16 @@
+!***********************************************************************
+!
+! mpas_grid_types
+!
+!> \brief MPAS Grid and field type defintion module
+!> \author Michael Duda, Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This module defines derived data types related to fields, and variable structures.
+!> It also includes routines for allocating and deallocating these types.
+!
+!-----------------------------------------------------------------------
module mpas_grid_types
use mpas_kind_types
@@ -474,31 +487,54 @@
contains
+!***********************************************************************
+!
+! routine mpas_allocate_domain
+!
+!> \brief MPAS Domain allocation routine
+!> \author Michael Duda
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a domain structure.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_allocate_domain(dom, dminfo)!{{{
- subroutine mpas_allocate_domain(dom, dminfo)
-
implicit none
- type (domain_type), pointer :: dom
- type (dm_info), pointer :: dminfo
+ type (domain_type), pointer :: dom !< Input/Output: Domain structure
+ type (dm_info), pointer :: dminfo !< Input: Domain Information
allocate(dom)
nullify(dom % blocklist)
dom % dminfo => dminfo
- end subroutine mpas_allocate_domain
+ end subroutine mpas_allocate_domain!}}}
-
- subroutine mpas_allocate_block(nHaloLayers, b, dom, blockID, &
+!***********************************************************************
+!
+! routine mpas_allocate_block
+!
+!> \brief MPAS Block allocation routine
+!> \author Michael Duda
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a block structure. It calls routines to allocate the variable structures
+!> that are members of the block type.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_allocate_block(nHaloLayers, b, dom, blockID, &!{{{
#include "dim_dummy_args.inc"
)
implicit none
- integer, intent(in) :: nHaloLayers
- type (block_type), pointer :: b
- type (domain_type), pointer :: dom
- integer, intent(in) :: blockID
+ integer, intent(in) :: nHaloLayers !< Input: Number of halo laters
+ type (block_type), pointer :: b !< Input/Output: Block structure
+ type (domain_type), pointer :: dom !< Input: Domain structure
+ integer, intent(in) :: blockID !< Input: Global ID of block
#include "dim_dummy_decls.inc"
@@ -513,19 +549,30 @@
#include "block_allocs.inc"
- end subroutine mpas_allocate_block
+ end subroutine mpas_allocate_block!}}}
#include "group_alloc_routines.inc"
#include "provis_alloc_routines.inc"
-
+!***********************************************************************
+!
+! routine mpas_deallocate_domain
+!
+!> \brief MPAS Domain deallocation routine
+!> \author Michael Duda
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a domain structure.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_domain(dom)!{{{
implicit none
- type (domain_type), pointer :: dom
+ type (domain_type), pointer :: dom !< Input/Output: Domain to deallocate
type (block_type), pointer :: block_ptr
@@ -539,9 +586,21 @@
end subroutine mpas_deallocate_domain!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field1d_integer
+!
+!> \brief MPAS 1D Scratch integer allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 1D scratch integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field1d_integer(f, single_block_in)!{{{
- type (field1dInteger), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field1dInteger), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated or all blocks.
logical :: single_block
type (field1dInteger), pointer :: f_cursor
@@ -571,9 +630,21 @@
end subroutine mpas_allocate_scratch_field1d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field2d_integer
+!
+!> \brief MPAS 2D Scratch integer allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 2D scratch integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field2d_integer(f, single_block_in)!{{{
- type (field2dInteger), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field2dInteger), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field2dInteger), pointer :: f_cursor
@@ -603,9 +674,21 @@
end subroutine mpas_allocate_scratch_field2d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field3d_integer
+!
+!> \brief MPAS 3D Scratch integer allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 3D scratch integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field3d_integer(f, single_block_in)!{{{
- type (field3dInteger), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field3dInteger), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field3dInteger), pointer :: f_cursor
@@ -635,9 +718,21 @@
end subroutine mpas_allocate_scratch_field3d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field1d_real
+!
+!> \brief MPAS 1D Scratch real allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 1D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field1d_real(f, single_block_in)!{{{
- type (field1dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field1dReal), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field1dReal), pointer :: f_cursor
@@ -667,9 +762,21 @@
end subroutine mpas_allocate_scratch_field1d_real!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field2d_real
+!
+!> \brief MPAS 2D Scratch real allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 2D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field2d_real(f, single_block_in)!{{{
- type (field2dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field2dReal), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field2dReal), pointer :: f_cursor
@@ -699,9 +806,21 @@
end subroutine mpas_allocate_scratch_field2d_real!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field3d_real
+!
+!> \brief MPAS 3D Scratch real allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 3D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field3d_real(f, single_block_in)!{{{
- type (field3dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field3dReal), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field3dReal), pointer :: f_cursor
@@ -731,9 +850,21 @@
end subroutine mpas_allocate_scratch_field3d_real!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field4D_real
+!
+!> \brief MPAS 4D Scratch real allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 4D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field4d_real(f, single_block_in)!{{{
- type (field4dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field4dReal), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field4dReal), pointer :: f_cursor
@@ -763,9 +894,21 @@
end subroutine mpas_allocate_scratch_field4d_real!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field5D_real
+!
+!> \brief MPAS 5D Scratch real allocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 5D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field5d_real(f, single_block_in)!{{{
- type (field5dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field5dReal), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field5dReal), pointer :: f_cursor
@@ -795,9 +938,21 @@
end subroutine mpas_allocate_scratch_field5d_real!}}}
+!***********************************************************************
+!
+! routine mpas_allocate_scratch_field1D_char
+!
+!> \brief MPAS 1D Scratch character deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine allocates a 1D scratch character field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_allocate_scratch_field1d_char(f, single_block_in)!{{{
- type (field1dChar), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field1dChar), pointer :: f !< Input: Field to allocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical flag that determines if a single block should be allocated, or all blocks.
logical :: single_block
type (field1dChar), pointer :: f_cursor
@@ -827,9 +982,21 @@
end subroutine mpas_allocate_scratch_field1d_char!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field1D_integer
+!
+!> \brief MPAS 1D Scratch integer deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 1D scratch integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field1d_integer(f, single_block_in)!{{{
- type (field1dInteger), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field1dInteger), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field1dInteger), pointer :: f_cursor
@@ -860,9 +1027,21 @@
end subroutine mpas_deallocate_scratch_field1d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field2D_integer
+!
+!> \brief MPAS 2D Scratch integer deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 2D scratch integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field2d_integer(f, single_block_in)!{{{
- type (field2dInteger), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field2dInteger), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field2dInteger), pointer :: f_cursor
@@ -893,9 +1072,21 @@
end subroutine mpas_deallocate_scratch_field2d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field3D_integer
+!
+!> \brief MPAS 3D Scratch integer deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 3D scratch integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field3d_integer(f, single_block_in)!{{{
- type (field3dInteger), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field3dInteger), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field3dInteger), pointer :: f_cursor
@@ -926,9 +1117,21 @@
end subroutine mpas_deallocate_scratch_field3d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field1D_real
+!
+!> \brief MPAS 1D Scratch real deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 1D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field1d_real(f, single_block_in)!{{{
- type (field1dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field1dReal), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field1dReal), pointer :: f_cursor
@@ -959,9 +1162,21 @@
end subroutine mpas_deallocate_scratch_field1d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field2D_real
+!
+!> \brief MPAS 2D Scratch real deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 2D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field2d_real(f, single_block_in)!{{{
- type (field2dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field2dReal), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field2dReal), pointer :: f_cursor
@@ -992,9 +1207,21 @@
end subroutine mpas_deallocate_scratch_field2d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field3D_real
+!
+!> \brief MPAS 3D Scratch real deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 3D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field3d_real(f, single_block_in)!{{{
- type (field3dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field3dReal), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field3dReal), pointer :: f_cursor
@@ -1025,9 +1252,21 @@
end subroutine mpas_deallocate_scratch_field3d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field4D_real
+!
+!> \brief MPAS 4D Scratch real deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 4D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field4d_real(f, single_block_in)!{{{
- type (field4dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field4dReal), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field4dReal), pointer :: f_cursor
@@ -1058,9 +1297,21 @@
end subroutine mpas_deallocate_scratch_field4d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field5D_real
+!
+!> \brief MPAS 5D Scratch real deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 5D scratch real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field5d_real(f, single_block_in)!{{{
- type (field5dReal), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field5dReal), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field5dReal), pointer :: f_cursor
@@ -1091,9 +1342,21 @@
end subroutine mpas_deallocate_scratch_field5d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_scratch_field1D_char
+!
+!> \brief MPAS 1D Scratch character deallocation rotuine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 1D scratch character field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_scratch_field1d_char(f, single_block_in)!{{{
- type (field1dChar), pointer :: f
- logical, intent(in), optional :: single_block_in
+ type (field1dChar), pointer :: f !< Input: Field to deallocate
+ logical, intent(in), optional :: single_block_in !< Input: Logical that determines if a single block should be deallocated, or all blocks.
logical :: single_block
type (field1dChar), pointer :: f_cursor
@@ -1124,9 +1387,20 @@
end subroutine mpas_deallocate_scratch_field1d_char!}}}
-
+!***********************************************************************
+!
+! routine mpas_deallocate_field0d_integer
+!
+!> \brief MPAS 0D integer deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 0D integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field0d_integer(f)!{{{
- type (field0dInteger), pointer :: f
+ type (field0dInteger), pointer :: f !< Input: Field to deallocate
type (field0dInteger), pointer :: f_cursor
f_cursor => f
@@ -1148,8 +1422,20 @@
end subroutine mpas_deallocate_field0d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field1D_integer
+!
+!> \brief MPAS 1D integer deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 1D integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field1d_integer(f)!{{{
- type (field1dInteger), pointer :: f
+ type (field1dInteger), pointer :: f !< Input: Field to deallocate
type (field1dInteger), pointer :: f_cursor
f_cursor => f
@@ -1175,8 +1461,20 @@
end subroutine mpas_deallocate_field1d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field2D_integer
+!
+!> \brief MPAS 2D integer deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 2D integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field2d_integer(f)!{{{
- type (field2dInteger), pointer :: f
+ type (field2dInteger), pointer :: f !< Input: Field to deallocate
type (field2dInteger), pointer :: f_cursor
f_cursor => f
@@ -1202,8 +1500,20 @@
end subroutine mpas_deallocate_field2d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field3D_integer
+!
+!> \brief MPAS 3D integer deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 3D integer field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field3d_integer(f)!{{{
- type (field3dInteger), pointer :: f
+ type (field3dInteger), pointer :: f !< Input: Field to deallocate
type (field3dInteger), pointer :: f_cursor
f_cursor => f
@@ -1229,8 +1539,20 @@
end subroutine mpas_deallocate_field3d_integer!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field0d_real
+!
+!> \brief MPAS 0D real deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 0D real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field0d_real(f)!{{{
- type (field0dReal), pointer :: f
+ type (field0dReal), pointer :: f !< Input: Field to deallocate
type (field0dReal), pointer :: f_cursor
f_cursor => f
@@ -1253,8 +1575,20 @@
end subroutine mpas_deallocate_field0d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field1D_real
+!
+!> \brief MPAS 1D real deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 1D real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field1d_real(f)!{{{
- type (field1dReal), pointer :: f
+ type (field1dReal), pointer :: f !< Input: Field to deallocate
type (field1dReal), pointer :: f_cursor
f_cursor => f
@@ -1280,8 +1614,20 @@
end subroutine mpas_deallocate_field1d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field2D_real
+!
+!> \brief MPAS 2D real deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 2D real field.
+!
+
subroutine mpas_deallocate_field2d_real(f)!{{{
- type (field2dReal), pointer :: f
+ type (field2dReal), pointer :: f !< Input: Field to deallocate
type (field2dReal), pointer :: f_cursor
f_cursor => f
@@ -1307,8 +1653,20 @@
end subroutine mpas_deallocate_field2d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field3D_real
+!
+!> \brief MPAS 3D real deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 3D real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field3d_real(f)!{{{
- type (field3dReal), pointer :: f
+ type (field3dReal), pointer :: f !< Input: Field to deallocate
type (field3dReal), pointer :: f_cursor
f_cursor => f
@@ -1334,8 +1692,20 @@
end subroutine mpas_deallocate_field3d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field4D_real
+!
+!> \brief MPAS 4D real deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 4D real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field4d_real(f)!{{{
- type (field4dReal), pointer :: f
+ type (field4dReal), pointer :: f !< Input: Field to deallocate
type (field4dReal), pointer :: f_cursor
f_cursor => f
@@ -1361,8 +1731,20 @@
end subroutine mpas_deallocate_field4d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field5D_real
+!
+!> \brief MPAS 5D real deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 5D real field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field5d_real(f)!{{{
- type (field5dReal), pointer :: f
+ type (field5dReal), pointer :: f !< Input: Field to deallocate
type (field5dReal), pointer :: f_cursor
f_cursor => f
@@ -1388,8 +1770,20 @@
end subroutine mpas_deallocate_field5d_real!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field0D_char
+!
+!> \brief MPAS 0D character deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 0D character field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field0d_char(f)!{{{
- type (field0dChar), pointer :: f
+ type (field0dChar), pointer :: f !< Input: Field to deallocate
type (field0dChar), pointer :: f_cursor
f_cursor => f
@@ -1411,8 +1805,20 @@
end subroutine mpas_deallocate_field0d_char!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_field1D_char
+!
+!> \brief MPAS 1D character deallocation routine.
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a 1D character field.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_field1d_char(f)!{{{
- type (field1dChar), pointer :: f
+ type (field1dChar), pointer :: f !< Input: Field to deallocate
type (field1dChar), pointer :: f_cursor
f_cursor => f
@@ -1438,16 +1844,29 @@
end subroutine mpas_deallocate_field1d_char!}}}
+!***********************************************************************
+!
+! routine mpas_deallocate_block
+!
+!> \brief MPAS Block deallocation routine
+!> \author Doug Jacobsen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine deallocates a block structure.
+!
+!-----------------------------------------------------------------------
subroutine mpas_deallocate_block(b)!{{{
implicit none
- type (block_type), intent(inout) :: b
+ type (block_type), intent(inout) :: b !< Input/Output: Block to be deallocated.
integer :: i
! BUG: It seems like we should be deallocating the exchange lists before we
! deallocate the array of head pointers and the parinfo type...
+ ! It also seems like these deallocations should happen with mpas_dmpar_destroy_multihalo_exchange_list
deallocate(b % parinfo % cellsToSend)
deallocate(b % parinfo % cellsToRecv)
Modified: branches/history_attribute/src/framework/streams.c
===================================================================
--- branches/history_attribute/src/framework/streams.c        2013-04-12 16:07:24 UTC (rev 2742)
+++ branches/history_attribute/src/framework/streams.c        2013-04-13 02:00:46 UTC (rev 2743)
@@ -34,14 +34,14 @@
                 return;
         }
} else {
-         sprintf(fname, "/dev/null", *id);
+         sprintf(fname, "/dev/null");
         fd_err = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
         if (dup2(fd_err, 2) < 0) {
                 printf("Error duplicating STDERR</font>
<font color="red">");
                 return;
         }
-         sprintf(fname, "/dev/null", *id);
+         sprintf(fname, "/dev/null");
         fd_out = open(fname,O_CREAT|O_WRONLY|O_TRUNC,0644);
         if (dup2(fd_out, 1) < 0) {
                 printf("Error duplicating STDOUT</font>
<font color="gray">");
Modified: branches/history_attribute/src/operators/mpas_spline_interpolation.F
===================================================================
--- branches/history_attribute/src/operators/mpas_spline_interpolation.F        2013-04-12 16:07:24 UTC (rev 2742)
+++ branches/history_attribute/src/operators/mpas_spline_interpolation.F        2013-04-13 02:00:46 UTC (rev 2743)
@@ -1,3 +1,15 @@
+!***********************************************************************
+!
+! mpas_spline_interpolation
+!
+!> \brief MPAS Vector reconstruction module
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This module provides routines for performing spline interpolation.
+!
+!-----------------------------------------------------------------------
module mpas_spline_interpolation
use mpas_kind_types
@@ -13,44 +25,42 @@
mpas_interpolate_linear, &
mpas_test_interpolate
-! Short Descriptions:
-
-! mpas_cubic_spline_coefficients: Compute second derivatives at nodes.
-! This must be run before any of the other cubic spine functions.
-
-! mpas_interpolate_cubic_spline: Compute cubic spline interpolation.
-
-! mpas_integrate_cubic_spline: Compute a single integral from spline data.
-
-! mpas_integrate_column_cubic_spline: Compute multiple integrals from spline data.
-
-! mpas_interpolate_linear: Compute linear interpolation.
-
-! mpas_test_interpolate: Test spline interpolation subroutines.
-
contains
- subroutine mpas_cubic_spline_coefficients(x,y,n,y2ndDer)
+!***********************************************************************
+!
+! routine mpas_cubic_spline_coefficients
+!
+!> \brief MPAS Cubic spline coefficients routine
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> This routine computes second derivatives at nodes.
+!> This must be run before any of the other cubic spine functions.
+!>
+!> Given arrays x(1:n) and y(1:n) containing a function,
+!> i.e., y(i) = f(x(i)), with x monotonically increasing
+!> this routine returns an array y2ndDer(1:n) that contains
+!> the second derivatives of the interpolating function at x(1:n).
+!> This routine uses boundary conditions for a natural spline,
+!> with zero second derivative on that boundary.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_cubic_spline_coefficients(x,y,n,y2ndDer) !{{{
-! Given arrays x(1:n) and y(1:n) containing a function,
-! i.e., y(i) = f(x(i)), with x monotonically increasing
-! this routine returns an array y2ndDer(1:n) that contains
-! the second derivatives of the interpolating function at x(1:n).
-! This routine uses boundary conditions for a natural spline,
-! with zero second derivative on that boundary.
-
! INPUT PARAMETERS:
integer, intent(in) :: &
- n ! number of nodes
+ n !< Input: number of nodes
real(kind=RKIND), intent(in), dimension(n) :: &
- x, &! location of nodes
- y ! value at nodes
+ x, &!< Input: location of nodes
+ y !< Input: value at nodes
! OUTPUT PARAMETERS:
real(kind=RKIND), intent(out), dimension(n) :: &
- y2ndDer ! dy^2/dx^2 at each node
+ y2ndDer !< Output: dy^2/dx^2 at each node
! local variables:
@@ -75,39 +85,48 @@
y2ndDer(i)=y2ndDer(i)*y2ndDer(i+1)+a(i)
enddo
- end subroutine mpas_cubic_spline_coefficients
+ end subroutine mpas_cubic_spline_coefficients!}}}
-
- subroutine mpas_interpolate_cubic_spline( &
+!***********************************************************************
+!
+! routine mpas_interpolate_cubic_spline
+!
+!> \brief MPAS Cubic spline interpolation routine
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> Given the arrays x(1:n) and y(1:n), which tabulate a function,
+!> and given the array y2ndDer(1:n), which is the output from
+!> CubicSplineCoefficients above, this routine returns the
+!> cubic-spline interpolated values of yOut(1:nOut) at xOut(1:nOut).
+!> This subroutine assumes that both x and xOut are monotonically
+!> increasing, and that all values of xOut are within the first and
+!> last values of x.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_interpolate_cubic_spline( &!{{{
x,y,y2ndDer,n, &
xOut,yOut,nOut)
-! Given the arrays x(1:n) and y(1:n), which tabulate a function,
-! and given the array y2ndDer(1:n), which is the output from
-! CubicSplineCoefficients above, this routine returns the
-! cubic-spline interpolated values of yOut(1:nOut) at xOut(1:nOut).
-! This subroutine assumes that both x and xOut are monotonically
-! increasing, and that all values of xOut are within the first and
-! last values of x.
-
! INPUT PARAMETERS:
real (kind=RKIND), dimension(n), intent(in) :: &
- x, &! node location, input grid
- y, &! interpolation variable, input grid
- y2ndDer ! 2nd derivative of y at nodes
+ x, &!< Input: node location, input grid
+ y, &!< Input: interpolation variable, input grid
+ y2ndDer !< Input: 2nd derivative of y at nodes
real (kind=RKIND), dimension(nOut), intent(in) :: &
- xOut ! node location, output grid
+ xOut !< Input: node location, output grid
integer, intent(in) :: &
- n, &! number of nodes, input grid
- nOut ! number of nodes, output grid
+ n, &!< Input: number of nodes, input grid
+ nOut !< Input: number of nodes, output grid
! OUTPUT PARAMETERS:
real (kind=RKIND), dimension(nOut), intent(out) :: &
- yOut ! interpolation variable, output grid
+ yOut !< Output: interpolation variable, output grid
! local variables:
@@ -139,34 +158,43 @@
enddo kInLoop
-end subroutine mpas_interpolate_cubic_spline
+end subroutine mpas_interpolate_cubic_spline!}}}
+!***********************************************************************
+!
+! routine mpas_integrate_cubic_spline
+!
+!> \brief MPAS Cubic spline integration routine
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> Given the arrays x(1:n) and y(1:n), which tabulate a function,
+!> and given the array y2ndDer(1:n), which is the output from
+!> CubicSplineCoefficients above, this routine returns y_integral,
+!> the integral of y from x1 to x2. The integration formula was
+!> created by analytically integrating a cubic spline between each node.
+!> This subroutine assumes that x is monotonically increasing, and
+!> that x1 < x2.
+!
+!-----------------------------------------------------------------------
+subroutine mpas_integrate_cubic_spline(x,y,y2ndDer,n,x1,x2,y_integral) !{{{
-subroutine mpas_integrate_cubic_spline(x,y,y2ndDer,n,x1,x2,y_integral)
-
-! Given the arrays x(1:n) and y(1:n), which tabulate a function,
-! and given the array y2ndDer(1:n), which is the output from
-! CubicSplineCoefficients above, this routine returns y_integral,
-! the integral of y from x1 to x2. The integration formula was
-! created by analytically integrating a cubic spline between each node.
-! This subroutine assumes that x is monotonically increasing, and
-! that x1 < x2.
-
! INPUT PARAMETERS:
integer, intent(in) :: &
- n ! number of nodes
+ n !< Input: number of nodes
real(kind=RKIND), intent(in), dimension(n) :: &
- x, &! location of nodes
- y, &! value at nodes
- y2ndDer ! dy^2/dx^2 at each node
+ x, &!< Input: location of nodes
+ y, &!< Input: value at nodes
+ y2ndDer !< Input: dy^2/dx^2 at each node
real(kind=RKIND), intent(in) :: &
- x1,x2 ! limits of integration
+ x1,x2 !< Input: limits of integration
! OUTPUT PARAMETERS:
real(kind=RKIND), intent(out) :: &
- y_integral ! integral of y
+ y_integral !< Output: integral of y
! local variables:
@@ -215,40 +243,49 @@
enddo ! j
- end subroutine mpas_integrate_cubic_spline
+ end subroutine mpas_integrate_cubic_spline!}}}
-
- subroutine mpas_integrate_column_cubic_spline( &
+!***********************************************************************
+!
+! routine mpas_integrate_column_cubic_spline
+!
+!> \brief MPAS Cubic spline column integration routine
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> Given the arrays x(1:n) and y(1:n), which tabulate a function,
+!> and given the array y2ndDer(1:n), which is the output from
+!> CubicSplineCoefficients above, this routine returns
+!> y_integral(1:nOut), the integral of y.
+!> This is a cumulative integration, so that
+!> y_integral(j) holds the integral of y from x(1) to xOut(j).
+!> The integration formula was created by analytically integrating a
+!> cubic spline between each node.
+!> This subroutine assumes that both x and xOut are monotonically
+!> increasing, and that all values of xOut are within the first and
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_integrate_column_cubic_spline( &!{{{
x,y,y2ndDer,n, &
xOut,y_integral, nOut)
-! Given the arrays x(1:n) and y(1:n), which tabulate a function,
-! and given the array y2ndDer(1:n), which is the output from
-! CubicSplineCoefficients above, this routine returns
-! y_integral(1:nOut), the integral of y.
-! This is a cumulative integration, so that
-! y_integral(j) holds the integral of y from x(1) to xOut(j).
-! The integration formula was created by analytically integrating a
-! cubic spline between each node.
-! This subroutine assumes that both x and xOut are monotonically
-! increasing, and that all values of xOut are within the first and
-
! INPUT PARAMETERS:
integer, intent(in) :: &
- n, &! number of nodes
- nOut ! number of output locations to compute integral
+ n, &!< Input: number of nodes
+ nOut !< Input: number of output locations to compute integral
real(kind=RKIND), intent(in), dimension(n) :: &
- x, &! location of nodes
- y, &! value at nodes
- y2ndDer ! dy^2/dx^2 at each node
+ x, &!< Input: location of nodes
+ y, &!< Input: value at nodes
+ y2ndDer !< Input: dy^2/dx^2 at each node
real(kind=RKIND), dimension(nOut), intent(in) :: &
- xOut ! output locations to compute integral
+ xOut !< Input: output locations to compute integral
! OUTPUT PARAMETERS:
real(kind=RKIND), dimension(nOut), intent(out) :: &
- y_integral ! integral from 0 to xOut
+ y_integral !< Output: integral from 0 to xOut
! local variables:
@@ -295,37 +332,47 @@
enddo k_loop
- end subroutine mpas_integrate_column_cubic_spline
+ end subroutine mpas_integrate_column_cubic_spline!}}}
-
- subroutine mpas_interpolate_linear( &
+!***********************************************************************
+!
+! routine mpas_interpolate_linear
+!
+!> \brief MPAS Linear interpolation routine
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> Given the arrays x(1:n) and y(1:n), which tabulate a function,
+!> this routine returns the linear interpolated values of yOut(1:nOut)
+!> at xOut(1:nOut).
+!> This subroutine assumes that both x and xOut are monotonically
+!> increasing, and that all values of xOut are within the first and
+!> last values of x.
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_interpolate_linear( &!{{{
x,y,n, &
xOut,yOut,nOut)
-! Given the arrays x(1:n) and y(1:n), which tabulate a function,
-! this routine returns the linear interpolated values of yOut(1:nOut)
-! at xOut(1:nOut).
-! This subroutine assumes that both x and xOut are monotonically
-! increasing, and that all values of xOut are within the first and
-! last values of x.
! !INPUT PARAMETERS:
real (kind=RKIND), dimension(n), intent(in) :: &
- x, &! node location, input grid
- y ! interpolation variable, input grid
+ x, &!< Input: node location, input grid
+ y !< Input: interpolation variable, input grid
real (kind=RKIND), dimension(nOut), intent(in) :: &
- xOut ! node location, output grid
+ xOut !< Input: node location, output grid
integer, intent(in) :: &
- N, &! number of nodes, input grid
- NOut ! number of nodes, output grid
+ N, &!< Input: number of nodes, input grid
+ NOut !< Input: number of nodes, output grid
! !OUTPUT PARAMETERS:
real (kind=RKIND), dimension(nOut), intent(out) :: &
- yOut ! interpolation variable, output grid
+ yOut !< Output: interpolation variable, output grid
!-----------------------------------------------------------------------
!
@@ -355,13 +402,22 @@
enddo kInLoop
- end subroutine mpas_interpolate_linear
+ end subroutine mpas_interpolate_linear!}}}
+!***********************************************************************
+!
+! routine mpas_test_interpolate
+!
+!> \brief MPAS Interpolation test routine
+!> \author Mark Petersen
+!> \date 04/02/13
+!> \version SVN:$Id$
+!> \details
+!> Test routine to show how to operate the cubic spline subroutines
+!
+!-----------------------------------------------------------------------
+ subroutine mpas_test_interpolate!{{{
- subroutine mpas_test_interpolate
-
-! Test function to show how to operate the cubic spline subroutines
-
integer, parameter :: &
n = 10
real (kind=RKIND), dimension(n) :: &
@@ -426,7 +482,7 @@
print '(a,100f8.4,a)', 'yOut = [',yOut,'];'
print *, "plot(x,y,'-*r',xOut,yOut,'x')"
- end subroutine mpas_test_interpolate
+ end subroutine mpas_test_interpolate!}}}
end module mpas_spline_interpolation
</font>
</pre>