Index: /issm/branches/trunk-jpl-damage/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/Makefile.am	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/Makefile.am	(revision 11577)
@@ -1,2 +1,3 @@
 EXTRA_DIST = reconf  scripts test INSTALLICE LICENSE m4 examples cron etc doc packages ChangeLogCielo ChangeLogIce contributors.txt run READMEICE startup.m startup.m startup.m startup.m  todo MakefileIce
 SUBDIRS = src bin
+bin_SCRIPTS=config.h startup.m README.rtf
Index: /issm/branches/trunk-jpl-damage/NEWS
===================================================================
--- /issm/branches/trunk-jpl-damage/NEWS	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/NEWS	(revision 11577)
@@ -1,3 +1,2 @@
-
 please go to the ISSM website for the latest news:
 
Index: /issm/branches/trunk-jpl-damage/README
===================================================================
--- /issm/branches/trunk-jpl-damage/README	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/README	(revision 11577)
@@ -9,44 +9,53 @@
 Jet Propulsion Laboratory
 
-Eric          Eric Larour (Project Lead)
-Mathieu       Mathieu Morlighem (Anisotropic Meshing, Control Methods)
-Helene        Helene Seroussi (Coupling 2D-3D, Multi-model, full-Stokes)
+Eric    Larour (Project Manager)
+Mathieu Morlighem (Core Developer, Anisotropic Meshing, Control Methods)
+Helene  Seroussi (Core Develper Coupling 2D-3D, Multi-model, full-Stokes)
+Nicole  Schlegel (Developer, Atmospheric Forcing)
+Chris   Borstad (Developer, Rifting/Faulting/Crack Propagation)
+Feras   Habbal (Developer, Solver Technologies)
+Daria   Halkides (Analyst, Atmospheric Forcing)
+Ala     Khazendar (Analyst, Ice Sheet Processes)
 
 Email: issm@jpl.nasa.gov
 
 ------------------------------------------------------------------------------
+
+Website: ttp://issm.jpl.nasa.gov/ for additional information.
+
+------------------------------------------------------------------------------
+
 License
 
-ISSM is California Institute of Technology Copyright.
+ISSM is California Institute of Technology Copyright, Distributed under BSD Three Clause License.
+
+
+Copyright (c) 2002-2011, California Institute of Technology.
+All rights reserved.  Based on Government Sponsored Research under contracts
+NAS7-1407 and/or NAS7-03001.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the California Institute of Technology (Caltech),
+   its operating division the Jet Propulsion Laboratory (JPL), the National
+   Aeronautics and Space Administration (NASA), nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE CALIFORNIA INSTITUTE OF TECHNOLOGY BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ------------------------------------------------------------------------------
-Overview
-
-More to come
-
-Refer to http://issm.jpl.nasa.gov/ for additional information.
-------------------------------------------------------------------------------
-Distribution
-
-The directories contained in this distribution include:
-
-examples            Example problems 
-
-externalpackages    Other libraries 
-
-m4                  m4 macros used for supporting autoconf.
-
-doc                 The Users, Reference, and Developers Manuals are 
-                    maintained here.  Other references are available from
-                    the ISSM Web site (http://issm.jpl.nasa.gov/)
-
-src                 The main source code repository for the ISSM system.
-
-test                Files for regression and unit testing of the ISSM system.
-------------------------------------------------------------------------------
-Installation
-
-The installation procedure uses a standard GNU installation based on autoconf.
-The basic steps are to invoke 'configure' to generate Makefiles for your 
-particular system and then invoke 'make' to compile the sources.  See the 
-INSTALL file for detailed instructions.
-------------------------------------------------------------------------------
Index: /issm/branches/trunk-jpl-damage/ar-lib
===================================================================
--- /issm/branches/trunk-jpl-damage/ar-lib	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/ar-lib	(revision 11577)
@@ -0,0 +1,265 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-01-30.22; # UTC
+
+# Copyright (C) 2010, 2012 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+  echo "$me: $1" 1>&2
+  exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv in
+	mingw)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+  operation=$2
+  archive=$3
+  at_file_contents=`cat "$1"`
+  eval set x "$at_file_contents"
+  shift
+
+  for member
+  do
+    $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+  done
+}
+
+case $1 in
+  '')
+     func_error "no command.  Try '$0 --help' for more information."
+     ;;
+  -h | --h*)
+    cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "$me, version $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test $# -lt 3; then
+  func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+  if test $# -lt 2; then
+    func_error "you must specify a program, an action and an archive"
+  fi
+  case $1 in
+    -lib | -LIB \
+    | -ltcg | -LTCG \
+    | -machine* | -MACHINE* \
+    | -subsystem* | -SUBSYSTEM* \
+    | -verbose | -VERBOSE \
+    | -wx* | -WX* )
+      AR="$AR $1"
+      shift
+      ;;
+    *)
+      action=$1
+      shift
+      break
+      ;;
+  esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+replace=
+create=
+
+while test -n "$action"
+do
+  case $action in
+    d*) delete=yes  ;;
+    x*) extract=yes ;;
+    t*) list=yes    ;;
+    r*) replace=yes ;;
+    c*) create=yes  ;;
+    u*)             ;; # TODO: don't ignore the update modifier
+    v*)             ;; # TODO: don't ignore the verbose modifier
+    *)
+      func_error "unknown action specified"
+      ;;
+  esac
+  action=${action#?}
+done
+
+case $delete$extract$list$replace in
+  yes)
+    ;;
+  yesyes*)
+    func_error "more than one action specified"
+    ;;
+  *)
+    func_error "no action specified"
+    ;;
+esac
+
+if test -n "$delete"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  for member
+  do
+    case $1 in
+      @*)
+        func_at_file "${1#@}" -REMOVE "$archive"
+        ;;
+      *)
+        func_file_conv "$1"
+        $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+        ;;
+    esac
+  done
+
+elif test -n "$extract"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  if test $# -gt 0; then
+    for member
+    do
+      case $1 in
+        @*)
+          func_at_file "${1#@}" -EXTRACT "$archive"
+          ;;
+        *)
+          func_file_conv "$1"
+          $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+          ;;
+      esac
+    done
+  else
+    $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+    do
+      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+    done
+  fi
+
+elif test -n "$replace"; then
+  if test ! -f "$orig_archive"; then
+    if test -z "$create"; then
+      echo "$me: creating $orig_archive"
+    fi
+    orig_archive=
+  else
+    orig_archive=$archive
+  fi
+
+  for member
+  do
+    case $1 in
+    @*)
+      func_file_conv "${1#@}"
+      set x "$@" "@$file"
+      ;;
+    *)
+      func_file_conv "$1"
+      set x "$@" "$file"
+      ;;
+    esac
+    shift
+    shift
+  done
+
+  if test -n "$orig_archive"; then
+    $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+  else
+    $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+  fi
+
+elif test -n "$list"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  $AR -NOLOGO -LIST "$archive" || exit $?
+fi
Index: /issm/branches/trunk-jpl-damage/configs/config-linux64-murdo.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/configs/config-linux64-murdo.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/configs/config-linux64-murdo.sh	(revision 11577)
@@ -21,8 +21,6 @@
  --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
  --with-numthreads=18 \
- --with-ml-dir=$ISSM_TIER/externalpackages/petsc/install/ \
- --with-hypre-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+ --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
  --enable-debugging
  
- #--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
  
Index: /issm/branches/trunk-jpl-damage/configs/config-win7-32.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/configs/config-win7-32.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/configs/config-win7-32.sh	(revision 11577)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+#Dos style path needed for the windows sdk 7.1 cl compiler: 
+ISSM_TIER_WIN=`cygpath -m "$ISSM_TIER"`
+
+#get configure.sh to pick up the win7 Visual Studio compiler 
+./configure --prefix=$ISSM_TIER \
+	--with-vendor=intel-win7-32  \
+	--with-matlab-dir=$MATLAB_DIR \
+	--with-triangle-dir="$ISSM_TIER_WIN/externalpackages/triangle/install" \
+	--with-metis-dir="$ISSM_TIER_WIN/externalpackages/metis/install" \
+	--with-petsc-dir="$ISSM_TIER_WIN/externalpackages/petsc/install" \
+	--with-petsc-arch=$ISSM_ARCH  \
+	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib/  \
+	--with-mpi-lib="$ISSM_TIER_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \
+	--with-mpi-include="$ISSM_TIER_WIN/externalpackages/petsc/install/include/mpiuni" 
Index: /issm/branches/trunk-jpl-damage/configs/config-win7-64.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/configs/config-win7-64.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/configs/config-win7-64.sh	(revision 11577)
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+#Dos style path needed for the windows sdk 7.1 cl compiler: 
+ISSM_TIER_WIN=`cygpath -m "$ISSM_TIER"`
+
+#get configure.sh to pick up the win7 Visual Studio compiler 
+./configure --prefix=$ISSM_TIER \
+	--with-vendor=intel-win7-64  \
+	--with-matlab-dir=$MATLAB_DIR \
+	--with-triangle-dir="$ISSM_TIER_WIN/externalpackages/triangle/install" \
+	--with-metis-dir="$ISSM_TIER_WIN/externalpackages/metis/install" \
+	--with-petsc-dir="$ISSM_TIER_WIN/externalpackages/petsc/install" \
+	--with-petsc-arch=$ISSM_ARCH  \
+	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib/  \
+	--with-mpi-lib="$ISSM_TIER_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \
+	--with-mpi-include="$ISSM_TIER_WIN/externalpackages/petsc/install/include/mpiuni" 
Index: /issm/branches/trunk-jpl-damage/configure.ac
===================================================================
--- /issm/branches/trunk-jpl-damage/configure.ac	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/configure.ac	(revision 11577)
@@ -5,8 +5,9 @@
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
+AM_SILENT_RULES([yes])
 AC_PROG_RANLIB
-AC_PROG_CC([gcc icl])
+AC_PROG_CC([gcc icl cccl cl])
 AC_PROG_CPP
-AC_PROG_CXX([g++ icl])
+AC_PROG_CXX([g++ icl cccl cl])
 AC_PROG_F77([ifort g77 gfortran])
 AC_F77_LIBRARY_LDFLAGS
@@ -14,4 +15,5 @@
 AC_PATH_XTRA
 ISSM_OPTIONS
+AM_PROG_AR
 AC_CONFIG_FILES([Makefile
 			src/Makefile
@@ -19,5 +21,52 @@
 			src/ad/Makefile
 			src/mex/Makefile
+			src/m/Makefile
+			src/m/classes/Makefile
+			src/m/classes/@modellist/Makefile
+			src/m/classes/@pairoptions/Makefile
+			src/m/classes/model/Makefile
+			src/m/classes/clusters/Makefile
+			src/m/enum/Makefile
+			src/m/kml/Makefile
+			src/m/model/Makefile
+			src/m/model/plot/Makefile
+			src/m/model/mesh/Makefile
+			src/m/model/display/Makefile
+			src/m/model/parameterization/Makefile
+			src/m/model/partition/Makefile
+			src/m/model/solvers/Makefile
+			src/m/planet/Makefile
+			src/m/qmu/Makefile
+			src/m/shared/Makefile
+			src/m/solutions/Makefile
+			src/m/solvers/Makefile
+			src/m/utils/Makefile
+			src/m/utils/Analysis/Makefile
+			src/m/utils/Array/Makefile
+			src/m/utils/BC/Makefile
+			src/m/utils/Basins/Makefile
+			src/m/utils/Cluster/Makefile
+			src/m/utils/DataProcessing/Makefile
+			src/m/utils/Ecco3/Makefile
+			src/m/utils/Exp/Makefile
+			src/m/utils/Geometry/Makefile
+			src/m/utils/ImageProcessing/Makefile
+			src/m/utils/Interp/Makefile
+			src/m/utils/Kml/Makefile
+			src/m/utils/LatLong/Makefile
+			src/m/utils/Math/Makefile
+			src/m/utils/Meca/Makefile
+			src/m/utils/Mesh/Makefile
+			src/m/utils/Miscellaneous/Makefile
+			src/m/utils/Model/Makefile
+			src/m/utils/Numerics/Makefile
+			src/m/utils/OS/Makefile
+			src/m/utils/Plot/Makefile
+			src/m/utils/Shell/Makefile
+			src/m/utils/String/Makefile
+			src/m/utils/consistency/Makefile
+			src/m/utils/qmu/Makefile
 			bin/Makefile])
 AC_OUTPUT
 
+
Index: /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_daily
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_daily	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_daily	(revision 11577)
@@ -17,6 +17,6 @@
 MACHINE="astrid"
 
-#MATLAB path
-MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+#COMPILATION CONFIGURATION FILE
+COMPILE_CONFIG_FILE="config-linux64-astrid.sh"
 
 #----------------------#
@@ -54,4 +54,8 @@
 #List of external pakages to be installed
 EXTERNALPACKAGES="autoconf automake matlab mpich2 petsc metis triangle dakota chaco"
+
+#Corresponding list of installation files to use
+EXTERNALPACKAGES_CONFIGS=" install.sh install.sh install.sh install-1.0.2-linux64.sh install-3.2-linux64.sh install-4.0-linux64.sh install-linux64.sh install-linux64-astrid.sh install.sh"
+EXTERNALPACKAGES_NUMCPUS=" 8 8 8 8 8 8"
 
 #---------------------#
@@ -92,2 +96,11 @@
 
 NROPTIONS=""
+
+#------------------------#
+# 7: Matlab#
+#------------------------#
+
+#MATLAB path
+MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+
+MATLABBIN="/usr/local/pkgs/matlab-7.6/bin/matlab"
Index: /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_nightly
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_nightly	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_nightly	(revision 11577)
@@ -17,6 +17,6 @@
 MACHINE="astrid"
 
-#MATLAB path
-MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+#COMPILATION CONFIGURATION FILE
+COMPILE_CONFIG_FILE="config-linux64-astrid.sh"
 
 #----------------------#
@@ -54,4 +54,8 @@
 #List of external pakages to be installed
 EXTERNALPACKAGES="autoconf automake matlab mpich2 petsc metis triangle dakota chaco"
+
+#Corresponding list of installation files to use
+EXTERNALPACKAGES_CONFIGS=" install.sh install.sh install.sh install-1.0.2-linux64.sh install-3.2-linux64.sh install-4.0-linux64.sh install-linux64.sh install-linux64-astrid.sh install.sh"
+EXTERNALPACKAGES_NUMCPUS=" 1 1 1 1 1 1"
 
 #---------------------#
@@ -92,2 +96,12 @@
 
 NROPTIONS=""
+
+
+#------------------------#
+# 7: Matlab#
+#------------------------#
+
+#MATLAB path
+MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+
+MATLABBIN="/usr/local/pkgs/matlab-7.6/bin/matlab"
Index: /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_validation
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_validation	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/cron/configs/linux64_schlegel_validation	(revision 11577)
@@ -16,6 +16,6 @@
 MACHINE="astrid"
 
-#MATLAB path
-MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+#COMPILATION CONFIGURATION FILE
+COMPILE_CONFIG_FILE="config-linux64-astrid.sh"
 
 #----------------------#
@@ -53,4 +53,8 @@
 #List of external pakages to be installed
 EXTERNALPACKAGES="autoconf automake matlab mpich2 petsc metis triangle dakota chaco yams"
+
+#Corresponding list of installation files to use
+EXTERNALPACKAGES_CONFIGS=" install.sh install.sh install.sh install-1.0.2-linux64.sh install-3.2-linux64.sh install-4.0-linux64.sh install-linux64.sh install-linux64-astrid.sh install.sh"
+EXTERNALPACKAGES_NUMCPUS=" 1 1 1 1 1 1"
 
 #---------------------#
@@ -91,2 +95,11 @@
 
 NROPTIONS="'benchmark','all'"
+
+#------------------------#
+# 7: Matlab#
+#------------------------#
+
+#MATLAB path
+MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+
+MATLABBIN="/usr/local/pkgs/matlab-7.6/bin/matlab"
Index: /issm/branches/trunk-jpl-damage/cron/configs/macosx64_larour
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/configs/macosx64_larour	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/cron/configs/macosx64_larour	(revision 11577)
@@ -1,4 +1,4 @@
 #
-########### Configuration file for Eric Larour's nightly run on Mac ############
+########### Configuration file for Mathieu Morlighem's nightly run on Linux ############
 
 #-------------------------------#
@@ -6,15 +6,17 @@
 #-------------------------------#
 
-#ISSM main directory (full pathto ISSM trunk)
-ISSM_DIR="/Users/larour/issm/trunk"
+#ISSM main directory (full path)
+ISSM_DIR="/Users/larour/issm-uci"
+ISSM_TIER="/Users/larour/issm-uci/trunk-jpl/cron/trunk-jpl"
 
 #ISSM Architecture
 ISSM_ARCH="macosx-gnu"
 
-#Operating System
-OS="macosx64"
+#Machine configuration
+MACHINE="macosx-gil"
 
-#MATLAB path
-MATLAB_PATH="/Applications/MATLAB_R2008a/"
+#COMPILATION CONFIGURATION FILE
+COMPILE_CONFIG_FILE="config-macosx64-mathieu.sh"
+
 
 #----------------------#
@@ -29,12 +31,11 @@
 # - "none"     leave ISSM as is in its directory
 #              ->skip to section 3
-ISSM_INSTALLATION="update"
+ISSM_INSTALLATION="checkout"
 
 #SVN repository
 REPOSITORY="https://issm.ess.uci.edu/svn/issm/issm/trunk-jpl"
-#REPOSITORY="http://s383-rhat/issm/svn/issm/branches/issm2.2"
 
 #execution path used for parallel runs
-EXECUTION_PATH=""
+EXECUTION_PATH="/Users/larour/ExecutionNightlyRun"
 
 #-----------------------------------#
@@ -47,9 +48,13 @@
 # - "none"    leave external packages as is
 #             ->skip to section 4
-ISSM_EXTERNALPACKAGES="copy"
-EXTERNALPACKAGESDIR=""
+ISSM_EXTERNALPACKAGES="install"
+EXTERNALPACKAGESDIR="/Users/larour/issm-uci/trunk-jpl/externalpackages"
 
 #List of external pakages to be installed
-EXTERNALPACKAGES="autoconf automake matlab mpich2 petsc metis triangle"
+EXTERNALPACKAGES="autoconf automake matlab mpich2 petsc metis triangle dakota chaco"
+
+#Corresponding list of installation files to use
+EXTERNALPACKAGES_CONFIGS=" install.sh install.sh install.sh install-1.0.2-linux64.sh install-3.2-linux64.sh install-4.0-linux64.sh install-linux64.sh install-linux64-astrid.sh install.sh"
+EXTERNALPACKAGES_NUMCPUS=" 1 1 1 1 1 1"
 
 #---------------------#
@@ -67,9 +72,9 @@
 
 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
-#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
 SKIPMAIL="no"
 
 #Sender email address
-EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
+EMAIL_ADRESS="schlegel@jpl.nasa.gov"
 
 #------------------------#
@@ -82,5 +87,5 @@
 
 #number of cpus used in the nightly runs.
-NUMCPUS_RUN=1
+NUMCPUS_RUN=7
 
 #Nightly run options. The matlab routine nightlyrun.m will be called
@@ -90,2 +95,12 @@
 
 NROPTIONS=""
+
+
+#------------------------#
+# 7: Matlab#
+#------------------------#
+
+#MATLAB path
+MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
+
+MATLABBIN="/usr/local/pkgs/matlab-7.6/bin/matlab"
Index: /issm/branches/trunk-jpl-damage/cron/configs/win732_larour
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/configs/win732_larour	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/cron/configs/win732_larour	(revision 11577)
@@ -0,0 +1,102 @@
+########### Configuration file for Mathieu Morlighem's nightly run on Linux ############
+
+#-------------------------------#
+# 1: ISSM general configuration #
+#-------------------------------#
+
+#ISSM main directory (full path)
+ISSM_DIR="/cygdrive/c/issm-uci"
+ISSM_TIER="/cygdrive/c/issm-uci/trunk-jpl/cron/trunk-jpl"
+
+#ISSM Architecture
+ISSM_ARCH="cygwin-intel"
+
+#Machine configuration
+MACHINE="win7"
+
+#MATLAB path
+MATLAB_PATH="C:/MATLAB/R2011b32/"
+
+#COMPILATION CONFIGURATION FILE
+COMPILE_CONFIG_FILE="config-win7-32.sh"
+
+#----------------------#
+# 2: ISSM Installation #
+#----------------------#
+
+#ISSM_INSTALLATION can have 3 values:
+# - "checkout" the existing version of the code will be erased and
+#              the latest version will be checked out
+# - "update"   the directory won't be erased but ISSM will be updated
+#              ->skip to section 3
+# - "none"     leave ISSM as is in its directory
+#              ->skip to section 3
+ISSM_INSTALLATION="none"
+
+#SVN repository
+REPOSITORY="http://issm.ess.uci.edu/svn/issm/issm/trunk-jpl"
+
+#execution path used for parallel runs
+EXECUTION_PATH="/cygdrive/c/issm-uci/ExecutionNightlyRun"
+
+#-----------------------------------#
+# 3: External packages installation #
+#-----------------------------------#
+
+#ISSM_EXTERNALPACKAGES can have 3 values:
+# - "install" install all external packages listed below
+# - "copy"    copy existing directories (EXTERNALPACKAGESDIR)
+# - "none"    leave external packages as is
+#             ->skip to section 4
+ISSM_EXTERNALPACKAGES="none"
+EXTERNALPACKAGESDIR="/cygdrive/c/issm-uci/trunk-jpl/externalpackages"
+
+#List of external pakages to be installed
+EXTERNALPACKAGES=" autoconf automake petsc metis triangle cccl"
+
+#Corresponding list of installation files to use
+EXTERNALPACKAGES_CONFIGS=" install.sh install.sh install-3.1-win7.sh install-4.0-win7.sh install-win7.sh install-win7.sh"
+EXTERNALPACKAGES_NUMCPUS=" 1 1 1 1 1 1" 
+
+#---------------------#
+# 4: ISSM Compilation #
+#---------------------#
+
+#ISSM_COMPILATION can have 2 values:
+# - "yes" compile ISSM
+# - "no"  do not compile ISSM
+ISSM_COMPILATION="no"
+
+#----------------------#
+# 5: Mail notification #
+#----------------------#
+
+#Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
+SKIPMAIL="no"
+
+#Sender email address
+EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
+
+#------------------------#
+# 6: Nightly run options #
+#------------------------#
+
+#number of cpus used in ISSM installation and compilation (one is usually
+#safer as some packages are very sensitive to parallel compilation)
+NUMCPUS_INSTALL=8
+
+#number of cpus used in the nightly runs.
+NUMCPUS_RUN=1
+
+#Nightly run options. The matlab routine nightlyrun.m will be called
+#as follows: nightlyrun($NROPTIONS). The options must be understandable
+#by Matlab and nightlyrun.m
+#ex: "'id',[101 102 103]"
+
+NROPTIONS="'benchmark','all'"
+
+#------------------------#
+# 7: Matlab#
+#------------------------#
+MATLABBIN=/cygdrive/c/MATLAB/R2011b32/bin/matlab
Index: /issm/branches/trunk-jpl-damage/cron/configs/win764_larour
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/configs/win764_larour	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/cron/configs/win764_larour	(revision 11577)
@@ -0,0 +1,102 @@
+########### Configuration file for Mathieu Morlighem's nightly run on Linux ############
+
+#-------------------------------#
+# 1: ISSM general configuration #
+#-------------------------------#
+
+#ISSM main directory (full path)
+ISSM_DIR="/cygdrive/c/issm-uci"
+ISSM_TIER="/cygdrive/c/issm-uci/trunk-jpl/cron/trunk-jpl"
+
+#ISSM Architecture
+ISSM_ARCH="cygwin-intel"
+
+#Machine configuration
+MACHINE="win7"
+
+#MATLAB path
+MATLAB_PATH="C:/MATLAB/R2011b/"
+
+#COMPILATION CONFIGURATION FILE
+COMPILE_CONFIG_FILE="config-win7-64.sh"
+
+#----------------------#
+# 2: ISSM Installation #
+#----------------------#
+
+#ISSM_INSTALLATION can have 3 values:
+# - "checkout" the existing version of the code will be erased and
+#              the latest version will be checked out
+# - "update"   the directory won't be erased but ISSM will be updated
+#              ->skip to section 3
+# - "none"     leave ISSM as is in its directory
+#              ->skip to section 3
+ISSM_INSTALLATION="none"
+
+#SVN repository
+REPOSITORY="http://issm.ess.uci.edu/svn/issm/issm/trunk-jpl"
+
+#execution path used for parallel runs
+EXECUTION_PATH="/cygdrive/c/issm-uci/ExecutionNightlyRun"
+
+#-----------------------------------#
+# 3: External packages installation #
+#-----------------------------------#
+
+#ISSM_EXTERNALPACKAGES can have 3 values:
+# - "install" install all external packages listed below
+# - "copy"    copy existing directories (EXTERNALPACKAGESDIR)
+# - "none"    leave external packages as is
+#             ->skip to section 4
+ISSM_EXTERNALPACKAGES="none"
+EXTERNALPACKAGESDIR="/cygdrive/c/issm-uci/trunk-jpl/externalpackages"
+
+#List of external pakages to be installed
+EXTERNALPACKAGES=" autoconf automake petsc metis triangle cccl"
+
+#Corresponding list of installation files to use
+EXTERNALPACKAGES_CONFIGS=" install.sh install.sh install-3.1-win7.sh install-4.0-win7.sh install-win7.sh install-win7.sh"
+EXTERNALPACKAGES_NUMCPUS=" 1 1 1 1 1 1" 
+
+#---------------------#
+# 4: ISSM Compilation #
+#---------------------#
+
+#ISSM_COMPILATION can have 2 values:
+# - "yes" compile ISSM
+# - "no"  do not compile ISSM
+ISSM_COMPILATION="no"
+
+#----------------------#
+# 5: Mail notification #
+#----------------------#
+
+#Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
+SKIPMAIL="no"
+
+#Sender email address
+EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
+
+#------------------------#
+# 6: Nightly run options #
+#------------------------#
+
+#number of cpus used in ISSM installation and compilation (one is usually
+#safer as some packages are very sensitive to parallel compilation)
+NUMCPUS_INSTALL=8
+
+#number of cpus used in the nightly runs.
+NUMCPUS_RUN=1
+
+#Nightly run options. The matlab routine nightlyrun.m will be called
+#as follows: nightlyrun($NROPTIONS). The options must be understandable
+#by Matlab and nightlyrun.m
+#ex: "'id',[101 102 103]"
+
+NROPTIONS=""
+
+#------------------------#
+# 7: Matlab#
+#------------------------#
+MATLABBIN=/cygdrive/c/MATLAB/R2011b32/bin/matlab
Index: /issm/branches/trunk-jpl-damage/cron/nightlyrun.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/cron/nightlyrun.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/cron/nightlyrun.sh	(revision 11577)
@@ -29,12 +29,22 @@
 {
 	#return host name depending on the OS
-	if [ "$1" = "wineric" ] 
+	if [ "$1" = "win7" ] 
 	then
-		HOST_NAME=`hostname`;
+		HOST_NAME=`hostname | sed 's/-//g'`;
 	else
-		HOST_NAME=`hostname -s`;
+		HOST_NAME=`hostname -s | sed 's/-//g'`;
 	fi
 	echo $HOST_NAME;
 } #}}}
+function pause() #{{{1
+{
+pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'`
+
+while [ -n "$pid" ]
+do
+	pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'`
+done
+}
+#}}}
 
 #Get configuration
@@ -74,5 +84,5 @@
 	#Erase previous code and Fetch the new one
 	rm -rf $ISSM_RELEASE
-	svn checkout $REPOSITORY
+	svn checkout "$REPOSITORY"
 
 elif [ "$ISSM_INSTALLATION" == "update" ]
@@ -100,9 +110,17 @@
 #create simpler  cluster.rc file, with only the cluster we are interested in.
 cd $ISSM_TIER/test/NightlyRun/
-cat << END > $HOST_NAME"_settings.m"
+if [ "$MACHINE" = "win7" ]; then
+	cat << END > $HOST_NAME"_settings.m"
+cluster.login='$USER';
+cluster.codepath='`cygpath -m $ISSM_TIER/bin`';
+cluster.executionpath='`cygpath -m $EXECUTION_PATH`';
+END
+else
+	cat << END > $HOST_NAME"_settings.m"
 cluster.login='$USER';
 cluster.codepath='$ISSM_TIER/bin';
 cluster.executionpath='$EXECUTION_PATH';
 END
+fi
 #}}}
 #Source environment variables with new matlab path {{{1
@@ -113,16 +131,16 @@
 if [ "$ISSM_EXTERNALPACKAGES" == "install" ]
 then
+	
 	cd $ISSM_TIER/externalpackages
-	for ep in $EXTERNALPACKAGES
-	do 
-		cd $ep
-		case $ep in
-			"mpich2" )   ./install-1.0.2-linux64.sh ;;
-			"petsc" )    ./install-3.2-linux64.sh   ;;
-			"metis" )    ./install-4.0-linux64.sh ;;
-			"triangle" ) ./install-linux64.sh ;;
-			"dakota" )   ./install-linux64-astrid.sh ;;
-			*)           ./install.sh $NUMCPUS_INSTALL
-		esac
+	#number of packages: 
+	numpackages=`echo $EXTERNALPACKAGES | wc -w`
+
+	for (( i=1; i<=$numpackages; i++ ))
+	do
+		package=`echo $EXTERNALPACKAGES | cut -d " " -f $i-$i`
+		package_config=`echo $EXTERNALPACKAGES_CONFIGS | cut -d " " -f $i-$i`
+
+		cd $package
+		$package_config
 		cd ..
 	done
@@ -158,18 +176,6 @@
 	make distclean
 	./scripts/automakererun.sh
-	./configs/config-linux64-astrid.sh
-
-	#4: compile and install ISSM
-	if [ "$MACHINE" = "wineric" ] 
-	then
-		cd $ISSM_TIER/src/c
-		./intel-compile.sh
-		cd $ISSM_TIER/src/mex
-		make install
-		cd $ISSM_TIER
-	else
-		make -j $NUMCPUS_INSTALL
-		make -j $NUMCPUS_INSTALL install
-	fi
+	source ./configs/$COMPILE_CONFIG_FILE
+	make install
 
 elif [ "$ISSM_COMPILATION" == "no" ]
@@ -185,5 +191,6 @@
 #create softlink to startup {{{1
 cd $ISSM_TIER/test/NightlyRun/
-ln -s $ISSM_TIER/startup.m .
+rm startup.m #in case it alreade exists
+cp $ISSM_TIER/startup.m .
 #}}}
 #Create nightlylog directory and info.log {{{1
@@ -212,4 +219,11 @@
 
 #Run tests
+#on Matlab and windows machines, we'll need a windows style path:  {{{
+if [ "$MACHINE" = "win7" ]; then
+	MATLAB_TIER=`cygpath -m $ISSM_TIER`
+else 
+	MATLAB_TIER=$ISSM_TIER
+fi
+#}}}
 #Launch all tests on different cpus {{{1
 for (( i=1;i<=$NUMCPUS_RUN;i++ ))
@@ -219,5 +233,5 @@
 	warning off %necessary to avoid a info.log of several Go for parallel runs
 	try,
-	cd $ISSM_TIER/test/NightlyRun
+	cd $MATLAB_TIER/test/NightlyRun
 	startup;
 	$(if [ "$NROPTIONS" = ""  ]
@@ -225,4 +239,5 @@
 		echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
 	else
+		#echo "runme('id',[101 102]);" 
 		echo "runme($NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
 	fi
@@ -245,14 +260,19 @@
 
 	#Start test
-	MATLAB_VERSION="7.6" #7.2,7.4,7.6 and 7.8
-	/usr/local/pkgs/matlab-$MATLAB_VERSION/bin/matlab  -nojvm -nosplash  -r matlab_run$i -logfile matlab_log$i.log &
+	$MATLABBIN  -nojvm -nosplash  -r matlab_run$i -logfile matlab_log$i.log &
+
 done
 
 #wait until matlab closes
-wait
+if [ "$MACHINE" = "win7" ]; then
+	pause MATLAB
+else
+	wait
+fi
+
 #}}}
 #concatenate all reports {{{1
 cd $ISSM_TIER/nightlylog/
-mv matlab_log1.log  matlab_log.log
+cp matlab_log1.log  matlab_log.log
 for (( i=2;i<=$NUMCPUS_RUN;i++ ))
 do
@@ -290,7 +310,8 @@
 	for i in `echo $MAILINGLIST`; do
 
-		if [ "$MACHINE" = "wineric" ]
+		if [ "$MACHINE" = "win7" ]
 		then
-			email -html -f "ISSM Nightly run $EMAIL_ADRESS" -s "Nightly runs of $ISSM_RELEASE , configuration: $MACHINE, host: $HOST_NAME, user: $USER. " $i < $ISSM_TIER/test/Verification/NightlyRun/report.html
+			echo $i
+			email -html -s "Nightly runs of $ISSM_RELEASE , configuration: $MACHINE, host: $HOST_NAME, user: $USER. " $i < $ISSM_TIER/nightlylog/report.html
 		else 
 			if [ "$MACHINE" = "astrid" ]
Index: /issm/branches/trunk-jpl-damage/etc/environment.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/etc/environment.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/etc/environment.sh	(revision 11577)
@@ -8,4 +8,10 @@
 	eval $i
 done
+
+#Windows compilers: 
+if [[ "$ISSM_ARCH" == "cygwin-intel" ]]; then
+	source $ISSM_TIER/externalpackages/windows/windows_environment.sh
+fi
+
 
 #CRON utilities
@@ -224,2 +230,5 @@
 #SHAPELIB
 export PATH="$PATH:$SHAPELIB_DIR/exec"
+
+#CCCL
+export PATH="$PATH:$CCCL_DIR/bin"
Index: /issm/branches/trunk-jpl-damage/etc/environment_variables.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/etc/environment_variables.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/etc/environment_variables.sh	(revision 11577)
@@ -166,2 +166,5 @@
 #shapelib
 SHAPELIB_DIR="$ISSM_TIER/externalpackages/shapelib/install"
+
+#cccl
+CCCL_DIR="$ISSM_TIER/externalpackages/cccl/install"
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/AndroidManifest.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/AndroidManifest.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/AndroidManifest.xml	(revision 11577)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      package="com.example.helloworld"
+      android:versionCode="1"
+      android:versionName="1.0">
+    <application android:label="@string/app_name" >
+        <activity android:name="HelloWorldAppActivity"
+                  android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest> 
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/ant.properties
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/ant.properties	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/ant.properties	(revision 11577)
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+#  'source.dir' for the location of your java source folder and
+#  'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+#  'key.store' for the location of your keystore and
+#  'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/HelloWorldApp-debug-unaligned.apk.d
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/HelloWorldApp-debug-unaligned.apk.d	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/HelloWorldApp-debug-unaligned.apk.d	(revision 11577)
@@ -0,0 +1,3 @@
+/Users/gperez/HelloWorldAppProject/bin/HelloWorldApp-debug-unaligned.apk : \
+/Users/gperez/HelloWorldAppProject/bin/HelloWorldApp.ap_ \
+/Users/gperez/HelloWorldAppProject/bin/classes.dex \
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/HelloWorldApp.ap_.d
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/HelloWorldApp.ap_.d	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/HelloWorldApp.ap_.d	(revision 11577)
@@ -0,0 +1,4 @@
+/Users/gperez/HelloWorldAppProject/bin/HelloWorldApp.ap_ \
+ : /Users/gperez/HelloWorldAppProject/res/layout/main.xml \
+/Users/gperez/HelloWorldAppProject/res/values/strings.xml \
+/Users/gperez/HelloWorldAppProject/AndroidManifest.xml \
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/build.prop
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/build.prop	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/build.prop	(revision 11577)
@@ -0,0 +1,10 @@
+#Last build type
+#Tue, 21 Feb 2012 11:52:47 -0800
+
+build.last.target=debug
+
+build.last.is.instrumented=false
+
+build.last.is.packaging.debug=true
+
+build.last.is.signing.debug=true
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/classes.dex.d
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/classes.dex.d	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/bin/classes.dex.d	(revision 11577)
@@ -0,0 +1,1 @@
+/Users/gperez/HelloWorldAppProject/bin/classes.dex : \
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/build.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/build.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/build.xml	(revision 11577)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="HelloWorldApp" default="help">
+
+    <!-- The local.properties file is created and updated by the 'android' tool.
+         It contains the path to the SDK. It should *NOT* be checked into
+         Version Control Systems. -->
+    <property file="local.properties" />
+
+    <!-- The ant.properties file can be created by you. It is only edited by the
+         'android' tool to add properties to it.
+         This is the place to change some Ant specific build properties.
+         Here are some properties you may want to change/update:
+
+         source.dir
+             The name of the source directory. Default is 'src'.
+         out.dir
+             The name of the output directory. Default is 'bin'.
+
+         For other overridable properties, look at the beginning of the rules
+         files in the SDK, at tools/ant/build.xml
+
+         Properties related to the SDK location or the project target should
+         be updated using the 'android' tool with the 'update' action.
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems.
+
+         -->
+    <property file="ant.properties" />
+
+    <!-- The project.properties file is created and updated by the 'android'
+         tool, as well as ADT.
+
+         This contains project specific properties such as project target, and library
+         dependencies. Lower level build properties are stored in ant.properties
+         (or in .classpath for Eclipse projects).
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems. -->
+    <loadproperties srcFile="project.properties" />
+
+    <!-- quick check on sdk.dir -->
+    <fail
+            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+            unless="sdk.dir"
+    />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+     in between standard targets -->
+<!--
+    <target name="-pre-build">
+    </target>
+    <target name="-pre-compile">
+    </target>
+
+    /* This is typically used for code obfuscation.
+       Compiled code location: ${out.classes.absolute.dir}
+       If this is not done in place, override ${out.dex.input.absolute.dir} */
+    <target name="-post-compile">
+    </target>
+-->
+
+    <!-- Import the actual build file.
+
+         To customize existing targets, there are two options:
+         - Customize only one target:
+             - copy/paste the target into this file, *before* the
+               <import> task.
+             - customize it to your needs.
+         - Customize the whole content of build.xml
+             - copy/paste the content of the rules files (minus the top node)
+               into this file, replacing the <import> task.
+             - customize to your needs.
+
+         ***********************
+         ****** IMPORTANT ******
+         ***********************
+         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+         in order to avoid having your file be overridden by tools such as "android update project"
+    -->
+    <!-- version-tag: 1 -->
+    <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/gen/R.java.d
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/gen/R.java.d	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/gen/R.java.d	(revision 11577)
@@ -0,0 +1,4 @@
+/Users/gperez/HelloWorldAppProject/gen/com/example/helloworld/R.java \
+ : /Users/gperez/HelloWorldAppProject/res/layout/main.xml \
+/Users/gperez/HelloWorldAppProject/res/values/strings.xml \
+/Users/gperez/HelloWorldAppProject/AndroidManifest.xml \
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/gen/com/example/helloworld/R.java
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/gen/com/example/helloworld/R.java	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/gen/com/example/helloworld/R.java	(revision 11577)
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package com.example.helloworld;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class layout {
+        public static final int main=0x7f020000;
+    }
+    public static final class string {
+        public static final int app_name=0x7f030000;
+    }
+}
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/proguard.cfg
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/proguard.cfg	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/proguard.cfg	(revision 11577)
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+   public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/project.properties
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/project.properties	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/project.properties	(revision 11577)
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-7
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/res/layout/main.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/res/layout/main.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/res/layout/main.xml	(revision 11577)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<TextView  
+    android:layout_width="fill_parent" 
+    android:layout_height="wrap_content" 
+    android:text="Hello World, HelloWorldAppActivity"
+    />
+</LinearLayout>
+
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/res/values/strings.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/res/values/strings.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/res/values/strings.xml	(revision 11577)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">HelloWorldAppActivity</string>
+</resources>
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/src/com/example/helloworld/HelloWorldAppActivity.java
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/src/com/example/helloworld/HelloWorldAppActivity.java	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/HelloWorldAppProject/src/com/example/helloworld/HelloWorldAppActivity.java	(revision 11577)
@@ -0,0 +1,15 @@
+package com.example.helloworld;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class HelloWorldAppActivity extends Activity
+{
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+    }
+}
Index: /issm/branches/trunk-jpl-damage/externalpackages/android/README
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/android/README	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/android/README	(revision 11577)
@@ -0,0 +1,19 @@
+//Written by: Gilberto Perez
+//Last Modified 2/21/2012
+/*
+ * This is a temporary readme file for the installation of the Android emulator.
+ */
+1) Download the Android SDK <http://developer.android.com/sdk/index.html>. 
+2) Add to your PATH the following:
+	ANDROID_HOME=~/android-sdk-macosx
+	PATH=${PATH}:ANDROID_HOME/platforms/android-15/:~ANDROID_HOME/platform-tools/:ANDROID_HOME/tools/
+3) Run Android and install the newest Android distribution(as of the last update: android-15)
+4) Navigate to the project directory and run Android update project ./
+5) Run ant debug.
+6) Initiate an emulator by entering:
+	1) android list targets (this will produce a list of available of system image targets)
+	2) android create avd -n <name> -t<targetID> (Choose targetID to match android-15)
+7) Start up the emulator by entering: emulator -avd <avd_name>
+8) Install the app by entering: adb install <path_to_your_bin>.apk
+
+The app should be installed and ready to run from the virtual device!
Index: /issm/branches/trunk-jpl-damage/externalpackages/autoconf/install.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/autoconf/install.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/autoconf/install.sh	(revision 11577)
@@ -2,5 +2,5 @@
 
 #Some cleanup
-rm -rf install autoconf-2.63 src
+rm -rf install autoconf-2.68 src
 
 #Create install directories
@@ -8,8 +8,8 @@
 
 #Untar 
-tar -zxvf  autoconf-2.63.tar.gz
+tar -zxvf  autoconf-2.68.tar.gz
 
 #Move autoconf into src directory
-mv autoconf-2.63 src
+mv autoconf-2.68 src
 
 #Compile autoconf
Index: /issm/branches/trunk-jpl-damage/externalpackages/automake/install.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/automake/install.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/automake/install.sh	(revision 11577)
@@ -2,5 +2,5 @@
 
 #Some cleanup
-rm -rf install automake-1.10.2 src
+rm -rf install automake-1.11.3 src
 
 #Create install directories
@@ -8,6 +8,6 @@
 
 #Untar 
-tar -zxvf  automake-1.10.2.tar.gz
-mv automake-1.10.2 src
+tar -zxvf  automake-1.11.3.tar.gz
+mv automake-1.11.3 src
 
 #Compile automake
Index: /issm/branches/trunk-jpl-damage/externalpackages/bsdtar/install-win7.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/bsdtar/install-win7.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/bsdtar/install-win7.sh	(revision 11577)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src libarchive-3.0.3
+mkdir install src
+
+#Untar 
+tar -zxvf  libarchive-3.0.3.tar.gz
+
+#Move libarchive into src directory
+mv libarchive-3.0.3/* src
+rm -rf libarchive-3.0.3
+
+cd src 
+./configure --prefix="$ISSM_TIER/externalpackages/bsdtar/install" 
+make
+make install
Index: /issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.orig.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.orig.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.orig.sh	(revision 11577)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf src install cccl-0.03
+mkdir install src
+
+#Untar 
+tar -zxvf  cccl-0.03.tar.gz
+
+#Move cccl into install directory
+mv cccl-0.03/* src
+rm -rf cccl-0.03
+
+cd src 
+
+#Compile
+./configure --prefix="$ISSM_TIER/externalpackages/cccl/install"
+
+make
+make install
Index: /issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.sh	(revision 11577)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+#Some cleanup
+rm -rf install src cccl-0.03
+mkdir install 
+mkdir install/bin
+
+#Move cccl into install directory
+cp issm/cccl install/bin
Index: /issm/branches/trunk-jpl-damage/externalpackages/cccl/issm/cccl
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/cccl/issm/cccl	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/cccl/issm/cccl	(revision 11577)
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+# cccl 
+# Wrapper around MS's cl.exe and link.exe to make them act more like
+# Unix cc and ld
+#
+# Copyright (C) 2000-2003 Geoffrey Wossum (gwossum@acm.org)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your optsion) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+usage()
+{
+    cat <<EOF
+Usage: cccl [OPTIONS]
+
+cccl is a wrapper around Microsoft's cl.exe and link.exe.  It translates
+parameters that Unix cc's and ld's understand to parameters that cl and link
+understand.
+EOF
+    exit $1
+}
+
+prog=cl
+
+### Run through every optsion and convert it to the proper MS one
+while test $# -gt 0; do
+
+    case "$1" in
+    --version)
+	cat <<EOF
+cccl 0.03
+
+Copyright 2000-2003 Geoffrey Wossum
+This is free software; see the source for copying conditions.  There is NO
+waranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+EOF
+	exit 1;
+	;;
+
+    -o)
+	# specifying output file, is it an object or an executable
+	shift
+	case "$1" in
+			
+		*.exe)
+			opts="$opts /Fe$1";
+		;;
+
+
+		*.mex*)
+			opts="$opts -o $1"
+		;;
+
+		*.o | *.obj)
+			opts="$opts /Fo$1"
+		;;
+
+		*)
+			opts="$opts /Fo$1"
+		;;
+    esac
+	;;
+	*)
+		#do nothing
+		opts="$opts $1"
+	;;
+
+	
+    esac
+    shift
+done
+
+#echo "$prog $opts"
+exec $prog $opts
+exit 0
+
+    
Index: /issm/branches/trunk-jpl-damage/externalpackages/dakota/install-linux64-murdo.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/dakota/install-linux64-murdo.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/dakota/install-linux64-murdo.sh	(revision 11577)
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+#Get number of cpus
+NUMCPUS=$1;
+
+#Some cleanup
+rm -rf Dakota
+rm -rf src 
+rm -rf install 
+mkdir src install 
+
+#Untar 
+tar -zxvf  Dakota_4_3.src.tar.gz
+
+#Move Dakota to src directory
+mv Dakota/* src
+rm -rf Dakota
+
+#Apply patches
+patch src/src/ParallelLibrary.C ./ParallelLibrary.C.patch
+patch src/src/ParallelLibrary.H ./ParallelLibrary.H.patch
+patch src/src/NIDRProblemDescDB.C ./NIDRProblemDescDB.C.patch
+patch src/src/NonDSampling.C ./NonDSampling.C.patch
+patch src/src/NonDLocalReliability.C ./NonDLocalReliability.C.patch
+patch src/src/NonDUnilevelRBDO.C ./NonDUnilevelRBDO.C.patch    #  source not even used?
+#patch -R src/packages/Pecos/src/LHSDriver.cpp ./LHSDriver.cpp.patch
+
+#Configure dakota
+cd src
+./configure \
+	--prefix="$ISSM_TIER/externalpackages/dakota/install" \
+	--without-graphics  \
+	--with-pic \
+	--disable-mpi \
+	--with-blas=/usr/lib64/libblas.so.3.1.1 \
+	--with-lapack=/usr/lib64/liblapack.so.3.1.1
+cd ..
+
+#Before compiling, if running on 64 bits, we need to active fPIC compilation. Some packages 
+#do not register -fPIC in Dakota, which is a problem. Edit the faulty Makefiles and add the -fPIC 
+#flag to the compilation.
+cat ./src/methods/NCSUOpt/Makefile | sed 's/FFLAGS = -g -O2/FFLAGS = -g -O2 -fPIC/g' >  temp
+mv temp ./src/methods/NCSUOpt/Makefile
+
+cat ./src/methods/acro/packages/pebbl/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
+mv temp ./src/methods/acro/packages/pebbl/src/Makefile
+
+cat ./src/methods/hopspack/src-nappspack/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
+mv temp ./src/methods/hopspack/src-nappspack/Makefile
+
+cat ./src/methods/hopspack/src-cddlib/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
+mv temp  ./src/methods/hopspack/src-cddlib/Makefile 
+
+cat ./src/methods/hopspack/src-shared/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
+mv temp  ./src/methods/hopspack/src-shared/Makefile 
+
+cat ./src/methods/hopspack/src-shared/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
+mv temp  ./src/methods/hopspack/src-shared/Makefile 
+
+cat ./src/methods/hopspack/src-conveyor/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2 -fPIC/g' > temp
+mv temp  ./src/methods/hopspack/src-conveyor/Makefile 
+
+cat ./src/methods/hopspack/src-appspack/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
+mv temp ./src/methods/hopspack/src-appspack/Makefile 
+
+cat ./src/methods/acro/packages/colin/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
+mv temp ./src/methods/acro/packages/colin/src/Makefile
+
+cat ./src/methods/acro/packages/coliny/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
+mv temp ./src/methods/acro/packages/coliny/src/Makefile
+
+cat ./src/methods/acro/packages/tpl/3po/Makefile | sed 's/CFLAGS = -O2/CFLAGS = -O2 -fPIC/g' > temp
+mv temp  ./src/methods/acro/packages/tpl/3po/Makefile 
+
+cat ./src/methods/acro/packages/tpl/3po/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CFLAGS = -O2 -fpermissive -fPIC/g' > temp
+mv temp  ./src/methods/acro/packages/tpl/3po/Makefile 
+
+cat ./src/packages/ampl/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
+mv temp  ./src/packages/ampl/Makefile 
+
+#Compile and install dakota
+cd src 
+if [ -z $NUMCPUS ];
+then
+	make
+	make install
+else
+	make -j $NUMCPUS
+	make -j $NUMCPUS install
+fi
+cd ..
+
+#Weird behaviour of Dakota: libamplsolver.a and amplsolver.a are not the same thing!
+cd install/lib
+mv libamplsolver.a libamplsolver.a.bak
+ln -s ../../src/packages/ampl/amplsolver.a ./libamplsolver.a
Index: /issm/branches/trunk-jpl-damage/externalpackages/dyson/ldap.pl
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/dyson/ldap.pl	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/dyson/ldap.pl	(revision 11577)
@@ -7,11 +7,11 @@
 $bn="jplbadgenumber"; $txt="$bn".".txt"; $db="jplusers.db";                # Initialize values
 #
-system(`$ldb -x -h $lds -b $ou uid=* filter $bn > $txt`);                     # Execute LDAPsearch, write to file
+system(`$ldb -x -h $lds -b $ou uid=* uid > $txt`);                         # Execute LDAPsearch, write to file
 #
 open(I,"<$txt");                                                           # Open input file handle
   open(O,">badges.tmp");                                                   # Open output file handle
     while (<I>) { chomp($_);                                               # Spool through input file
-      if ($_=~"^uid=") {                                                   # If line begins with UID value,
-        $_=~s/uid=//; $_=~s/,(.*)$//; $_=~s/\n//;                          #   strip line of extraneous data
+      if ($_ =~ "^uid: ") {                                                # If line begins with UID value,
+        $_=~s/uid: //; $_=~s/,(.*)$//; $_=~s/\n//;                         #   strip line of extraneous data
         if (!($_=~/^\d\d\d\d\d\d/)) { print O "$_\n"; }                    # If UID is non-numeric, print output
       }                                                                    # Close condition
Index: /issm/branches/trunk-jpl-damage/externalpackages/matlab/install.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/matlab/install.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/matlab/install.sh	(revision 11577)
@@ -5,8 +5,8 @@
 
 #Select or create a new simlink
-ln -s /usr/local/pkgs/matlab-7.6/ install
+#ln -s /usr/local/pkgs/matlab-7.6/ install
 #ln -s /usr/local/matlab704/ install
 #ln -s /usr/local/matlab711/ install
-#ln -s /usr/local/matlab712/ install
+ln -s /usr/local/matlab712/ install
 #ln -s /usr/local/pkgs/matlab-7.6/ install
 #ln -s /Applications/MATLAB_R2008a/ install
Index: /issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.4-macosx32.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.4-macosx32.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.4-macosx32.sh	(revision 11577)
@@ -14,8 +14,8 @@
 #Configure mpich2
 cd src
-export CFLAGS=" -arch i386"
+export FFLAGS=" -m32"
+export CFLAGS=" -m32"
 export CXXFLAGS=" -arch i386"
 export CPPFLAGS=" -arch i386"
-export FFLAGS=" -arch i386"
 ./configure \
 	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
@@ -23,5 +23,5 @@
 	--enable-sharedlibs=osx-gcc \
 	--enable-shared \
-	--enable-fc="/usr/local/bin/gfortran"
+	--enable-fc
 
 #Compile mpich2
Index: /issm/branches/trunk-jpl-damage/externalpackages/tao/install.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/tao/install.sh	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/tao/install.sh	(revision 11577)
@@ -1,15 +1,16 @@
 #!/bin/bash
-#wget http://www.mcs.anl.gov/research/projects/tao/download/tao-2.0.tar.gz
+#http://www.mcs.anl.gov/research/projects/tao/download/index.html
+#wget http://www.mcs.anl.gov/research/projects/tao/download/tao-2.0-p3.tar.gz
 
 #Some cleanup
-rm -rf install tao-2.0
+rm -rf install tao-2.0-p3
 mkdir install
 
 #Untar 
-tar -zxvf  tao-2.0.tar.gz
+tar -zxvf  tao-2.0-p3.tar.gz
 
 #move into place
-mv tao-2.0/* install/
-rm -rf tao-2.0
+mv tao-2.0-p3/* install/
+rm -rf tao-2.0-p3
 cd install
 export TAO_DIR="$ISSM_TIER/externalpackages/tao/install/"
Index: /issm/branches/trunk-jpl-damage/externalpackages/vim/addons/vim/syntax/c.vim
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/vim/addons/vim/syntax/c.vim	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/externalpackages/vim/addons/vim/syntax/c.vim	(revision 11577)
@@ -434,5 +434,4 @@
 syn keyword cType Pengrid
 syn keyword cType Element
-syn keyword cType Load
 syn keyword cType Penta
 syn keyword cType PentaHook
@@ -636,4 +635,6 @@
 syn keyword cConstant MaterialsRheologyLawEnum
 syn keyword cConstant MaterialsRheologyNEnum
+syn keyword cConstant MaterialsRheologyZEnum
+syn keyword cConstant MaterialsRheologyZbarEnum
 syn keyword cConstant MaterialsRhoIceEnum
 syn keyword cConstant MaterialsRhoWaterEnum
@@ -697,4 +698,5 @@
 syn keyword cConstant ThermalSpctemperatureEnum
 syn keyword cConstant ThermalStabilizationEnum
+syn keyword cConstant ThermalIsenthalpyEnum
 syn keyword cConstant ThicknessEnum
 syn keyword cConstant TimesteppingCflCoefficientEnum
Index: /issm/branches/trunk-jpl-damage/externalpackages/windows/InstallInstructions.txt
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/windows/InstallInstructions.txt	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/windows/InstallInstructions.txt	(revision 11577)
@@ -0,0 +1,151 @@
+Win7: 
+-Be sure to use an account name that does not have spaces in it, as this could be an 
+issue with Cygwin. 
+
+
+Installing Matlab: 
+
+-Make sure that when you install Matlab, you choose C:\MATLAB\R2011b as directory 
+for the installation. Failing to do so could preclude the sdk compiler from 
+finding the Matlab header files. 
+
+-Also pay attention to what version of Matlab you are using, 32 or 64 bits, 
+as this will need to be reflected onto the sdk compiler settings. 
+
+
+
+Cygwin: 
+
+-You will need cygwin installed on your Windows platform to manage the compilation. 
+The compilation will still be carried out by the windows sdk compiler, but the 
+environment driving the compilation will be the unix-like cygwin. When you download
+cygwin, make sure that you install it in the C:\Cygwin directory. 
+
+-You will find the cygwin setup executable on the www.cygwin.com webpage. Here is a link
+to it: http://cygwin.com/setup.exe. Download this file to C:\Cygwin and be sure to reuse 
+it when you want to update your current cygwin installation. Do not download setup.exe 
+twice! 
+
+- You will need the following packages downloaded to carry out the compilation of ISSM
+ successfully, so be sure to include them in your cygwin install: 
+
+subversion
+autotools
+automake
+vim (or any other editor)
+patchutils
+make: The GNU version of the 'make' utility
+automake 1.11 and automake:Wrapper scripts
+autoconf
+python: Python language interpreter
+unzip
+
+
+
+Compiler: 
+
+You need Visual Studio Express 2010 for C++, which you can find here: 
+http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
+
+you will also need the Windows SDK 7.1 compiler, which you can find at the following link
+http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279
+This compiler is compatible with Matlab, as detailed in the following webpage: 
+http://www.mathworks.com/support/compilers/R2011b/win64.html#n2
+
+Be careful not to download the sdk before Visual Studio Express, as this could lead to 
+environment setup issues. 
+
+
+Before you do anything related to ISSM! You have to capture the settings of your compiler.
+This is by far the most tricky part. 
+
+Follow Figure 2 for more details. You have to launch sdk 7.1 command prompt, go to the 
+cygwin directory and fire up Cygwin by executing Cygwin.bat. Once this is done,dump the 
+results of the export command onto a file, called  sdk7.1.win7.64.sh 
+you will need this file later in the ISSM install. 
+
+
+
+Downloading issm: 
+
+Download issm onto the C:\ directory. Do not download it in your Documents or Desktop
+folder. 
+
+In cygwin: 
+cd /cygdrive/c/
+svn co http://issm.ess.uci.edi/svn/issm/issm
+
+Once you download it, in your home directory, edit .bashrc: 
+and add the following lines:
+export ISSM_DIR=/cygdrive/c/issm
+export ISSM_TIER=$ISSM_DIR/trunk-jpl
+export ISSM_ARCH=cygwin-intel
+
+#source
+source $ISSM_TIER/etc/environment.sh
+
+
+Getting the cl.exe compiler to work: 
+before trying to compile the externalpackages, you need to be sure that your compiler cl.exe 
+(the sdk compiler)works. To make sure, create a simple hello world file: 
+
+hello.cpp
+
+#include <stdio.h>
+int main(){
+printf("%s\n","hello");
+return 1;
+}
+
+and try to compile it by doing: 
+cl hello.cpp
+
+If this does not work, do not go any further! The settings of your cl compiler are found 
+in externalpackages/windows/configs/ 
+if there is a significant different between you sdk7.1.win7.64.sh file (see above section Compiler) 
+and the file that is being sourced in the windows/configs directory, place your new file in 
+the configs directory. Relaunch bash, and try to run cl hello.cpp again. Beware, you might 
+have to erase some lines in your file, as cygwin might not like some of the stuff that your 
+Windows platform is trying to define. 
+
+
+
+
+Once the cl.exe compiler works, you can start installing the following packages: 
+petsc   metis triangle and cccl
+
+For petsc, use install-3.1-win7.sh 
+For metis, use install-4.0-win7.sh
+For cccl, use install-win7.sh
+For triangle, use install-win7.sh
+
+Once these externlapackages have been compiled, you can compile issm: 
+
+./scripts/autoremakererun.sh
+./configs/config-win7-64.sh
+make install
+
+This should compile both parallel and serial versions of ISSM. Beware though, the parallel
+version cannot be run on multi-core platforms yet! We are actively working on it. 
+
+
+
+
+
+One note about 32 vs 64 bit compile: 
+depending on your Matlab version, you will need to do a 32 or 64 bit compile. The only 
+difference between both compiles is the setup of the cl.exe compiler. For ease of use, 
+you will find in externalpackages/windows/windows_environment.sh a switch to go from 32 
+to 64 bit compile. When you type cl.exe \help at the command prompt, cl.exe should report 
+what system it is compiling for. 
+Beware, switching 32 to 64 or vice-versa implies recompiling everything from scratch. 
+
+
+
+
+
+
+How to setup a Cron job? 
+downlaod exim and cron from cygwin. run exim-config (don't forget to launch your cygwin terminal as 
+Administrator). If asked for a daemon name, type ntsec. Also, if cron complains about sendmail,
+symlink /usr/lib/sendmail and /usr/bin/exim. 
Index: /issm/branches/trunk-jpl-damage/externalpackages/windows/README
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/windows/README	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/windows/README	(revision 11577)
@@ -0,0 +1,52 @@
+How to install intel compiler to work on cygwin at the command line: 
+
+This is what I got from the following post on google: 
+
+-----------------------------------------------------
+All necessary paths and environment variables are set if you put the Microsoft linker path in ICL.CFG, and open the Intel 
+compiler command line window on the Start menu. Then you can run cygwin.bat so that bash inherits the ICL paths, 
+without breaking ICL. You will sometimes get the bash warning about finding Windows style paths in the environment, 
+but those are necessary for ICL and Microsoft link. Needless to say, the Windows environment variable forgetfulness
+ point will be reached sooner with this setup.
+
+After I run cygwin.bat, and try to run icl, it says:
+
+link: invalid option -- o
+Try `ling --help' for more information.
+
+I verified that icl compiles without any problems before I run cygwin.bat
+
+What am I missing?
+
+
+
+This would indicate that you ignored my advice about icl.cfg, and so you are getting the wrong link.exe.  It should have said "link" not "ling."
+For a VC9 installation, /windows/C/Program Files/Intel/Compiler/11.1/026/bin/ia32/icl.cfg:
+-Qlocation,link,"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin"
+-Qprec-div -Qprec-sqrt -Qansi_alias
+----------------------------------------------------------
+
+
+
+
+
+So here is what you do: 
+edit /cygdrive/c/IntelInstall/Compiler/11.1/026/bin/ia32/icl.cfg
+
+add: 
+-Qlocation,link,"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin"
+-Qprec-div -Qprec-sqrt -Qansi_alias
+
+
+Then run the intel compiler command window. Go to C:\Cygwin and run Cygwin.bat. 
+you are now running cygwin with the correct paths.  Type "export" at the command line, and figure out which variables have been set that relate to the intel compiler and visual studio environment. Build a file containing specific export commands and source it from your .bashrc. intel.sh is an example of such file on a Windows XP 32 build. 
+
+
+
+Compiling ISSM using Matlab compatible  compilers. 
+
+At: http://www.mathworks.com/support/compilers/R2011b/win64.html#n2 
+you will find a list of Matlab supported compilers. 
+
+
+We'll try the compile with the Microsoft Windows SDK 7.1: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279
Index: /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/intel-winXP.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/intel-winXP.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/intel-winXP.sh	(revision 11577)
@@ -0,0 +1,16 @@
+ export CPATH="C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32\\include;C:\\IntelInstall\\Compiler\\11.1\\038\\mkl\\include;"
+ export DEVENVDIR="C:\\MicrosoftVisualStudio 9.0\\Common7\\IDE"
+ export FPATH="C:\\IntelInstall\\Compiler\\11.1\\038\\mkl\\include;"
+ export FRAMEWORK35VERSION="v3.5"
+ export FRAMEWORKDIR="C:\\WINDOWS\\Microsoft.NET\\Framework"
+ export FRAMEWORKVERSION="v2.0.50727"
+ export INCLUDE="C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32\\include;C:\\IntelInstall\\Compiler\\11.1\\038\\mkl\\include;C:\\IntelInstall\\Compiler\\11.1\\038\\tbb\\include;C:\\IntelInstall\\Compiler\\11.1\\038\\include;C:\\MicrosoftVisualStudio 9.0\\VC\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;"
+ export IPPROOT="C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32"
+ export LIB="C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32\\lib;C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32\\stublib;C:\\IntelInstall\\Compiler\\11.1\\038\\mkl\\ia32\\lib;C:\\IntelInstall\\Compiler\\11.1\\038\\tbb\\ia32\\vc9\\lib;C:\\IntelInstall\\Compiler\\11.1\\038\\Lib\\ia32;C:\\MicrosoftVisualStudio 9.0\\VC\\LIB;C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\lib;"
+ export LIBPATH="C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5;C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727;C:\\MicrosoftVisualStudio 9.0\\VC\\LIB;"
+ export LIBRARY_PATH="C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32\\lib;C:\\IntelInstall\\Compiler\\11.1\\038\\ipp\\ia32\\stublib;C:\\IntelInstall\\Compiler\\11.1\\038\\mkl\\ia32\\lib;"
+ export PATH="$PATH:/cygdrive/c/IntelInstall/Compiler/11.1/038/Bin/ia32:/cygdrive/c/MicrosoftVisualStudio 9.0/Common7/IDE:/cygdrive/c/MicrosoftVisualStudio 9.0/VC/BIN:/cygdrive/c/MicrosoftVisualStudio 9.0/Common7/Tools:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.5:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/MicrosoftVisualStudio 9.0/VC/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.0A/bin:/cygdrive/c/WINDOWS"
+ export TBB_ARCH_PLATFORM="ia32\\vc9"
+ export VCINSTALLDIR="C:\\MicrosoftVisualStudio 9.0\\VC"
+ export VSINSTALLDIR="C:\\MicrosoftVisualStudio 9.0"
+ export WINDOWSSDKDIR="C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\"
Index: /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-32.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-32.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-32.sh	(revision 11577)
@@ -0,0 +1,73 @@
+declare -x ALLUSERSPROFILE="C:\\ProgramData"
+declare -x APPDATA="C:\\Users\\larour\\AppData\\Roaming"
+declare -x APPVER="6.1"
+declare -x CL="/AI C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319"
+declare -x COMMONPROGRAMFILES="C:\\Program Files (x86)\\Common Files"
+declare -x COMPUTERNAME="WIN-IH1FCG0JVB1"
+declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
+declare -x CURRENT_CPU="x64"
+declare -x CommandPromptType="Cross"
+declare -x CommonProgramW6432="C:\\Program Files\\Common Files"
+declare -x Configuration="Debug"
+declare -x FP_NO_HOST_CHECK="NO"
+declare -x FrameworkVersion="v4.0.30319"
+declare -x GREP_COLOR="00;38;5;226"
+declare -x GREP_OPTIONS="--binary-file=without-match"
+declare -x HOME="/home/larour"
+declare -x HOMEDRIVE="C:"
+declare -x HOMEPATH="\\Users\\larour"
+declare -x HOSTNAME="WIN-IH1FCG0JVB1"
+declare -x INCLUDE="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE\\gl;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE;"
+declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info:"
+declare -x LANG="en_US.UTF-8"
+declare -x LIB="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;"
+declare -x LIBPATH="C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib;"
+declare -x LOCALAPPDATA="C:\\Users\\larour\\AppData\\Local"
+declare -x LOGONSERVER="\\\\WIN-IH1FCG0JVB1"
+declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:"
+declare -x NUMBER_OF_PROCESSORS="8"
+declare -x OS="Windows_NT"
+declare -x PATH="/usr/local/bin:/usr/bin:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2011b32/runtime/win32:/cygdrive/c/MATLAB/R2011b32/bin:/cygdrive/c/MATLAB/R2011b/runtime/win64:/cygdrive/c/MATLAB/R2011b/bin:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files/Microsoft Network Monitor 3"
+declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
+declare -x PRINTER="137.78.140.129#:1"
+declare -x PROCESSOR_ARCHITECTURE="x86"
+declare -x PROCESSOR_ARCHITEW6432="AMD64"
+declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 42 Stepping 7, GenuineIntel"
+declare -x PROCESSOR_LEVEL="6"
+declare -x PROCESSOR_REVISION="2a07"
+declare -x PROGRAMFILES="C:\\Program Files (x86)"
+declare -x PROMPT="\$P\$G"
+declare -x PS1="\\[\\e]0;\\w\\a\\]\\n\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\w\\[\\e[0m\\]\\n\\\$ "
+declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\"
+declare -x PUBLIC="C:\\Users\\Public"
+declare -x PWD="/cygdrive/c/issm-uci/trunk-jpl-32/externalpackages/win7"
+declare -x PlatformToolset="Windows7.1SDK"
+declare -x ProgramData="C:\\ProgramData"
+declare -x ProgramW6432="C:\\Program Files"
+declare -x REPO="jpl"
+declare -x SESSIONNAME="Console"
+declare -x SHELL="/bin/bash"
+declare -x SHLVL="1"
+declare -x SVN_EDITOR="/usr/bin/vim"
+declare -x SYSTEMDRIVE="C:"
+declare -x SYSTEMROOT="C:\\Windows"
+declare -x TARGET_CPU="x86"
+declare -x TARGET_PLATFORM="WIN7"
+declare -x TEMP="/tmp"
+declare -x TERM="cygwin"
+declare -x TMP="/tmp"
+declare -x TZ="America/Los_Angeles"
+declare -x ToolsVersion="4.0"
+declare -x USER="larour"
+declare -x USERDOMAIN="WIN-IH1FCG0JVB1"
+declare -x USERNAME="larour"
+declare -x USERPROFILE="C:\\Users\\larour"
+declare -x VS100COMNTOOLS="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\"
+declare -x WINDIR="C:\\Windows"
+declare -x WindowsSDKDir="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
+declare -x WindowsSDKVersionOverride="v7.1"
+declare -x sdkdir="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
+declare -x temp="C:\\Users\\larour\\AppData\\Local\\Temp"
+declare -x tmp="C:\\Users\\larour\\AppData\\Local\\Temp"
+declare -x windows_tracing_flags="3"
+declare -x windows_tracing_logfile="C:\\BVTBin\\Tests\\installpackage\\csilogfile.log"
Index: /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-64.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-64.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-64.sh	(revision 11577)
@@ -0,0 +1,69 @@
+declare -x ALLUSERSPROFILE="C:\\ProgramData"
+declare -x APPDATA="C:\\Users\\larour\\AppData\\Roaming"
+declare -x APPVER="6.1"
+declare -x CL="/AI C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319"
+declare -x COMMONPROGRAMFILES="C:\\Program Files (x86)\\Common Files"
+declare -x COMPUTERNAME="WIN-IH1FCG0JVB1"
+declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
+declare -x CURRENT_CPU="x64"
+declare -x CommandPromptType="Native"
+declare -x CommonProgramW6432="C:\\Program Files\\Common Files"
+declare -x Configuration="Debug"
+declare -x FP_NO_HOST_CHECK="NO"
+declare -x FrameworkVersion="v4.0.30319"
+declare -x GREP_COLOR="00;38;5;226"
+declare -x GREP_OPTIONS="--binary-file=without-match"
+declare -x HOME="/home/larour"
+declare -x HOMEDRIVE="C:"
+declare -x HOMEPATH="\\Users\\larour"
+declare -x HOSTNAME="WIN-IH1FCG0JVB1"
+declare -x INCLUDE="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE\\gl;"
+declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info:"
+declare -x LANG="C.UTF-8"
+declare -x LIB="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib\\amd64;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib\\X64;"
+declare -x LIBPATH="C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\v3.5;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib\\amd64;"
+declare -x LOCALAPPDATA="C:\\Users\\larour\\AppData\\Local"
+declare -x LOGONSERVER="\\\\WIN-IH1FCG0JVB1"
+declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:"
+declare -x NUMBER_OF_PROCESSORS="1"
+declare -x OLDPWD="/cygdrive/c/issm-uci/trunk-jpl/externalpackages"
+declare -x OS="Windows_NT"
+declare -x PATH="/usr/local/bin:/usr/bin:/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework64/v3.5:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2011b/runtime/win64:/cygdrive/c/MATLAB/R2011b/bin"
+declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
+declare -x PRINTER="137.78.140.129#:1"
+declare -x PROCESSOR_ARCHITECTURE="x86"
+declare -x PROCESSOR_ARCHITEW6432="AMD64"
+declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 42 Stepping 7, GenuineIntel"
+declare -x PROCESSOR_LEVEL="6"
+declare -x PROCESSOR_REVISION="2a07"
+declare -x PROGRAMFILES="C:\\Program Files (x86)"
+declare -x PROMPT="\$P\$G"
+declare -x PS1="\\[\\e]0;\\w\\a\\]\\n\\[\\e[32m\\]\\u@\\h \\[\\e[33m\\]\\w\\[\\e[0m\\]\\n\\\$ "
+declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\"
+declare -x PUBLIC="C:\\Users\\Public"
+declare -x PWD="/cygdrive/c/issm-uci/trunk-jpl/externalpackages/win7"
+declare -x PlatformToolset="Windows7.1SDK"
+declare -x ProgramData="C:\\ProgramData"
+declare -x ProgramW6432="C:\\Program Files"
+declare -x REPO="jpl"
+declare -x SESSIONNAME="Console"
+declare -x SHLVL="1"
+declare -x SYSTEMDRIVE="C:"
+declare -x SYSTEMROOT="C:\\Windows"
+declare -x TARGET_CPU="x64"
+declare -x TARGET_PLATFORM="WIN7"
+declare -x TEMP="/tmp"
+declare -x TERM="cygwin"
+declare -x TMP="/tmp"
+declare -x ToolsVersion="4.0"
+declare -x USER="larour"
+declare -x USERDOMAIN="WIN-IH1FCG0JVB1"
+declare -x USERNAME="larour"
+declare -x USERPROFILE="C:\\Users\\larour"
+declare -x VS100COMNTOOLS="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\"
+declare -x WINDIR="C:\\Windows"
+declare -x WindowsSDKDir="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
+declare -x WindowsSDKVersionOverride="v7.1"
+declare -x sdkdir="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
+declare -x windows_tracing_flags="3"
+declare -x windows_tracing_logfile="C:\\BVTBin\\Tests\\installpackage\\csilogfile.log"
Index: /issm/branches/trunk-jpl-damage/externalpackages/windows/windows_environment.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/externalpackages/windows/windows_environment.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/externalpackages/windows/windows_environment.sh	(revision 11577)
@@ -0,0 +1,28 @@
+#This file sources all relevant scripts to setup the paths to windows compilers.
+
+#Where are the configuration files for each compiler: 
+config_dir="$ISSM_TIER/externalpackages/windows/configs"
+
+#your choise of compiler: 
+# 1: sdk 7.1 32 bits on Win7
+# 2: sdk 7.1 64 bits on Win7
+# 3: intel compiler on Win7
+# 4: intel compiler on WinXP
+
+compiler=1;
+
+#source corresponding environment variables: 
+
+if [[ "$compiler" == "1" ]]; then 
+	source $config_dir/sdk7.1.win7-32.sh
+elif [[ "$compiler" == "2" ]]; then 
+	source $config_dir/sdk7.1.win7-64.sh
+elif [[ "$compiler" == "3" ]]; then 
+	source $config_dir/intel-win7.sh
+else 
+	source $config_dir/intel-winXP.sh
+fi
+
+#finally, out of ISSM_TIER, we need to create an ISSM_TIER_WIN variable for Matlab to pick up on.
+ISSM_TIER_WIN=`cygpath -m $ISSM_TIER`
+export ISSM_TIER_WIN
Index: /issm/branches/trunk-jpl-damage/m4/ar-lib.m4
===================================================================
--- /issm/branches/trunk-jpl-damage/m4/ar-lib.m4	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/m4/ar-lib.m4	(revision 11577)
@@ -0,0 +1,61 @@
+##                                                          -*- Autoconf -*-
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed.  If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+  [am_cv_ar_interface=ar
+   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([am_ar_try])
+      if test "$ac_status" -eq 0; then
+        am_cv_ar_interface=ar
+      else
+        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+        AC_TRY_EVAL([am_ar_try])
+        if test "$ac_status" -eq 0; then
+          am_cv_ar_interface=lib
+        else
+          am_cv_ar_interface=unknown
+        fi
+      fi
+      rm -f conftest.lib libconftest.a
+     ])
+   ])
+
+case $am_cv_ar_interface in
+ar)
+  ;;
+lib)
+  # Microsoft lib, so override with the ar-lib wrapper script.
+  # FIXME: It is wrong to rewrite AR.
+  # But if we don't then we get into trouble of one sort or another.
+  # A longer-term fix would be to have automake use am__AR in this case,
+  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+  # similar.
+  AR="$am_aux_dir/ar-lib $AR"
+  ;;
+unknown)
+  m4_default([$1],
+             [AC_MSG_ERROR([could not determine $AR interface])])
+  ;;
+esac
+AC_SUBST([AR])dnl
+])
Index: /issm/branches/trunk-jpl-damage/m4/issm_options.m4
===================================================================
--- /issm/branches/trunk-jpl-damage/m4/issm_options.m4	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/m4/issm_options.m4	(revision 11577)
@@ -29,4 +29,6 @@
 	AM_CONDITIONAL([NOPARALLEL], [test $PARALLEL_VALUE = no])
 	AC_MSG_RESULT($PARALLEL_VALUE) 
+	ISSMEXT=".exe"
+	AC_SUBST([ISSMEXT])
 	dnl }}}
 	dnl Serial or Parallel check {{{1
@@ -40,4 +42,48 @@
 
 	dnl ISSM's externalpackages
+	dnl vendor{{{1
+	AC_ARG_WITH([vendor],
+			  AS_HELP_STRING([--with-vendor = VENDOR], [vendor name, ex: intel]), [VENDOR=$withval],[VENDOR=""]) 
+	AC_MSG_CHECKING(for vendor compilers)
+	if test -n "$VENDOR"; then
+
+		if  test $VENDOR = intel-win32; then
+			export CC=icl
+			export CXX=icl
+			export CFLAGS="-DWIN32 -D_INTEL_WIN_"
+			export CXXFLAGS="-DWIN32 -D_INTEL_WIN_"
+		elif  test $VENDOR = intel-win7-32; then
+			export CC=cccl
+			export CXX=cccl
+			export CXXFLAGS="-DWIN32 -D_INTEL_WIN_ -EHsc"
+			export CFLAGS="-DWIN32 -D_INTEL_WIN_ -EHsc"
+			export AR=lib
+			export RANLIB=true
+			OSLIBS="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
+		elif  test $VENDOR = intel-win7-64; then
+			export CC=cccl
+			export CXX=cccl
+			export CXXFLAGS="-DWIN32 -D_INTEL_WIN_ -EHsc"
+			export CFLAGS="-DWIN32 -D_INTEL_WIN_ -EHsc"
+			export AR=lib
+			export RANLIB=true
+			OSLIBS="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
+		elif test $VENDOR = intel-linux; then
+			export CC=icc
+			export CXX=icpc
+			export CFLAGS=" -D_INTEL_LINUX_"
+			export CXXFLAGS=" -D_INTEL_LINUX_"
+		elif test $VENDOR = intel-pleiades; then
+			export CC=icc
+			export CXX=icpc
+			export CXXFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
+			export CFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
+		else
+		AC_MSG_ERROR([unknow compiler vendor!])
+		fi
+	fi
+	AC_SUBST([OSLIBS]) 
+	AC_MSG_RESULT(done)
+	dnl }}}
 	dnl Matlab {{{1
 	AC_ARG_WITH([matlab-dir],
@@ -76,11 +122,12 @@
 				dnl if matlab version is 7.10 or more, we must use mexmaci64 (64 bits)
 				MEXLINK="-O -Wl,-flat_namespace -undefined suppress -arch i386 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
+				MEXLIB=" -L$MATLAB_ROOT/bin/maci/ -lmx -lmex -lmat -lstdc++ -largeArrayDims"
 				if test $MATLAB_MAJOR -ge 7; then 
 					 if test $MATLAB_MINOR -ge 10; then 
 						  MEXLINK="-O -Wl,-flat_namespace -undefined suppress -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci64/mexFunction.map"
+							 MEXLIB=" -L$MATLAB_ROOT/bin/maci64/ -lmx -lmex -lmat -lstdc++"
 					 fi
 				fi
 
-				MEXLIB=" mexversion.o -L$MATLAB_ROOT/bin/maci/ -lmx -lmex -lmat -lstdc++ -largeArrayDims"
 				MEXEXT=`$MATLAB_ROOT/bin/mexext`
 				MEXEXT=".$MEXEXT"
@@ -89,7 +136,10 @@
 				dnl MEXLINK="-Wl,-twolevel_namespace -undefined error -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
 			;;
-			*cygwin*)
-				MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win32\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO"
-
+			*cygwin*) 
+				if  test $VENDOR = intel-win7-32; then
+					MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win32\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO -manifest" 
+				elif  test $VENDOR = intel-win7-64; then
+					MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win64\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO -manifest" 
+				fi
 				MEXEXT=`$MATLAB_ROOT/bin/mexext.bat`
 				MEXEXT=".$MEXEXT"
@@ -130,4 +180,8 @@
 						fi
 					;;
+					*cygwin*)
+						largearrays=yes 
+					;;
+
 					*darwin*)
 						if test $MATLAB_MAJOR -ge 7; then 
@@ -155,5 +209,16 @@
 		HAVE_TRIANGLE=yes
 		TRIANGLEINCL=-I$TRIANGLE_ROOT/
-		TRIANGLELIB=$TRIANGLE_ROOT/triangle.a
+
+		case "${host_os}" in
+				*cygwin*)
+				TRIANGLELIB=$TRIANGLE_ROOT/triangle.lib
+				;;
+				*linux*)
+				TRIANGLELIB=$TRIANGLE_ROOT/triangle.a
+				;;
+				*darwin*)
+				TRIANGLELIB=$TRIANGLE_ROOT/triangle.a
+				;;
+			esac
 
 		AC_DEFINE([_HAVE_TRIANGLE_],[1],[with Triangle in ISSM src])
@@ -315,5 +380,6 @@
 					                          
 		if test "$METIS_VERSION" = "4" ; then
-
+   			
+			METISINCL=-I"$METIS_ROOT/Lib" 
 			case "${host_os}" in
 				*cygwin*)
@@ -328,5 +394,4 @@
 			esac
 
-   			METISINCL=-I"$METIS_ROOT/Lib" 
    			AC_DEFINE([_METIS_VERSION_],[4],[ Metis version number])
 		fi
@@ -432,4 +497,5 @@
 	AC_MSG_CHECKING(for Petsc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)
 	
+	
 	if test -d "$PETSC_ROOT"; then
 
@@ -438,5 +504,9 @@
 		case "${host_os}" in
 			*cygwin*)
-			PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetscsnes.lib libpetscts.lib libmpiuni.lib libpetsc.lib"
+			if test "$PETSC_MAJOR" = "2" ; then
+				PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetscsnes.lib libpetscts.lib libmpiuni.lib libpetsc.lib"
+			else
+				PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetsc.lib"
+			fi
 			;;
 			*linux*)
@@ -501,5 +571,5 @@
 		case "${host_os}" in
 			*cygwin*)
-			MPILIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
+			dnl MPILIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
 			;;
 			*linux*)
@@ -817,28 +887,4 @@
 		AC_DEFINE([_HAVE_GRAPHICS_],[1],[with GRAPHICS in ISSM src])
 		AC_SUBST([GRAPHICSLIB])
-	fi
-	AC_MSG_RESULT(done)
-	dnl }}}
-	dnl vendor{{{1
-	AC_ARG_WITH([vendor],
-			  AS_HELP_STRING([--with-vendor = VENDOR], [vendor name, ex: intel]), [VENDOR=$withval],[VENDOR=""]) 
-	AC_MSG_CHECKING(for vendor compilers)
-	if test -n "$VENDOR"; then
-
-		if  test $VENDOR = intel-win; then
-			export CC=icl
-			export CXX=icl
-			export CXXFLAGS="-DWIN32 -D_INTEL_WIN_"
-		elif test $VENDOR = intel-linux; then
-			export CC=icc
-			export CXX=icpc
-			export CXXFLAGS=" -D_INTEL_LINUX_"
-		elif test $VENDOR = intel-pleiades; then
-			export CC=icc
-			export CXX=icpc
-			export CXXFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
-		else
-		AC_MSG_ERROR([unknow compiler vendor!])
-		fi
 	fi
 	AC_MSG_RESULT(done)
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.app/Contents/Info.plist
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.app/Contents/Info.plist	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.app/Contents/Info.plist	(revision 11577)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleAllowMixedLocalizations</key>
+	<true/>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>applet</string>
+	<key>CFBundleIconFile</key>
+	<string>applet</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>ISSM</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>aplt</string>
+	<key>LSMinimumSystemVersionByArchitecture</key>
+	<dict>
+		<key>x86_64</key>
+		<string>10.6</string>
+	</dict>
+	<key>LSRequiresCarbon</key>
+	<true/>
+	<key>WindowState</key>
+	<dict>
+		<key>dividerCollapsed</key>
+		<false/>
+		<key>eventLogLevel</key>
+		<integer>-1</integer>
+		<key>name</key>
+		<string>ScriptWindowState</string>
+		<key>positionOfDivider</key>
+		<real>333</real>
+		<key>savedFrame</key>
+		<string>1006 323 602 597 0 0 1680 1028 </string>
+		<key>selectedTabView</key>
+		<string>result</string>
+	</dict>
+</dict>
+</plist>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.app/Contents/PkgInfo
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.app/Contents/PkgInfo	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.app/Contents/PkgInfo	(revision 11577)
@@ -0,0 +1,1 @@
+APPLaplt
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.appscript
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.appscript	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.appscript	(revision 11577)
@@ -0,0 +1,1 @@
+do shell script "open /Library/ISSM/bin/matlabissm"
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/01issm-contents.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/01issm-contents.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/01issm-contents.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkg-contents spec="1.12"><f n="ISSM.app" o="root" g="admin" p="16877" pt="/Users/larour/issm-uci/trunk-jpl/installers/macosx/ISSM.app" m="true" t="file"><f n="Contents" o="larour" g="staff" p="16877"><f n="Info.plist" o="larour" g="staff" p="33188"/><f n="MacOS" o="larour" g="staff" p="16877"><f n="applet" o="larour" g="staff" p="33261"/></f><f n="PkgInfo" o="larour" g="staff" p="33188"/><f n="Resources" o="larour" g="staff" p="16877"><f n="applet.icns" o="larour" g="staff" p="33188"/><f n="applet.rsrc" o="larour" g="staff" p="33188"/><f n="description.rtfd" o="larour" g="staff" p="16877"><f n="TXT.rtf" o="larour" g="staff" p="33188"/></f><f n="Scripts" o="larour" g="staff" p="16877"><f n="main.scpt" o="larour" g="staff" p="33188"/></f></f></f><mod>group</mod><mod>owner</mod></f></pkg-contents>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/01issm.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/01issm.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/01issm.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkgref spec="1.12" uuid="280C4FF1-FB54-447F-B616-1EB3C56397F9"><config><identifier>ISSM.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/Users/larour/issm-uci/trunk-jpl/installers/macosx/ISSM.app</installFrom><installTo>/Applications</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>requireAuthorization</mod><mod>identifier</mod><mod>installTo</mod><mod>relocatable</mod><mod>includeRoot</mod><mod>parent</mod></config><contents><file-list>01issm-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/02matlabissm-contents.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/02matlabissm-contents.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/02matlabissm-contents.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkg-contents spec="1.12"><f n="matlabissm" o="larour" g="wheel" p="33261" pt="/Users/larour/issm-uci/trunk-jpl/installers/macosx/matlabissm" m="false" t="file"/></pkg-contents>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/02matlabissm.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/02matlabissm.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/02matlabissm.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkgref spec="1.12" uuid="1F48AC5D-FBA9-4F3E-A35E-CA4E0724E726"><config><identifier>ISSM.matlabissm.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/larour/issm-uci/trunk-jpl/installers/macosx/matlabissm</installFrom><installTo mod="true" relocatable="true">/Library/ISSM/bin/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo.isRelativeType</mod><mod>installTo</mod><mod>relocatable</mod><mod>installTo.isAbsoluteType</mod><mod>identifier</mod><mod>parent</mod><mod>installTo.path</mod></config><contents><file-list>02matlabissm-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/03startup-contents.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/03startup-contents.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/03startup-contents.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkg-contents spec="1.12"><f n="startup.m" o="larour" g="staff" p="33261" pt="/Users/larour/issm-uci/trunk-jpl/installers/macosx/startup.m" m="false" t="file"/></pkg-contents>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/03startup.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/03startup.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/03startup.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkgref spec="1.12" uuid="206B7D23-8F4B-4BE1-B641-B646887657AD"><config><identifier>ISSM.startup.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/larour/issm-uci/trunk-jpl/installers/macosx/startup.m</installFrom><installTo mod="true" relocatable="true">/Library/ISSM/bin/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo.path</mod><mod>relocatable</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>03startup-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/04bin-contents.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/04bin-contents.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/04bin-contents.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkg-contents spec="1.12"><f n="bin" o="larour" g="staff" p="16877" pt="/Users/larour/issm-uci/trunk-jpl/bin" m="false" t="file"><f n=".svn" o="larour" g="staff" p="16877"><f n="all-wcprops" o="larour" g="staff" p="33060"/><f n="dir-prop-base" o="larour" g="staff" p="33060"/><f n="entries" o="larour" g="staff" p="33060"/><f n="prop-base" o="larour" g="staff" p="16877"/><f n="props" o="larour" g="staff" p="16877"/><f n="text-base" o="larour" g="staff" p="16877"><f n="Makefile.am.svn-base" o="larour" g="staff" p="33060"/></f><f n="tmp" o="larour" g="staff" p="16877"><f n="prop-base" o="larour" g="staff" p="16877"/><f n="props" o="larour" g="staff" p="16877"/><f n="text-base" o="larour" g="staff" p="16877"/></f></f><f n="@modellist" o="larour" g="staff" p="16877"><f n="display.m" o="larour" g="staff" p="33188"/><f n="get.m" o="larour" g="staff" p="33188"/><f n="loadmultipleresultsfromcluster.m" o="larour" g="staff" p="33188"/><f n="modellist.m" o="larour" g="staff" p="33188"/><f n="setdefaultparameters.m" o="larour" g="staff" p="33188"/><f n="solve.m" o="larour" g="staff" p="33188"/><f n="subsasgn.m" o="larour" g="staff" p="33188"/><f n="subsref.m" o="larour" g="staff" p="33188"/></f><f n="@pairoptions" o="larour" g="staff" p="16877"><f n="addfield.m" o="larour" g="staff" p="33188"/><f n="addfielddefault.m" o="larour" g="staff" p="33188"/><f n="buildlist.m" o="larour" g="staff" p="33188"/><f n="changefieldvalue.m" o="larour" g="staff" p="33188"/><f n="deleteduplicates.m" o="larour" g="staff" p="33188"/><f n="display.m" o="larour" g="staff" p="33188"/><f n="exist.m" o="larour" g="staff" p="33188"/><f n="fieldoccurences.m" o="larour" g="staff" p="33188"/><f n="getfieldvalue.m" o="larour" g="staff" p="33188"/><f n="pairoptions.m" o="larour" g="staff" p="33188"/><f n="removefield.m" o="larour" g="staff" p="33188"/><f n="subsref.m" o="larour" g="staff" p="33188"/></f><f n="AbsoluteEnum.m" o="larour" g="staff" p="33261"/><f n="addnote.m" o="larour" g="staff" p="33261"/><f n="addtrack.m" o="larour" g="staff" p="33261"/><f n="adjointbalancethickness_core.m" o="larour" g="staff" p="33261"/><f n="AdjointBalancethicknessAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointCorePointerFromSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="adjointdiagnostic_core.m" o="larour" g="staff" p="33261"/><f n="AdjointEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointHorizAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointpEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointxEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointyEnum.m" o="larour" g="staff" p="33261"/><f n="AdjointzEnum.m" o="larour" g="staff" p="33261"/><f n="AgressiveMigrationEnum.m" o="larour" g="staff" p="33261"/><f n="AirEnum.m" o="larour" g="staff" p="33261"/><f n="allempty.m" o="larour" g="staff" p="33261"/><f n="allequal.m" o="larour" g="staff" p="33261"/><f n="allnan.m" o="larour" g="staff" p="33261"/><f n="AnalysisConfiguration.m" o="larour" g="staff" p="33261"/><f n="AnalysisCounterEnum.m" o="larour" g="staff" p="33261"/><f n="AnalysisTypeEnum.m" o="larour" g="staff" p="33261"/><f n="any2str.m" o="larour" g="staff" p="33261"/><f n="ApproximationEnum.m" o="larour" g="staff" p="33261"/><f n="argusmesh.m" o="larour" g="staff" p="33261"/><f n="array_numel.m" o="larour" g="staff" p="33261"/><f n="array_size.m" o="larour" g="staff" p="33261"/><f n="ArrheniusEnum.m" o="larour" g="staff" p="33261"/><f n="autodiff.m" o="larour" g="staff" p="33261"/><f n="AutodiffForwardEnum.m" o="larour" g="staff" p="33261"/><f n="AutodiffIsautodiffEnum.m" o="larour" g="staff" p="33261"/><f n="AutodiffReverseEnum.m" o="larour" g="staff" p="33261"/><f n="averageconnectivity.m" o="larour" g="staff" p="33261"/><f n="averaging.m" o="larour" g="staff" p="33261"/><f n="balancethickness.m" o="larour" g="staff" p="33261"/><f n="balancethickness_core.m" o="larour" g="staff" p="33261"/><f n="BalancethicknessAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="BalancethicknessSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="BalancethicknessSpcthicknessEnum.m" o="larour" g="staff" p="33261"/><f n="BalancethicknessStabilizationEnum.m" o="larour" g="staff" p="33261"/><f n="BalancethicknessThickeningRateEnum.m" o="larour" g="staff" p="33261"/><f n="BamgCall.m" o="larour" g="staff" p="33261"/><f n="BamgCallFromMetric.m" o="larour" g="staff" p="33261"/><f n="bamggeom.m" o="larour" g="staff" p="33261"/><f n="bamgmesh.m" o="larour" g="staff" p="33261"/><f n="basalforcings.m" o="larour" g="staff" p="33261"/><f n="BasalforcingsGeothermalfluxEnum.m" o="larour" g="staff" p="33261"/><f n="BasalforcingsMeltingRateCorrectionEnum.m" o="larour" g="staff" p="33261"/><f n="BasalforcingsMeltingRateEnum.m" o="larour" g="staff" p="33261"/><f n="BasalFrictionEnum.m" o="larour" g="staff" p="33261"/><f n="basalstress.m" o="larour" g="staff" p="33261"/><f n="basevert.m" o="larour" g="staff" p="33261"/><f n="BasinConstrain.m" o="larour" g="staff" p="33261"/><f n="BasinConstrainShelf.m" o="larour" g="staff" p="33261"/><f n="basinzoom.m" o="larour" g="staff" p="33261"/><f n="BathymetryEnum.m" o="larour" g="staff" p="33261"/><f n="BedEnum.m" o="larour" g="staff" p="33261"/><f n="bedslope.m" o="larour" g="staff" p="33261"/><f n="bedslope_core.m" o="larour" g="staff" p="33261"/><f n="BedSlopeAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="BedSlopeSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="BedSlopeXAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="BedSlopeXEnum.m" o="larour" g="staff" p="33261"/><f n="BedSlopeYAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="BedSlopeYEnum.m" o="larour" g="staff" p="33261"/><f n="BilinearInterpEnum.m" o="larour" g="staff" p="33261"/><f n="BoolElementResultEnum.m" o="larour" g="staff" p="33261"/><f n="BoolExternalResultEnum.m" o="larour" g="staff" p="33261"/><f n="BoolInputEnum.m" o="larour" g="staff" p="33261"/><f n="BoolParamEnum.m" o="larour" g="staff" p="33261"/><f n="BoundaryEnum.m" o="larour" g="staff" p="33261"/><f n="carter.m" o="larour" g="staff" p="33261"/><f n="cfl_step.m" o="larour" g="staff" p="33261"/><f n="checkfield.m" o="larour" g="staff" p="33261"/><f n="checkmessage.m" o="larour" g="staff" p="33261"/><f n="clicktoflowline.m" o="larour" g="staff" p="33261"/><f n="ClosedEnum.m" o="larour" g="staff" p="33261"/><f n="ColinearEnum.m" o="larour" g="staff" p="33261"/><f n="collapse.m" o="larour" g="staff" p="33261"/><f n="ComputeHessian.m" o="larour" g="staff" p="33261"/><f n="ComputeMetric.m" o="larour" g="staff" p="33261"/><f n="config.h" o="larour" g="staff" p="33261"/><f n="ConfigurationTypeEnum.m" o="larour" g="staff" p="33261"/><f n="ConstantEnum.m" o="larour" g="staff" p="33261"/><f n="constants.m" o="larour" g="staff" p="33261"/><f n="ConstantsGEnum.m" o="larour" g="staff" p="33261"/><f n="ConstantsReferencetemperatureEnum.m" o="larour" g="staff" p="33261"/><f n="ConstantsYtsEnum.m" o="larour" g="staff" p="33261"/><f n="ConstraintsEnum.m" o="larour" g="staff" p="33261"/><f n="contourenvelope.m" o="larour" g="staff" p="33261"/><f n="contourmassbalance.m" o="larour" g="staff" p="33261"/><f n="control_core.m" o="larour" g="staff" p="33261"/><f n="controlconvergence.m" o="larour" g="staff" p="33261"/><f n="ControlInputEnum.m" o="larour" g="staff" p="33261"/><f n="ControlSteadyEnum.m" o="larour" g="staff" p="33261"/><f n="ConvergedEnum.m" o="larour" g="staff" p="33261"/><f n="convergence.m" o="larour" g="staff" p="33261"/><f n="CorePointerFromSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="create_region.m" o="larour" g="staff" p="33261"/><f n="CreateDataBoundaries.m" o="larour" g="staff" p="33261"/><f n="CreateDataMatrix.m" o="larour" g="staff" p="33261"/><f n="dakota_cdfs.m" o="larour" g="staff" p="33261"/><f n="dakota_in_data.m" o="larour" g="staff" p="33261"/><f n="dakota_in_params.m" o="larour" g="staff" p="33261"/><f n="dakota_in_parse.m" o="larour" g="staff" p="33261"/><f n="dakota_in_write.m" o="larour" g="staff" p="33261"/><f n="dakota_m_write.m" o="larour" g="staff" p="33261"/><f n="dakota_moments.m" o="larour" g="staff" p="33261"/><f n="dakota_out_parse.m" o="larour" g="staff" p="33261"/><f n="dakota_resp_uconv.m" o="larour" g="staff" p="33261"/><f n="data_processing_tool.m" o="larour" g="staff" p="33261"/><f n="DatasetInputEnum.m" o="larour" g="staff" p="33261"/><f n="ddeblank.m" o="larour" g="staff" p="33261"/><f n="ddewhite.m" o="larour" g="staff" p="33261"/><f n="debug.m" o="larour" g="staff" p="33261"/><f n="DepthAverage.m" o="larour" g="staff" p="33261"/><f n="dewhite.m" o="larour" g="staff" p="33261"/><f n="diagnostic.m" o="larour" g="staff" p="33261"/><f n="diagnostic_core.m" o="larour" g="staff" p="33261"/><f n="DiagnosticAbstolEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticHorizAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticHutterAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticIcefrontEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticMaxiterEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticNumRequestedOutputsEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticPenaltyFactorEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticReferentialEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticReltolEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticRequestedOutputsEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticRestolEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticRiftPenaltyLockEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticRiftPenaltyThresholdEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticShelfDampeningEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticSpcvxEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticSpcvyEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticSpcvzEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticStokesreconditioningEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticVertAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticVertexPairingEnum.m" o="larour" g="staff" p="33261"/><f n="DiagnosticViscosityOvershootEnum.m" o="larour" g="staff" p="33261"/><f n="discardnum.m" o="larour" g="staff" p="33261"/><f n="divergence.m" o="larour" g="staff" p="33261"/><f n="DofIndexingEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleElementResultEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleExternalResultEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleInputEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleMatArrayParamEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleMatExternalResultEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleMatParamEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleParamEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleVecExternalResultEnum.m" o="larour" g="staff" p="33261"/><f n="DoubleVecParamEnum.m" o="larour" g="staff" p="33261"/><f n="downstreamflowlines.m" o="larour" g="staff" p="33261"/><f n="DragCoefficientAbsGradientEnum.m" o="larour" g="staff" p="33261"/><f n="drivingstress.m" o="larour" g="staff" p="33261"/><f n="ecco32issm.m" o="larour" g="staff" p="33261"/><f n="edgeadjacency.m" o="larour" g="staff" p="33261"/><f n="edgeperimeter.m" o="larour" g="staff" p="33261"/><f n="effective_value.m" o="larour" g="staff" p="33261"/><f n="effectivepressure.m" o="larour" g="staff" p="33261"/><f n="ElementEnum.m" o="larour" g="staff" p="33261"/><f n="ElementResultEnum.m" o="larour" g="staff" p="33261"/><f n="ElementsFromEdge.m" o="larour" g="staff" p="33261"/><f n="enthalpy_core.m" o="larour" g="staff" p="33261"/><f n="enthalpy_core_step.m" o="larour" g="staff" p="33261"/><f n="EnthalpyAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="EnthalpyEnum.m" o="larour" g="staff" p="33261"/><f n="EnthalpyPicardEnum.m" o="larour" g="staff" p="33261"/><f n="EnthalpySolutionEnum.m" o="larour" g="staff" p="33261"/><f n="EnumToModelField.m" o="larour" g="staff" p="33261"/><f n="exp2kml.m" o="larour" g="staff" p="33261"/><f n="expandresponses.m" o="larour" g="staff" p="33261"/><f n="expandvariables.m" o="larour" g="staff" p="33261"/><f n="expbox.m" o="larour" g="staff" p="33261"/><f n="expboxgen.m" o="larour" g="staff" p="33261"/><f n="expcoarsen.m" o="larour" g="staff" p="33261"/><f n="expconcatenate.m" o="larour" g="staff" p="33261"/><f n="expcontract.m" o="larour" g="staff" p="33261"/><f n="expcreatecircle.m" o="larour" g="staff" p="33261"/><f n="expcreatecontour.m" o="larour" g="staff" p="33261"/><f n="expcreateprofile.m" o="larour" g="staff" p="33261"/><f n="expcut.m" o="larour" g="staff" p="33261"/><f n="expdisp.m" o="larour" g="staff" p="33261"/><f n="expdoc.m" o="larour" g="staff" p="33261"/><f n="expexcludeoutliers.m" o="larour" g="staff" p="33261"/><f n="expflip.m" o="larour" g="staff" p="33261"/><f n="expgen.m" o="larour" g="staff" p="33261"/><f n="explink.m" o="larour" g="staff" p="33261"/><f n="expll2xy.m" o="larour" g="staff" p="33261"/><f n="expmaster.m" o="larour" g="staff" p="33261"/><f n="expopen.m" o="larour" g="staff" p="33261"/><f n="exporientation.m" o="larour" g="staff" p="33261"/><f n="expremovestraightsegments.m" o="larour" g="staff" p="33261"/><f n="expselect.m" o="larour" g="staff" p="33261"/><f n="expsplit.m" o="larour" g="staff" p="33261"/><f n="expsquare.m" o="larour" g="staff" p="33261"/><f n="expswapxy.m" o="larour" g="staff" p="33261"/><f n="exptool.m" o="larour" g="staff" p="33261"/><f n="expxy2ll.m" o="larour" g="staff" p="33261"/><f n="ExternalResultEnum.m" o="larour" g="staff" p="33261"/><f n="extrude.m" o="larour" g="staff" p="33261"/><f n="ExtToIuEnum.m" o="larour" g="staff" p="33261"/><f n="FieldFindVarNames.m" o="larour" g="staff" p="33261"/><f n="FileParamEnum.m" o="larour" g="staff" p="33261"/><f n="FillEnum.m" o="larour" g="staff" p="33261"/><f n="FillHole.m" o="larour" g="staff" p="33261"/><f n="find_point.m" o="larour" g="staff" p="33261"/><f n="find_string.m" o="larour" g="staff" p="33261"/><f n="findarg.m" o="larour" g="staff" p="33261"/><f n="fixdec.m" o="larour" g="staff" p="33261"/><f n="FixMesh.m" o="larour" g="staff" p="33261"/><f n="FlagElements.m" o="larour" g="staff" p="33261"/><f n="flaim.m" o="larour" g="staff" p="33261"/><f n="flaim_sol.m" o="larour" g="staff" p="33261"/><f n="FlaimAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="flaimdir.m" o="larour" g="staff" p="33261"/><f n="FlaimSolutionEnum.m" o="larour" g="staff" p="33261"/><f n="flowequation.m" o="larour" g="staff" p="33261"/><f n="FlowequationBordermacayealEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationBorderpattynEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationBorderstokesEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationElementEquationEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationIshutterEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationIsmacayealpattynEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationIsstokesEnum.m" o="larour" g="staff" p="33261"/><f n="FlowequationVertexEquationEnum.m" o="larour" g="staff" p="33261"/><f n="flowlines.m" o="larour" g="staff" p="33261"/><f n="FractionIncrementEnum.m" o="larour" g="staff" p="33261"/><f n="FreeEnum.m" o="larour" g="staff" p="33261"/><f n="friction.m" o="larour" g="staff" p="33261"/><f n="FrictionCoefficientEnum.m" o="larour" g="staff" p="33261"/><f n="FrictionEnum.m" o="larour" g="staff" p="33261"/><f n="FrictionPEnum.m" o="larour" g="staff" p="33261"/><f n="FrictionQEnum.m" o="larour" g="staff" p="33261"/><f n="FsetEnum.m" o="larour" g="staff" p="33261"/><f n="geometry.m" o="larour" g="staff" p="33261"/><f n="GeometryHydrostaticRatioEnum.m" o="larour" g="staff" p="33261"/><f n="GetAreas.m" o="larour" g="staff" p="33261"/><f n="GetCharacteristicLength.m" o="larour" g="staff" p="33261"/><f n="GetNodalFunctionsCoeff.m" o="larour" g="staff" p="33261"/><f n="GetVerbosityLevel.m" o="larour" g="staff" p="33261"/><f n="ginputquick.m" o="larour" g="staff" p="33261"/><f n="glen_coefficients.m" o="larour" g="staff" p="33261"/><f n="graddetection.m" o="larour" g="staff" p="33261"/><f n="Gradient1Enum.m" o="larour" g="staff" p="33261"/><f n="Gradient2Enum.m" o="larour" g="staff" p="33261"/><f n="Gradient3Enum.m" o="larour" g="staff" p="33261"/><f n="gradient_core.m" o="larour" g="staff" p="33261"/><f n="gradient_perso.m" o="larour" g="staff" p="33261"/><f n="GradientEnum.m" o="larour" g="staff" p="33261"/><f n="groundingline.m" o="larour" g="staff" p="33261"/><f n="GroundinglineMeltingRateEnum.m" o="larour" g="staff" p="33261"/><f n="GroundinglineMigrationEnum.m" o="larour" g="staff" p="33261"/><f n="GsetEnum.m" o="larour" g="staff" p="33261"/><f n="HookEnum.m" o="larour" g="staff" p="33261"/><f n="HutterApproximationEnum.m" o="larour" g="staff" p="33261"/><f n="hydrology.m" o="larour" g="staff" p="33261"/><f n="HydrologyAnalysisEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyCREnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyKnEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyNEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyPEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyQEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologySolutionEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologySpcwatercolumnEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyStabilizationEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyWaterVxEnum.m" o="larour" g="staff" p="33261"/><f n="HydrologyWaterVyEnum.m" o="larour" g="staff" p="33261"/><f n="IceEnum.m" o="larour" g="staff" p="33261"/><f n="IcefrontEnum.m" o="larour" g="staff" p="33261"/><f n="IceVolumeEnum.m" o="larour" g="staff" p="33261"/><f n="im_resize.m" o="larour" g="staff" p="33261"/><f n="immerge.m" o="larour" g="staff" p="33261"/><f n="importancefactors.m" o="larour" g="staff" p="33261"/><f n="IncrementalEnum.m" o="larour" g="staff" p="33261"/><f n="IndexedEnum.m" o="larour" g="staff" p="33261"/><f n="IndexEnum.m" o="larour" g="staff" p="33261"/><f n="initialization.m" o="larour" g="staff" p="33261"/><f n="InputEnum.m" o="larour" g="staff" p="33261"/><f n="InternalEnum.m" o="larour" g="staff" p="33261"/><f n="InterpFromFile.m" o="larour" g="staff" p="33261"/><f n="startup.m" o="larour" g="staff" p="33261"/></f></pkg-contents>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/04bin.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/04bin.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/04bin.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkgref spec="1.12" uuid="18E7DF11-93BD-47ED-B9FE-56870B61EB72"><config><identifier>issm.bin.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/larour/issm-uci/trunk-jpl/bin</installFrom><installTo mod="true">/Library/ISSM/bin</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo.path</mod><mod>parent</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>04bin-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/index.xml
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/index.xml	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/ISSM.pmdoc/index.xml	(revision 11577)
@@ -0,0 +1,1 @@
+<pkmkdoc spec="1.12"><properties><title>ISSM</title><build>/Users/larour/issm-uci/trunk-jpl/installers/macosx/ISSM.pkg</build><organization>http://issm.jpl.nasa.gov</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Ice Sheet System Model</description><contents><choice title="ISSM" id="choice3" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="ISSM.pkg"/></choice><choice title="matlabissm" id="choice4" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="ISSM.matlabissm.pkg"/></choice><choice title="startup" id="choice5" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="ISSM.startup.pkg"/></choice><choice title="bin" id="choice6" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="issm.bin.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"/></resources><flags/><item type="file">01issm.xml</item><item type="file">02matlabissm.xml</item><item type="file">03startup.xml</item><item type="file">04bin.xml</item><mod>properties.title</mod><mod>properties.userDomain</mod><mod>description</mod><mod>properties.anywhereDomain</mod></pkmkdoc>
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/README
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/README	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/README	(revision 11577)
@@ -0,0 +1,16 @@
+Files needsed to package ISSM into a MacOSX delivery: 
+
+ISSM.appscript : applescript file used by Script Editor to build ISSM.app. Just edit using applescript, and save 
+as application. 
+
+ISSM.app: result of above. 
+
+ISSM.pmdoc: Package Maker project, which outputs ISSM.pkg
+
+ISSM.pkg: result of above. 
+
+Package Maker can be command line driven, using the pmdoc project directly. This is what package.sh does.
+
+issm.icns: icon file for ISSM install.
+matlabissm: used by the Package Maker to launch matlab with ISSM path sourced. 
+startup.m: needed to be sourced by Matlab to point towards mac executables.
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/matlabissm
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/matlabissm	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/matlabissm	(revision 11577)
@@ -0,0 +1,2 @@
+#/bin/bash
+matlab -r "addpath /Library/ISSM/bin/; startup"
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/package.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/package.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/package.sh	(revision 11577)
@@ -0,0 +1,6 @@
+#/bin/bash
+
+#Package using the Package Maker from OSX, driven by command line.
+rm -rf ISSM.pkg
+
+PackageMaker -d ISSM.pmdoc -o ISSM.pkg
Index: /issm/branches/trunk-jpl-damage/packagers/macosx/startup.m
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/macosx/startup.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/macosx/startup.m	(revision 11577)
@@ -0,0 +1,46 @@
+%STARTUP - Matlab startup script
+%
+%   startup.m is a script run by matlab at the beginning of a session, just
+%   before handing over the prompt to the user. This delivery startup.m script
+%   has been customized here for the ISSM code. This startup script should be
+%   run by users before trying to use ISSM. The best way to do that is to put
+%   the startup file in the location where Matlab starts and established its
+%   root directory.
+
+% clear the last warning to focus on the warnings of the ISSM path
+lastwarn(''); 
+
+%Recover ISSM_TIER , or if on a Windows machine, ISSM_TIER_WIN
+ISSM_TIER=getenv('ISSM_TIER');
+
+if (isempty(ISSM_TIER)),
+	error('issmdir error message: ''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
+end
+
+%Now add all issm code paths necessary to run issm smoothly. 
+%We capture the error output, so that we can warn the user to update 
+%the variable ISSM_TIER in this file, in case it is not correctly setup. 
+
+%ISSM path
+addpath(pwd); %add current path first
+addpath([pwd '\bin']);
+
+%Check on any warning messages that might indicate that the paths were not correct. 
+if ~isempty(lastwarn),
+	fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_TIER variable in your .cshrc or .bashrc!\n');
+	fprintf('  ''ISSM'' will not  work at all until this is resolved\n\n');
+else
+	fprintf('\n  To get started with ISSM, type issmdoc at the command prompt.\n\n');
+end
+
+%disable matlab bell!
+beep off;
+
+% no warning if we try to plot while in nojvm (will not be supported in future releases)
+warning off MATLAB:HandleGraphics:noJVM
+
+%at the end, get to tests directory if ISSM_TESTS exists: 
+ISSM_TESTS=getenv('ISSM_TESTS');
+if ~isempty(ISSM_TESTS),
+	cd(ISSM_TESTS);
+end
Index: /issm/branches/trunk-jpl-damage/packagers/ubuntu/README
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/ubuntu/README	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/ubuntu/README	(revision 11577)
@@ -0,0 +1,14 @@
+To install ISSM, untar ISSM-Ubuntu32.tar.gz 
+You will get an ISSM directory. 
+
+You then need to setup the following environment variable in your 
+.bashrc or .cshrc: 
+
+in your .bashrc: 
+export ISSM_TIER='path_to_untarred_ISSM/bin'
+
+or in your .cshrc: 
+setenv ISSM_TIER 'path_to_untarred_ISSM'
+
+Once this is done, fireup matlab from inside the ISSM directory: 
+matlab -nojvm -r "startup;"
Index: /issm/branches/trunk-jpl-damage/packagers/ubuntu/package.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/ubuntu/package.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/ubuntu/package.sh	(revision 11577)
@@ -0,0 +1,15 @@
+#/bin/bash
+
+#Just tar gz the bin/ directory and test/ directory and put a startup.m file.
+
+rm -rf ISSM ISSM-Ubuntu32.tar.gz
+
+mkdir ISSM
+cd ISSM
+ln -s $ISSM_TIER/bin ./bin
+ln -s $ISSM_TIER/test ./test
+cp ../startup.m ./
+cp ../README.m ./
+cd ..
+tar  zcvfh  ISSM-Ubuntu32.tar.gz --exclude='.svn' ./ISSM
+rm -rf ISSM
Index: /issm/branches/trunk-jpl-damage/packagers/ubuntu/startup.m
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/ubuntu/startup.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/ubuntu/startup.m	(revision 11577)
@@ -0,0 +1,40 @@
+%STARTUP - Matlab startup script
+%
+%   startup.m is a script run by matlab at the beginning of a session, just
+%   before handing over the prompt to the user. This delivery startup.m script
+%   has been customized here for the ISSM code. This startup script should be
+%   run by users before trying to use ISSM. The best way to do that is to put
+%   the startup file in the location where Matlab starts and established its
+%   root directory.
+
+% clear the last warning to focus on the warnings of the ISSM path
+lastwarn(''); 
+
+%Recover ISSM_TIER , or if on a Windows machine, ISSM_TIER_WIN
+ISSM_TIER=getenv('ISSM_TIER');
+
+if (isempty(ISSM_TIER)),
+	error('issmdir error message: ''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
+end
+
+%Now add all issm code paths necessary to run issm smoothly. 
+%We capture the error output, so that we can warn the user to update 
+%the variable ISSM_TIER in this file, in case it is not correctly setup. 
+
+%ISSM path
+addpath(ISSM_TIER);
+addpath([ISSM_TIER '/bin']);
+
+%Check on any warning messages that might indicate that the paths were not correct. 
+if ~isempty(lastwarn),
+	fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_TIER variable in your .cshrc or .bashrc!\n');
+	fprintf('  ''ISSM'' will not  work at all until this is resolved\n\n');
+else
+	fprintf('\n  To get started with ISSM, type issmdoc at the command prompt.\n\n');
+end
+
+%disable matlab bell!
+beep off;
+
+% no warning if we try to plot while in nojvm (will not be supported in future releases)
+warning off MATLAB:HandleGraphics:noJVM
Index: /issm/branches/trunk-jpl-damage/packagers/win7/ISSM.initial.aip
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/win7/ISSM.initial.aip	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/win7/ISSM.initial.aip	(revision 11577)
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<DOCUMENT Type="Advanced Installer" CreateVersion="8.9" version="8.9" Modules="simple" RootPath="." Language="en" Id="{36DC7549-63BC-4A22-AE82-A96C27BF7B21}">
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
+    <ROW Property="ALLUSERS" Value="2"/>
+    <ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
+    <ROW Property="ARPCONTACT" Value="Eric Larour, Helene Seroussi and Mathieu Morlighem"/>
+    <ROW Property="ARPHELPTELEPHONE" Value="001 (818) 393-2435"/>
+    <ROW Property="ARPURLINFOABOUT" Value="http://issm.jpl.nasa.gov"/>
+    <ROW Property="CTRLS" Value="1"/>
+    <ROW Property="Manufacturer" Value="JPL-UCI" ValueLocId="*"/>
+    <ROW Property="ProductCode" Value="1033:{387D11EC-1489-4A6F-8CA2-BA65601C19BE} " Type="16"/>
+    <ROW Property="ProductLanguage" Value="1033"/>
+    <ROW Property="ProductName" Value="ISSM" ValueLocId="*"/>
+    <ROW Property="ProductVersion" Value="1.0"/>
+    <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
+    <ROW Property="UpgradeCode" Value="{F12D1A74-5079-41A3-A02A-15754B89E390}"/>
+    <ROW Property="VIEWREADME" Value="1" Type="4"/>
+    <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
+    <ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
+    <ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
+    <ROW Directory="AppDataFolder" Directory_Parent="TARGETDIR" DefaultDir="AppDat~1|AppDataFolder" IsPseudoRoot="1"/>
+    <ROW Directory="DesktopFolder" Directory_Parent="TARGETDIR" DefaultDir="Deskto~1|DesktopFolder" IsPseudoRoot="1"/>
+    <ROW Directory="InternetExplorer_Dir" Directory_Parent="Microsoft_Dir" DefaultDir="Intern~1|Internet Explorer"/>
+    <ROW Directory="Microsoft_Dir" Directory_Parent="AppDataFolder" DefaultDir="Micros~1|Microsoft"/>
+    <ROW Directory="QuickLaunch_Dir" Directory_Parent="InternetExplorer_Dir" DefaultDir="QuickL~1|Quick Launch"/>
+    <ROW Directory="SHORTCUTDIR" Directory_Parent="TARGETDIR" DefaultDir="SHORTC~1|SHORTCUTDIR" IsPseudoRoot="1"/>
+    <ROW Directory="StartMenuFolder" Directory_Parent="TARGETDIR" DefaultDir="StartM~1|StartMenuFolder" IsPseudoRoot="1"/>
+    <ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
+    <ROW Component="ProductInformation" ComponentId="{9BA1DCE1-2716-4161-BFC1-9427FF450B3F}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
+    <ROW Component="QuickLaunch" ComponentId="{73BCCA29-216A-4FD5-A030-FFEAC0435857}" Directory_="QuickLaunch_Dir" Attributes="0"/>
+    <ROW Component="SHORTCUTDIR" ComponentId="{92285889-F321-4F14-B289-6895275D45D7}" Directory_="SHORTCUTDIR" Attributes="0"/>
+    <ROW Component="matlabissm.bat" ComponentId="{239E0327-22CA-433B-B84D-609A42F7F608}" Directory_="APPDIR" Attributes="0" KeyPath="matlabissm.bat" Type="0"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
+    <ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="ProductInformation QuickLaunch SHORTCUTDIR matlabissm.bat"/>
+    <ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
+    <ROW File="README.rtf" Component_="matlabissm.bat" FileName="README.rtf" Attributes="0" SourcePath="..\..\bin\README.rtf" SelfReg="false"/>
+    <ROW File="matlabissm.bat" Component_="matlabissm.bat" FileName="matlab~1.bat|matlabissm.bat" Attributes="0" SourcePath="..\..\scripts\matlabissm.bat" SelfReg="false" NextFile="README.rtf"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
+    <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" Languages="en" InstallationType="4" MsiPackageType="x64"/>
+    <ATTRIBUTE name="CurrentBuild" value="DefaultBuild"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.CacheComponent">
+    <ATTRIBUTE name="Enable" value="false"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
+    <ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
+    <ROW Path="&lt;AI_DICTS&gt;ui_en.ail"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
+    <ROW Fragment="CommonUI.aip" Path="&lt;AI_FRAGS&gt;CommonUI.aip"/>
+    <ROW Fragment="FolderDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\FolderDlg.aip"/>
+    <ROW Fragment="SequenceDialogs.aip" Path="&lt;AI_THEMES&gt;classic\fragments\SequenceDialogs.aip"/>
+    <ROW Fragment="Sequences.aip" Path="&lt;AI_FRAGS&gt;Sequences.aip"/>
+    <ROW Fragment="StaticUIStrings.aip" Path="&lt;AI_FRAGS&gt;StaticUIStrings.aip"/>
+    <ROW Fragment="UI.aip" Path="&lt;AI_THEMES&gt;classic\fragments\UI.aip"/>
+    <ROW Fragment="Validation.aip" Path="&lt;AI_FRAGS&gt;Validation.aip"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
+    <ROW Name="aicustact.dll" SourcePath="&lt;AI_CUSTACTS&gt;aicustact.dll"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
+    <ATTRIBUTE name="FixedSizeBitmaps" value="0"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
+    <ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
+    <ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/>
+    <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="201"/>
+    <ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/>
+    <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/>
+    <ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/>
+    <ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/>
+    <ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
+    <ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="401"/>
+    <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="202"/>
+    <ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/>
+    <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/>
+    <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
+    <ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/>
+    <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
+    <ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
+    <ROW Directory_="SHORTCUTDIR" Component_="SHORTCUTDIR"/>
+    <ROW Directory_="QuickLaunch_Dir" Component_="QuickLaunch"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
+    <ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
+    <ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
+    <ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
+    <ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
+    <ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
+    <ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
+    <ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
+    <ROW Action="AI_ViewReadme" Type="1" Source="aicustact.dll" Target="[#README.rtf]"/>
+    <ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFiles64Folder][Manufacturer]\[ProductName]"/>
+    <ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
+    <ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiEnvComponent">
+    <ROW Environment="ISSM_TESTS_1" Name="=-ISSM_TESTS" Value="[test_Dir]" Component_="ProductInformation"/>
+    <ROW Environment="ISSM_TIER" Name="=-ISSM_TIER" Value="[APPDIR]" Component_="ProductInformation"/>
+    <ROW Environment="ISSM_TIER_WIN" Name="=-ISSM_TIER_WIN" Value="[APPDIR]" Component_="ProductInformation"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
+    <ROW Name="matlabissm.exe" SourcePath="ISSMlogo.ico" Index="0"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
+    <ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel &lt;&gt; 5)" Sequence="210"/>
+    <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="749"/>
+    <ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
+    <ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE=&quot;No&quot; AND (Not Installed)" Sequence="1399"/>
+    <ROW Action="AI_ResolveKnownFolders" Sequence="51"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
+    <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="749"/>
+    <ROW Action="AI_ResolveKnownFolders" Sequence="51"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
+    <ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
+    <ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
+    <ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiShortsComponent">
+    <ROW Shortcut="ISSM" Directory_="SHORTCUTDIR" Name="ISSM" Component_="matlabissm.bat" Target="[#matlabissm.bat]" Hotkey="0" Icon_="matlabissm.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
+    <ROW Shortcut="ISSM_1" Directory_="DesktopFolder" Name="ISSM" Component_="matlabissm.bat" Target="[#matlabissm.bat]" Hotkey="0" Icon_="matlabissm.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
+    <ROW Shortcut="ISSM_2" Directory_="QuickLaunch_Dir" Name="ISSM" Component_="matlabissm.bat" Target="[#matlabissm.bat]" Hotkey="0" Icon_="matlabissm.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
+    <ROW Shortcut="ISSM_3" Directory_="StartMenuFolder" Name="ISSM" Component_="matlabissm.bat" Target="[#matlabissm.bat]" Hotkey="0" Icon_="matlabissm.exe" IconIndex="0" ShowCmd="1" WkDir="APPDIR"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
+    <ATTRIBUTE name="UsedTheme" value="classic"/>
+  </COMPONENT>
+  <COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
+    <ROW UpgradeCode="[|UpgradeCode]" VersionMax="[|ProductVersion]" Attributes="1025" ActionProperty="OLDPRODUCTS"/>
+    <ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
+  </COMPONENT>
+</DOCUMENT>
Index: /issm/branches/trunk-jpl-damage/packagers/win7/package.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/win7/package.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/win7/package.sh	(revision 11577)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+#get brand new project: 
+rm -rf ISSM.aip  ISSM-SetupFiles ISSM.msi
+cp ISSM.initial.aip ISSM.aip
+
+#get windows style path to files
+ISSM_TIER_WIN=`cygpath -m "$ISSM_TIER"`
+
+#build list of files to put into the installer: 
+rm -rf ISSM.aic 
+cat << END > ISSM.aic
+;aic
+SetVersion "1.0"
+SetPackageName "ISSM.msi"
+END
+
+ls $ISSM_TIER_WIN/scripts/*.bat startup.m $ISSM_TIER_WIN/bin/*.h | awk '{printf("AddFile APPDIR %s\n",$1);}' | sed 's/\//\\/g' >> ISSM.aic
+
+cat << END >> ISSM.aic
+AddFolder PersonalFolder $ISSM_TIER_WIN\test
+AddFolder APPDIR $ISSM_TIER_WIN\bin
+DelEnvironment ISSM_TESTS
+NewEnvironment -name ISSM_TESTS -value [test_Dir]
+DelEnvironment ISSM_TIER
+NewEnvironment -name ISSM_TIER -value [APPDIR]
+DelEnvironment ISSM_TIER_WIN
+NewEnvironment -name ISSM_TIER_WIN -value [APPDIR]
+Save
+Rebuild
+END
+
+#Run installer: 
+"C:/Program Files (x86)/Caphyon/Advanced Installer 8.9/bin/x86/AdvancedInstaller.com" /execute  ./ISSM.aip ./ISSM.aic
+
+#Get rid of temporary files: 
+cp ISSM-SetupFiles/ISSM.msi ./
+rm -rf ISSM.aip ISSM-SetupFiles ISSM.aic
Index: /issm/branches/trunk-jpl-damage/packagers/win7/startup.m
===================================================================
--- /issm/branches/trunk-jpl-damage/packagers/win7/startup.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/packagers/win7/startup.m	(revision 11577)
@@ -0,0 +1,46 @@
+%STARTUP - Matlab startup script
+%
+%   startup.m is a script run by matlab at the beginning of a session, just
+%   before handing over the prompt to the user. This delivery startup.m script
+%   has been customized here for the ISSM code. This startup script should be
+%   run by users before trying to use ISSM. The best way to do that is to put
+%   the startup file in the location where Matlab starts and established its
+%   root directory.
+
+% clear the last warning to focus on the warnings of the ISSM path
+lastwarn(''); 
+
+%Recover ISSM_TIER , or if on a Windows machine, ISSM_TIER_WIN
+ISSM_TIER=getenv('ISSM_TIER_WIN');
+
+if (isempty(ISSM_TIER)),
+	error('issmdir error message: ''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
+end
+
+%Now add all issm code paths necessary to run issm smoothly. 
+%We capture the error output, so that we can warn the user to update 
+%the variable ISSM_TIER in this file, in case it is not correctly setup. 
+
+%ISSM path
+addpath(pwd); %add current path first
+addpath([pwd '\bin']);
+
+%Check on any warning messages that might indicate that the paths were not correct. 
+if ~isempty(lastwarn),
+	fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_TIER variable in your .cshrc or .bashrc!\n');
+	fprintf('  ''ISSM'' will not  work at all until this is resolved\n\n');
+else
+	fprintf('\n  To get started with ISSM, type issmdoc at the command prompt.\n\n');
+end
+
+%disable matlab bell!
+beep off;
+
+% no warning if we try to plot while in nojvm (will not be supported in future releases)
+warning off MATLAB:HandleGraphics:noJVM
+
+%at the end, get to tests directory if ISSM_TESTS exists: 
+ISSM_TESTS=getenv('ISSM_TESTS');
+if ~isempty(ISSM_TESTS),
+	cd(ISSM_TESTS);
+end
Index: /issm/branches/trunk-jpl-damage/scripts/historyISSM.m
===================================================================
--- /issm/branches/trunk-jpl-damage/scripts/historyISSM.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/scripts/historyISSM.m	(revision 11577)
@@ -1,18 +1,13 @@
 !vim runme.m
-md=runme('id',101);
 runme('id',[101]);
-md.numberofelements
-md.numberofnodes
+md.mesh.numberofelements
 md=mesh(md,'DomainOutline.exp',5000);
-md=geography(md,'','');
-md=geography(md,'Iceshelves.exp','Islands.exp');
-md=setelementstype(md,'macayeal','all');
-md=setelementstype(md,'pattyn','all','stokes','all');
-md=solve(md,ThermalSolutionEnum);
+md=setmask(md,'','');
+md=setflowequation(md,'macayeal','all');
+md=setflowequation(md,'pattyn','all','stokes','all');
+md=solve(md,TransientSolutionEnum);
 md=solve(md,BalancedthicknessSolutionEnum);
 md=solve(md,DiagnosticSolutionEnum);
 md=loadresultsfromcluster(md);
-md=tres(md,ThermalSolutionEnum);
-md=tres(md,DiagnosticSolutionEnum);
 plotmodel(md,'data',md.results.DiagnosticSolution.Vel)
 plotmodel(md,'data',)
Index: /issm/branches/trunk-jpl-damage/scripts/intel-compile.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/scripts/intel-compile.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/scripts/intel-compile.sh	(revision 11577)
@@ -0,0 +1,21 @@
+#!/bin/bash
+#Why don't we just type make? (shouldn't automake have taken care of this?)
+#The problem is the /Fe option from the intel compiler, which we weren't able to 
+#get automake to recognize. End result is that every file compiled is not named libISSM_a-name, 
+#but just name.  This makes the creation of libISSM.a impossible, as none of its objects 
+#can be found with the correct name. 
+#As a fix, we rename the objects, and then link.
+
+#First compile.
+#make
+
+#Then change the names
+list=`ls *.obj | grep -v libISSM_a`
+for i in `echo $list`
+do
+	mv $i libISSM_a-$i
+done
+
+#Now create the library out the .obj files
+rm -rf libISSM.a
+lib.exe /out:libISSM.a *.obj
Index: /issm/branches/trunk-jpl-damage/scripts/matlabissm.bat
===================================================================
--- /issm/branches/trunk-jpl-damage/scripts/matlabissm.bat	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/scripts/matlabissm.bat	(revision 11577)
@@ -0,0 +1,2 @@
+@echo off
+matlab 
Index: /issm/branches/trunk-jpl-damage/scripts/wincron.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/scripts/wincron.sh	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/scripts/wincron.sh	(revision 11577)
@@ -0,0 +1,5 @@
+#/bin/bash
+#Launch cron as a windows service, using cygrunsrv: 
+
+cygrunsrv --install cron --path /usr/sbin/cron --args -n
+net start cron
Index: /issm/branches/trunk-jpl-damage/src/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/Makefile.am	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/Makefile.am	(revision 11577)
@@ -1,4 +1,4 @@
-EXTRA_DIST = m  perl  pro
-SUBDIRS = c mex
+EXTRA_DIST =  perl  pro
+SUBDIRS = c mex m
 
 if ADIC2
Index: /issm/branches/trunk-jpl-damage/src/c/Container/Elements.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/Container/Elements.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/Container/Elements.cpp	(revision 11577)
@@ -180,4 +180,6 @@
 	int    numberofvertices,numberofelements;
 	int    numberofresults,vectorsize;
+	int    rank;
+	int    minrank;
 
 	/*Recover parameters: */
@@ -190,14 +192,20 @@
 		/*No patch here, we prepare vectors*/
 
+		/*Get rank of first cpu that has results*/
+		if(this->Size()) rank=my_rank;
+		else rank=num_procs;
+		MPI_Allreduce (&rank,&minrank,1,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
+
 		/*see what the first element of this partition has in stock (this is common to all partitions)*/
-		if(my_rank==0){
-			if(this->Size()==0) _error_("Cannot write results because first partition has no element. Maybe too many cpus were requested");
+		if(my_rank==minrank){
+			if(this->Size()==0) _error_("Cannot write results because there is no element??");
 			Element* element=(Element*)this->GetObjectByOffset(0);
 			element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
 		}
-		MPI_Bcast(&numberofresults,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+		MPI_Bcast(&numberofresults,1,MPI_DOUBLE,minrank,MPI_COMM_WORLD);
+
 		/*Get out if there is no results. Otherwise broadcast info*/
 		if(!numberofresults) return;
-		if(my_rank!=0){
+		if(my_rank!=minrank){
 			resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
 			resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
@@ -205,8 +213,8 @@
 			resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
 		}
-		MPI_Bcast(resultsenums,numberofresults,MPI_INT,0,MPI_COMM_WORLD);
-		MPI_Bcast(resultssizes,numberofresults,MPI_INT,0,MPI_COMM_WORLD);
-		MPI_Bcast(resultstimes,numberofresults,MPI_DOUBLE,0,MPI_COMM_WORLD);
-		MPI_Bcast(resultssteps,numberofresults,MPI_INT,0,MPI_COMM_WORLD);
+		MPI_Bcast(resultsenums,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+		MPI_Bcast(resultssizes,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+		MPI_Bcast(resultstimes,numberofresults,MPI_DOUBLE,minrank,MPI_COMM_WORLD);
+		MPI_Bcast(resultssteps,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
 
 		/*Loop over all results and get nodal vector*/
Index: /issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumDefinitions.h	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumDefinitions.h	(revision 11577)
@@ -73,4 +73,5 @@
 	InversionIscontrolEnum,
 	InversionTaoEnum,
+	InversionIncompleteAdjointEnum,
 	InversionMaxParametersEnum,
 	InversionMaxiterPerStepEnum,
@@ -154,6 +155,5 @@
 	SteadystateRequestedOutputsEnum,
 	SurfaceEnum,
-	SurfaceforcingsAblationRateEnum,
-	SurfaceforcingsAccumulationRateEnum,
+	SurfaceforcingsPrecipitationEnum,
 	SurfaceforcingsMassBalanceEnum,
 	ThermalMaxiterEnum,
Index: /issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumToModelField.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumToModelField.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumToModelField.cpp	(revision 11577)
@@ -25,6 +25,4 @@
 		case InversionVyObsEnum : return "vy_obs";
 		case BasalforcingsMeltingRateEnum : return "basal_melting_rate";
-      case SurfaceforcingsAccumulationRateEnum : return "surface_accumulation_rate";
-		case SurfaceforcingsAblationRateEnum : return "surface_ablation_rate";
 		case SurfaceforcingsMassBalanceEnum : return "surface_mass_balance";
 		default : _error_("No model field is associated to enum %s",EnumToStringx(en));
Index: /issm/branches/trunk-jpl-damage/src/c/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/Makefile.am	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/Makefile.am	(revision 11577)
@@ -1,3 +1,4 @@
 INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@  @METISINCL@  @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@  @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@  @TRIANGLEINCL@ @HYPREINCL@ @MLINCL@ @TAOINCL@
+EXEEXT=$(ISSMEXT)
 
 #Library declaration {{{1
@@ -185,4 +186,6 @@
 					./shared/Numerics/GaussPoints.cpp\
 					./shared/Numerics/cross.cpp\
+					./shared/Numerics/isnan.h\
+					./shared/Numerics/isnan.cpp\
 					./shared/Numerics/extrema.cpp\
 					./shared/Numerics/XZvectorsToCoordinateSystem.cpp\
@@ -309,4 +312,6 @@
 					./modules/SpcNodesx/SpcNodesx.h\
 					./modules/SpcNodesx/SpcNodesx.cpp\
+					./modules/PositiveDegreeDayx/PositiveDegreeDayx.h\
+					./modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp\
 					./modules/UpdateConstraintsx/UpdateConstraintsx.h\
 					./modules/UpdateConstraintsx/UpdateConstraintsx.cpp\
@@ -743,6 +748,4 @@
 			./shared/Threads/LaunchThread.cpp\
 			./shared/Threads/PartitionRange.cpp\
-			./shared/Numerics/isnan.h\
-			./shared/Numerics/isnan.cpp\
 			./shared/Exp/exp.h\
 			./shared/Exp/IsInPoly.cpp\
@@ -894,5 +897,5 @@
 libISSM_a_SOURCES += $(matlab_sources)
 
-libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -ansi -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXOPTFLAGS)
+libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(CXXOPTFLAGS) 
 if LARGEARRAYS
 libISSM_a_CXXFLAGS += -D__GCC4BUILD__  
@@ -904,9 +907,9 @@
 libpISSM_a_SOURCES  = $(issm_sources)
 libpISSM_a_SOURCES += $(issm_psources)
-libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS) 
+libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXFLAGS) $(CXXOPTFLAGS) 
 #}}}
 #Overload library, to overload any non-standard symbols. {{{1
 libOverload_a_SOURCES = ./shared/String/stricmp.c
-libOverload_a_CFLAGS  = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
+libOverload_a_CFLAGS  = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS) $(CFLAGS)
 #}}}
 
@@ -915,5 +918,5 @@
 bin_PROGRAMS = 
 else 
-bin_PROGRAMS = issm.exe
+bin_PROGRAMS = issm
 endif
 
@@ -922,7 +925,7 @@
 
 #External packages
-LDADD += $(PETSCLIB) $(TAOLIB) $(FLIBS) $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB)  $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(ADIC2LIB) 
-
-issm_exe_SOURCES = solutions/issm.cpp
-issm_exe_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXOPTFLAGS) $(COPTFLAGS) 
-#}}}
+LDADD += $(PETSCLIB) $(TAOLIB) $(FLIBS) $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB)  $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(ADIC2LIB)  $(OSLIBS)
+
+issm_SOURCES = solutions/issm.cpp
+issm_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
+#}}}
Index: /issm/branches/trunk-jpl-damage/src/c/include/typedefs.h
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/include/typedefs.h	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/include/typedefs.h	(revision 11577)
@@ -23,6 +23,19 @@
 /*Windows specific typefefs: */
 #ifdef _INTEL_WIN_
-#define NAN 0.0/0.0
-#define INFINITY 1.0/0.0
+
+/*Complicated way, which does not handle INFINITY though: */
+/*#ifndef NAN
+	static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
+	#define NAN (*(const float *) __nan)
+#endif*/
+
+//For reference, for Intel compile on win64
+//#define NAN 0.0/0.0 
+//#define INFINITY 1.0/0.0
+
+//Most generic way it would seem:
+#define INFINITY (DBL_MAX+DBL_MAX)
+#define NAN (INFINITY-INFINITY)
+	
 #endif
 
Index: sm/branches/trunk-jpl-damage/src/c/intel-compile.sh
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/intel-compile.sh	(revision 11576)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#!/bin/bash
-#Why don't we just type make? (shouldn't automake have taken care of this?)
-#The problem is the /Fe option from the intel compiler, which we weren't able to 
-#get automake to recognize. End result is that every file compiled is not named libISSM_a-name, 
-#but just name.  This makes the creation of libISSM.a impossible, as none of its objects 
-#can be found with the correct name. 
-#As a fix, we rename the objects, and then link.
-
-#First compile.
-make
-
-#Then change the names
-list=`ls *.obj | grep -v libISSM_a`
-for i in `echo $list`
-do
-	mv $i libISSM_a-$i
-done
-
-#Now create the library out the .obj files
-rm -rf libISSM.a
-ar cru libISSM.a *.obj
Index: /issm/branches/trunk-jpl-damage/src/c/modules/Bamgx/Bamgx.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/Bamgx/Bamgx.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/Bamgx/Bamgx.cpp	(revision 11577)
@@ -145,5 +145,5 @@
 					Metric M=BTh.vertices[i].m;
 					EigenMetric Vp(M/coef);
-					Vp.Minh(bamgopts->hmaxVertices[i]);
+					Vp.Maxh(bamgopts->hmaxVertices[i]);
 					BTh.vertices[i].m=Vp;
 				}
Index: /issm/branches/trunk-jpl-damage/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 11577)
@@ -77,4 +77,5 @@
 		case InversionIscontrolEnum : return "InversionIscontrol";
 		case InversionTaoEnum : return "InversionTao";
+		case InversionIncompleteAdjointEnum : return "InversionIncompleteAdjoint";
 		case InversionMaxParametersEnum : return "InversionMaxParameters";
 		case InversionMaxiterPerStepEnum : return "InversionMaxiterPerStep";
@@ -158,6 +159,5 @@
 		case SteadystateRequestedOutputsEnum : return "SteadystateRequestedOutputs";
 		case SurfaceEnum : return "Surface";
-		case SurfaceforcingsAblationRateEnum : return "SurfaceforcingsAblationRate";
-		case SurfaceforcingsAccumulationRateEnum : return "SurfaceforcingsAccumulationRate";
+		case SurfaceforcingsPrecipitationEnum : return "SurfaceforcingsPrecipitation";
 		case SurfaceforcingsMassBalanceEnum : return "SurfaceforcingsMassBalance";
 		case ThermalMaxiterEnum : return "ThermalMaxiter";
Index: /issm/branches/trunk-jpl-damage/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 11577)
@@ -48,4 +48,5 @@
 	KML_LinearRing*    kring =NULL;
 	KML_LineString*    kline =NULL;
+	KML_Point*         kpoint=NULL;
 
 	FILE*   fid=NULL;
@@ -60,6 +61,9 @@
 /*  read exp file  */
 
-	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp,false))
+	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp,true))
 		_error_("Error reading exp file.");
+	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
+//	for (i=0; i<nprof; i++)
+//		printf("i=%d; nvert=%d, closed=%d\n",i,pnvert[i],closed[i]);
 
 /*  construct kml file  */
@@ -123,5 +127,5 @@
 /*  polygon with multiple holes  */
 
-	if (holes && nprof && !closed[0]) {
+	if (holes && nprof && (pnvert[0] <= 1 || pprofx[0][pnvert[0]-1] != pprofx[0][0] || pprofy[0][pnvert[0]-1] != pprofy[0][0])) {
 		_printf_(true,"Warning -- Outer profile is not closed, so \"holes\" option will be ignored.\n");
 		holes=false;
@@ -138,11 +142,10 @@
 		kring =new KML_LinearRing();
 
-		lat=(double *) xmalloc(pnvert[i]*sizeof(double));
-		lon=(double *) xmalloc(pnvert[i]*sizeof(double));
-		Xy2llx(lat,lon,pprofx[i],pprofy[i],pnvert[i],sgn,cm,sp);
-
-		kring->ncoord    =pnvert[i];
-		kring->coords    =(double (*)[3]) xmalloc(pnvert[i]*3*sizeof(double));
-		for (j=0; j<pnvert[i]; j++) {
+		kring->ncoord    =pnvert[i]-1;
+		lat=(double *) xmalloc(kring->ncoord*sizeof(double));
+		lon=(double *) xmalloc(kring->ncoord*sizeof(double));
+		Xy2llx(lat,lon,pprofx[i],pprofy[i],kring->ncoord,sgn,cm,sp);
+		kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
+		for (j=0; j<kring->ncoord; j++) {
 			kring->coords[j][0]=lon[j];
 			kring->coords[j][1]=lat[j];
@@ -156,5 +159,5 @@
 
 		for (i=1; i<nprof; i++) {
-			if (!closed[i]) {
+			if (pnvert[i] <= 1 || pprofx[i][pnvert[i]-1] != pprofx[i][0] || pprofy[i][pnvert[i]-1] != pprofy[i][0]) {
 				_printf_(true,"Warning -- Inner profile %d is not closed with \"holes\" specified, so it will be ignored.\n",i+1);
 				continue;
@@ -163,10 +166,10 @@
 			kring =new KML_LinearRing();
 
-			lat=(double *) xmalloc(pnvert[i]*sizeof(double));
-			lon=(double *) xmalloc(pnvert[i]*sizeof(double));
-			Xy2llx(lat,lon,pprofx[i],pprofy[i],pnvert[i],sgn,cm,sp);
-			kring->ncoord    =pnvert[i];
-			kring->coords    =(double (*)[3]) xmalloc(pnvert[i]*3*sizeof(double));
-			for (j=0; j<pnvert[i]; j++) {
+			kring->ncoord    =pnvert[i]-1;
+			lat=(double *) xmalloc(kring->ncoord*sizeof(double));
+			lon=(double *) xmalloc(kring->ncoord*sizeof(double));
+			Xy2llx(lat,lon,pprofx[i],pprofy[i],kring->ncoord,sgn,cm,sp);
+			kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
+			for (j=0; j<kring->ncoord; j++) {
 				kring->coords[j][0]=lon[j];
 				kring->coords[j][1]=lat[j];
@@ -192,5 +195,5 @@
 			kplace=new KML_Placemark();
 
-			if (closed[i]) {
+			if     (pnvert[i] > 1 && pprofx[i][pnvert[i]-1] == pprofx[i][0] && pprofy[i][pnvert[i]-1] == pprofy[i][0]) {
 				sprintf(kplace->name      ,"Polygon %d",i+1);
 				kplace->visibility=true;
@@ -200,11 +203,10 @@
 				kring =new KML_LinearRing();
 
-				lat=(double *) xmalloc(pnvert[i]*sizeof(double));
-				lon=(double *) xmalloc(pnvert[i]*sizeof(double));
-				Xy2llx(lat,lon,pprofx[i],pprofy[i],pnvert[i],sgn,cm,sp);
-
-				kring->ncoord    =pnvert[i];
-				kring->coords    =(double (*)[3]) xmalloc(pnvert[i]*3*sizeof(double));
-				for (j=0; j<pnvert[i]; j++) {
+				kring->ncoord    =pnvert[i]-1;
+				lat=(double *) xmalloc(kring->ncoord*sizeof(double));
+				lon=(double *) xmalloc(kring->ncoord*sizeof(double));
+				Xy2llx(lat,lon,pprofx[i],pprofy[i],kring->ncoord,sgn,cm,sp);
+				kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
+				for (j=0; j<kring->ncoord; j++) {
 					kring->coords[j][0]=lon[j];
 					kring->coords[j][1]=lat[j];
@@ -221,5 +223,5 @@
 			}
 
-			else {
+			else if (pnvert[i] > 1) {
 				sprintf(kplace->name      ,"LineString %d",i+1);
 				kplace->visibility=true;
@@ -228,11 +230,10 @@
 				kline =new KML_LineString();
 
-				lat=(double *) xmalloc(pnvert[i]*sizeof(double));
-				lon=(double *) xmalloc(pnvert[i]*sizeof(double));
-				Xy2llx(lat,lon,pprofx[i],pprofy[i],pnvert[i],sgn,cm,sp);
-
 				kline->ncoord    =pnvert[i];
-				kline->coords    =(double (*)[3]) xmalloc(pnvert[i]*3*sizeof(double));
-				for (j=0; j<pnvert[i]; j++) {
+				lat=(double *) xmalloc(kline->ncoord*sizeof(double));
+				lon=(double *) xmalloc(kline->ncoord*sizeof(double));
+				Xy2llx(lat,lon,pprofx[i],pprofy[i],kline->ncoord,sgn,cm,sp);
+				kline->coords    =(double (*)[3]) xmalloc(kline->ncoord*3*sizeof(double));
+				for (j=0; j<kline->ncoord; j++) {
 					kline->coords[j][0]=lon[j];
 					kline->coords[j][1]=lat[j];
@@ -246,4 +247,24 @@
 			}
 
+			else if (pnvert[i]) {
+				sprintf(kplace->name      ,"Point %d",i+1);
+				kplace->visibility=true;
+				sprintf(kplace->styleurl  ,"#RandomLineEmptyPoly");
+
+				kpoint=new KML_Point();
+
+				lat=(double *) xmalloc(sizeof(double));
+				lon=(double *) xmalloc(sizeof(double));
+				Xy2llx(lat,lon,pprofx[i],pprofy[i],1,sgn,cm,sp);
+				kpoint->coords[0]=lon[0];
+				kpoint->coords[1]=lat[0];
+				kpoint->coords[2]=0.;
+				xfree((void**)&lon);
+				xfree((void**)&lat);
+
+				(kplace->geometry  )->AddObject((Object*)kpoint);
+				kpoint =NULL;
+			}
+
 			(kfold ->feature   )->AddObject((Object*)kplace);
 			kplace=NULL;
@@ -260,5 +281,5 @@
 /*  write kml file  */
 
-	_printf_(true,"Writing kml document to file.\n");
+	_printf_(true,"Exp2Kmlx -- Writing kml document to file \"%s\".\n",filkml);
 	fid=fopen(filkml,"w");
 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
Index: /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp	(revision 11577)
@@ -42,6 +42,4 @@
 	iomodel->FetchDataToInput(elements,VyEnum);
 	iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAblationRateEnum);
 	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
 	iomodel->FetchDataToInput(elements,BalancethicknessThickeningRateEnum);
Index: /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 11577)
@@ -40,4 +40,5 @@
 		parameters->AddObject(iomodel->CopyConstantObject(InversionCostFunctionThresholdEnum));
 		parameters->AddObject(iomodel->CopyConstantObject(InversionGradientOnlyEnum));
+		parameters->AddObject(iomodel->CopyConstantObject(InversionIncompleteAdjointEnum));
 
 		/*What solution type?*/
Index: /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 11577)
@@ -67,6 +67,4 @@
 		iomodel->FetchDataToInput(elements,MeshElementonsurfaceEnum);
 		iomodel->FetchDataToInput(elements,VzEnum);
-		iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
-		iomodel->FetchDataToInput(elements,SurfaceforcingsAblationRateEnum);
 		iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
 		iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
Index: /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp	(revision 11577)
@@ -48,6 +48,4 @@
 	iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);
 	iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAblationRateEnum);
 	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
 	iomodel->FetchDataToInput(elements,VxEnum);
Index: /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp	(revision 11577)
@@ -53,7 +53,4 @@
 	iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
 	iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAblationRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
 	iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
 	iomodel->FetchDataToInput(elements,PressureEnum);
Index: /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 11577)
@@ -44,6 +44,5 @@
 	iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum);
 	iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
-	iomodel->FetchDataToInput(elements,SurfaceforcingsAblationRateEnum);
+	iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum);
 	iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
 	iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
Index: /issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 11577)
@@ -0,0 +1,21 @@
+/*!\file PositiveDegreeDayx
+ * \brief: create system matrices (stiffness matrix, loads vector)
+ */
+
+#include "./PositiveDegreeDayx.h"
+#include "../../shared/shared.h"
+#include "../../include/include.h"
+#include "../../io/io.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+void PositiveDegreeDayx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
+	
+	Element* element = NULL;
+
+	for(int i=0;i<elements->Size();i++){
+		element=(Element*)elements->GetObjectByOffset(i);
+		element->PositiveDegreeDay();
+	}
+
+}
Index: /issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.h
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.h	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.h	(revision 11577)
@@ -0,0 +1,14 @@
+/*!\file:  PositiveDegreeDayx.h
+ * \brief header file for degree of freedoms distribution routines.
+ */ 
+
+#ifndef _POSITIVEDEGREEDAYX_H
+#define _POSITIVEDEGREEDAYX_H
+
+#include "../../Container/Container.h"
+#include "../../objects/objects.h"
+
+/* local prototypes: */
+void PositiveDegreeDayx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
+
+#endif  /* _POSITIVEDEGREEDAYX_H*/
Index: /issm/branches/trunk-jpl-damage/src/c/modules/Solverx/Solverx.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/Solverx/Solverx.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/Solverx/Solverx.cpp	(revision 11577)
@@ -108,4 +108,14 @@
 	#endif
 	/*}}}*/
+	/*Check the solver is available: {{{1*/
+	if(solver_type==MUMPSPACKAGE_LU || solver_type==MUMPSPACKAGE_CHOL){
+	#if _PETSC_MAJOR_ >=3
+		#ifndef _HAVE_MUMPS_
+		_error_("requested MUMPS solver, which was not compiled into ISSM!\n");
+		#endif
+
+	#endif
+	}
+	/*}}}*/
 	/*Prepare solver:{{{1*/
 	KSPCreate(MPI_COMM_WORLD,&ksp);
@@ -113,13 +123,17 @@
 	KSPSetFromOptions(ksp);
 
-	#if defined(_SERIAL_) && _PETSC_VERSION_==3
+	#if defined(_SERIAL_) && _PETSC_MAJOR_==3
 	/*Specific solver?: */
 	KSPGetPC(ksp,&pc);
 	if (solver_type==MUMPSPACKAGE_LU){
+		#if _PETSC_MINOR_==1
 		PCFactorSetMatSolverPackage(pc,MAT_SOLVER_MUMPS);
+		#else
+		PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);
+		#endif
 	}
 	#endif
 
-	#if defined(_PARALLEL_) && _PETSC_VERSION_==3
+	#if defined(_PARALLEL_) && _PETSC_MAJOR_==3
 	/*Stokes: */
 	if (solver_type==StokesSolverEnum){
@@ -130,6 +144,11 @@
 		/*Set field splits: */
 		KSPGetPC(ksp,&pc);
+		#if _PETSC_MINOR_==1
 		PCFieldSplitSetIS(pc,isv);
 		PCFieldSplitSetIS(pc,isp);
+		#else
+		PCFieldSplitSetIS(pc,PETSC_NULL,isv);
+		PCFieldSplitSetIS(pc,PETSC_NULL,isp);
+		#endif
 
 	}
Index: /issm/branches/trunk-jpl-damage/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 11577)
@@ -78,4 +78,5 @@
 	      else if (strcmp(name,"InversionIscontrol")==0) return InversionIscontrolEnum;
 	      else if (strcmp(name,"InversionTao")==0) return InversionTaoEnum;
+	      else if (strcmp(name,"InversionIncompleteAdjoint")==0) return InversionIncompleteAdjointEnum;
 	      else if (strcmp(name,"InversionMaxParameters")==0) return InversionMaxParametersEnum;
 	      else if (strcmp(name,"InversionMaxiterPerStep")==0) return InversionMaxiterPerStepEnum;
@@ -162,6 +163,5 @@
 	      else if (strcmp(name,"SteadystateRequestedOutputs")==0) return SteadystateRequestedOutputsEnum;
 	      else if (strcmp(name,"Surface")==0) return SurfaceEnum;
-	      else if (strcmp(name,"SurfaceforcingsAblationRate")==0) return SurfaceforcingsAblationRateEnum;
-	      else if (strcmp(name,"SurfaceforcingsAccumulationRate")==0) return SurfaceforcingsAccumulationRateEnum;
+	      else if (strcmp(name,"SurfaceforcingsPrecipitation")==0) return SurfaceforcingsPrecipitationEnum;
 	      else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum;
 	      else if (strcmp(name,"ThermalMaxiter")==0) return ThermalMaxiterEnum;
Index: /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Element.h
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Element.h	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Element.h	(revision 11577)
@@ -68,4 +68,5 @@
 		virtual void   MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding)=0;
 		virtual void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding)=0;
+		virtual void   PositiveDegreeDay(void)=0;
 		virtual int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0;
 		virtual void   ResetCoordinateSystem()=0;
Index: /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.cpp	(revision 11577)
@@ -585,6 +585,9 @@
 	switch(analysis_type){
 		#ifdef _HAVE_DIAGNOSTIC_
-		case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum:
+		case DiagnosticHorizAnalysisEnum:
 			Ke=CreateKMatrixDiagnosticHoriz(); De=CreateDVectorDiagnosticHoriz();
+			break;
+		case AdjointHorizAnalysisEnum:
+			Ke=CreateKMatrixAdjointHoriz();
 			break;
 		case DiagnosticHutterAnalysisEnum:
@@ -2379,4 +2382,10 @@
 	*pnumvertices=NUMVERTICES;
 	*pnumnodes=numnodes;
+}
+/*}}}*/
+/*FUNCTION Penta::PositiveDegreeDay{{{1*/
+void  Penta::PositiveDegreeDay(){
+
+	_error_("Not implemented yet");
 }
 /*}}}*/
@@ -4453,4 +4462,194 @@
 
 }/*}}}*/
+/*FUNCTION Penta::CreateKMatrixAdjointHoriz{{{1*/
+ElementMatrix* Penta::CreateKMatrixAdjointHoriz(void){
+
+	int approximation;
+	inputs->GetInputValue(&approximation,ApproximationEnum);
+
+	switch(approximation){
+		case MacAyealApproximationEnum:
+			return CreateKMatrixAdjointMacAyeal2d();
+		case PattynApproximationEnum:
+			return CreateKMatrixAdjointPattyn();
+		case StokesApproximationEnum:
+			return CreateKMatrixAdjointStokes();
+		case NoneApproximationEnum:
+			return NULL;
+		default:
+			_error_("Approximation %s not supported yet",EnumToStringx(approximation));
+	}
+}
+/*}}}*/
+/*FUNCTION Penta::CreateKMatrixAdjointMacAyeal2d{{{1*/
+ElementMatrix* Penta::CreateKMatrixAdjointMacAyeal2d(void){
+
+	/*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 
+	  bedrock, in which case we spawn a tria element using the 3 first nodes, and use it to build 
+	  the stiffness matrix. */
+	if (!IsOnBed()) return NULL;
+
+	/*Depth Averaging B*/
+	this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
+
+	/*Call Tria function*/
+	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	ElementMatrix* Ke=tria->CreateKMatrixAdjointMacAyeal();
+	delete tria->matice; delete tria;
+
+	/*Delete B averaged*/
+	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+
+	/*clean up and return*/
+	return Ke;
+}
+/*}}}*/
+/*FUNCTION Penta::CreateKMatrixAdjointPattyn{{{1*/
+ElementMatrix* Penta::CreateKMatrixAdjointPattyn(void){
+
+	/*Constants*/
+	const int    numdof=NDOF2*NUMVERTICES;
+
+	/*Intermediaries */
+	int        i,j,ig;
+	bool       incomplete_adjoint;
+	double     xyz_list[NUMVERTICES][3];
+	double     Jdet;
+	double     eps1dotdphii,eps1dotdphij;
+	double     eps2dotdphii,eps2dotdphij;
+	double     mu_prime;
+	double     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+	double     eps1[3],eps2[3];
+	double     phi[NUMVERTICES];
+	double     dphi[3][NUMVERTICES];
+	GaussPenta *gauss=NULL;
+
+	/*Initialize Jacobian with regular Pattyn (first part of the Gateau derivative)*/
+	parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum);
+	ElementMatrix* Ke=CreateKMatrixDiagnosticPattyn();
+	if(incomplete_adjoint) return Ke;
+
+	/*Retrieve all inputs and parameters*/
+	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+
+	/* Start  looping on the number of gaussian points: */
+	gauss=new GaussPenta(5,5);
+	for (ig=gauss->begin();ig<gauss->end();ig++){
+
+		gauss->GaussPoint(ig);
+
+		GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
+		GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss);
+
+		this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
+		matice->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
+		eps1[0]=2*epsilon[0]+epsilon[1];   eps2[0]=epsilon[2];
+		eps1[1]=epsilon[2];                eps2[1]=epsilon[0]+2*epsilon[1];
+		eps1[2]=epsilon[3];                eps2[2]=epsilon[4];
+
+		for(i=0;i<6;i++){
+			for(j=0;j<6;j++){
+				eps1dotdphii=eps1[0]*dphi[0][i]+eps1[1]*dphi[1][i]+eps1[2]*dphi[2][i];
+				eps1dotdphij=eps1[0]*dphi[0][j]+eps1[1]*dphi[1][j]+eps1[2]*dphi[2][j];
+				eps2dotdphii=eps2[0]*dphi[0][i]+eps2[1]*dphi[1][i]+eps2[2]*dphi[2][i];
+				eps2dotdphij=eps2[0]*dphi[0][j]+eps2[1]*dphi[1][j]+eps2[2]*dphi[2][j];
+
+				Ke->values[12*(2*i+0)+2*j+0]+=gauss->weight*Jdet*2*mu_prime*eps1dotdphij*eps1dotdphii;
+				Ke->values[12*(2*i+0)+2*j+1]+=gauss->weight*Jdet*2*mu_prime*eps2dotdphij*eps1dotdphii;
+				Ke->values[12*(2*i+1)+2*j+0]+=gauss->weight*Jdet*2*mu_prime*eps1dotdphij*eps2dotdphii;
+				Ke->values[12*(2*i+1)+2*j+1]+=gauss->weight*Jdet*2*mu_prime*eps2dotdphij*eps2dotdphii;
+			}
+		}
+	}
+
+	/*Transform Coordinate System*/
+	TransformStiffnessMatrixCoord(Ke,nodes,NUMVERTICES,XYEnum);
+
+	/*Clean up and return*/
+	delete gauss;
+	return Ke;
+}
+/*}}}*/
+/*FUNCTION Penta::CreateKMatrixAdjointStokes{{{1*/
+ElementMatrix* Penta::CreateKMatrixAdjointStokes(void){
+
+	/*Constants*/
+	const int    numdof=NDOF4*NUMVERTICES;
+
+	/*Intermediaries */
+	int        i,j,ig;
+	bool       incomplete_adjoint;
+	double     xyz_list[NUMVERTICES][3];
+	double     Jdet;
+	double     eps1dotdphii,eps1dotdphij;
+	double     eps2dotdphii,eps2dotdphij;
+	double     eps3dotdphii,eps3dotdphij;
+	double     mu_prime;
+	double     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+	double     eps1[3],eps2[3],eps3[3];
+	double     phi[NUMVERTICES];
+	double     dphi[3][NUMVERTICES];
+	GaussPenta *gauss=NULL;
+
+	/*Initialize Jacobian with regular Stokes (first part of the Gateau derivative)*/
+	parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum);
+	ElementMatrix* Ke=CreateKMatrixDiagnosticStokes();
+	if(incomplete_adjoint) return Ke;
+
+	/*Retrieve all inputs and parameters*/
+	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+	Input* vz_input=inputs->GetInput(VzEnum);       _assert_(vz_input);
+
+	/* Start  looping on the number of gaussian points: */
+	gauss=new GaussPenta(5,5);
+	for (ig=gauss->begin();ig<gauss->end();ig++){
+
+		gauss->GaussPoint(ig);
+
+		GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
+		GetNodalFunctionsP1Derivatives(&dphi[0][0],&xyz_list[0][0],gauss);
+
+		this->GetStrainRate3dPattyn(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
+		matice->GetViscosityDerivativeEpsSquare(&mu_prime,&epsilon[0]);
+		eps1[0]=epsilon[0];   eps2[0]=epsilon[2];   eps3[0]=epsilon[3];
+		eps1[1]=epsilon[2];   eps2[1]=epsilon[1];   eps3[1]=epsilon[4];
+		eps1[2]=epsilon[3];   eps2[2]=epsilon[4];   eps3[2]= -epsilon[0] -epsilon[1];
+
+		for(i=0;i<6;i++){
+			for(j=0;j<6;j++){
+				eps1dotdphii=eps1[0]*dphi[0][i]+eps1[1]*dphi[1][i]+eps1[2]*dphi[2][i];
+				eps1dotdphij=eps1[0]*dphi[0][j]+eps1[1]*dphi[1][j]+eps1[2]*dphi[2][j];
+				eps2dotdphii=eps2[0]*dphi[0][i]+eps2[1]*dphi[1][i]+eps2[2]*dphi[2][i];
+				eps2dotdphij=eps2[0]*dphi[0][j]+eps2[1]*dphi[1][j]+eps2[2]*dphi[2][j];
+				eps3dotdphii=eps3[0]*dphi[0][i]+eps3[1]*dphi[1][i]+eps3[2]*dphi[2][i];
+				eps3dotdphij=eps3[0]*dphi[0][j]+eps3[1]*dphi[1][j]+eps3[2]*dphi[2][j];
+
+				Ke->values[numdof*(4*i+0)+4*j+0]+=gauss->weight*Jdet*2*mu_prime*eps1dotdphij*eps1dotdphii;
+				Ke->values[numdof*(4*i+0)+4*j+1]+=gauss->weight*Jdet*2*mu_prime*eps2dotdphij*eps1dotdphii;
+				Ke->values[numdof*(4*i+0)+4*j+2]+=gauss->weight*Jdet*2*mu_prime*eps3dotdphij*eps1dotdphii;
+
+				Ke->values[numdof*(4*i+1)+4*j+0]+=gauss->weight*Jdet*2*mu_prime*eps1dotdphij*eps2dotdphii;
+				Ke->values[numdof*(4*i+1)+4*j+1]+=gauss->weight*Jdet*2*mu_prime*eps2dotdphij*eps2dotdphii;
+				Ke->values[numdof*(4*i+1)+4*j+2]+=gauss->weight*Jdet*2*mu_prime*eps3dotdphij*eps2dotdphii;
+
+				Ke->values[numdof*(4*i+2)+4*j+0]+=gauss->weight*Jdet*2*mu_prime*eps1dotdphij*eps3dotdphii;
+				Ke->values[numdof*(4*i+2)+4*j+1]+=gauss->weight*Jdet*2*mu_prime*eps2dotdphij*eps3dotdphii;
+				Ke->values[numdof*(4*i+2)+4*j+2]+=gauss->weight*Jdet*2*mu_prime*eps3dotdphij*eps3dotdphii;
+			}
+		}
+	}
+
+	/*Transform Coordinate System*/
+	TransformStiffnessMatrixCoord(Ke,nodes,NUMVERTICES,XYZPEnum);
+
+	/*Clean up and return*/
+	delete gauss;
+	return Ke;
+}
+/*}}}*/
 /*FUNCTION Penta::CreatePVectorAdjointHoriz{{{1*/
 ElementVector* Penta::CreatePVectorAdjointHoriz(void){
Index: /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.h	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.h	(revision 11577)
@@ -112,4 +112,5 @@
 		void   PatchFill(int* pcount, Patch* patch);
 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+		void   PositiveDegreeDay(void);
 		void   ProcessResultsUnits(void);
 		void   ResetCoordinateSystem(void);
@@ -216,4 +217,5 @@
 		ElementMatrix* CreateKMatrixCouplingPattynStokes(void);
 		ElementMatrix* CreateKMatrixDiagnosticHoriz(void);
+		ElementMatrix* CreateKMatrixAdjointHoriz(void);
 		ElementVector* CreateDVectorDiagnosticHoriz(void);
 		ElementVector* CreateDVectorDiagnosticStokes(void);
@@ -275,4 +277,7 @@
 		#ifdef _HAVE_CONTROL_
 		ElementVector* CreatePVectorAdjointHoriz(void);
+		ElementMatrix* CreateKMatrixAdjointMacAyeal2d(void);
+		ElementMatrix* CreateKMatrixAdjointPattyn(void);
+		ElementMatrix* CreateKMatrixAdjointStokes(void);
 		ElementVector* CreatePVectorAdjointMacAyeal(void);
 		ElementVector* CreatePVectorAdjointPattyn(void);
Index: /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.cpp	(revision 11577)
@@ -336,6 +336,9 @@
 	switch(analysis_type){
 		#ifdef _HAVE_DIAGNOSTIC_
-		case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum:
+		case DiagnosticHorizAnalysisEnum:
 			Ke=CreateKMatrixDiagnosticMacAyeal();
+			break;
+		case AdjointHorizAnalysisEnum:
+			Ke=CreateKMatrixAdjointMacAyeal();
 			break;
 		case DiagnosticHutterAnalysisEnum:
@@ -521,5 +524,5 @@
 		if(stabilization==2){
 			/*Streamline upwinding*/
-			vel=sqrt(pow(vx,2.)+pow(vy,2.));
+			vel=sqrt(pow(vx,2.)+pow(vy,2.))+1.e-8;
 			K[0][0]=h/(2*vel)*vx*vx;
 			K[1][0]=h/(2*vel)*vy*vx;
@@ -2201,4 +2204,10 @@
 }
 /*}}}*/
+/*FUNCTION Tria::PositiveDegreeDay{{{1*/
+void  Tria::PositiveDegreeDay(){
+
+	_error_("Not implemented yet");
+}
+/*}}}*/
 /*FUNCTION Tria::ProcessResultsUnits{{{1*/
 void  Tria::ProcessResultsUnits(void){
@@ -3067,5 +3076,5 @@
 }
 /*}}}*/
-/*FUNCTION Tria::CreateJacobianDiagnosticPattyn{{{1*/
+/*FUNCTION Tria::CreateJacobianDiagnosticMacayeal{{{1*/
 ElementMatrix* Tria::CreateJacobianDiagnosticMacayeal(void){
 
@@ -3692,4 +3701,5 @@
 	int        analysis_type;
 	int        doflist1[NUMVERTICES];
+	int        connectivity[NUMVERTICES];
 	double     vx,vy,lambda,mu,alpha_complement,Jdet;
 	double     bed,thickness,Neff,drag;
@@ -3709,4 +3719,5 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	GradientIndexing(&doflist1[0],control_index);
+	this->GetConnectivityList(&connectivity[0]);
 
 	/*Build frictoin element, needed later: */
@@ -3761,6 +3772,5 @@
 	//	vx_input->GetInputValue(&vx,gauss);
 	//	vy_input->GetInputValue(&vy,gauss);
-	//	grade_g[iv]=-2*drag*alpha_complement*((lambda*vx+mu*vy));
-	//	VecSetValues(gradient,NUMVERTICES,doflist1,(const double*)grade_g,INSERT_VALUES);
+	//	grade_g[iv] = -2*drag*alpha_complement*(lambda*vx+mu*vy)/((double)connectivity[iv]);
 	//}
 	/*End Analytical gradient*/
@@ -3968,5 +3978,5 @@
 
 		/*Tikhonov regularization: J = 1/2 ((dp/dx)^2 + (dp/dy)^2) */ 
-		//Jelem+=weight*1/2*(pow(dp[0],2.)+pow(dp[1],2.))*Jdet*gauss->weight;
+		Jelem+=weight*1/2*(pow(dp[0],2.)+pow(dp[1],2.))*Jdet*gauss->weight;
 	}
 
@@ -4840,5 +4850,5 @@
 
 		/*Tikhonov regularization: J = 1/2 ((dp/dx)^2 + (dp/dy)^2) */ 
-		//Jelem+=weight*1/2*(pow(dp[0],2.)+pow(dp[1],2.))*Jdet*gauss->weight;
+		Jelem+=weight*1/2*(pow(dp[0],2.)+pow(dp[1],2.))*Jdet*gauss->weight;
 	}
 
@@ -4867,4 +4877,74 @@
 	/*Transpose and return Ke*/
 	Ke->Transpose();
+	return Ke;
+}
+/*}}}*/
+/*FUNCTION Tria::CreateKMatrixAdjointMacAyeal{{{1*/
+ElementMatrix* Tria::CreateKMatrixAdjointMacAyeal(void){
+
+	/*Constants*/
+	const int    numdof=NDOF2*NUMVERTICES;
+
+	/*Intermediaries */
+	int        i,j,ig;
+	bool       incomplete_adjoint;
+	double     xyz_list[NUMVERTICES][3];
+	double     Jdet,thickness;
+	double     eps1dotdphii,eps1dotdphij;
+	double     eps2dotdphii,eps2dotdphij;
+	double     mu_prime;
+	double     epsilon[3];/* epsilon=[exx,eyy,exy];*/
+	double     eps1[2],eps2[2];
+	double     phi[NUMVERTICES];
+	double     dphi[2][NUMVERTICES];
+	GaussTria *gauss=NULL;
+
+	/*Initialize Jacobian with regular MacAyeal (first part of the Gateau derivative)*/
+	parameters->FindParam(&incomplete_adjoint,InversionIncompleteAdjointEnum);
+	ElementMatrix* Ke=CreateKMatrixDiagnosticMacAyeal();
+	if(incomplete_adjoint) return Ke;
+
+	/*Retrieve all inputs and parameters*/
+	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
+	Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
+	Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
+
+	/* Start  looping on the number of gaussian points: */
+	gauss=new GaussTria(2);
+	for (ig=gauss->begin();ig<gauss->end();ig++){
+
+		gauss->GaussPoint(ig);
+
+		GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss);
+		GetNodalFunctionsDerivatives(&dphi[0][0],&xyz_list[0][0],gauss);
+
+		thickness_input->GetInputValue(&thickness, gauss);
+		this->GetStrainRate2d(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input);
+		matice->GetViscosity2dDerivativeEpsSquare(&mu_prime,&epsilon[0]);
+		eps1[0]=2*epsilon[0]+epsilon[1];   eps2[0]=epsilon[2];
+		eps1[1]=epsilon[2];                eps2[1]=epsilon[0]+2*epsilon[1];
+
+		for(i=0;i<3;i++){
+			for(j=0;j<3;j++){
+				eps1dotdphii=eps1[0]*dphi[0][i]+eps1[1]*dphi[1][i];
+				eps1dotdphij=eps1[0]*dphi[0][j]+eps1[1]*dphi[1][j];
+				eps2dotdphii=eps2[0]*dphi[0][i]+eps2[1]*dphi[1][i];
+				eps2dotdphij=eps2[0]*dphi[0][j]+eps2[1]*dphi[1][j];
+
+				Ke->values[6*(2*i+0)+2*j+0]+=gauss->weight*Jdet*2*mu_prime*thickness*eps1dotdphij*eps1dotdphii;
+				Ke->values[6*(2*i+0)+2*j+1]+=gauss->weight*Jdet*2*mu_prime*thickness*eps2dotdphij*eps1dotdphii;
+				Ke->values[6*(2*i+1)+2*j+0]+=gauss->weight*Jdet*2*mu_prime*thickness*eps1dotdphij*eps2dotdphii;
+				Ke->values[6*(2*i+1)+2*j+1]+=gauss->weight*Jdet*2*mu_prime*thickness*eps2dotdphij*eps2dotdphii;
+			}
+		}
+	}
+
+	/*Transform Coordinate System*/
+	TransformStiffnessMatrixCoord(Ke,nodes,NUMVERTICES,XYEnum);
+
+	/*Clean up and return*/
+	delete gauss;
+	//Ke->Transpose();
 	return Ke;
 }
Index: /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.h	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.h	(revision 11577)
@@ -107,4 +107,5 @@
 		void   MigrateGroundingLine(double* oldfloating,double* sheet_ungrounding);
 		void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding);
+		void   PositiveDegreeDay(void);
 		void   RequestedOutput(int output_enum,int step,double time);
 		void   ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results);
@@ -219,4 +220,5 @@
 		#ifdef _HAVE_CONTROL_
 		ElementMatrix* CreateKMatrixAdjointBalancethickness(void);
+		ElementMatrix* CreateKMatrixAdjointMacAyeal(void);
 		ElementVector* CreatePVectorAdjointHoriz(void);
 		ElementVector* CreatePVectorAdjointStokes(void);
Index: /issm/branches/trunk-jpl-damage/src/c/shared/Numerics/UnitConversion.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/shared/Numerics/UnitConversion.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/shared/Numerics/UnitConversion.cpp	(revision 11577)
@@ -63,6 +63,5 @@
 		case BasalforcingsMeltingRateEnum:        scale=yts;break; //m/yr
 		case BasalforcingsMeltingRateCorrectionEnum: scale=yts;break; //m/yr
-		case SurfaceforcingsAccumulationRateEnum: scale=yts;break; //m/yr
-		case SurfaceforcingsAblationRateEnum:     scale=yts;break; //m/yr
+		case SurfaceforcingsPrecipitationEnum:     scale=yts;break; //m/yr
 		case SurfaceforcingsMassBalanceEnum:      scale=yts;break; //m/yr
 		case MisfitEnum:      scale=pow(yts,2);break; //(m/yr)^2
Index: /issm/branches/trunk-jpl-damage/src/c/solutions/controltao_core.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/solutions/controltao_core.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/solutions/controltao_core.cpp	(revision 11577)
@@ -17,5 +17,6 @@
 
 /*Local prototype*/
-int FormFunctionGradient(TaoSolver tao,Vec,double*,Vec,void*);
+int FormFunctionGradient(TaoSolver,Vec,double*,Vec,void*);
+int IssmMonitor(TaoSolver,void*);
 typedef struct {
 	FemModel* femmodel;
@@ -53,5 +54,4 @@
 	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
 	TaoCreate(PETSC_COMM_WORLD,&tao);
-	PetscOptionsSetValue("-tao_monitor","");
 	TaoSetFromOptions(tao);
 	TaoSetType(tao,"tao_blmvm");
@@ -60,4 +60,5 @@
 
 	/*Prepare all TAO parameters*/
+	TaoSetMonitor(tao,IssmMonitor,&user,NULL);
 	TaoSetMaximumFunctionEvaluations(tao,maxiter);
 	TaoSetMaximumIterations(tao,nsteps);
@@ -143,4 +144,32 @@
 	return 0;
 }
+int IssmMonitor(TaoSolver tao, void *userCtx){
+
+	int       i,its,num_responses;
+	double    f,gnorm,cnorm,xdiff;
+	AppCtx   *user      = (AppCtx *)userCtx;
+	FemModel *femmodel  = user->femmodel;
+	Element  *element   = NULL;
+	int      *responses = NULL;
+
+	femmodel->parameters->FindParam(&num_responses,InversionNumCostFunctionsEnum);
+	femmodel->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
+
+	TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL);
+	if(its==0) _printf_(true,"Iter       Function      Residual  |  List of contributions\n");
+	if(its==0) _printf_(true,"-----------------------------------+-----------------------\n");
+	_printf_(true,"%4i   %12.7g  %12.7g  | ",its,f,gnorm);
+
+	/*Retrieve objective functions independently*/
+	for(i=0;i<num_responses;i++){
+		Responsex(&f,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnumToStringx(responses[i]),false,i);
+		_printf_(true," %12.7g ","",f);
+	}
+	_printf_(true,"\n");
+
+	/*Clean-up and return*/
+	xfree((void**)&responses);
+	return 0;
+}
 
 #else
Index: /issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp	(revision 11577)
@@ -49,4 +49,16 @@
 		solver_type=SUPERLUDISTPACKAGE;
 	}
+	if (strcmp(option,"")==0){
+		solver_type=SUPERLUDISTPACKAGE;
+	}
+
+
+	#if _PETSC_MAJOR_ >= 3 
+	PetscOptionsGetString(PETSC_NULL,"-pc_factor_mat_solver_package",&option[0],100,&flag);
+	if (strcmp(option,"mumps")==0){
+		solver_type=MUMPSPACKAGE_LU;
+	}
+	#endif
+
 	
 	PetscOptionsGetString(PETSC_NULL,"-issm_option_solver",&option[0],100,&flag);
Index: /issm/branches/trunk-jpl-damage/src/m/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+SUBDIRS = classes enum kml model planet qmu shared solutions solvers utils
Index: /issm/branches/trunk-jpl-damage/src/m/classes/@modellist/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/@modellist/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/@modellist/Makefile.am	(revision 11577)
@@ -0,0 +1,2 @@
+classesdir=$(bindir)/@modellist
+classes_DATA=*.m
Index: /issm/branches/trunk-jpl-damage/src/m/classes/@pairoptions/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/@pairoptions/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/@pairoptions/Makefile.am	(revision 11577)
@@ -0,0 +1,2 @@
+classesdir=$(bindir)/@pairoptions
+classes_DATA=*.m
Index: /issm/branches/trunk-jpl-damage/src/m/classes/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/Makefile.am	(revision 11577)
@@ -0,0 +1,2 @@
+SUBDIRS = @pairoptions @modellist model clusters
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/classes/clusters/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/clusters/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/clusters/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/classes/clusters/generic.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/clusters/generic.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/clusters/generic.m	(revision 11577)
@@ -78,31 +78,63 @@
 
 			 %open file for writing: 
-			 fid=fopen([modelname '.queue'],'w');
+			 if ~ispc,
+				 fid=fopen([modelname '.queue'],'w');
+			 else
+				 fid=fopen([modelname '.bat'],'w');
+			 end
 
 			 %write instructions for launching a job on the cluster
-			 fprintf(fid,'#!/bin/sh\n');
+			 if ~ispc,
+				 fprintf(fid,'#!/bin/sh\n');
+			 else
+				 fprintf(fid,'@echo off\n');
+			 end
+			 
 			 if ~isvalgrind,
 				 if cluster.interactive
-					 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',...
-						 cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
-				 else
-					 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
-						 cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
+					 if ~ispc,
+						 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+					 else
+						 fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+					 end
+				 else
+					 if ~ispc,
+						 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
+					 else
+						 fprintf(fid,'"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
+					 end
 				 end
 			 else
-				 %Add --gen-suppressions=all to get suppression lines
-				 fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
-				 fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
+				 if ~ispc,
+					 %Add --gen-suppressions=all to get suppression lines
+					 fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
+					 fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
 					 cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
+				 else
+					 error('valgrind not supported on windows platforms');
+				 end
 			 end
 
 			 if isgprof,
-				 fprintf(fid,'\n gprof %s/issm.exe gmon.out > %s.performance',cluster.codepath,modelname);
+				 if ~ispc,
+					 fprintf(fid,'\n gprof %s/issm.exe gmon.out > %s.performance',cluster.codepath,modelname);
+				 else
+					 error('gprof not supported on windows platforms');
+				 end
+
 			 end
 
 			 if ~md.settings.io_gather,
-				 %concatenate the output files:
-				 fprintf(fid,'\ncat %s.outbin.* > %s.outbin',modelname,modelname);
-			 end
+				 if ~ispc,
+					 %concatenate the output files:
+					 fprintf(fid,'\ncat %s.outbin.* > %s.outbin',modelname,modelname);
+				 else
+					 error('iogather not supported on windows platforms');
+				 end
+
+			 end
+			 
+			 %close file: 
+			 fclose(fid);
 
 			 %in interactive mode, create a run file, and errlog and outlog file
@@ -112,61 +144,71 @@
 			 end
 
+
 		 end
 		 %}}}
 		 function LaunchQueueJob(cluster,md,options)% {{{1
 			 
-			 %lauch command, to be executed via ssh
-			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
-			                ' && cd ' md.private.runtimename ' && mv ../' md.private.runtimename '.tar.gz ./ && tar -zxf ' md.private.runtimename '.tar.gz  && source  ' md.miscellaneous.name '.queue '];
-
-			if ~strcmpi(options.batch,'yes'),
-				
-				%compress the files into one zip.
-				compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue '  md.miscellaneous.name '.petsc '];
-				if md.qmu.isdakota,
-					compressstring=[compressstring md.miscellaneous.name '.qmu.in'];
-				end
-				if cluster.interactive,
-					compressstring=[compressstring ' ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog '];
-				end
-				system(compressstring);
-				
-				disp('uploading input file and queueing script');
-				issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']});
-
-				disp('launching solution sequence on remote cluster');
-				issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
-			else
-				disp('batch mode requested: not launching job interactively');
-				disp('launch solution sequence on remote cluster by hand');
-			end
-
-		 end %}}}
-		 function Download(cluster,md)% {{{1
-
-			%some check
-			if isempty(md.private.runtimename),
-				error('supply runtime name for results to be loaded!');
-			end
-
-			%Figure out the  directory where all the files are in: 
-			directory=[cluster.executionpath '/' md.private.runtimename '/'];
-
-			%What packages are we picking up from remote cluster
-			packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']};
-			if md.qmu.isdakota,
-				packages{end+1}=[md.miscellaneous.name '.qmu.err'];
-				packages{end+1}=[md.miscellaneous.name '.qmu.out'];
-				if isfield(md.qmu.params,'tabular_graphics_data'),
-					if md.qmu.params.tabular_graphics_data==true,
-						packages{end+1}='dakota_tabular.dat'; 
+			 if ~ispc,
+					 %lauch command, to be executed via ssh
+					 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
+					 ' && cd ' md.private.runtimename ' && mv ../' md.private.runtimename '.tar.gz ./ && tar -zxf ' md.private.runtimename '.tar.gz  && source  ' md.miscellaneous.name '.queue '];
+
+					 if ~strcmpi(options.batch,'yes'),
+
+						 %compress the files into one zip.
+						 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue '  md.miscellaneous.name '.petsc '];
+						 if md.qmu.isdakota,
+							 compressstring=[compressstring md.miscellaneous.name '.qmu.in'];
 					end
+					if cluster.interactive,
+						compressstring=[compressstring ' ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog '];
+					end
+					system(compressstring);
+
+					disp('uploading input file and queueing script');
+					issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']});
+
+					disp('launching solution sequence on remote cluster');
+					issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
+				else
+					disp('batch mode requested: not launching job interactively');
+					disp('launch solution sequence on remote cluster by hand');
 				end
 			else
-				packages{end+1}=[md.miscellaneous.name '.outbin'];
+				%launch right here, do not compress or archive.
+				system([md.miscellaneous.name '.bat']);
 			end
 
-			%copy files from cluster to present directory
-			issmscpin(cluster.name, cluster.login, cluster.port, directory, packages);
+		end %}}}
+		 function Download(cluster,md)% {{{1
+
+			if ~ispc,
+				%some check
+				if isempty(md.private.runtimename),
+					error('supply runtime name for results to be loaded!');
+				end
+
+				%Figure out the  directory where all the files are in: 
+				directory=[cluster.executionpath '/' md.private.runtimename '/'];
+
+				%What packages are we picking up from remote cluster
+				packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']};
+				if md.qmu.isdakota,
+					packages{end+1}=[md.miscellaneous.name '.qmu.err'];
+					packages{end+1}=[md.miscellaneous.name '.qmu.out'];
+					if isfield(md.qmu.params,'tabular_graphics_data'),
+						if md.qmu.params.tabular_graphics_data==true,
+							packages{end+1}='dakota_tabular.dat'; 
+						end
+					end
+				else
+					packages{end+1}=[md.miscellaneous.name '.outbin'];
+				end
+
+				%copy files from cluster to present directory
+				issmscpin(cluster.name, cluster.login, cluster.port, directory, packages);
+			else
+				%do nothing!
+			end
 		end %}}}
 	end
Index: /issm/branches/trunk-jpl-damage/src/m/classes/clusters/greenplanet.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/clusters/greenplanet.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/clusters/greenplanet.m	(revision 11577)
@@ -95,5 +95,5 @@
 
 			 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,md.private.runtimename);
-			 fprintf(fid,'/sopt/mpi/mvapich-1.1/intel/bin/mpiexec -mpich-p4-no-shmem -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+			 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
 
 			 if ~md.settings.io_gather,
Index: /issm/branches/trunk-jpl-damage/src/m/classes/inversion.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/inversion.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/inversion.m	(revision 11577)
@@ -8,4 +8,5 @@
 		iscontrol                   = 0
 		tao                         = 0
+		incomplete_adjoint          = 0
 		control_parameters          = NaN
 		nsteps                      = 0
@@ -43,37 +44,40 @@
 		function obj = setdefaultparameters(obj) % {{{
 
-			 %parameter to be inferred by control methods (only
-			 %drag and B are supported yet)
-			 obj.control_parameters={'FrictionCoefficient'};
+			%default is incomplete adjoint for now
+			obj.incomplete_adjoint=1;
 
-			 %number of steps in the control methods
-			 obj.nsteps=20;
+			%parameter to be inferred by control methods (only
+			%drag and B are supported yet)
+			obj.control_parameters={'FrictionCoefficient'};
 
-			 %maximum number of iteration in the optimization algorithm for
-			 %each step
-			 obj.maxiter_per_step=20*ones(obj.nsteps,1);
+			%number of steps in the control methods
+			obj.nsteps=20;
 
-			 %the inversed parameter is updated as follows:
-			 %new_par=old_par + gradient_scaling(n)*C*gradient with C in [0 1];
-			 %usually the gradient_scaling must be of the order of magnitude of the 
-			 %inversed parameter (10^8 for B, 50 for drag) and can be decreased
-			 %after the first iterations
-			 obj.gradient_scaling=50*ones(obj.nsteps,1);
+			%maximum number of iteration in the optimization algorithm for
+			%each step
+			obj.maxiter_per_step=20*ones(obj.nsteps,1);
 
-			 %several responses can be used:
-			 obj.cost_functions=101*ones(obj.nsteps,1);
+			%the inversed parameter is updated as follows:
+			%new_par=old_par + gradient_scaling(n)*C*gradient with C in [0 1];
+			%usually the gradient_scaling must be of the order of magnitude of the 
+			%inversed parameter (10^8 for B, 50 for drag) and can be decreased
+			%after the first iterations
+			obj.gradient_scaling=50*ones(obj.nsteps,1);
 
-			 %step_threshold is used to speed up control method. When
-			 %misfit(1)/misfit(0) < obj.step_threshold, we go directly to
-			 %the next step
-			 obj.step_threshold=.7*ones(obj.nsteps,1); %30 per cent decrement.
+			%several responses can be used:
+			obj.cost_functions=101*ones(obj.nsteps,1);
 
-			 %stop control solution at the gradient computation and return it? 
-			 obj.gradient_only=0;
+			%step_threshold is used to speed up control method. When
+			%misfit(1)/misfit(0) < obj.step_threshold, we go directly to
+			%the next step
+			obj.step_threshold=.7*ones(obj.nsteps,1); %30 per cent decrement.
 
-			 %cost_function_threshold is a criteria to stop the control methods.
-			 %if J[n]-J[n-1]/J[n] < criteria, the control run stops
-			 %NaN if not applied
-			 obj.cost_function_threshold=NaN; %not activated
+			%stop control solution at the gradient computation and return it? 
+			obj.gradient_only=0;
+
+			%cost_function_threshold is a criteria to stop the control methods.
+			%if J[n]-J[n-1]/J[n] < criteria, the control run stops
+			%NaN if not applied
+			obj.cost_function_threshold=NaN; %not activated
 
 		end % }}}
@@ -107,4 +111,5 @@
 		function disp(obj) % {{{
 			fielddisplay(obj,'iscontrol','is inversion activated?');
+			fielddisplay(obj,'incomplete_adjoint','do we assume linear viscosity?');
 			fielddisplay(obj,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}');
 			fielddisplay(obj,'nsteps','number of optimization searches');
@@ -137,4 +142,5 @@
 			WriteData(fid,'object',obj,'fieldname','iscontrol','format','Boolean');
 			WriteData(fid,'object',obj,'fieldname','tao','format','Boolean');
+			WriteData(fid,'object',obj,'fieldname','incomplete_adjoint','format','Boolean');
 			if ~obj.iscontrol, return; end
 			WriteData(fid,'object',obj,'fieldname','nsteps','format','Integer');
Index: /issm/branches/trunk-jpl-damage/src/m/classes/mesh.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/mesh.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/mesh.m	(revision 11577)
@@ -99,4 +99,5 @@
 				checkfield(md,'mesh.average_vertex_connectivity','>=',24,'message','''mesh.average_vertex_connectivity'' should be at least 24 in 3d');
 			end
+			checkfield(md,'mesh.elementconnectivity','size',[md.mesh.numberofelements 3],'NaN',1);
 
 			%Solution specific checks
Index: /issm/branches/trunk-jpl-damage/src/m/classes/model/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/model/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/model/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/classes/model/model.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/model/model.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/model/model.m	(revision 11577)
@@ -136,5 +136,4 @@
 			 if isfield(structmd,'melting_rate'), md.basalforcings.melting_rate=structmd.melting_rate; end
 			 if isfield(structmd,'accumulation'), md.surfaceforcings.mass_balance=structmd.accumulation; end
-			 if isfield(structmd,'accumulation_rate'), md.surfaceforcings.mass_balance=structmd.accumulation_rate; end
 			 if isfield(structmd,'numberofgrids'), md.mesh.numberofvertices=structmd.numberofgrids; end
 			 if isfield(structmd,'numberofgrids2d'), md.mesh.numberofvertices2d=structmd.numberofgrids2d; end
@@ -406,5 +405,9 @@
 			 md.settings         = settings();
 			 md.solver           = solver();
-			 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,mumpsoptions);
+			 if ismumps,
+				 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,mumpsoptions);
+			 else
+				 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,iluasmoptions);
+			 end
 			 md.cluster          = none();
 			 md.balancethickness = balancethickness();
Index: /issm/branches/trunk-jpl-damage/src/m/classes/prognostic.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/prognostic.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/prognostic.m	(revision 11577)
@@ -50,5 +50,5 @@
 			checkfield(md,'prognostic.spcthickness','forcing',1);
 			checkfield(md,'prognostic.hydrostatic_adjustment','values',{'Absolute' 'Incremental'});
-			checkfield(md,'prognostic.stabilization','values',[0 1 3]);
+			checkfield(md,'prognostic.stabilization','values',[0 1 2 3]);
 			checkfield(md,'prognostic.min_thickness','>',0);
 
@@ -59,5 +59,5 @@
 			fielddisplay(obj,'min_thickness','minimum ice thickness allowed');
 			fielddisplay(obj,'hydrostatic_adjustment','adjustment of ice shelves surface and bed elevations: ''Incremental'' or ''Absolute'' ');
-			fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 3->discontinuous Galerkin');
+			fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 2->streamline upwinding, 3->discontinuous Galerkin');
 
 			disp(sprintf('\n      %s','Penalty options:'));
Index: /issm/branches/trunk-jpl-damage/src/m/classes/solver.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/solver.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/solver.m	(revision 11577)
@@ -27,5 +27,9 @@
 
 			 %MUMPS is the default solver
-			 obj.options={'NoneAnalysis',mumpsoptions};
+			 if ismumps,
+				 obj.options={'NoneAnalysis',mumpsoptions};
+			 else
+				 obj.options={'NoneAnalysis',iluasmoptions};
+			 end
 
 		 end % }}}
Index: /issm/branches/trunk-jpl-damage/src/m/classes/surfaceforcings.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/classes/surfaceforcings.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/classes/surfaceforcings.m	(revision 11577)
@@ -6,7 +6,6 @@
 classdef surfaceforcings
 	properties (SetAccess=public) 
-		accumulation_rate = NaN;
-		ablation_rate     = NaN;
-		mass_balance      = NaN;
+		precipitation = NaN;
+		mass_balance  = NaN;
 	end
 	methods
@@ -41,12 +40,10 @@
 			disp(sprintf('   surface forcings parameters:'));
 
-			fielddisplay(obj,'accumulation_rate','surface accumulation rate [m]');
-			fielddisplay(obj,'ablation_rate','surface ablation rate [m]');
-			fielddisplay(obj,'mass_balance','surface mass balance [m]');
+			fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]');
+			fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]');
 
 		end % }}}
 		function marshall(obj,fid) % {{{
-			WriteData(fid,'object',obj,'fieldname','accumulation_rate','format','DoubleMat','mattype',1);
-			WriteData(fid,'object',obj,'fieldname','ablation_rate','format','DoubleMat','mattype',1);
+			WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1);
 			WriteData(fid,'object',obj,'fieldname','mass_balance','format','DoubleMat','mattype',1);
 		end % }}}
Index: /issm/branches/trunk-jpl-damage/src/m/enum/InversionIncompleteAdjointEnum.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/enum/InversionIncompleteAdjointEnum.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/enum/InversionIncompleteAdjointEnum.m	(revision 11577)
@@ -0,0 +1,11 @@
+function macro=InversionIncompleteAdjointEnum()
+%INVERSIONINCOMPLETEADJOINTENUM - Enum of InversionIncompleteAdjoint
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=InversionIncompleteAdjointEnum()
+
+macro=StringToEnum('InversionIncompleteAdjoint');
Index: /issm/branches/trunk-jpl-damage/src/m/enum/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/enum/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/enum/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: sm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsAblationRateEnum.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsAblationRateEnum.m	(revision 11576)
+++ 	(revision )
@@ -1,11 +1,0 @@
-function macro=SurfaceforcingsAblationRateEnum()
-%SURFACEFORCINGSABLATIONRATEENUM - Enum of SurfaceforcingsAblationRate
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
-%            Please read src/c/EnumDefinitions/README for more information
-%
-%   Usage:
-%      macro=SurfaceforcingsAblationRateEnum()
-
-macro=StringToEnum('SurfaceforcingsAblationRate');
Index: sm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsAccumulationRateEnum.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsAccumulationRateEnum.m	(revision 11576)
+++ 	(revision )
@@ -1,11 +1,0 @@
-function macro=SurfaceforcingsAccumulationRateEnum()
-%SURFACEFORCINGSACCUMULATIONRATEENUM - Enum of SurfaceforcingsAccumulationRate
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
-%            Please read src/c/EnumDefinitions/README for more information
-%
-%   Usage:
-%      macro=SurfaceforcingsAccumulationRateEnum()
-
-macro=StringToEnum('SurfaceforcingsAccumulationRate');
Index: /issm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsPrecipitationEnum.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsPrecipitationEnum.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/enum/SurfaceforcingsPrecipitationEnum.m	(revision 11577)
@@ -0,0 +1,11 @@
+function macro=SurfaceforcingsPrecipitationEnum()
+%SURFACEFORCINGSPRECIPITATIONENUM - Enum of SurfaceforcingsPrecipitation
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=SurfaceforcingsPrecipitationEnum()
+
+macro=StringToEnum('SurfaceforcingsPrecipitation');
Index: /issm/branches/trunk-jpl-damage/src/m/kml/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/kml/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/kml/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/model/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/Makefile.am	(revision 11577)
@@ -0,0 +1,2 @@
+SUBDIRS = plot mesh display parameterization partition solvers
+bin_SCRIPTS=*.m  
Index: /issm/branches/trunk-jpl-damage/src/m/model/display/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/display/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/display/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/model/extrude.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/extrude.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/model/extrude.m	(revision 11577)
@@ -137,6 +137,5 @@
 md.inversion.vel_obs=project3d(md,'vector',md.inversion.vel_obs,'type','node');
 md.surfaceforcings.mass_balance=project3d(md,'vector',md.surfaceforcings.mass_balance,'type','node');
-md.surfaceforcings.accumulation_rate=project3d(md,'vector',md.surfaceforcings.accumulation_rate,'type','node');
-md.surfaceforcings.ablation_rate=project3d(md,'vector',md.surfaceforcings.ablation_rate,'type','node');
+md.surfaceforcings.precipitation=project3d(md,'vector',md.surfaceforcings.precipitation,'type','node');
 md.balancethickness.thickening_rate=project3d(md,'vector',md.balancethickness.thickening_rate,'type','node');
 
@@ -217,4 +216,6 @@
 md.mask.vertexonwater=project3d(md,'vector',md.mask.vertexonwater,'type','node');
 if ~isnan(md.inversion.cost_functions_coefficients),md.inversion.cost_functions_coefficients=project3d(md,'vector',md.inversion.cost_functions_coefficients,'type','node');end;
+if ~isnan(md.inversion.min_parameters),md.inversion.min_parameters=project3d(md,'vector',md.inversion.min_parameters,'type','node');end;
+if ~isnan(md.inversion.max_parameters),md.inversion.max_parameters=project3d(md,'vector',md.inversion.max_parameters,'type','node');end;
 if ~isnan(md.qmu.partition),md.qmu.partition=project3d(md,'vector',md.qmu.partition','type','node');end
 
Index: /issm/branches/trunk-jpl-damage/src/m/model/loadresultsfromcluster.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/loadresultsfromcluster.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/model/loadresultsfromcluster.m	(revision 11577)
@@ -30,5 +30,7 @@
 	delete([md.miscellaneous.name '.errlog']);
 	delete([md.miscellaneous.name '.outbin']);
-	delete([md.private.runtimename '.tar.gz']);
+	if ~ispc,
+		delete([md.private.runtimename '.tar.gz']);
+	end
 end
 
@@ -41,6 +43,10 @@
 	else
 		delete([md.miscellaneous.name '.bin']);
-		delete([md.miscellaneous.name '.queue']);
 		delete([md.miscellaneous.name '.petsc']);
+		if ~ispc,
+			delete([md.miscellaneous.name '.queue']);
+		else
+			delete([md.miscellaneous.name '.bat']);
+		end
 	end
 end
Index: /issm/branches/trunk-jpl-damage/src/m/model/mesh/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/mesh/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/mesh/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/model/parameterization/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/parameterization/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/parameterization/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/model/partition/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/partition/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/partition/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/model/plot/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/plot/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/plot/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/model/solvers/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/model/solvers/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/model/solvers/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/planet/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/planet/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/planet/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/qmu/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/qmu/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/qmu/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/shared/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/shared/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/shared/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/solutions/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/solutions/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/solutions/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/solvers/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/solvers/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/solvers/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Analysis/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Analysis/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Analysis/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Array/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Array/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Array/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/BC/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/BC/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/BC/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetIceSheetBC.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetIceSheetBC.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetIceSheetBC.m	(revision 11577)
@@ -34,11 +34,7 @@
 
 %Create zeros basal melting rate and surface mass balance if not specified
-if isnan(md.surfaceforcings.accumulation_rate),
-	md.surfaceforcings.accumulation_rate=zeros(md.mesh.numberofvertices,1);
-	disp('      no surfaceforcings.accumulation_rate specified: values set as zero');
-end
-if isnan(md.surfaceforcings.ablation_rate),
-	md.surfaceforcings.ablation_rate=zeros(md.mesh.numberofvertices,1);
-	disp('      no surfaceforcings.ablation_rate specified: values set as zero');
+if isnan(md.surfaceforcings.precipitation),
+	md.surfaceforcings.precipitation=zeros(md.mesh.numberofvertices,1);
+	disp('      no surfaceforcings.precipitation specified: values set as zero');
 end
 if isnan(md.surfaceforcings.mass_balance),
Index: /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetIceShelfBC.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetIceShelfBC.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetIceShelfBC.m	(revision 11577)
@@ -64,13 +64,8 @@
 md.diagnostic.icefront=pressureload;
 
-%Create zeros basalforcings.melting_rate, surfaceforcings.ablation_rate, surfaceforcings.accumulation_rate
-% and surfaceforcings.mass_balance if not specified
-if isnan(md.surfaceforcings.accumulation_rate),
-	md.surfaceforcings.accumulation_rate=zeros(md.mesh.numberofvertices,1);
-	disp('      no surfaceforcings.accumulation_rate specified: values set as zero');
-end
-if isnan(md.surfaceforcings.ablation_rate),
-	md.surfaceforcings.ablation_rate=zeros(md.mesh.numberofvertices,1);
-	disp('      no surfaceforcings.ablation_rate specified: values set as zero');
+%Create zeros basalforcings and surfaceforcings
+if isnan(md.surfaceforcings.precipitation),
+	md.surfaceforcings.precipitation=zeros(md.mesh.numberofvertices,1);
+	disp('      no surfaceforcings.precipitation specified: values set as zero');
 end
 if isnan(md.surfaceforcings.mass_balance),
Index: /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetMarineIceSheetBC.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 11577)
@@ -75,13 +75,8 @@
 
 
-%Create zeros basalforcings.melting_rate, surfaceforcings.ablation_rate, surfaceforcings.accumulation_rate
-% and surfaceforcings.mass_balance if not specified
-if isnan(md.surfaceforcings.accumulation_rate),
-	md.surfaceforcings.accumulation_rate=zeros(md.mesh.numberofvertices,1);
-	disp('      no surfaceforcings.accumulation_rate specified: values set as zero');
-end
-if isnan(md.surfaceforcings.ablation_rate),
-	md.surfaceforcings.ablation_rate=zeros(md.mesh.numberofvertices,1);
-	disp('      no surfaceforcings.ablation_rate specified: values set as zero');
+%Create zeros basalforcings and surfaceforcings
+if isnan(md.surfaceforcings.precipitation),
+	md.surfaceforcings.precipitation=zeros(md.mesh.numberofvertices,1);
+	disp('      no surfaceforcings.precipitation specified: values set as zero');
 end
 if isnan(md.surfaceforcings.mass_balance),
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Basins/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Basins/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Basins/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Cluster/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Cluster/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Cluster/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/DataProcessing/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/DataProcessing/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/DataProcessing/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Ecco3/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Ecco3/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Ecco3/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Exp/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Exp/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Exp/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: sm/branches/trunk-jpl-damage/src/m/utils/Exp/expopen.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Exp/expopen.m	(revision 11576)
+++ 	(revision )
@@ -1,10 +1,0 @@
-function struct=expopen(newname,oldname)
-%EXPOPEN - read in an exp file, and open all the contours.
-%
-%   Usage:
-%      expopen(newname,oldname)
-%  
-
-
-a=expread(oldname,0); %0 for opening.
-expwrite(a,newname);
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Geometry/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Geometry/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Geometry/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/ImageProcessing/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/ImageProcessing/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/ImageProcessing/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Interp/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Interp/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Interp/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Kml/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Kml/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Kml/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/LatLong/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/LatLong/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/LatLong/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Makefile.am	(revision 11577)
@@ -0,0 +1,2 @@
+SUBDIRS = Analysis Array BC Basins Cluster DataProcessing Ecco3 Exp Geometry ImageProcessing Interp Kml LatLong Math Meca Mesh Miscellaneous Model Numerics OS Plot Shell String consistency qmu
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Math/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Math/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Math/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Meca/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Meca/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Meca/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: sm/branches/trunk-jpl-damage/src/m/utils/Meca/effective_value.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Meca/effective_value.m	(revision 11576)
+++ 	(revision )
@@ -1,18 +1,0 @@
-function effective_value=effective_value(A)
-%EFFECTIVE_VALUE - compute the effective value of any matrix
-%
-%   effective(A)= 1/sqrt(2)*sqrt(sum(Aij^2))
-%
-%   Usage:
-%      effective_value=effective_value(A)
-
-[row,col]=size(A);
-
-SUM=0;
-for i=1:row
-    for j=1:col
-        SUM=SUM+A(i,j)^2;
-    end
-end
-
-effective_value=1/sqrt(2)*sqrt(SUM);
Index: sm/branches/trunk-jpl-damage/src/m/utils/Meca/glen_coefficients.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Meca/glen_coefficients.m	(revision 11576)
+++ 	(revision )
@@ -1,26 +1,0 @@
-function [A ,B]=glen_coefficients(Ao,T);
-%GLEN_COEFFICIENTS - compute A and B, given the temperature and Ao
-%
-%   Ao,T according to patterson,Ao in s-1kPa-3.
-%   values range between 3.9 and 5.3*10^-16;
-%   Return: A in s-1kPa-3. B in Pa.a1/3
-%
-%   Usage:
-%      [A ,B]=glen_coefficients(Ao,T)
-
-To=263;
-R=8.314;
-E1=139000;
-E2=60000;
-
-%For T>263,
-Ac1=Ao*exp(E1/R/To);
-%For T<263,
-Ac2=Ao*exp(E2/R/To);
-
-A=Ac1*exp(-E1/R./T);
-pos=find(T<263);
-A(pos)=Ac2*exp(-E2/R./T(pos));
-
-B=(A*365*24*3600).^(-1/3);
-
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Mesh/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Mesh/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Mesh/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/issmdoc.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/issmdoc.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/issmdoc.m	(revision 11577)
@@ -0,0 +1,15 @@
+%Quick documentation for ISSM
+
+%First get ISSM tier: 
+ISSM_TIER=issmtier;
+
+disp(sprintf('\n%s','  A comprehensive documentation is available on http://issm.jpl.nasa.gov'));
+disp(sprintf('\n%s','  Example: how to create a square ice shelf'));
+disp(sprintf('%s','	   go to ',ISSM_TIER,'/examples/SquareIceshelf'));
+disp(sprintf('%s','	   md=model;                                %creates a new empty model structure'));
+disp(sprintf('%s','	   md=triangle(md,''DomainOutline.exp'',50000);   %creates a mesh of the domain outline with a resolution of 50000m'));
+disp(sprintf('%s','	   md=geography(md,''all'','''');               %defines the glacier system as an ice shelf (no island)'));
+disp(sprintf('%s','	   md=parameterize(md,''Square.par'');        %fills all the other fields of the model'));
+disp(sprintf('%s','	   md=setelementstype(md,''macayeal'',''all''); %defines all elements as MacAyeal''s'));
+disp(sprintf('%s','	   md=solve(md,DiagnosticSolutionEnum);   %generate the velocity field'));
+disp(sprintf('%s','	   plotmodel(md,''data'',md.results.DiagnosticSolution.Vel);    %displays the velocity (type plotdoc for plotmodel help)'));
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Model/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Model/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Model/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Numerics/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Numerics/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Numerics/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/OS/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/OS/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/OS/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/OS/ismumps.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/OS/ismumps.m	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/OS/ismumps.m	(revision 11577)
@@ -0,0 +1,33 @@
+function flag=ismumps()
+%ISMUMPS - figure out if MUMPS package was compiled with ISSM
+%
+%   Usage:
+%       flag=ismumps();
+
+
+configfile=[issmtier() '/config.h'];
+if ~exist(configfile,'file'),
+	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
+end
+
+%go through the file, and recover the line we want
+flag=2;
+fid=fopen(configfile,'r');
+if(fid==-1), error(['could not open file: ' configfile]); end
+
+while(true),
+	tline=fgets(fid);
+	if ~ischar(tline), break, end
+	if strncmp(tline,'/* #undef _HAVE_MUMPS_ */',25),
+		flag=0;
+		break;
+	end
+	if  strncmp(tline,'#define _HAVE_MUMPS_',20),
+		flag=1;
+		break;
+	end
+end
+fclose(fid);
+if flag==2,
+	error('could not determine whether MUMPS was or was not compiled');
+end
Index: /issm/branches/trunk-jpl-damage/src/m/utils/OS/issmscpin.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/OS/issmscpin.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/OS/issmscpin.m	(revision 11577)
@@ -52,9 +52,13 @@
 		%just use standard unix scp
 		%string to copy multiple files using scp: 
-		string='\{';
-		for i=1:numel(packages)-1,
-			string=[string packages{i} ','];
+		if numel(packages)==1,
+			string=packages{1};
+		else
+			string='\{';
+			for i=1:numel(packages)-1,
+				string=[string packages{i} ','];
+			end
+			string=[string packages{end} '\}'];
 		end
-		string=[string packages{end} '\}'];
 
 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/OS/oshostname.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/OS/oshostname.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/OS/oshostname.m	(revision 11577)
@@ -7,5 +7,5 @@
 
 if ispc,
-	[status,hostname]=system('hostname');hostname=hostname(1:end-1);
+	[status,hostname]=system('hostname | sed ''s/-//g''');hostname=hostname(1:end-1);
 
 	if status, 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Plot/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Plot/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Plot/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Shell/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Shell/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Shell/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmdir.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmdir.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmdir.m	(revision 11577)
@@ -5,5 +5,9 @@
 %      ISSM_DIR=issmdir()
 
-ISSM_DIR =getenv('ISSM_DIR');
+if ~ispc,
+	ISSM_DIR =getenv('ISSM_DIR');
+else
+	ISSM_DIR =getenv('ISSM_DIR_WIN');
+end
 
 if (isempty(ISSM_DIR)),
Index: /issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmtier.m
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmtier.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmtier.m	(revision 11577)
@@ -5,5 +5,12 @@
 %      ISSM_TIER=issmtier()
 
-ISSM_TIER =getenv('ISSM_TIER');
+if ~ispc, 
+	ISSM_TIER =getenv('ISSM_TIER');
+else
+	ISSM_TIER =getenv('ISSM_TIER_WIN');
+	if strcmpi(ISSM_TIER(end),'/') | strcmpi(ISSM_TIER(end),'\'),
+		ISSM_TIER = ISSM_TIER(1:end-1); %shave off the last '/'
+	end
+end
 
 if (isempty(ISSM_TIER)),
Index: /issm/branches/trunk-jpl-damage/src/m/utils/String/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/String/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/String/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/consistency/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/consistency/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/consistency/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/m/utils/qmu/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/m/utils/qmu/Makefile.am	(revision 11577)
+++ /issm/branches/trunk-jpl-damage/src/m/utils/qmu/Makefile.am	(revision 11577)
@@ -0,0 +1,1 @@
+bin_SCRIPTS=*.m 
Index: /issm/branches/trunk-jpl-damage/src/mex/Makefile.am
===================================================================
--- /issm/branches/trunk-jpl-damage/src/mex/Makefile.am	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/src/mex/Makefile.am	(revision 11577)
@@ -1,3 +1,3 @@
-INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@
+INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ 
 EXEEXT=$(MEXEXT)
 
@@ -96,11 +96,15 @@
 bin_PROGRAMS += 
 else
+if DAKOTA
 bin_PROGRAMS += DakotaResponses\
 				Dakota\
 				InputUpdateFromDakota
+else
+bin_PROGRAMS += 
+endif
 endif 
 #}}}
 #Flags and libraries {{{1
-LDADD =   $(TRIANGLELIB) ../c/libISSM.a $(PETSCLIB) $(FLIBS)  $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB)  $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB)  $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB)
+LDADD =   $(TRIANGLELIB) ../c/libISSM.a $(PETSCLIB) $(FLIBS)  $(PLAPACKLIB)  $(MUMPSLIB) $(SCALAPACKLIB)  $(BLACSLIB)  $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB)  $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(MEXLIB)
 
 AM_LDFLAGS = $(MEXLINK)
Index: /issm/branches/trunk-jpl-damage/startup.m
===================================================================
--- /issm/branches/trunk-jpl-damage/startup.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/startup.m	(revision 11577)
@@ -11,6 +11,10 @@
 lastwarn(''); 
 
-%Recover ISSM_TIER 
-ISSM_TIER=getenv('ISSM_TIER');
+%Recover ISSM_TIER , or if on a Windows machine, ISSM_TIER_WIN
+if ~ispc,
+	ISSM_TIER=getenv('ISSM_TIER');
+else
+	ISSM_TIER=getenv('ISSM_TIER_WIN');
+end
 if (isempty(ISSM_TIER)),
 	error('issmdir error message: ''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
@@ -23,5 +27,4 @@
 %ISSM path
 addpath([ISSM_TIER '/src/m/utils/']); %loads recursivepath
-addpath([ISSM_TIER '/doc']);
 addpath([ISSM_TIER '/bin']);
 addpath(recursivepath([ISSM_TIER '/src/m']));
@@ -31,4 +34,5 @@
 addpath(recursivepath([ISSM_TIER '/externalpackages/googleearthtoolbox/']));
 addpath(recursivepath([ISSM_TIER '/externalpackages/export_fig']));
+
 clear ISSM_TIER;
 
@@ -43,15 +47,17 @@
 %  deal with Matlab bug (on Linux, not WinXP) -- unless
 %  the class has been called, "empty" method can not be found
-normal_uncertain;
-continuous_design;
-continuous_state;
-linear_inequality_constraint;
-linear_equality_constraint;
-response_function;
-objective_function;
-least_squares_term;
-nonlinear_inequality_constraint;
-nonlinear_equality_constraint;
-clear ans;
+if ~ispc,
+	normal_uncertain;
+	continuous_design;
+	continuous_state;
+	linear_inequality_constraint;
+	linear_equality_constraint;
+	response_function;
+	objective_function;
+	least_squares_term;
+	nonlinear_inequality_constraint;
+	nonlinear_equality_constraint;
+	clear ans;
+end
 
 %disable matlab bell!
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/Makefile
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/Makefile	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/Makefile	(revision 11577)
@@ -1,2 +1,2 @@
 clean: 
-	rm -rf *.tar.gz *.bin *.errlog *.outlog  *.outbin *.petsc *.queue *.run valgrind.log*
+	rm -rf *.tar.gz *.bin *.errlog *.outlog  *.outbin *.petsc *.queue *.run valgrind.log* *.bat *.lock
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test1104.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test1104.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test1104.m	(revision 11577)
@@ -68,5 +68,5 @@
 	1e-08,1e-08,1e-08,...
 	1e-08,1e-08,1e-08,...
-	1e-08,1e-08,1e-08,...
+	1e-08,1e-07,1e-08,...
 	1e-07,1e-07,1e-07,...
 };
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test1105.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test1105.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test1105.m	(revision 11577)
@@ -143,5 +143,5 @@
 field_tolerances={...
 	1e-08,1e-07,1e-07,...
-	1e-09,1e-07,1e-08,...
+	1e-09,1e-07,1e-07,...
 	1e-09,1e-09,1e-07,...
 	1e-09,1e-09,1e-08,...
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test1109.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test1109.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test1109.m	(revision 11577)
@@ -95,7 +95,7 @@
 field_tolerances={...
 	1e-05,1e-05,...
-	1e-06,1e-06,1e-06,...
+	1e-05,1e-06,1e-06,...
 	1e-05,1e-04,...
-	1e-06,1e-06,1e-06,...
+	1e-05,1e-05,1e-06,...
 };
 field_values={};
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test1110.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test1110.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test1110.m	(revision 11577)
@@ -114,5 +114,5 @@
 	1e-10,1e-09,1e-09,1e-10,...
 	1e-10,1e-09,1e-09,1e-10,...
-	1e-09,1e-09,1e-08,1e-09,...
+	1e-08,1e-09,1e-08,1e-09,...
 	1e-08,1e-09,1e-08,1e-09,...
 };
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test430.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test430.m	(revision 11576)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test430.m	(revision 11577)
@@ -24,5 +24,5 @@
 %Fields and tolerances to track changes
 field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy' 'Vz' 'Temperature' 'BasalforcingsMeltingRate'};
-field_tolerances={1e-10,1e-10,1e-11,1e-13,1e-10,1e-09,1e-10,1e-8,1e-10,1e-6};
+field_tolerances={1e-10,1e-10,1e-11,1e-13,1e-10,1e-09,1e-10,1e-8,1e-09,1e-6};
 field_values={...
 	(md.results.SteadystateSolution.Gradient1),...
