Changeset 12708
- Timestamp:
- 07/24/12 10:38:45 (13 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 12705
- Property svn:mergeinfo changed
-
issm/trunk/src/c/objects/Inputs/TransientInput.h
r12706 r12708 51 51 void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");}; 52 52 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss); 53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss) {_error2_("not implemented yet");};53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss); 54 54 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time); 55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time) {_error2_("not implemented yet");};55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time); 56 56 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");}; 57 57 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");}; -
issm/trunk/src/c/shared/Elements/PddSurfaceMassBalance.cpp
r12641 r12708 5 5 #include "./elements.h" 6 6 7 double PddSurfaceMassBlance(double* monthlytemperatures, double* monthlyprec, double* pdds, double* pds, double signorm, double yts, double h, double s, double rho_ice, double rho_water){7 IssmDouble PddSurfaceMassBlance(IssmDouble* monthlytemperatures, IssmDouble* monthlyprec, IssmDouble* pdds, IssmDouble* pds, IssmDouble signorm, IssmDouble yts, IssmDouble h, IssmDouble s, IssmDouble rho_ice, IssmDouble rho_water){ 8 8 9 9 // output: 10 double B; // surface mass balance, melt+accumulation10 IssmDouble B; // surface mass balance, melt+accumulation 11 11 12 12 int iqj,imonth, j; 13 13 14 double saccu; // yearly surface accumulation15 double smelt; // yearly melt16 double precrunoff; // yearly runoff17 double prect; // total precipitation during 1 year taking into account des. ef.18 double water; //water=rain + snowmelt19 double runoff; //meltwater only, does not include rain20 double sconv; //rhow_rain/rhoi / 12 months21 22 double density;23 double lapser=6.5/1000., sealev=0.; // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper24 double desfac = 0.5; // desert elevation factor25 double s0p=0.; // should be set to elevation from precip source26 double s0t=0.; // should be set to elevation from temperature source27 double st; // elevation between altitude of the temp record and current altitude28 double sp; // elevation between altitude of the prec record and current altitude14 IssmDouble saccu; // yearly surface accumulation 15 IssmDouble smelt; // yearly melt 16 IssmDouble precrunoff; // yearly runoff 17 IssmDouble prect; // total precipitation during 1 year taking into account des. ef. 18 IssmDouble water; //water=rain + snowmelt 19 IssmDouble runoff; //meltwater only, does not include rain 20 IssmDouble sconv; //rhow_rain/rhoi / 12 months 21 22 IssmDouble density; 23 IssmDouble lapser=6.5/1000., sealev=0.; // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper 24 IssmDouble desfac = 0.5; // desert elevation factor 25 IssmDouble s0p=0.; // should be set to elevation from precip source 26 IssmDouble s0t=0.; // should be set to elevation from temperature source 27 IssmDouble st; // elevation between altitude of the temp record and current altitude 28 IssmDouble sp; // elevation between altitude of the prec record and current altitude 29 29 30 30 // PDD and PD constants and variables 31 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm32 double signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day33 double siglimc, siglim0, siglim0c;34 double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)35 double DT = 0.02;36 double pddt, pd; // pd: snow/precip fraction, precipitation falling as snow37 38 double q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.39 double qm = 0.; // snow part of the precipitation40 double qmt = 0.; // precipitation without desertification effect adjustment41 double qmp = 0.; // desertification taken into account42 double pdd = 0.;43 double frzndd = 0.;44 45 double tstar; // monthly mean surface temp46 double Tsum= 0.; // average summer (JJA) temperature47 double Tsurf = 0.; // average annual temperature48 49 50 double deltm=1./12.;31 IssmDouble siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 32 IssmDouble signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day 33 IssmDouble siglimc, siglim0, siglim0c; 34 IssmDouble PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 35 IssmDouble DT = 0.02; 36 IssmDouble pddt, pd; // pd: snow/precip fraction, precipitation falling as snow 37 38 IssmDouble q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist. 39 IssmDouble qm = 0.; // snow part of the precipitation 40 IssmDouble qmt = 0.; // precipitation without desertification effect adjustment 41 IssmDouble qmp = 0.; // desertification taken into account 42 IssmDouble pdd = 0.; 43 IssmDouble frzndd = 0.; 44 45 IssmDouble tstar; // monthly mean surface temp 46 IssmDouble Tsum= 0.; // average summer (JJA) temperature 47 IssmDouble Tsurf = 0.; // average annual temperature 48 49 50 IssmDouble deltm=1./12.; 51 51 int ismon[12]={11,0,1,2,3,4,5,6,7,8,9,10}; 52 52 53 double snwm; // snow that could have been melted in a year.54 double snwmf; // ablation factor for snow per positive degree day.55 double smf; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002).56 57 double dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr58 double supice,supcap,diffndd;59 double fsupT=0.5, fsupndd=0.5; // Tsurf mode factors for supice60 double pddtj, hmx2;53 IssmDouble snwm; // snow that could have been melted in a year. 54 IssmDouble snwmf; // ablation factor for snow per positive degree day. 55 IssmDouble smf; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002). 56 57 IssmDouble dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr 58 IssmDouble supice,supcap,diffndd; 59 IssmDouble fsupT=0.5, fsupndd=0.5; // Tsurf mode factors for supice 60 IssmDouble pddtj, hmx2; 61 61 62 62 sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
Note:
See TracChangeset
for help on using the changeset viewer.