Index: /trunk/psLib/src/types/psArray.c
===================================================================
--- /trunk/psLib/src/types/psArray.c	(revision 8803)
+++ /trunk/psLib/src/types/psArray.c	(revision 8804)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-09-12 21:08:15 $
+ *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-09-12 21:55:49 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -27,4 +27,5 @@
 #include "psArray.h"
 #include "psLogMsg.h"
+#include "psAssert.h"
 
 
@@ -158,4 +159,24 @@
 }
 
+bool psArrayRemoveByPos(psArray* array,
+                        long position)
+{
+    PS_ASSERT_PTR_NON_NULL(array, false);
+
+    if (position > array->n) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                _("position > then the number of elements in the array."));
+        return false;
+    }
+
+    long i = position;
+    long n = array->n;
+    psFree(array->data[i]);
+    memmove(&array->data[i], &array->data[i + 1], (n - i - 1) * sizeof(psPtr));
+    array->n = --i; // reset the array size to indicate the removed item(s)
+
+    return true;
+}
+
 void psArrayElementsFree(psArray* array)
 {
Index: /trunk/psLib/src/types/psArray.h
===================================================================
--- /trunk/psLib/src/types/psArray.h	(revision 8803)
+++ /trunk/psLib/src/types/psArray.h	(revision 8804)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-09-12 21:04:11 $
+ *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-09-12 21:55:49 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -97,5 +97,5 @@
 );
 
-/** Remove an element from the array
+/** Remove an element from the array by it's pointer
  *
  *  Finds and removes the specified data pointer from the list.
@@ -108,4 +108,17 @@
     psArray* array,                    ///< array to operate on
     const psPtr data                   ///< the data pointer to remove from psArray
+);
+
+/** Remove an element from the array
+ *
+ *  Finds and removes the elements as the specified position
+ *
+ * @return bool:  TRUE if the specified data pointer was found and removed,
+ *                otherwise FALSE.
+ *
+ */
+bool psArrayRemoveByPos(
+    psArray* array,                    ///< array to operate on
+    long position                      ///< the element to remove
 );
 
Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 8803)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 8804)
@@ -10,6 +10,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-09-12 04:18:56 $
+*  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-09-12 21:55:49 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1118,5 +1118,5 @@
                 } else {
                     // Remove lower info level
-                    if(!psArrayRemove(levelArray,levelArray->data[*level])) {
+                    if(!psArrayRemoveByPos(levelArray, *level)) {
                         psFree(keyName);
                         return false;
