Changeset 12293
- Timestamp:
- 05/29/12 09:20:06 (13 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 1 added
- 12 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r11995 r12293 484 484 PatersonEnum, 485 485 ArrheniusEnum, 486 SurfaceforcingsIspddEnum, 486 487 /*}}}*/ 487 488 MaximumNumberOfEnums -
issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
r11995 r12293 452 452 case PatersonEnum : return "Paterson"; 453 453 case ArrheniusEnum : return "Arrhenius"; 454 case SurfaceforcingsIspddEnum : return "SurfaceforcingsIspdd"; 454 455 default : return "unknown"; 455 456 -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r11995 r12293 89 89 parameters->AddObject(iomodel->CopyConstantObject(InversionIscontrolEnum)); 90 90 parameters->AddObject(iomodel->CopyConstantObject(InversionTaoEnum)); 91 parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIspddEnum)); 91 92 92 93 /*some parameters that did not come with the iomodel: */ -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
r11995 r12293 20 20 int stabilization; 21 21 bool dakota_analysis; 22 bool ispdd; 22 23 23 24 /*Fetch data needed: */ … … 27 28 iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum); 28 29 iomodel->FetchData(1,MeshElementsEnum); 30 iomodel->Constant(&ispdd,SurfaceforcingsIspddEnum); 29 31 30 32 /*Update elements: */ … … 44 46 iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum); 45 47 iomodel->FetchDataToInput(elements,MaskElementonwaterEnum); 48 iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum); 46 49 iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum); 47 50 iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum); … … 66 69 iomodel->FetchDataToInput(elements,TemperatureEnum); 67 70 } 68 71 if(ispdd){ 72 iomodel->FetchDataToInput(elements,VyEnum); 73 iomodel->FetchDataToInput(elements,ThermalSpctemperatureEnum); 74 iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum); 75 } 69 76 /*Free data: */ 70 77 iomodel->DeleteData(1,MeshElementsEnum); -
issm/trunk/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
r11778 r12293 20 20 // monthly mean precip rate (m/yr water equivalent): vPrec(NA,NTIME) 21 21 // OUTPUT: mass-balance (m/yr ice): agd(NA) 22 // mean annual s urface temperature (degrees C): Tsurf(NA)22 // mean annual sssurface temperature (degrees C): Tsurf(NA) 23 23 24 24 int i, it, jj, itm; … … 26 26 double signorm = 5.5; // signorm : sigma of the temperature distribution for a normal day 27 27 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 28 double signormc ; // sigma of the temperature distribution for cloudy day29 double siglimc =0, siglim0, siglim0c;28 double signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day 29 double siglimc, siglim0, siglim0c; 30 30 double tstep, tsint, tint, tstepc; 31 31 int NPDMAX = 1504, NPDCMAX = 1454; … … 43 43 pds=(double*)xmalloc(NPDCMAX*sizeof(double)+1); 44 44 45 46 // PDD constant47 siglim = 2.5*signorm;48 49 45 // initialize PDD (creation of a lookup table) 50 46 tstep = 0.1; … … 53 49 snormfac = 1.0/(signorm*sqrt(2.0*acos(-1.0))); 54 50 siglim = 2.5*signorm; 51 siglimc = 2.5*signormc 52 siglim0 = siglim/DT + 0.5 53 siglim0c = siglimc/DT + 0.5 54 PDup = siglimc+PDCUT 55 55 56 itm = (int)(2*siglim/DT + 1.5); 56 57 -
issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
r11995 r12293 462 462 else if (strcmp(name,"Paterson")==0) return PatersonEnum; 463 463 else if (strcmp(name,"Arrhenius")==0) return ArrheniusEnum; 464 else if (strcmp(name,"SurfaceforcingsIspdd")==0) return SurfaceforcingsIspddEnum; 464 465 else stage=5; 465 466 } -
issm/trunk/src/c/modules/modules.h
r11995 r12293 93 93 #include "./ConstraintsStatex/ConstraintsStatex.h" 94 94 #include "./PointCloudFindNeighborsx/PointCloudFindNeighborsx.h" 95 #include "./PositiveDegreeDayx/PositiveDegreeDayx.h" 95 96 #include "./PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h" 96 97 #include "./Dakotax/Dakotax.h" … … 122 123 #include "./VecMergex/VecMergex.h" 123 124 125 124 126 #endif -
issm/trunk/src/c/objects/Elements/Penta.cpp
r11995 r12293 2434 2434 // PDD and PD constants and variables 2435 2435 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 2436 double siglimc=0, siglim0, siglim0c; 2436 double signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day 2437 double siglimc, siglim0, siglim0c; 2437 2438 double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 2438 2439 double DT = 0.02; … … 2480 2481 /*Get material parameters :*/ 2481 2482 rho_ice=matpar->GetRhoIce(); 2482 rho_water=matpar->GetRhoWater(); 2483 density=rho_ice/rho_water; 2483 //rho_freshwater=matpar->GetRhoWater(); 2484 2484 2485 sconv=( rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months2485 sconv=(1000/rho_ice)/12.; //rhow_rain/rhoi / 12 months 2486 2486 2487 2487 /*PDD constant*/ 2488 2488 siglim = 2.5*signorm; 2489 siglimc = 2.5*signormc 2489 2490 siglim0 = siglim/DT + 0.5; 2490 2491 siglim0c = siglimc/DT + 0.5; -
issm/trunk/src/c/objects/Elements/Tria.cpp
r11995 r12293 2238 2238 2239 2239 int i,iqj,imonth; 2240 double agd[NUMVERTICES]; // surface and basal2240 double agd[NUMVERTICES]; // surface mass balance 2241 2241 double saccu[NUMVERTICES] = {0}; // yearly surface accumulation 2242 2242 double smelt[NUMVERTICES] = {0}; // yearly melt … … 2247 2247 double sconv; //rhow_rain/rhoi / 12 months 2248 2248 2249 double 2250 double lapser=6.5/1000, sealev=0; // lapse rate. degrees per meter. 2251 double desfac = 0.5; // desert elevation factor2252 double s0p[NUMVERTICES]={0}; // should be set to elevation from precip source2253 double s0t[NUMVERTICES]={0}; // should be set to elevation from temperature source2249 double rho_water,rho_ice,density; 2250 double lapser=6.5/1000, sealev=0; // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper 2251 double desfac = 0.5; // desert elevation factor 2252 double s0p[NUMVERTICES]={0}; // should be set to elevation from precip source 2253 double s0t[NUMVERTICES]={0}; // should be set to elevation from temperature source 2254 2254 double st; // elevation between altitude of the temp record and current altitude 2255 2255 double sp; // elevation between altitude of the prec record and current altitude … … 2258 2258 // PDD and PD constants and variables 2259 2259 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 2260 double siglimc=0, siglim0, siglim0c; 2260 double signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day 2261 double siglimc, siglim0, siglim0c; 2261 2262 double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 2262 2263 double DT = 0.02; … … 2275 2276 2276 2277 double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES] 2277 double t[NUMVERTICES ][12],prec[NUMVERTICES][12];2278 double t[NUMVERTICES+1][12],prec[NUMVERTICES+1][12]; 2278 2279 double deltm=1/12; 2279 2280 int ismon[12]={12,1,2,3,4,5,6,7,8,9,10,11}; … … 2304 2305 /*Get material parameters :*/ 2305 2306 rho_ice=matpar->GetRhoIce(); 2306 rho_water=matpar->GetRhoWater(); 2307 density=rho_ice/rho_water; 2307 //rho_freshwater=matpar->GetRhoWater(); 2308 2308 2309 sconv=( rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months2309 sconv=(1000/rho_ice)/12.; //rhow_rain/rhoi / 12 months 2310 2310 2311 2311 /*PDD constant*/ 2312 2312 siglim = 2.5*signorm; 2313 siglimc = 2.5*signormc 2313 2314 siglim0 = siglim/DT + 0.5; 2314 2315 siglim0c = siglimc/DT + 0.5; … … 2335 2336 else {q = 1.0;} 2336 2337 2337 qmt[i]= qmt[i] + prec[i][imonth]*sconv; //*sconv to convert in m of ice equivalent 2338 qmt[i]= qmt[i] + prec[i][imonth]*sconv; //*sconv to convert in m of ice equivalent per month 2338 2339 qmpt= q*prec[i][imonth]*sconv; 2339 2340 qmp[i]= qmp[i] + qmpt; -
issm/trunk/src/c/solutions/prognostic_core.cpp
r11995 r12293 16 16 /*parameters: */ 17 17 bool save_results; 18 bool ispdd; 18 19 19 20 /*activate formulation: */ … … 22 23 /*recover parameters: */ 23 24 femmodel->parameters->FindParam(&save_results,SaveResultsEnum); 25 femmodel->parameters->FindParam(&ispdd,SurfaceforcingsIspddEnum); 26 27 if(ispdd){ 28 _printf_(VerboseSolution()," call positive degree day module\n"); 29 PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters); 30 } 24 31 25 32 _printf_(VerboseSolution()," call computational core\n"); 26 33 solver_linear(femmodel); 27 34 28 35 if(save_results){ 29 36 _printf_(VerboseSolution()," saving results\n"); -
issm/trunk/src/m/classes/surfaceforcings.m
r11995 r12293 8 8 precipitation = NaN; 9 9 mass_balance = NaN; 10 ispdd = NaN; 10 11 end 11 12 methods … … 19 20 end % }}} 20 21 function obj = setdefaultparameters(obj) % {{{ 22 23 %pdd methode not use in default mode 24 obj.ispdd=0; 21 25 22 26 end % }}} … … 29 33 checkfield(md,'surfaceforcings.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1); 30 34 end 35 if (ismember(PrognosticAnalysisEnum,analyses) & md.surfaceforcings.ispdd), 36 checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]); 37 end 31 38 end % }}} 32 39 function disp(obj) % {{{ … … 35 42 fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]'); 36 43 fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]'); 44 fielddisplay(obj,'ispdd','is pdd activated (0 or 1, default is 0)'); 37 45 38 46 end % }}} … … 40 48 WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1); 41 49 WriteData(fid,'object',obj,'fieldname','mass_balance','format','DoubleMat','mattype',1); 50 WriteData(fid,'object',obj,'fieldname','ispdd','format','Boolean'); 51 42 52 end % }}} 43 53 end -
issm/trunk/src/m/enum/EnumToModelField.m
r11988 r12293 21 21 case InversionVyObsEnum(), string='vy_obs'; return 22 22 case BasalforcingsMeltingRateEnum(), string='basal_melting_rate'; return 23 case SurfaceforcingsAccumulationRateEnum(), string='surface_accumulation_rate'; return24 case SurfaceforcingsAblationRateEnum(), string='surface_ablation_rate'; return25 23 case SurfaceforcingsMassBalanceEnum(), string='surface_mass_balance'; return 26 24 otherwise, error(['Enum ' num2str(enum) ' not found associated to any model field']); -
issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
r11527 r12293 58 58 %segment on Neumann (Ice Front) 59 59 pos=find(vertexonicefront(md.mesh.segments(:,1)) | vertexonicefront(md.mesh.segments(:,2))); 60 60 61 if (md.mesh.dimension==2) 61 62 pressureload=md.mesh.segments(pos,:); … … 106 107 disp(' no thermal boundary conditions created: no observed temperature found'); 107 108 end 109
Note:
See TracChangeset
for help on using the changeset viewer.