/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/hydrotrend/hydrosetgeoparams.c

Go to the documentation of this file.
00001 /*
00002  * HydroSetGeoParams.c
00003  *
00004  * The subroutine sets the constant parameters of Qsbar based on the
00005  * geographic position of the river mouth and average basin temperature,
00006  * according to a paper of Syvitski, J.P.M., Peckham, S.D., Hilberman, R.D.
00007  * and Mulder, T., (in press).
00008  * Predicting the terrestrial flux of sediment to the global
00009  * ocean: A planetary perspective. Marine Geology.
00010  *
00011  *  Author:        A.J. Kettner  (August 2002)(February 2003)(november 2003)
00012  *
00013  *
00014  * Qsbar = alpha3 * pow(A,alpha4) * pow(H,alpha5) * exp(k * Tbar)
00015  * Alpha3, alpha4 and alpha5 and k are set here.
00016  * Tbar  = Tmean - ((lapserate[ep] * maxalt[ep])/3.0);
00017  * Tmean = (Tstart[ep] + (Tstart[ep] + (Tchange[ep]*nyears[ep])))/2;
00018  *
00019  *--------------------------------------------------------------------
00020  *|Global Sector                  | alpha3 | alpha4 | alpha5 |  k    |
00021  *|                               |        |        |        |       |
00022  *|Polar (T<0 deg.C)              | 2e-5   | 0.50   | 1.50   |  0.1  |
00023  *|Temperate N (Lat>30N, T>0deg.C)| 6.1e-5 | 0.55   | 1.12   |  0.07 |
00024  *|Tropics N (Lat 0 to 30N)       | 0.31   | 0.40   | 0.66   | -0.1  |
00025  *|Tropics S (Lat 0 to 30S)       | 0.57   | 0.50   | 0.37   | -0.1  |
00026  *|Temperate S (Lat>30S, T>0deg.C)| 1.3e-3 | 0.43   | 0.96   |  0.0  |
00027  *--------------------------------------------------------------------
00028  *
00029  * Or:
00030  * Qsbar = alpha6 * pow(Q,alpha7) * pow(H,alpha8) * exp(k*Tbar)
00031  * Alpha6, alpha7, alpha8 and k are set here.
00032  * 
00033  *--------------------------------------------------------------------
00034  *|Global Sector                  | alpha6 | alpha7 | alpha8 |  k    |
00035  *|                               |        |        |        |       |
00036  *|Polar (T<0 deg.C)              | 1.3e-4 | 0.55   | 1.50   |  0.1  |
00037  *|Temperate N (Lat>30N, T>0deg.C)| 1.1e-3 | 0.53   | 1.10   |  0.06 |
00038  *|Tropics N (Lat 0 to 30N)       | 2.0    | 0.45   | 0.57   | -0.09 |
00039  *|Tropics S (Lat 0 to 30S)       | 162    | 0.65   |-0.05   | -0.16 |
00040  *|Temperate S (Lat>30S, T>0deg.C)| 1.1e-3 | 0.53   | 1.10   |  0.06 |
00041  *--------------------------------------------------------------------
00042  * NOTE THAT TEMPERATE S GOT THE SAME VALUES AS THE TEMPERATE N. THIS BECAUSE
00043  * NO VALUES WHERE IN THE PAPER FOR TEMPERATE S. FOR NOW, THE VALUES FOR TEMPERATE
00044  * N ARE USED.
00045  * 
00046  *  Variable    Def.Location            Type    Units   Usage
00047  *  --------    ------------            ----    -----   -----
00048  *  changeyear  HydroSetGeoParams.c     double  years   The year in which the Temp switches
00049  *  err                 various                         int             -               error flag, halts program
00050  *      i                       various                         int             -               counter
00051  *  Tbar                HydroSetGeoParams.c     double  deg.C   Mean temp. for the whole basin
00052  *  Tbarend             HydroSetGeoParams.c     double  deg.C   Temp at the last year of the run corrected for the whole basin
00053  *  Tbarstart   HydroSetGeoParams.c     double  deg.C   Temp at the first year of the run
00054  *  Tdummy              HydroSetGeoParams.c     double  deg.C   Total temp used for real data
00055  *  Tend                HydroSetGeoParams.c     double  deg.C   Temp at the last year of the run
00056  *  Tmean               HydroSetGeoParams.c     double  deg.C   Mean temp. not corrected for the whole basin yet.
00057  * 
00058  */
00059 
00060 #include "hydroparams.h"
00061 #include "hydroclimate.h"
00062 #include "hydroreadclimate.h"
00063 #include "hydroinout.h"
00064 
00065 /*------------------------------
00066  *  Start of HydroSetGeoParams
00067  *------------------------------*/
00068 int hydrosetgeoparams( gw_rainfall_etc* gw_rain ) {
00069 int err,i;
00070 double Tend, Tmean, Tbar,Tdummy;/*, Tbarstart, Tbarend, changeyears;*/
00071 
00072 /*----------------------------------------------------------------
00073  * Set all the constants of the Qsbar
00074  * (Qsbar = alpha3 * pow(A,alpha4) * pow(H,alpha5) * exp(k * Tbar)
00075  *----------------------------------------------------------------*/
00076 err = 0;
00077 
00078 if ( raindatafile == 1){
00079         Tdummy = 0.0;
00080         for (i=0; i<nyears[ep]; i++)
00081                 Tdummy +=gw_rain->Tperyear[i];
00082         Tmean = Tdummy / nyears[ep];
00083 }
00084 
00085 else {
00086         Tend            = Tstart[ep] + ( Tchange[ep] * nyears[ep] );
00087         Tmean           = ( Tstart[ep] + Tend ) / 2;
00088 }       
00089 Tbar = Tmean - ((lapserate[ep] * maxalt[ep])/3.0);
00090         if (lat > 30 && Tbar > 0){                                /* Temperate North */
00091         alpha3 = 0.000061;
00092             alpha4 = 0.55;
00093         alpha5 =  1.12;
00094         k1 = 0.07;
00095     }   
00096         if ((lat > 0 || lat == 0) && lat < 30 && Tbar > 0){       /* Tropics North */
00097         alpha3 = 0.31;
00098             alpha4 = 0.40;
00099         alpha5 =  0.66;
00100         k1 = -0.1;
00101         }
00102     if ((lat > -30 || lat == -30) && lat < 0 && Tbar > 0){    /* Tropics South */
00103             alpha3 = 0.57;
00104         alpha4 = 0.50;
00105         alpha5 =  0.37;
00106             k1 = -0.1;
00107     }
00108         if (lat < -30 && Tbar > 0){                               /* Temperate South */
00109         alpha3 = 0.0013;
00110             alpha4 = 0.43;
00111         alpha5 =  0.96;
00112         k1 = 0.0;
00113         }
00114     if (Tbar <= 0.0 ){                         /* Polar; South or North */
00115             alpha3 = 0.00002;
00116         alpha4 = 0.50;
00117         alpha5 =  1.50;
00118             k1 = 0.1;
00119     }
00120         if (lat > 30 && Tbar > 0){                                /* Temperate North */
00121         alpha6 = 0.0011;
00122         alpha7 = 0.53;
00123             alpha8 =  1.1;
00124         k2 = 0.06;
00125     }
00126         if ((lat >= 0.0) && lat < 30 && Tbar > 0){       /* Tropics North */
00127         alpha6 = 2.0;
00128             alpha7 = 0.45;
00129         alpha8 =  0.57;
00130         k2 = -0.09;
00131         }
00132     if ((lat > -30 || lat == -30) && lat < 0 && Tbar > 0){    /* Tropics South */
00133             alpha6 = 162;
00134         alpha7 = 0.65;
00135         alpha8 =  -0.05;
00136             k2 = -0.16;
00137     }
00138         if (lat < -30 && Tbar > 0){                               /* Temperate South */
00139         alpha6 = 0.0011;
00140             alpha7 = 0.53;
00141         alpha8 =  1.1;
00142         k2 = 0.06;
00143         }
00144     if ( Tbar <= 0.0){                         /* Polar; South or North */
00145             alpha6 = 0.00013;
00146         alpha7 = 0.55;
00147         alpha8 =  1.50;
00148             k2 = 0.1;
00149     }   
00150 return(err);
00151 } /* end of HydroSetGeoParams.c */
00152 

Generated on Fri Jan 4 18:04:14 2008 for sedflux by  doxygen 1.5.2