|
PISM, A Parallel Ice Sheet Model stable 0.4.1779
|
00001 /* 00002 Copyright (C) 2004-2006 Jed Brown and Ed Bueler 00003 00004 This file is part of PISM. 00005 00006 PISM is free software; you can redistribute it and/or modify it under the 00007 terms of the GNU General Public License as published by the Free Software 00008 Foundation; either version 2 of the License, or (at your option) any later 00009 version. 00010 00011 PISM is distributed in the hope that it will be useful, but WITHOUT ANY 00012 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00013 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00014 details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with PISM; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #include <stdio.h> 00022 #include <math.h> 00023 #include "exactTestH.h" 00024 00025 #define SperA 31556926.0 /* seconds per year; 365.2422 days */ 00026 00027 int exactH(const double f, const double tIN, const double r, 00028 double *H, double *M) { 00029 00030 const double n = 3.0; 00031 const double H0 = 3600.0, R0=750000.0; 00032 /* t0 = (beta/Gamma) * pow((2n+1)/((n+1)(1-f)),n) * (pow(R0,n+1)/pow(H0,2n+1)) 00033 when beta=2; */ 00034 double t0 = (15208.0 / pow(1-f,n)) * SperA; 00035 /* t0 = 40033 years; for test C with isostasy f = rho_ice/rho_rock with 00036 rho_ice = 910 and rho_rock = 3300 kg/m^3 */ 00037 double lambda, alpha, beta, t0post, Rmargin; 00038 double t; 00039 00040 t = tIN; 00041 00042 if (t < t0) { /* t <= t0: version of test C */ 00043 lambda = 5.0; 00044 alpha = -1.0; /* alpha=(2-(n+1)*lambda)/(5*n+3) */ 00045 beta = 2.0; /* beta=(1+(2*n+1)*lambda)/(5*n+3) */ 00046 } else { /* t >= t0: version of test B */ 00047 t0post = (t0 / 2.0) * (1.0 / 18.0); /* reset t and t0 */ 00048 t = t - t0 + t0post; /* reset to Halfar w. f */ 00049 t0 = t0post; 00050 lambda = 0.0; 00051 alpha = 1.0 / 9.0; /* alpha=(2-(n+1)*lambda)/(5*n+3)=1/9 */ 00052 beta = 1.0 / 18.0; /* beta=(1+(2*n+1)*lambda)/(5*n+3)=1/18 */ 00053 } 00054 00055 Rmargin = R0 * pow(t / t0, beta); 00056 if (r < Rmargin) 00057 *H = H0 * pow(t / t0, -alpha) 00058 * pow(1.0 - pow(pow(t / t0, -beta) * (r / R0), (n + 1.0) / n), 00059 n / (2.0 * n + 1.0) ); 00060 else 00061 *H = 0.0; 00062 00063 if (t > 0.1*SperA) 00064 *M = (lambda / t) * (*H); 00065 else { /* when less than 0.1 year, avoid division by time */ 00066 Rmargin = R0 * pow(0.1*SperA / t0, beta); 00067 if (r < Rmargin) 00068 *M = lambda * H0 / t0; /* constant value in disc of Rmargin radius */ 00069 else 00070 *M = 0.0; 00071 } 00072 00073 return 0; 00074 }
1.7.3