[19528] | 1 | #include "./SmbAnalysis.h"
|
---|
| 2 | #include "../toolkits/toolkits.h"
|
---|
| 3 | #include "../classes/classes.h"
|
---|
| 4 | #include "../shared/shared.h"
|
---|
| 5 | #include "../modules/modules.h"
|
---|
| 6 |
|
---|
| 7 | /*Model processing*/
|
---|
| 8 | void SmbAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
|
---|
| 9 | /*No constraints*/
|
---|
| 10 | }/*}}}*/
|
---|
| 11 | void SmbAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/
|
---|
| 12 | /*No loads*/
|
---|
| 13 | }/*}}}*/
|
---|
| 14 | void SmbAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel){/*{{{*/
|
---|
| 15 | ::CreateNodes(nodes,iomodel,SmbAnalysisEnum,P1Enum);
|
---|
| 16 | }/*}}}*/
|
---|
| 17 | int SmbAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/
|
---|
| 18 | return 1;
|
---|
| 19 | }/*}}}*/
|
---|
| 20 | void SmbAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
|
---|
| 21 |
|
---|
| 22 | int smb_model;
|
---|
[22448] | 23 | bool isdelta18o,ismungsm,isd18opd,issetpddfac;
|
---|
[19528] | 24 |
|
---|
| 25 | /*Update elements: */
|
---|
| 26 | int counter=0;
|
---|
| 27 | for(int i=0;i<iomodel->numberofelements;i++){
|
---|
| 28 | if(iomodel->my_elements[i]){
|
---|
| 29 | Element* element=(Element*)elements->GetObjectByOffset(counter);
|
---|
| 30 | element->Update(i,iomodel,analysis_counter,analysis_type,P1Enum);
|
---|
| 31 | counter++;
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
| 34 |
|
---|
[19554] | 35 | /*Figure out smb model: */
|
---|
[20690] | 36 | iomodel->FindConstant(&smb_model,"md.smb.model");
|
---|
[19554] | 37 |
|
---|
[19528] | 38 | switch(smb_model){
|
---|
| 39 | case SMBforcingEnum:
|
---|
[20690] | 40 | iomodel->FetchDataToInput(elements,"md.smb.mass_balance",SmbMassBalanceEnum,0.);
|
---|
[19528] | 41 | break;
|
---|
[19554] | 42 | case SMBgembEnum:
|
---|
[20690] | 43 | iomodel->FetchDataToInput(elements,"md.smb.Ta",SmbTaEnum);
|
---|
| 44 | iomodel->FetchDataToInput(elements,"md.smb.V",SmbVEnum);
|
---|
| 45 | iomodel->FetchDataToInput(elements,"md.smb.dswrf",SmbDswrfEnum);
|
---|
| 46 | iomodel->FetchDataToInput(elements,"md.smb.dlwrf",SmbDlwrfEnum);
|
---|
| 47 | iomodel->FetchDataToInput(elements,"md.smb.P",SmbPEnum);
|
---|
| 48 | iomodel->FetchDataToInput(elements,"md.smb.eAir",SmbEAirEnum);
|
---|
| 49 | iomodel->FetchDataToInput(elements,"md.smb.pAir",SmbPAirEnum);
|
---|
| 50 | iomodel->FetchDataToInput(elements,"md.smb.zTop",SmbZTopEnum);
|
---|
| 51 | iomodel->FetchDataToInput(elements,"md.smb.dzTop",SmbDzTopEnum);
|
---|
| 52 | iomodel->FetchDataToInput(elements,"md.smb.dzMin",SmbDzMinEnum);
|
---|
| 53 | iomodel->FetchDataToInput(elements,"md.smb.zY",SmbZYEnum);
|
---|
| 54 | iomodel->FetchDataToInput(elements,"md.smb.zMax",SmbZMaxEnum);
|
---|
| 55 | iomodel->FetchDataToInput(elements,"md.smb.zMin",SmbZMinEnum);
|
---|
| 56 | iomodel->FetchDataToInput(elements,"md.smb.Tmean",SmbTmeanEnum);
|
---|
| 57 | iomodel->FetchDataToInput(elements,"md.smb.C",SmbCEnum);
|
---|
| 58 | iomodel->FetchDataToInput(elements,"md.smb.Tz",SmbTzEnum);
|
---|
| 59 | iomodel->FetchDataToInput(elements,"md.smb.Vz",SmbVzEnum);
|
---|
[21232] | 60 | InputUpdateFromConstantx(elements,0.,SmbIsInitializedEnum);
|
---|
| 61 | iomodel->FetchDataToInput(elements,"md.smb.Dzini",SmbDziniEnum);
|
---|
| 62 | iomodel->FetchDataToInput(elements,"md.smb.Dini",SmbDiniEnum);
|
---|
| 63 | iomodel->FetchDataToInput(elements,"md.smb.Reini",SmbReiniEnum);
|
---|
| 64 | iomodel->FetchDataToInput(elements,"md.smb.Gdnini",SmbGdniniEnum);
|
---|
| 65 | iomodel->FetchDataToInput(elements,"md.smb.Gspini",SmbGspiniEnum);
|
---|
| 66 | iomodel->FetchDataToInput(elements,"md.smb.ECini",SmbECiniEnum);
|
---|
| 67 | iomodel->FetchDataToInput(elements,"md.smb.Wini",SmbWiniEnum);
|
---|
| 68 | iomodel->FetchDataToInput(elements,"md.smb.Aini",SmbAiniEnum);
|
---|
| 69 | iomodel->FetchDataToInput(elements,"md.smb.Tini",SmbTiniEnum);
|
---|
| 70 | iomodel->FetchDataToInput(elements,"md.smb.Sizeini",SmbSizeiniEnum);
|
---|
[22450] | 71 | iomodel->FetchDataToInput(elements,"md.smb.aValue",SmbAValueEnum);
|
---|
| 72 | iomodel->FetchDataToInput(elements,"md.smb.teValue",SmbTeValueEnum);
|
---|
[19554] | 73 | break;
|
---|
[19528] | 74 | case SMBpddEnum:
|
---|
[20690] | 75 | iomodel->FindConstant(&isdelta18o,"md.smb.isdelta18o");
|
---|
| 76 | iomodel->FindConstant(&ismungsm,"md.smb.ismungsm");
|
---|
| 77 | iomodel->FetchDataToInput(elements,"md.thermal.spctemperature",ThermalSpctemperatureEnum);
|
---|
| 78 | iomodel->FetchDataToInput(elements,"md.smb.s0p",SmbS0pEnum);
|
---|
| 79 | iomodel->FetchDataToInput(elements,"md.smb.s0t",SmbS0tEnum);
|
---|
[19528] | 80 | if(isdelta18o || ismungsm){
|
---|
[20690] | 81 | iomodel->FetchDataToInput(elements,"md.smb.temperatures_lgm",SmbTemperaturesLgmEnum);
|
---|
| 82 | iomodel->FetchDataToInput(elements,"md.smb.temperatures_presentday",SmbTemperaturesPresentdayEnum);
|
---|
| 83 | iomodel->FetchDataToInput(elements,"md.smb.precipitations_presentday",SmbPrecipitationsPresentdayEnum);
|
---|
| 84 | iomodel->FetchDataToInput(elements,"md.smb.precipitations_lgm",SmbPrecipitationsLgmEnum);
|
---|
[19528] | 85 | }
|
---|
| 86 | else{
|
---|
[20690] | 87 | iomodel->FetchDataToInput(elements,"md.smb.precipitation",SmbPrecipitationEnum);
|
---|
| 88 | iomodel->FetchDataToInput(elements,"md.smb.monthlytemperatures",SmbMonthlytemperaturesEnum);
|
---|
[19528] | 89 | }
|
---|
| 90 | break;
|
---|
| 91 | case SMBd18opddEnum:
|
---|
[20690] | 92 | iomodel->FindConstant(&ismungsm,"md.smb.ismungsm");
|
---|
| 93 | iomodel->FindConstant(&isd18opd,"md.smb.isd18opd");
|
---|
[22448] | 94 | iomodel->FindConstant(&issetpddfac,"md.smb.issetpddfac");
|
---|
[20690] | 95 | iomodel->FetchDataToInput(elements,"md.thermal.spctemperature",ThermalSpctemperatureEnum);
|
---|
| 96 | iomodel->FetchDataToInput(elements,"md.smb.s0p",SmbS0pEnum);
|
---|
| 97 | iomodel->FetchDataToInput(elements,"md.smb.s0t",SmbS0tEnum);
|
---|
| 98 | if(isd18opd){
|
---|
| 99 | iomodel->FetchDataToInput(elements,"md.smb.temperatures_presentday",SmbTemperaturesPresentdayEnum);
|
---|
| 100 | iomodel->FetchDataToInput(elements,"md.smb.precipitations_presentday",SmbPrecipitationsPresentdayEnum);
|
---|
[19528] | 101 | }
|
---|
[22448] | 102 | if(issetpddfac){
|
---|
| 103 | iomodel->FetchDataToInput(elements,"md.smb.pddfac_snow",SmbPddfacSnowEnum,-1.);
|
---|
| 104 | iomodel->FetchDataToInput(elements,"md.smb.pddfac_ice",SmbPddfacIceEnum,-1.);
|
---|
| 105 | }
|
---|
[19528] | 106 | break;
|
---|
| 107 | case SMBgradientsEnum:
|
---|
[20690] | 108 | iomodel->FetchDataToInput(elements,"md.smb.href",SmbHrefEnum);
|
---|
| 109 | iomodel->FetchDataToInput(elements,"md.smb.smbref",SmbSmbrefEnum);
|
---|
| 110 | iomodel->FetchDataToInput(elements,"md.smb.b_pos",SmbBPosEnum);
|
---|
| 111 | iomodel->FetchDataToInput(elements,"md.smb.b_neg",SmbBNegEnum);
|
---|
[19528] | 112 | break;
|
---|
[21469] | 113 | case SMBgradientselaEnum:
|
---|
| 114 | iomodel->FetchDataToInput(elements,"md.smb.ela",SmbElaEnum);
|
---|
| 115 | iomodel->FetchDataToInput(elements,"md.smb.b_pos",SmbBPosEnum);
|
---|
| 116 | iomodel->FetchDataToInput(elements,"md.smb.b_neg",SmbBNegEnum);
|
---|
| 117 | iomodel->FetchDataToInput(elements,"md.smb.b_max",SmbBMaxEnum);
|
---|
| 118 | iomodel->FetchDataToInput(elements,"md.smb.b_min",SmbBMinEnum);
|
---|
| 119 | break;
|
---|
[19528] | 120 | case SMBhenningEnum:
|
---|
[20690] | 121 | iomodel->FetchDataToInput(elements,"md.smb.smbref",SmbSmbrefEnum,0.);
|
---|
[19528] | 122 | break;
|
---|
| 123 | case SMBcomponentsEnum:
|
---|
[20690] | 124 | iomodel->FetchDataToInput(elements,"md.smb.accumulation",SmbAccumulationEnum,0.);
|
---|
| 125 | iomodel->FetchDataToInput(elements,"md.smb.evaporation",SmbEvaporationEnum,0.);
|
---|
| 126 | iomodel->FetchDataToInput(elements,"md.smb.runoff",SmbRunoffEnum,0.);
|
---|
[19528] | 127 | break;
|
---|
| 128 | case SMBmeltcomponentsEnum:
|
---|
[20690] | 129 | iomodel->FetchDataToInput(elements,"md.smb.accumulation",SmbAccumulationEnum,0.);
|
---|
| 130 | iomodel->FetchDataToInput(elements,"md.smb.evaporation",SmbEvaporationEnum,0.);
|
---|
| 131 | iomodel->FetchDataToInput(elements,"md.smb.melt",SmbMeltEnum,0.);
|
---|
| 132 | iomodel->FetchDataToInput(elements,"md.smb.refreeze",SmbRefreezeEnum,0.);
|
---|
[19528] | 133 | break;
|
---|
| 134 | default:
|
---|
| 135 | _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet");
|
---|
| 136 | }
|
---|
[19554] | 137 |
|
---|
| 138 |
|
---|
[19528] | 139 |
|
---|
| 140 | }/*}}}*/
|
---|
| 141 | void SmbAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/
|
---|
| 142 |
|
---|
| 143 | int numoutputs;
|
---|
| 144 | char** requestedoutputs = NULL;
|
---|
[22448] | 145 | bool isdelta18o,ismungsm,isd18opd,issetpddfac,interp;
|
---|
[19528] | 146 | int smb_model;
|
---|
| 147 | IssmDouble *temp = NULL;
|
---|
| 148 | int N,M;
|
---|
| 149 |
|
---|
[20690] | 150 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.model",SmbEnum));
|
---|
[19528] | 151 |
|
---|
[20690] | 152 | iomodel->FindConstant(&smb_model,"md.smb.model");
|
---|
| 153 | iomodel->FindConstant(&interp,"md.timestepping.interp_forcings");
|
---|
[19528] | 154 |
|
---|
| 155 | switch(smb_model){
|
---|
| 156 | case SMBforcingEnum:
|
---|
| 157 | /*Nothing to add to parameters*/
|
---|
| 158 | break;
|
---|
[19554] | 159 | case SMBgembEnum:
|
---|
[20690] | 160 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.aIdx",SmbAIdxEnum));
|
---|
| 161 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.swIdx",SmbSwIdxEnum));
|
---|
| 162 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.denIdx",SmbDenIdxEnum));
|
---|
| 163 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.cldFrac",SmbCldFracEnum));
|
---|
| 164 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.t0wet",SmbT0wetEnum));
|
---|
| 165 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.t0dry",SmbT0dryEnum));
|
---|
| 166 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.K",SmbKEnum));
|
---|
| 167 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.aSnow",SmbASnowEnum));
|
---|
| 168 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.aIce",SmbAIceEnum));
|
---|
| 169 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.dt",SmbDtEnum));
|
---|
| 170 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isgraingrowth",SmbIsgraingrowthEnum));
|
---|
| 171 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isalbedo",SmbIsalbedoEnum));
|
---|
| 172 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isshortwave",SmbIsshortwaveEnum));
|
---|
| 173 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isthermal",SmbIsthermalEnum));
|
---|
| 174 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isaccumulation",SmbIsaccumulationEnum));
|
---|
| 175 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.ismelt",SmbIsmeltEnum));
|
---|
| 176 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isdensification",SmbIsdensificationEnum));
|
---|
| 177 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isturbulentflux",SmbIsturbulentfluxEnum));
|
---|
| 178 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.InitDensityScaling",SmbInitDensityScalingEnum));
|
---|
[22475] | 179 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.ThermoDeltaTScaling",SmbThermoDeltaTScalingEnum));
|
---|
[22482] | 180 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.adThresh",SmbAdThreshEnum));
|
---|
[19554] | 181 | break;
|
---|
[19528] | 182 | case SMBpddEnum:
|
---|
[20690] | 183 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isdelta18o",SmbIsdelta18oEnum));
|
---|
| 184 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.ismungsm",SmbIsmungsmEnum));
|
---|
[22448] | 185 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.issetpddfac",SmbIssetpddfacEnum));
|
---|
[20690] | 186 | iomodel->FindConstant(&isdelta18o,"md.smb.isdelta18o");
|
---|
| 187 | iomodel->FindConstant(&ismungsm,"md.smb.ismungsm");
|
---|
[19528] | 188 |
|
---|
| 189 | if(ismungsm){
|
---|
[20690] | 190 | iomodel->FetchData(&temp,&N,&M,"md.smb.Pfac"); _assert_(N==2);
|
---|
[19528] | 191 | parameters->AddObject(new TransientParam(SmbPfacEnum,&temp[0],&temp[M],interp,M));
|
---|
[20690] | 192 | iomodel->DeleteData(temp,"md.smb.Pfac");
|
---|
[19528] | 193 |
|
---|
[20690] | 194 | iomodel->FetchData(&temp,&N,&M,"md.smb.Tdiff"); _assert_(N==2);
|
---|
[19528] | 195 | parameters->AddObject(new TransientParam(SmbTdiffEnum,&temp[0],&temp[M],interp,M));
|
---|
[20690] | 196 | iomodel->DeleteData(temp,"md.smb.Tdiff");
|
---|
[19528] | 197 |
|
---|
[20690] | 198 | iomodel->FetchData(&temp,&N,&M,"md.smb.sealev"); _assert_(N==2);
|
---|
[19528] | 199 | parameters->AddObject(new TransientParam(SmbSealevEnum,&temp[0],&temp[M],interp,M));
|
---|
[20690] | 200 | iomodel->DeleteData(temp,"md.smb.sealev");
|
---|
[19528] | 201 | }
|
---|
| 202 | if(isdelta18o){
|
---|
[20690] | 203 | iomodel->FetchData(&temp,&N,&M,"md.smb.delta18o"); _assert_(N==2);
|
---|
[19528] | 204 | parameters->AddObject(new TransientParam(SmbDelta18oEnum,&temp[0],&temp[M],interp,M));
|
---|
[20690] | 205 | iomodel->DeleteData(temp,"md.smb.delta18o");
|
---|
[19528] | 206 |
|
---|
[20690] | 207 | iomodel->FetchData(&temp,&N,&M,"md.smb.delta18o_surface"); _assert_(N==2);
|
---|
[19528] | 208 | parameters->AddObject(new TransientParam(SmbDelta18oSurfaceEnum,&temp[0],&temp[M],interp,M));
|
---|
[20690] | 209 | iomodel->DeleteData(temp,"md.smb.delta18o_surface");
|
---|
[19528] | 210 | }
|
---|
| 211 | break;
|
---|
| 212 | case SMBd18opddEnum:
|
---|
[20690] | 213 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.ismungsm",SmbIsmungsmEnum));
|
---|
| 214 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.isd18opd",SmbIsd18opdEnum));
|
---|
[22448] | 215 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.issetpddfac",SmbIssetpddfacEnum));
|
---|
[20690] | 216 | iomodel->FindConstant(&ismungsm,"md.smb.ismungsm");
|
---|
| 217 | iomodel->FindConstant(&isd18opd,"md.smb.isd18opd");
|
---|
[22448] | 218 | iomodel->FindConstant(&issetpddfac,"md.smb.issetpddfac");
|
---|
[19528] | 219 | if(isd18opd){
|
---|
[22608] | 220 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.f",SmbFEnum));
|
---|
[22495] | 221 | parameters->AddObject(iomodel->CopyConstantObject("md.smb.istemperaturescaled",SmbIstemperaturescaledEnum));
|
---|
[20690] | 222 | iomodel->FetchData(&temp,&N,&M,"md.smb.delta18o"); _assert_(N==2);
|
---|
[19528] | 223 | parameters->AddObject(new TransientParam(SmbDelta18oEnum,&temp[0],&temp[M],interp,M));
|
---|
[20690] | 224 | iomodel->DeleteData(temp,"md.smb.delta18o");
|
---|
[19528] | 225 | }
|
---|
| 226 | break;
|
---|
| 227 | case SMBgradientsEnum:
|
---|
| 228 | /*Nothing to add to parameters*/
|
---|
| 229 | break;
|
---|
[21469] | 230 | case SMBgradientselaEnum:
|
---|
| 231 | /*Nothing to add to parameters*/
|
---|
| 232 | break;
|
---|
[19528] | 233 | case SMBhenningEnum:
|
---|
| 234 | /*Nothing to add to parameters*/
|
---|
| 235 | break;
|
---|
| 236 | case SMBcomponentsEnum:
|
---|
| 237 | /*Nothing to add to parameters*/
|
---|
| 238 | break;
|
---|
| 239 | case SMBmeltcomponentsEnum:
|
---|
| 240 | /*Nothing to add to parameters*/
|
---|
| 241 | break;
|
---|
| 242 | default:
|
---|
| 243 | _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet");
|
---|
| 244 | }
|
---|
| 245 |
|
---|
[20690] | 246 | iomodel->FindConstant(&requestedoutputs,&numoutputs,"md.smb.requested_outputs");
|
---|
[19528] | 247 | parameters->AddObject(new IntParam(SmbNumRequestedOutputsEnum,numoutputs));
|
---|
| 248 | if(numoutputs)parameters->AddObject(new StringArrayParam(SmbRequestedOutputsEnum,requestedoutputs,numoutputs));
|
---|
[20690] | 249 | iomodel->DeleteData(&requestedoutputs,numoutputs,"md.smb.requested_outputs");
|
---|
[19528] | 250 |
|
---|
| 251 | }/*}}}*/
|
---|
| 252 |
|
---|
| 253 | /*Finite Element Analysis*/
|
---|
| 254 | void SmbAnalysis::Core(FemModel* femmodel){/*{{{*/
|
---|
| 255 |
|
---|
| 256 | int smb_model;
|
---|
| 257 |
|
---|
| 258 | /*Figure out smb model: */
|
---|
| 259 | femmodel->parameters->FindParam(&smb_model,SmbEnum);
|
---|
| 260 |
|
---|
| 261 | /*branch to correct module*/
|
---|
| 262 | switch(smb_model){
|
---|
| 263 | case SMBforcingEnum:
|
---|
| 264 | /*Nothing to be done*/
|
---|
| 265 | break;
|
---|
[19554] | 266 | case SMBgembEnum:
|
---|
| 267 | Gembx(femmodel);
|
---|
| 268 | break;
|
---|
[19528] | 269 | case SMBpddEnum:
|
---|
| 270 | bool isdelta18o,ismungsm;
|
---|
| 271 | femmodel->parameters->FindParam(&isdelta18o,SmbIsdelta18oEnum);
|
---|
| 272 | femmodel->parameters->FindParam(&ismungsm,SmbIsmungsmEnum);
|
---|
| 273 | if(isdelta18o){
|
---|
| 274 | if(VerboseSolution()) _printf0_(" call Delta18oParameterization module\n");
|
---|
| 275 | Delta18oParameterizationx(femmodel);
|
---|
| 276 | }
|
---|
| 277 | if(ismungsm){
|
---|
| 278 | if(VerboseSolution()) _printf0_(" call MungsmtpParameterization module\n");
|
---|
| 279 | MungsmtpParameterizationx(femmodel);
|
---|
| 280 | }
|
---|
| 281 | if(VerboseSolution()) _printf0_(" call positive degree day module\n");
|
---|
| 282 | PositiveDegreeDayx(femmodel);
|
---|
| 283 | break;
|
---|
| 284 | case SMBd18opddEnum:
|
---|
| 285 | bool isd18opd;
|
---|
| 286 | femmodel->parameters->FindParam(&isd18opd,SmbIsd18opdEnum);
|
---|
| 287 | if(isd18opd){
|
---|
| 288 | if(VerboseSolution()) _printf0_(" call Delta18opdParameterization module\n");
|
---|
| 289 | Delta18opdParameterizationx(femmodel);
|
---|
| 290 | if(VerboseSolution()) _printf0_(" call positive degree day module\n");
|
---|
| 291 | PositiveDegreeDayx(femmodel);
|
---|
| 292 | }
|
---|
| 293 | break;
|
---|
| 294 | case SMBgradientsEnum:
|
---|
| 295 | if(VerboseSolution())_printf0_(" call smb gradients module\n");
|
---|
| 296 | SmbGradientsx(femmodel);
|
---|
| 297 | break;
|
---|
[21469] | 298 | case SMBgradientselaEnum:
|
---|
| 299 | if(VerboseSolution())_printf0_(" call smb gradients ela module\n");
|
---|
| 300 | SmbGradientsElax(femmodel);
|
---|
| 301 | break;
|
---|
[19528] | 302 | case SMBhenningEnum:
|
---|
| 303 | if(VerboseSolution())_printf0_(" call smb Henning module\n");
|
---|
| 304 | SmbHenningx(femmodel);
|
---|
| 305 | break;
|
---|
| 306 | case SMBcomponentsEnum:
|
---|
| 307 | if(VerboseSolution())_printf0_(" call smb Components module\n");
|
---|
| 308 | SmbComponentsx(femmodel);
|
---|
| 309 | break;
|
---|
| 310 | case SMBmeltcomponentsEnum:
|
---|
| 311 | if(VerboseSolution())_printf0_(" call smb Melt Components module\n");
|
---|
| 312 | SmbMeltComponentsx(femmodel);
|
---|
| 313 | break;
|
---|
| 314 | case SMBgcmEnum:
|
---|
| 315 | /*Nothing to be done*/
|
---|
| 316 | break;
|
---|
| 317 | default:
|
---|
| 318 | _error_("Surface mass balance model "<<EnumToStringx(smb_model)<<" not supported yet");
|
---|
| 319 | }
|
---|
| 320 |
|
---|
| 321 | }/*}}}*/
|
---|
| 322 | ElementVector* SmbAnalysis::CreateDVector(Element* element){/*{{{*/
|
---|
| 323 | _error_("not implemented");
|
---|
| 324 | }/*}}}*/
|
---|
| 325 | ElementMatrix* SmbAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/
|
---|
| 326 | _error_("Not implemented");
|
---|
| 327 | }/*}}}*/
|
---|
| 328 | ElementMatrix* SmbAnalysis::CreateKMatrix(Element* element){/*{{{*/
|
---|
| 329 | _error_("not implemented yet");
|
---|
| 330 | }/*}}}*/
|
---|
| 331 | ElementVector* SmbAnalysis::CreatePVector(Element* element){/*{{{*/
|
---|
| 332 | _error_("not implemented yet");
|
---|
| 333 | }/*}}}*/
|
---|
| 334 | void SmbAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
|
---|
| 335 | _error_("not implemented yet");
|
---|
| 336 | }/*}}}*/
|
---|
| 337 | void SmbAnalysis::GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_index){/*{{{*/
|
---|
| 338 | _error_("Not implemented yet");
|
---|
| 339 | }/*}}}*/
|
---|
| 340 | void SmbAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/
|
---|
| 341 | _error_("not implemented yet");
|
---|
| 342 | }/*}}}*/
|
---|
| 343 | void SmbAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/
|
---|
| 344 | /*Default, do nothing*/
|
---|
| 345 | return;
|
---|
| 346 | }/*}}}*/
|
---|