[issm-svn] r12708 - issm/trunk
morlighe at issm.ess.uci.edu
morlighe at issm.ess.uci.edu
Tue Jul 24 10:38:45 PDT 2012
Author: morlighe
Date: 2012-07-24 10:38:45 -0700 (Tue, 24 Jul 2012)
New Revision: 12708
Modified:
issm/trunk/
issm/trunk/src/c/objects/Inputs/TransientInput.h
issm/trunk/src/c/shared/Elements/PddSurfaceMassBalance.cpp
Log:
merged trunk-jpl and trunk for revision 12707
Property changes on: issm/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /issm/trunk-jpl:10936-11994,11996-12326,12333-12336,12338-12703
+ /issm/trunk-jpl:10936-11994,11996-12326,12333-12336,12338-12703,12705-12707
Modified: issm/trunk/src/c/objects/Inputs/TransientInput.h
===================================================================
--- issm/trunk/src/c/objects/Inputs/TransientInput.h 2012-07-24 17:36:46 UTC (rev 12707)
+++ issm/trunk/src/c/objects/Inputs/TransientInput.h 2012-07-24 17:38:45 UTC (rev 12708)
@@ -50,9 +50,9 @@
void GetInputValue(int* pvalue){_error2_("not implemented yet");};
void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
- void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+ void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time);
- void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
+ void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time);
void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
Modified: issm/trunk/src/c/shared/Elements/PddSurfaceMassBalance.cpp
===================================================================
--- issm/trunk/src/c/shared/Elements/PddSurfaceMassBalance.cpp 2012-07-24 17:36:46 UTC (rev 12707)
+++ issm/trunk/src/c/shared/Elements/PddSurfaceMassBalance.cpp 2012-07-24 17:38:45 UTC (rev 12708)
@@ -4,60 +4,60 @@
#include "./elements.h"
-double PddSurfaceMassBlance(double* monthlytemperatures, double* monthlyprec, double* pdds, double* pds, double signorm, double yts, double h, double s, double rho_ice, double rho_water){
+IssmDouble PddSurfaceMassBlance(IssmDouble* monthlytemperatures, IssmDouble* monthlyprec, IssmDouble* pdds, IssmDouble* pds, IssmDouble signorm, IssmDouble yts, IssmDouble h, IssmDouble s, IssmDouble rho_ice, IssmDouble rho_water){
// output:
- double B; // surface mass balance, melt+accumulation
+ IssmDouble B; // surface mass balance, melt+accumulation
int iqj,imonth, j;
- double saccu; // yearly surface accumulation
- double smelt; // yearly melt
- double precrunoff; // yearly runoff
- double prect; // total precipitation during 1 year taking into account des. ef.
- double water; //water=rain + snowmelt
- double runoff; //meltwater only, does not include rain
- double sconv; //rhow_rain/rhoi / 12 months
+ IssmDouble saccu; // yearly surface accumulation
+ IssmDouble smelt; // yearly melt
+ IssmDouble precrunoff; // yearly runoff
+ IssmDouble prect; // total precipitation during 1 year taking into account des. ef.
+ IssmDouble water; //water=rain + snowmelt
+ IssmDouble runoff; //meltwater only, does not include rain
+ IssmDouble sconv; //rhow_rain/rhoi / 12 months
- double density;
- double lapser=6.5/1000., sealev=0.; // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper
- double desfac = 0.5; // desert elevation factor
- double s0p=0.; // should be set to elevation from precip source
- double s0t=0.; // should be set to elevation from temperature source
- double st; // elevation between altitude of the temp record and current altitude
- double sp; // elevation between altitude of the prec record and current altitude
+ IssmDouble density;
+ IssmDouble lapser=6.5/1000., sealev=0.; // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper
+ IssmDouble desfac = 0.5; // desert elevation factor
+ IssmDouble s0p=0.; // should be set to elevation from precip source
+ IssmDouble s0t=0.; // should be set to elevation from temperature source
+ IssmDouble st; // elevation between altitude of the temp record and current altitude
+ IssmDouble sp; // elevation between altitude of the prec record and current altitude
// PDD and PD constants and variables
- double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm
- double signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day
- double siglimc, siglim0, siglim0c;
- double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
- double DT = 0.02;
- double pddt, pd; // pd: snow/precip fraction, precipitation falling as snow
+ IssmDouble siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm
+ IssmDouble signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day
+ IssmDouble siglimc, siglim0, siglim0c;
+ IssmDouble PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
+ IssmDouble DT = 0.02;
+ IssmDouble pddt, pd; // pd: snow/precip fraction, precipitation falling as snow
- double q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.
- double qm = 0.; // snow part of the precipitation
- double qmt = 0.; // precipitation without desertification effect adjustment
- double qmp = 0.; // desertification taken into account
- double pdd = 0.;
- double frzndd = 0.;
+ IssmDouble q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.
+ IssmDouble qm = 0.; // snow part of the precipitation
+ IssmDouble qmt = 0.; // precipitation without desertification effect adjustment
+ IssmDouble qmp = 0.; // desertification taken into account
+ IssmDouble pdd = 0.;
+ IssmDouble frzndd = 0.;
- double tstar; // monthly mean surface temp
- double Tsum= 0.; // average summer (JJA) temperature
- double Tsurf = 0.; // average annual temperature
+ IssmDouble tstar; // monthly mean surface temp
+ IssmDouble Tsum= 0.; // average summer (JJA) temperature
+ IssmDouble Tsurf = 0.; // average annual temperature
- double deltm=1./12.;
+ IssmDouble deltm=1./12.;
int ismon[12]={11,0,1,2,3,4,5,6,7,8,9,10};
- double snwm; // snow that could have been melted in a year.
- double snwmf; // ablation factor for snow per positive degree day.
- double smf; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002).
+ IssmDouble snwm; // snow that could have been melted in a year.
+ IssmDouble snwmf; // ablation factor for snow per positive degree day.
+ IssmDouble smf; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002).
- double dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr
- double supice,supcap,diffndd;
- double fsupT=0.5, fsupndd=0.5; // Tsurf mode factors for supice
- double pddtj, hmx2;
+ IssmDouble dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr
+ IssmDouble supice,supcap,diffndd;
+ IssmDouble fsupT=0.5, fsupndd=0.5; // Tsurf mode factors for supice
+ IssmDouble pddtj, hmx2;
sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
More information about the issm-svn
mailing list