PISM, A Parallel Ice Sheet Model stable 0.4.1779

src/base/iMdefaults.cc

Go to the documentation of this file.
00001 // Copyright (C) 2004-2011 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   shelvesDragToo = PETSC_FALSE;
00053   
00054   // set maximum |u|,|v|,|w| in ice to an (obviously) invalid number
00055   gmaxu = gmaxv = gmaxw = -1.0;
00056 
00057   updateHmelt = PETSC_TRUE;
00058 
00059   // set default locations of soundings and slices
00060   id = (grid.Mx - 1)/2;
00061   jd = (grid.My - 1)/2;
00062 
00063   // frequently used physical constants and parameters:
00064   standard_gravity = config.get("standard_gravity");
00065 
00066   global_attributes.set_string("Conventions", "CF-1.4");
00067   global_attributes.set_string("source", string("PISM ") + PISM_Revision);
00068 
00069   return 0;
00070 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines