// Copyright (C) 2004-2014 Jed Brown, Ed Bueler and Constantine Khroulev // // This file is part of Pism. // // Pism 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 3 of the License, or (at your option) any later // version. // // Pism 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 Pism; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA static char help[] = "Ice sheet driver for EISMINT II, and other constant climate, simplified geometry\n" "intercomparison simulations.\n"; #include #include #include "IceGrid.hh" #include "iceModel.hh" #include "eismint/iceEISModel.hh" #include "pism_options.hh" #include "POConstant.hh" int main(int argc, char *argv[]) { PetscErrorCode ierr; MPI_Comm com; ierr = PetscInitialize(&argc, &argv, PETSC_NULL, help); CHKERRQ(ierr); com = PETSC_COMM_WORLD; /* This explicit scoping forces destructors to be called before PetscFinalize() */ { ierr = verbosityLevelFromOptions(); CHKERRQ(ierr); ierr = verbPrintf(2,com, "PISMS %s (simplified geometry mode)\n", PISM_Revision); CHKERRQ(ierr); ierr = stop_on_version_option(); CHKERRQ(ierr); std::vector required; required.clear(); // no actually required options; "-eisII A" is default ierr = show_usage_check_req_opts(com, "pisms", required, " pisms [-eisII x] [OTHER PISM & PETSc OPTIONS]\n" "where major option chooses type of simplified experiment:\n" " -eisII x choose EISMINT II experiment (x = A|B|C|D|E|F|G|H|I|J|K|L)\n"); CHKERRQ(ierr); PISMUnitSystem unit_system(NULL); PISMConfig config(com, "pism_config", unit_system), overrides(com, "pism_overrides", unit_system); ierr = init_config(com, config, overrides, true); CHKERRQ(ierr); config.set_string("calendar", "none"); IceGrid g(com, config); IceEISModel m(g, config, overrides); ierr = m.setExecName("pisms"); CHKERRQ(ierr); ierr = m.init(); CHKERRQ(ierr); ierr = m.run(); CHKERRQ(ierr); ierr = verbPrintf(2,com, "... done with run \n"); CHKERRQ(ierr); // provide a default output file name if no -o option is given. ierr = m.writeFiles("unnamed.nc"); CHKERRQ(ierr); } ierr = PetscFinalize(); CHKERRQ(ierr); return 0; }