00001 //--- 00002 // 00003 // This file is part of sedflux. 00004 // 00005 // sedflux is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // sedflux is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with sedflux; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 // 00019 //--- 00020 00021 #ifndef __PLUMEINPUT_IS_INCLUDED__ 00022 #define __PLUMEINPUT_IS_INCLUDED__ 00023 /* 00024 * PlumeInput.h Type definitions for the input variables 00025 * 00026 * Author: M.D. Morehead 00027 * Original: April 1998 00028 * Modified: Sep 1998, MDM, Conversion for SEDFLUX3D 00029 */ 00030 00031 /***************************************************************/ 00032 /* this is a type definition for grid data 00033 * Also defined in PLUME's plumeinput.h 00034 */ 00035 00036 #include <stdlib.h> 00037 #include <utils/utils.h> 00038 #include "plume_types.h" 00039 00040 //extern grid_type_3d *grid; 00041 00042 /* 00043 * River parameters 00044 * Also defined in SEDFLUX3D's typedef.h 00045 */ 00046 #ifdef EXCLUDE 00047 typedef struct { 00048 double *Cs; /* River Concentration (kg/m^3) [0.001:100] */ 00049 double Q; /* discharge (m^3/s) [1:1e6] */ 00050 double u0; /* velocity (m/s) [0.01:10] */ 00051 double rdirection; /* river mouth direction (degN) [0:360] */ 00052 double b0; /* river mouth width (m) [1.0:1e5] */ 00053 double d0; /* river depth (m) [calculated] */ 00054 double rma; /* River mouth angle (degrees), + is in plus y dir. */ 00055 } river_type; 00056 #endif 00057 00058 //extern river_type river; 00059 00060 /* 00061 * Sediment Load Parameters 00062 * Also defined in SEDFLUX3D's typedef.h 00063 */ 00064 //extern int ngrains; /* actual number of grains simulated */ 00065 00066 #ifdef EXCLUDE 00067 typedef struct { 00068 double lambda; /* removal rate coefficient, input (1/day) [0.1:40] */ 00069 /* immediately convert to (1/s) */ 00070 double rho; /* density of sediment (kg/m^3) [1100:2600] */ 00071 double grainsize; /* used by SEDFLUX3D */ 00072 double diff_coef; /* used by SEDFLUX3D */ 00073 } sedload_type; 00074 #endif 00075 00076 //extern sedload_type *sedload; 00077 00078 /* 00079 * Ocean Parameters 00080 * Also defined in SEDFLUX3D's typedef.h 00081 */ 00082 #ifdef EXCLUDE 00083 typedef struct 00084 { 00085 double Cw; /* ocean sediment concentration (kg/m^3) [0:min(Cs)] */ 00086 double vo; /* alongshore current magnitude (m/s) [-3:3] */ 00087 double vdirection; /* alongshore current direction (degN) [0:360] */ 00088 double cc; /* Coastal Current width = cc*inertial length scale [0.1:1] */ 00089 double So; /* Conservative Tracer Property, River concentration */ 00090 double Sw; /* Conservative Tracer Property, Ocean concentration */ 00091 } ocean_type; 00092 #endif 00093 00094 //extern ocean_type ocean; 00095 00096 /* 00097 * Other Parameters 00098 */ 00099 //extern int fjrd; /* Flag for Fjord conditions, fjrd = 1; coastal, fjrd = 0 */ 00100 //extern int kwf; /* Kelvin Wave Flag, 0 = not, 1 = yes */ 00101 //extern double lat; /* latitude north in degrees [0:90] */ 00102 00103 /* 00104 * Set up grids (ymin,ymax used in Fjord runs (fr == 0) and for vo == 0 00105 */ 00106 //extern int ndy; /* N points within rivermouth (used for dy), must be odd!! 00107 // * (11 is a good number, reducing mass balance errors) */ 00108 //extern int ndx; /* x-grid spacing = ndx * dy 00109 // * (open ocean use 1, fjords use 3 to 10) */ 00110 //extern int dy, dx; /* actual bin spacing [calculated] */ 00111 //extern double ymin; /* Y (alongshore) range (m) [< -2*bo] */ 00112 //extern double ymax; /* [> 2*bo] */ 00113 //extern double xmin; /* X (crossshore) range (m) [0] */ 00114 //extern double xmax; /* [lots] */ 00115 //extern int o1, o2, o3; /* output flags for 1=standalone, 2=SEDFLUX-2D, 3=SEDFLUX-3D */ 00116 00117 /* Function declarations. 00118 */ 00119 int plume( Plume_enviro* , Plume_grid* , Plume_options* ); 00120 int plumeread2d(char* , Plume_enviro* , Plume_grid* , Plume_options* ); 00121 int plumeset( Plume_enviro* , Plume_grid* , Plume_options* ); 00122 int plumejump( Plume_river* ); 00123 int plumecheck( Plume_enviro* , Plume_grid* , Plume_options* ); 00124 int plumearray( Plume_grid* , Plume_enviro* , Plume_options* ); 00125 int plumecent( Plume_enviro* , Plume_grid* , Plume_options* ); 00126 int plumedist( Plume_grid* , Plume_options* ); 00127 int plumeconc( Plume_enviro* , Plume_grid* , Plume_options* ); 00128 int plumemass( Plume_enviro* , Plume_grid* , Plume_mass_bal* ); 00129 int plumeout2( Plume_enviro* , Plume_grid* , double , double** , int , int , double ); 00130 int plumeout3( Plume_enviro *env , Plume_grid *grid , Eh_dbl_grid *deposit_grid ); 00131 int plumelog( Plume_enviro* , Plume_grid* , Plume_options* , Plume_mass_bal* ); 00132 00133 Plume_data *plume_data_init( Plume_data* ); 00134 void destroy_plume_data( Plume_data* ); 00135 00136 #endif // plumeinput.h is included