00001 // Copyright (C) 2004-2010 Jed Brown, Ed Bueler and Constantine Khroulev 00002 // 00003 // This file is part of PISM. 00004 // 00005 // PISM is free software; you can redistribute it and/or modify it under the 00006 // terms of the GNU General Public License as published by the Free Software 00007 // Foundation; either version 2 of the License, or (at your option) any later 00008 // version. 00009 // 00010 // PISM is distributed in the hope that it will be useful, but WITHOUT ANY 00011 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00013 // details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with PISM; if not, write to the Free Software 00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 #include <cstring> 00020 #include <cmath> 00021 #include "iceModel.hh" 00022 00024 00045 PetscErrorCode IceModel::setDefaults() { 00046 PetscErrorCode ierr; 00047 00048 ierr = verbPrintf(3,grid.com, "setting IceModel defaults...\n"); CHKERRQ(ierr); 00049 00050 executable_short_name = "pism"; // drivers typically override this 00051 00052 computeSIAVelocities = PETSC_TRUE; 00053 00054 ssaSystemToASCIIMatlab = PETSC_FALSE; 00055 leaveNuHAloneSSA = false; 00056 00057 strcpy(ssaMatlabFilePrefix, "pism_SSA"); 00058 00059 holdTillYieldStress = PETSC_FALSE; 00060 useConstantTillPhi = PETSC_FALSE; 00061 00062 shelvesDragToo = PETSC_FALSE; 00063 00064 // set maximum |u|,|v|,|w| in ice to an (obviously) invalid number 00065 gmaxu = gmaxv = gmaxw = -1.0; 00066 00067 reportPATemps = PETSC_TRUE; 00068 00069 updateHmelt = PETSC_TRUE; 00070 realAgeForGrainSize = PETSC_FALSE; 00071 00072 // set default locations of soundings and slices 00073 id = (grid.Mx - 1)/2; 00074 jd = (grid.My - 1)/2; 00075 00076 // frequently used physical constants and parameters: 00077 standard_gravity = config.get("standard_gravity"); 00078 00079 // ssa_velocities_are_valid might get overwritten while reading an -i file 00080 global_attributes.set_flag("pism_ssa_velocities_are_valid", false); 00081 global_attributes.set_string("Conventions", "CF-1.4"); 00082 global_attributes.set_string("source", string("PISM ") + PISM_Revision); 00083 00084 return 0; 00085 }
1.6.2-20100124