[13394] | 1 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh (revision 12747)
|
---|
| 4 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh (revision 12748)
|
---|
| 5 | @@ -4,12 +4,14 @@
|
---|
| 6 | rm -rf install
|
---|
| 7 |
|
---|
| 8 | #Select or create a new simlink
|
---|
| 9 | -ln -s /usr/local/pkgs/matlab-7.6/ install
|
---|
| 10 | +#ln -s /usr/local/pkgs/matlab-7.6/ install
|
---|
| 11 | #ln -s /discover/vis/mathworks/matlab_r2011b/ install
|
---|
| 12 | #ln -s /usr/local/matlab704/ install
|
---|
| 13 | #ln -s /usr/local/matlab711/ install
|
---|
| 14 | #ln -s /usr/local/matlab712/ install
|
---|
| 15 |
|
---|
| 16 | +ln -s /home/kevin/perso.dir/matlab10 install
|
---|
| 17 | +
|
---|
| 18 | # Macintosh (OSX) simlink
|
---|
| 19 | #ln -s /Applications/MATLAB_R2008a/ install
|
---|
| 20 | #ln -s /Applications/MATLAB_R2009a.app/ install
|
---|
| 21 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp
|
---|
| 22 | ===================================================================
|
---|
| 23 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp (revision 12747)
|
---|
| 24 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp (revision 12748)
|
---|
| 25 | @@ -15,7 +15,6 @@
|
---|
| 26 |
|
---|
| 27 | /*parameters: */
|
---|
| 28 | bool save_results;
|
---|
| 29 | - bool ispdd;
|
---|
| 30 | bool issmbgradients;
|
---|
| 31 |
|
---|
| 32 | /*activate formulation: */
|
---|
| 33 | @@ -23,13 +22,8 @@
|
---|
| 34 |
|
---|
| 35 | /*recover parameters: */
|
---|
| 36 | femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
|
---|
| 37 | - femmodel->parameters->FindParam(&ispdd,SurfaceforcingsIspddEnum);
|
---|
| 38 | femmodel->parameters->FindParam(&issmbgradients,SurfaceforcingsIssmbgradientsEnum);
|
---|
| 39 |
|
---|
| 40 | - if(ispdd){
|
---|
| 41 | - if(VerboseSolution()) _pprintLine_(" call positive degree day module");
|
---|
| 42 | - PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
|
---|
| 43 | - }
|
---|
| 44 |
|
---|
| 45 | if(issmbgradients){
|
---|
| 46 | _printf_(VerboseSolution()," call smb gradients module\n");
|
---|
| 47 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp
|
---|
| 48 | ===================================================================
|
---|
| 49 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp (revision 12747)
|
---|
| 50 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp (revision 12748)
|
---|
| 51 | @@ -23,7 +23,7 @@
|
---|
| 52 |
|
---|
| 53 | /*parameters: */
|
---|
| 54 | IssmDouble starttime,finaltime,dt,yts;
|
---|
| 55 | - bool isdiagnostic,isprognostic,isthermal,isgroundingline,isenthalpy;
|
---|
| 56 | + bool isdiagnostic,isprognostic,isthermal,isgroundingline,isenthalpy,ispdd,isdelta18o;
|
---|
| 57 | bool save_results,dakota_analysis;
|
---|
| 58 | bool time_adapt=false;
|
---|
| 59 | int output_frequency;
|
---|
| 60 | @@ -52,6 +52,8 @@
|
---|
| 61 | if(isgroundingline) femmodel->parameters->FindParam(&groundingline_migration,GroundinglineMigrationEnum);
|
---|
| 62 | femmodel->parameters->FindParam(&numoutputs,TransientNumRequestedOutputsEnum);
|
---|
| 63 | if(numoutputs) femmodel->parameters->FindParam(&requested_outputs,&numoutputs,TransientRequestedOutputsEnum);
|
---|
| 64 | + femmodel->parameters->FindParam(&ispdd,SurfaceforcingsIspddEnum);
|
---|
| 65 | + femmodel->parameters->FindParam(&isdelta18o,SurfaceforcingsIsdelta18oEnum);
|
---|
| 66 |
|
---|
| 67 | /*initialize: */
|
---|
| 68 | step=0;
|
---|
| 69 | @@ -105,6 +107,15 @@
|
---|
| 70 | _error2_("ISSM was not compiled with thermal capabilities. Exiting");
|
---|
| 71 | #endif
|
---|
| 72 | }
|
---|
| 73 | +
|
---|
| 74 | + if(ispdd){
|
---|
| 75 | + if(isdelta18o){
|
---|
| 76 | + if(VerboseSolution()) _pprintLine_(" call Delta18oParametrization module");
|
---|
| 77 | + Delta18oParameterizationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
|
---|
| 78 | + }
|
---|
| 79 | + if(VerboseSolution()) _pprintLine_(" call positive degree day module");
|
---|
| 80 | + PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
|
---|
| 81 | + }
|
---|
| 82 |
|
---|
| 83 | if(isdiagnostic){
|
---|
| 84 | if(VerboseSolution()) _pprintLine_(" computing new velocity");
|
---|
| 85 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h
|
---|
| 86 | ===================================================================
|
---|
| 87 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h (revision 12747)
|
---|
| 88 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h (revision 12748)
|
---|
| 89 | @@ -148,6 +148,12 @@
|
---|
| 90 | SettingsOutputFrequencyEnum,
|
---|
| 91 | SettingsResultsAsPatchesEnum,
|
---|
| 92 | SettingsWaitonlockEnum,
|
---|
| 93 | + SurfaceforcingsDelta18oEnum,
|
---|
| 94 | + SurfaceforcingsDelta18oTemperaturesPresentdayEnum,
|
---|
| 95 | + SurfaceforcingsDelta18oTemperaturesLgmEnum,
|
---|
| 96 | + SurfaceforcingsDelta18oSurfaceEnum,
|
---|
| 97 | + SurfaceforcingsIsdelta18oEnum,
|
---|
| 98 | + SurfaceforcingsPrecipitationsPresentdayEnum,
|
---|
| 99 | DebugProfilingEnum,
|
---|
| 100 | ProfilingCurrentMemEnum,
|
---|
| 101 | ProfilingCurrentFlopsEnum,
|
---|
| 102 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h
|
---|
| 103 | ===================================================================
|
---|
| 104 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h (revision 12747)
|
---|
| 105 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h (revision 12748)
|
---|
| 106 | @@ -12,7 +12,13 @@
|
---|
| 107 |
|
---|
| 108 | IssmDouble Paterson(IssmDouble temperature);
|
---|
| 109 | IssmDouble Arrhenius(IssmDouble temperature,IssmDouble depth,IssmDouble n);
|
---|
| 110 | -IssmDouble PddSurfaceMassBlance(IssmDouble* monthlytemperatures, IssmDouble* monthlyprec, IssmDouble* pdds, IssmDouble* pds, IssmDouble signorm, IssmDouble yts, IssmDouble h, IssmDouble s, IssmDouble rho_ice, IssmDouble rho_water);
|
---|
| 111 | +IssmDouble PddSurfaceMassBlance(IssmDouble* monthlytemperatures, IssmDouble* monthlyprec, IssmDouble* pdds, IssmDouble* pds,
|
---|
| 112 | + IssmDouble signorm, IssmDouble yts, IssmDouble h, IssmDouble s, IssmDouble rho_ice, IssmDouble rho_water);
|
---|
| 113 | +void ComputeDelta18oTemperaturePrecipitation(IssmDouble Delta18oSurfacePresent, IssmDouble Delta18oSurfaceLgm, IssmDouble Delta18oSurfaceTime,
|
---|
| 114 | + IssmDouble Delta18oPresent, IssmDouble Delta18oLgm, IssmDouble Delta18oTime,
|
---|
| 115 | + IssmDouble* PrecipitationsPresentday,
|
---|
| 116 | + IssmDouble* Delta18oTemperaturesLgm, IssmDouble* Delta18oTemperaturesPresentday,
|
---|
| 117 | + IssmDouble* monthlytemperaturesout, IssmDouble* monthlyprecout);
|
---|
| 118 | void GetVerticesCoordinates(IssmDouble* xyz, Node** nodes, int numvertices);
|
---|
| 119 | int GetNumberOfDofs( Node** nodes,int numnodes,int setenum,int approximation_enum);
|
---|
| 120 | int* GetLocalDofList( Node** nodes,int numnodes,int setenum,int approximation_enum);
|
---|
| 121 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp
|
---|
| 122 | ===================================================================
|
---|
| 123 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp (revision 0)
|
---|
| 124 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp (revision 12748)
|
---|
| 125 | @@ -0,0 +1,30 @@
|
---|
| 126 | +/* file: ComputeTemperaturePrecipitation.cpp
|
---|
| 127 | + Compute the temperature and precipitation at time t from
|
---|
| 128 | + the data at present day and delta18O
|
---|
| 129 | + */
|
---|
| 130 | +
|
---|
| 131 | +#include "./elements.h"
|
---|
| 132 | +
|
---|
| 133 | +void ComputeDelta18oTemperaturePrecipitation(IssmDouble Delta18oSurfacePresent, IssmDouble Delta18oSurfaceLgm, IssmDouble Delta18oSurfaceTime,
|
---|
| 134 | + IssmDouble Delta18oPresent, IssmDouble Delta18oLgm, IssmDouble Delta18oTime,
|
---|
| 135 | + IssmDouble* PrecipitationsPresentday,
|
---|
| 136 | + IssmDouble* Delta18oTemperaturesLgm, IssmDouble* Delta18oTemperaturesPresentday,
|
---|
| 137 | + IssmDouble* monthlytemperaturesout, IssmDouble* monthlyprecout){
|
---|
| 138 | +
|
---|
| 139 | + IssmDouble monthlytemperaturestmp[12],monthlyprectmp[12];
|
---|
| 140 | + IssmDouble delta18oLapseRate=-6.2*pow(10.,-3);
|
---|
| 141 | + IssmDouble glacialindex; // used to vary present day temperature
|
---|
| 142 | +
|
---|
| 143 | + glacialindex = (Delta18oTime-Delta18oPresent-delta18oLapseRate*(Delta18oSurfaceTime-Delta18oSurfacePresent))
|
---|
| 144 | + /(Delta18oLgm-Delta18oPresent-delta18oLapseRate*(Delta18oSurfaceLgm-Delta18oSurfacePresent));
|
---|
| 145 | +
|
---|
| 146 | + for (int imonth = 0; imonth<12; imonth++){
|
---|
| 147 | + monthlytemperaturestmp[imonth] = glacialindex*Delta18oTemperaturesLgm[imonth] + (1-glacialindex)*Delta18oTemperaturesPresentday[imonth];
|
---|
| 148 | + monthlyprectmp[imonth] = 1.5*pow(2,((monthlytemperaturestmp[imonth]-0)/10)); //equation from rob's paper
|
---|
| 149 | + /*Assign output pointer*/
|
---|
| 150 | + *(monthlytemperaturesout+imonth) = monthlytemperaturestmp[imonth];
|
---|
| 151 | + *(monthlyprecout+imonth) = monthlyprectmp[imonth];
|
---|
| 152 | + }
|
---|
| 153 | +
|
---|
| 154 | +
|
---|
| 155 | +}
|
---|
| 156 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp
|
---|
| 157 | ===================================================================
|
---|
| 158 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp (revision 12747)
|
---|
| 159 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/PddSurfaceMassBalance.cpp (revision 12748)
|
---|
| 160 | @@ -42,7 +42,7 @@
|
---|
| 161 | IssmDouble pdd = 0.;
|
---|
| 162 | IssmDouble frzndd = 0.;
|
---|
| 163 |
|
---|
| 164 | - IssmDouble tstar; // monthly mean surface temp
|
---|
| 165 | + IssmDouble tstar; // monthly mean surface temp
|
---|
| 166 | IssmDouble Tsum= 0.; // average summer (JJA) temperature
|
---|
| 167 | IssmDouble Tsurf = 0.; // average annual temperature
|
---|
| 168 |
|
---|
| 169 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
|
---|
| 170 | ===================================================================
|
---|
| 171 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp (revision 12747)
|
---|
| 172 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp (revision 12748)
|
---|
| 173 | @@ -157,6 +157,12 @@
|
---|
| 174 | else if (strcmp(name,"SettingsOutputFrequency")==0) return SettingsOutputFrequencyEnum;
|
---|
| 175 | else if (strcmp(name,"SettingsResultsAsPatches")==0) return SettingsResultsAsPatchesEnum;
|
---|
| 176 | else if (strcmp(name,"SettingsWaitonlock")==0) return SettingsWaitonlockEnum;
|
---|
| 177 | + else if (strcmp(name,"SurfaceforcingsDelta18o")==0) return SurfaceforcingsDelta18oEnum;
|
---|
| 178 | + else if (strcmp(name,"SurfaceforcingsDelta18oTemperaturesPresentday")==0) return SurfaceforcingsDelta18oTemperaturesPresentdayEnum;
|
---|
| 179 | + else if (strcmp(name,"SurfaceforcingsDelta18oTemperaturesLgm")==0) return SurfaceforcingsDelta18oTemperaturesLgmEnum;
|
---|
| 180 | + else if (strcmp(name,"SurfaceforcingsDelta18oSurface")==0) return SurfaceforcingsDelta18oSurfaceEnum;
|
---|
| 181 | + else if (strcmp(name,"SurfaceforcingsIsdelta18o")==0) return SurfaceforcingsIsdelta18oEnum;
|
---|
| 182 | + else if (strcmp(name,"SurfaceforcingsPrecipitationsPresentday")==0) return SurfaceforcingsPrecipitationsPresentdayEnum;
|
---|
| 183 | else if (strcmp(name,"DebugProfiling")==0) return DebugProfilingEnum;
|
---|
| 184 | else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum;
|
---|
| 185 | else if (strcmp(name,"ProfilingCurrentFlops")==0) return ProfilingCurrentFlopsEnum;
|
---|
| 186 | @@ -254,16 +260,16 @@
|
---|
| 187 | else if (strcmp(name,"Contour")==0) return ContourEnum;
|
---|
| 188 | else if (strcmp(name,"ControlInput")==0) return ControlInputEnum;
|
---|
| 189 | else if (strcmp(name,"DatasetInput")==0) return DatasetInputEnum;
|
---|
| 190 | - else if (strcmp(name,"DofIndexing")==0) return DofIndexingEnum;
|
---|
| 191 | + else stage=3;
|
---|
| 192 | + }
|
---|
| 193 | + if(stage==3){
|
---|
| 194 | + if (strcmp(name,"DofIndexing")==0) return DofIndexingEnum;
|
---|
| 195 | else if (strcmp(name,"DoubleInput")==0) return DoubleInputEnum;
|
---|
| 196 | else if (strcmp(name,"DoubleMatArrayParam")==0) return DoubleMatArrayParamEnum;
|
---|
| 197 | else if (strcmp(name,"DoubleMatParam")==0) return DoubleMatParamEnum;
|
---|
| 198 | else if (strcmp(name,"DoubleParam")==0) return DoubleParamEnum;
|
---|
| 199 | else if (strcmp(name,"DoubleVecParam")==0) return DoubleVecParamEnum;
|
---|
| 200 | - else stage=3;
|
---|
| 201 | - }
|
---|
| 202 | - if(stage==3){
|
---|
| 203 | - if (strcmp(name,"Element")==0) return ElementEnum;
|
---|
| 204 | + else if (strcmp(name,"Element")==0) return ElementEnum;
|
---|
| 205 | else if (strcmp(name,"ElementResult")==0) return ElementResultEnum;
|
---|
| 206 | else if (strcmp(name,"ExternalResult")==0) return ExternalResultEnum;
|
---|
| 207 | else if (strcmp(name,"FileParam")==0) return FileParamEnum;
|
---|
| 208 | @@ -377,16 +383,16 @@
|
---|
| 209 | else if (strcmp(name,"RheologyBbarAbsGradient")==0) return RheologyBbarAbsGradientEnum;
|
---|
| 210 | else if (strcmp(name,"DragCoefficientAbsGradient")==0) return DragCoefficientAbsGradientEnum;
|
---|
| 211 | else if (strcmp(name,"TransientInput")==0) return TransientInputEnum;
|
---|
| 212 | - else if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum;
|
---|
| 213 | + else stage=4;
|
---|
| 214 | + }
|
---|
| 215 | + if(stage==4){
|
---|
| 216 | + if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum;
|
---|
| 217 | else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum;
|
---|
| 218 | else if (strcmp(name,"Watercolumn")==0) return WatercolumnEnum;
|
---|
| 219 | else if (strcmp(name,"BasalFriction")==0) return BasalFrictionEnum;
|
---|
| 220 | else if (strcmp(name,"ViscousHeating")==0) return ViscousHeatingEnum;
|
---|
| 221 | else if (strcmp(name,"QmuTemperature")==0) return QmuTemperatureEnum;
|
---|
| 222 | - else stage=4;
|
---|
| 223 | - }
|
---|
| 224 | - if(stage==4){
|
---|
| 225 | - if (strcmp(name,"HydrologyWaterVx")==0) return HydrologyWaterVxEnum;
|
---|
| 226 | + else if (strcmp(name,"HydrologyWaterVx")==0) return HydrologyWaterVxEnum;
|
---|
| 227 | else if (strcmp(name,"HydrologyWaterVy")==0) return HydrologyWaterVyEnum;
|
---|
| 228 | else if (strcmp(name,"StressTensor")==0) return StressTensorEnum;
|
---|
| 229 | else if (strcmp(name,"StressTensorxx")==0) return StressTensorxxEnum;
|
---|
| 230 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
|
---|
| 231 | ===================================================================
|
---|
| 232 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp (revision 12747)
|
---|
| 233 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp (revision 12748)
|
---|
| 234 | @@ -153,6 +153,12 @@
|
---|
| 235 | case SettingsOutputFrequencyEnum : return "SettingsOutputFrequency";
|
---|
| 236 | case SettingsResultsAsPatchesEnum : return "SettingsResultsAsPatches";
|
---|
| 237 | case SettingsWaitonlockEnum : return "SettingsWaitonlock";
|
---|
| 238 | + case SurfaceforcingsDelta18oEnum : return "SurfaceforcingsDelta18o";
|
---|
| 239 | + case SurfaceforcingsDelta18oTemperaturesPresentdayEnum : return "SurfaceforcingsDelta18oTemperaturesPresentday";
|
---|
| 240 | + case SurfaceforcingsDelta18oTemperaturesLgmEnum : return "SurfaceforcingsDelta18oTemperaturesLgm";
|
---|
| 241 | + case SurfaceforcingsDelta18oSurfaceEnum : return "SurfaceforcingsDelta18oSurface";
|
---|
| 242 | + case SurfaceforcingsIsdelta18oEnum : return "SurfaceforcingsIsdelta18o";
|
---|
| 243 | + case SurfaceforcingsPrecipitationsPresentdayEnum : return "SurfaceforcingsPrecipitationsPresentday";
|
---|
| 244 | case DebugProfilingEnum : return "DebugProfiling";
|
---|
| 245 | case ProfilingCurrentMemEnum : return "ProfilingCurrentMem";
|
---|
| 246 | case ProfilingCurrentFlopsEnum : return "ProfilingCurrentFlops";
|
---|
| 247 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/modules.h
|
---|
| 248 | ===================================================================
|
---|
| 249 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/modules.h (revision 12747)
|
---|
| 250 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/modules.h (revision 12748)
|
---|
| 251 | @@ -24,6 +24,7 @@
|
---|
| 252 | #include "./CostFunctionx/CostFunctionx.h"
|
---|
| 253 | #include "./CreateNodalConstraintsx/CreateNodalConstraintsx.h"
|
---|
| 254 | #include "./DakotaResponsesx/DakotaResponsesx.h"
|
---|
| 255 | +#include "./Delta18oParameterizationx/Delta18oParameterizationx.h"
|
---|
| 256 | #include "./DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.h"
|
---|
| 257 | #include "./ElementConnectivityx/ElementConnectivityx.h"
|
---|
| 258 | #include "./EnumToStringx/EnumToStringx.h"
|
---|
| 259 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
|
---|
| 260 | ===================================================================
|
---|
| 261 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp (revision 12747)
|
---|
| 262 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp (revision 12748)
|
---|
| 263 | @@ -19,7 +19,6 @@
|
---|
| 264 | int numberofelements;
|
---|
| 265 | int stabilization;
|
---|
| 266 | bool dakota_analysis;
|
---|
| 267 | - bool ispdd;
|
---|
| 268 | bool issmbgradients;
|
---|
| 269 |
|
---|
| 270 | /*Fetch data needed: */
|
---|
| 271 | @@ -28,7 +27,6 @@
|
---|
| 272 | iomodel->Constant(&stabilization,PrognosticStabilizationEnum);
|
---|
| 273 | iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum);
|
---|
| 274 | iomodel->FetchData(1,MeshElementsEnum);
|
---|
| 275 | - iomodel->Constant(&ispdd,SurfaceforcingsIspddEnum);
|
---|
| 276 | iomodel->Constant(&issmbgradients,SurfaceforcingsIssmbgradientsEnum);
|
---|
| 277 |
|
---|
| 278 | /*Update elements: */
|
---|
| 279 | @@ -68,24 +66,18 @@
|
---|
| 280 | iomodel->FetchDataToInput(elements,PressureEnum);
|
---|
| 281 | iomodel->FetchDataToInput(elements,TemperatureEnum);
|
---|
| 282 | }
|
---|
| 283 | - if(ispdd){
|
---|
| 284 | - iomodel->FetchDataToInput(elements,VyEnum);
|
---|
| 285 | - iomodel->FetchDataToInput(elements,ThermalSpctemperatureEnum);
|
---|
| 286 | - iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum);
|
---|
| 287 | - iomodel->FetchDataToInput(elements,SurfaceforcingsMonthlytemperaturesEnum);
|
---|
| 288 | - }
|
---|
| 289 | if(issmbgradients){
|
---|
| 290 | - iomodel->FetchDataToInput(elements,SurfaceforcingsHcEnum);
|
---|
| 291 | - iomodel->FetchDataToInput(elements,SurfaceforcingsSmbPosMaxEnum);
|
---|
| 292 | - iomodel->FetchDataToInput(elements,SurfaceforcingsSmbPosMinEnum);
|
---|
| 293 | - iomodel->FetchDataToInput(elements,SurfaceforcingsAPosEnum);
|
---|
| 294 | - iomodel->FetchDataToInput(elements,SurfaceforcingsBPosEnum);
|
---|
| 295 | - iomodel->FetchDataToInput(elements,SurfaceforcingsANegEnum);
|
---|
| 296 | - iomodel->FetchDataToInput(elements,SurfaceforcingsBNegEnum);
|
---|
| 297 | + iomodel->FetchDataToInput(elements,SurfaceforcingsHcEnum);
|
---|
| 298 | + iomodel->FetchDataToInput(elements,SurfaceforcingsSmbPosMaxEnum);
|
---|
| 299 | + iomodel->FetchDataToInput(elements,SurfaceforcingsSmbPosMinEnum);
|
---|
| 300 | + iomodel->FetchDataToInput(elements,SurfaceforcingsAPosEnum);
|
---|
| 301 | + iomodel->FetchDataToInput(elements,SurfaceforcingsBPosEnum);
|
---|
| 302 | + iomodel->FetchDataToInput(elements,SurfaceforcingsANegEnum);
|
---|
| 303 | + iomodel->FetchDataToInput(elements,SurfaceforcingsBNegEnum);
|
---|
| 304 | }
|
---|
| 305 | - else{
|
---|
| 306 | - iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
|
---|
| 307 | - }
|
---|
| 308 | + //else{
|
---|
| 309 | + // iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
|
---|
| 310 | + //}
|
---|
| 311 |
|
---|
| 312 | /*Free data: */
|
---|
| 313 | iomodel->DeleteData(1,MeshElementsEnum);
|
---|
| 314 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
|
---|
| 315 | ===================================================================
|
---|
| 316 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp (revision 12747)
|
---|
| 317 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp (revision 12748)
|
---|
| 318 | @@ -15,6 +15,30 @@
|
---|
| 319 |
|
---|
| 320 | void UpdateElementsTransient(Elements* elements, Parameters* parameters,IoModel* iomodel,int analysis_counter,int analysis_type){
|
---|
| 321 |
|
---|
| 322 | - /*nothing for now: */
|
---|
| 323 | + bool ispdd;
|
---|
| 324 | + bool isdelta18o;
|
---|
| 325 | + IssmDouble *size, Delta18oTimeSerie,Delta18oSurfaceTimeSerie ;
|
---|
| 326 |
|
---|
| 327 | + /*Fetch data needed: */
|
---|
| 328 | + iomodel->Constant(&ispdd,SurfaceforcingsIspddEnum);
|
---|
| 329 | + iomodel->Constant(&isdelta18o,SurfaceforcingsIsdelta18oEnum);
|
---|
| 330 | +
|
---|
| 331 | + if(ispdd){
|
---|
| 332 | + iomodel->FetchDataToInput(elements,ThermalSpctemperatureEnum);
|
---|
| 333 | + if(isdelta18o){
|
---|
| 334 | + iomodel->FetchDataToInput(elements,SurfaceforcingsDelta18oEnum);
|
---|
| 335 | + iomodel->FetchDataToInput(elements,SurfaceforcingsDelta18oSurfaceEnum);
|
---|
| 336 | +
|
---|
| 337 | + iomodel->FetchDataToInput(elements,SurfaceforcingsDelta18oTemperaturesLgmEnum);
|
---|
| 338 | + iomodel->FetchDataToInput(elements,SurfaceforcingsDelta18oTemperaturesPresentdayEnum);
|
---|
| 339 | + iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationsPresentdayEnum);
|
---|
| 340 | + }
|
---|
| 341 | + else{
|
---|
| 342 | + iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum);
|
---|
| 343 | + iomodel->FetchDataToInput(elements,SurfaceforcingsMonthlytemperaturesEnum);
|
---|
| 344 | + }
|
---|
| 345 | + }
|
---|
| 346 | + else{
|
---|
| 347 | + iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
|
---|
| 348 | + }
|
---|
| 349 | }
|
---|
| 350 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
|
---|
| 351 | ===================================================================
|
---|
| 352 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp (revision 12747)
|
---|
| 353 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp (revision 12748)
|
---|
| 354 | @@ -24,7 +24,10 @@
|
---|
| 355 | int numoutputs;
|
---|
| 356 | Parameters *parameters = NULL;
|
---|
| 357 | IssmDouble *requestedoutputs = NULL;
|
---|
| 358 | -
|
---|
| 359 | + bool isdelta18o;
|
---|
| 360 | + IssmDouble *Delta18oT, *Delta18oSurfaceT;
|
---|
| 361 | + int nlinesD18o, ncolsD18o, nlinesD18osurf, ncolsD18osurf;
|
---|
| 362 | +
|
---|
| 363 | if(*pparameters)return; //do not create parameters twice!
|
---|
| 364 |
|
---|
| 365 | /*Initialize dataset: */
|
---|
| 366 | @@ -89,8 +92,20 @@
|
---|
| 367 | parameters->AddObject(iomodel->CopyConstantObject(InversionIscontrolEnum));
|
---|
| 368 | parameters->AddObject(iomodel->CopyConstantObject(InversionTaoEnum));
|
---|
| 369 | parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIspddEnum));
|
---|
| 370 | + parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIsdelta18oEnum));
|
---|
| 371 | parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIssmbgradientsEnum));
|
---|
| 372 |
|
---|
| 373 | + iomodel->Constant(&isdelta18o,SurfaceforcingsIsdelta18oEnum);
|
---|
| 374 | + if(isdelta18o){
|
---|
| 375 | + iomodel->FetchData(&Delta18oT,&nlinesD18o,&ncolsD18o,SurfaceforcingsDelta18oEnum);
|
---|
| 376 | + _assert_(nlinesD18o==2);
|
---|
| 377 | + parameters->AddObject(new TransientParam(SurfaceforcingsDelta18oEnum,&Delta18oT[0],&Delta18oT[ncolsD18o],ncolsD18o));
|
---|
| 378 | +
|
---|
| 379 | + iomodel->FetchData(&Delta18oSurfaceT,&nlinesD18osurf,&ncolsD18osurf,SurfaceforcingsDelta18oSurfaceEnum);
|
---|
| 380 | + _assert_(nlinesD18osurf==2);
|
---|
| 381 | + parameters->AddObject(new TransientParam(SurfaceforcingsDelta18oSurfaceEnum,&Delta18oSurfaceT[0],&Delta18oSurfaceT[ncolsD18osurf],ncolsD18osurf));
|
---|
| 382 | + }
|
---|
| 383 | +
|
---|
| 384 | /*some parameters that did not come with the iomodel: */
|
---|
| 385 | parameters->AddObject(new IntParam(SolutionTypeEnum,solution_type));
|
---|
| 386 | parameters->AddObject(new IntParam(AnalysisTypeEnum,analysis_type));
|
---|
| 387 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Delta18oParameterizationx/Delta18oParameterizationx.cpp
|
---|
| 388 | ===================================================================
|
---|
| 389 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Delta18oParameterizationx/Delta18oParameterizationx.cpp (revision 0)
|
---|
| 390 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Delta18oParameterizationx/Delta18oParameterizationx.cpp (revision 12748)
|
---|
| 391 | @@ -0,0 +1,23 @@
|
---|
| 392 | +/*!\file Delta18oParameterizationx
|
---|
| 393 | + * \brief: Create past temperature field from present day fields
|
---|
| 394 | + */
|
---|
| 395 | +
|
---|
| 396 | +#include "./Delta18oParameterizationx.h"
|
---|
| 397 | +#include "../../shared/shared.h"
|
---|
| 398 | +#include "../../include/include.h"
|
---|
| 399 | +#include "../../io/io.h"
|
---|
| 400 | +#include "../../toolkits/toolkits.h"
|
---|
| 401 | +#include "../../EnumDefinitions/EnumDefinitions.h"
|
---|
| 402 | +
|
---|
| 403 | +void Delta18oParameterizationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
|
---|
| 404 | +
|
---|
| 405 | + /*Intermediary*/
|
---|
| 406 | + int i;
|
---|
| 407 | + Element* element = NULL;
|
---|
| 408 | +
|
---|
| 409 | + /*Compute temperature and precipitation fields: */
|
---|
| 410 | + for(i=0;i<elements->Size();i++){
|
---|
| 411 | + element=(Element*)elements->GetObjectByOffset(i);
|
---|
| 412 | + element->Delta18oParameterization();
|
---|
| 413 | + }
|
---|
| 414 | +}
|
---|
| 415 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Delta18oParameterizationx/Delta18oParameterizationx.h
|
---|
| 416 | ===================================================================
|
---|
| 417 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Delta18oParameterizationx/Delta18oParameterizationx.h (revision 0)
|
---|
| 418 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Delta18oParameterizationx/Delta18oParameterizationx.h (revision 12748)
|
---|
| 419 | @@ -0,0 +1,14 @@
|
---|
| 420 | +/*!\file: Delta18oParameterizationx.cpp
|
---|
| 421 | + * \brief header file for
|
---|
| 422 | + */
|
---|
| 423 | +
|
---|
| 424 | +#ifndef _DELTA18OPARAMETERIZATIONX_H
|
---|
| 425 | +#define _DELTA18OPARAMETERIZATIONX_H
|
---|
| 426 | +
|
---|
| 427 | +#include "../../Container/Container.h"
|
---|
| 428 | +#include "../../objects/objects.h"
|
---|
| 429 | +
|
---|
| 430 | +/* local prototypes: */
|
---|
| 431 | +void Delta18oParameterizationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
|
---|
| 432 | +
|
---|
| 433 | +#endif /* _DELTA18OPARAMETERIZATIONX_H*/
|
---|
| 434 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
|
---|
| 435 | ===================================================================
|
---|
| 436 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am (revision 12747)
|
---|
| 437 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am (revision 12748)
|
---|
| 438 | @@ -211,6 +211,7 @@
|
---|
| 439 | ./shared/Elements/GetGlobalDofList.cpp\
|
---|
| 440 | ./shared/Elements/GetNumberOfDofs.cpp\
|
---|
| 441 | ./shared/Elements/PddSurfaceMassBalance.cpp\
|
---|
| 442 | + ./shared/Elements/ComputeDelta18oTemperaturePrecipitation.cpp\
|
---|
| 443 | ./shared/String/sharedstring.h\
|
---|
| 444 | ./shared/Wrapper/wrappershared.h\
|
---|
| 445 | ./shared/Wrapper/ModuleBoot.cpp\
|
---|
| 446 | @@ -293,6 +294,8 @@
|
---|
| 447 | ./modules/SpcNodesx/SpcNodesx.cpp\
|
---|
| 448 | ./modules/PositiveDegreeDayx/PositiveDegreeDayx.h\
|
---|
| 449 | ./modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp\
|
---|
| 450 | + ./modules/Delta18oParameterizationx/Delta18oParameterizationx.h\
|
---|
| 451 | + ./modules/Delta18oParameterizationx/Delta18oParameterizationx.cpp\
|
---|
| 452 | ./modules/SmbGradientsx/SmbGradientsx.h\
|
---|
| 453 | ./modules/SmbGradientsx/SmbGradientsx.cpp\
|
---|
| 454 | ./modules/UpdateConstraintsx/UpdateConstraintsx.h\
|
---|
| 455 | @@ -817,7 +820,7 @@
|
---|
| 456 | #Matlab and Petsc sources {{{
|
---|
| 457 | matlabpetsc_sources= ./matlab/io/MatlabMatrixToPetscMatrix.cpp\
|
---|
| 458 | ./matlab/io/MatlabVectorToPetscVector.cpp
|
---|
| 459 | -
|
---|
| 460 | +
|
---|
| 461 | #}}}
|
---|
| 462 | #Modules sources{{{
|
---|
| 463 | module_sources= ./objects/Options/Option.cpp\
|
---|
| 464 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h
|
---|
| 465 | ===================================================================
|
---|
| 466 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h (revision 12747)
|
---|
| 467 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h (revision 12748)
|
---|
| 468 | @@ -71,6 +71,7 @@
|
---|
| 469 | virtual void MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding)=0;
|
---|
| 470 | virtual void PotentialSheetUngrounding(Vector* potential_sheet_ungrounding)=0;
|
---|
| 471 | virtual void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
|
---|
| 472 | + virtual void Delta18oParameterization(void)=0;
|
---|
| 473 | virtual void SmbGradients()=0;
|
---|
| 474 | virtual int UpdatePotentialSheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0;
|
---|
| 475 | virtual void ResetCoordinateSystem()=0;
|
---|
| 476 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
|
---|
| 477 | ===================================================================
|
---|
| 478 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp (revision 12747)
|
---|
| 479 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp (revision 12748)
|
---|
| 480 | @@ -907,6 +907,66 @@
|
---|
| 481 |
|
---|
| 482 | }
|
---|
| 483 | /*}}}*/
|
---|
| 484 | +/*FUNCTION Tria::Delta18oParameterization{{{*/
|
---|
| 485 | +void Tria::Delta18oParameterization(void){
|
---|
| 486 | +
|
---|
| 487 | + IssmDouble monthlytemperatures[NUMVERTICES][12],monthlyprec[NUMVERTICES][12];
|
---|
| 488 | + IssmDouble Delta18oTemperaturesPresentday[NUMVERTICES][12],Delta18oTemperaturesLgm[NUMVERTICES][12];
|
---|
| 489 | + IssmDouble PrecipitationsPresentday[NUMVERTICES][12];
|
---|
| 490 | + IssmDouble Delta18oPresent,Delta18oLgm,Delta18oTime;
|
---|
| 491 | + IssmDouble Delta18oSurfacePresent,Delta18oSurfaceLgm,Delta18oSurfaceTime;
|
---|
| 492 | + IssmDouble time,yts,finaltime;
|
---|
| 493 | + this->parameters->FindParam(&time,TimeEnum);
|
---|
| 494 | + this->parameters->FindParam(&yts,ConstantsYtsEnum);
|
---|
| 495 | + this->parameters->FindParam(&finaltime,TimesteppingFinalTimeEnum);
|
---|
| 496 | +
|
---|
| 497 | + /*Recover present day temperature and precipitation*/
|
---|
| 498 | + Input* input=inputs->GetInput(SurfaceforcingsDelta18oTemperaturesPresentdayEnum); _assert_(input);
|
---|
| 499 | + Input* input2=inputs->GetInput(SurfaceforcingsDelta18oTemperaturesLgmEnum); _assert_(input2);
|
---|
| 500 | + Input* input3=inputs->GetInput(SurfaceforcingsPrecipitationsPresentdayEnum); _assert_(input3);
|
---|
| 501 | + GaussTria* gauss=new GaussTria();
|
---|
| 502 | + for(int month=0;month<12;month++) {
|
---|
| 503 | + for(int iv=0;iv<NUMVERTICES;iv++) {
|
---|
| 504 | + gauss->GaussVertex(iv);
|
---|
| 505 | + input->GetInputValue(&Delta18oTemperaturesPresentday[iv][month],gauss,month/12.*yts);
|
---|
| 506 | + input2->GetInputValue(&Delta18oTemperaturesLgm[iv][month],gauss,month/12.*yts);
|
---|
| 507 | + input3->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts);
|
---|
| 508 | + monthlyprec[iv][month]=monthlyprec[iv][month]*yts; // convertion to m/yr
|
---|
| 509 | + }
|
---|
| 510 | + }
|
---|
| 511 | +
|
---|
| 512 | + /*Recover delta18o and Delta18oSurface at present day, lgm and at time t*/
|
---|
| 513 | + this->parameters->FindParam(&Delta18oPresent,SurfaceforcingsDelta18oEnum,finaltime*yts);
|
---|
| 514 | + this->parameters->FindParam(&Delta18oLgm,SurfaceforcingsDelta18oEnum,(finaltime-21000)*yts);
|
---|
| 515 | + this->parameters->FindParam(&Delta18oTime,SurfaceforcingsDelta18oEnum,time*yts);
|
---|
| 516 | + this->parameters->FindParam(&Delta18oSurfacePresent,SurfaceforcingsDelta18oSurfaceEnum,finaltime*yts);
|
---|
| 517 | + this->parameters->FindParam(&Delta18oSurfaceLgm,SurfaceforcingsDelta18oSurfaceEnum,(finaltime-21000)*yts);
|
---|
| 518 | + this->parameters->FindParam(&Delta18oSurfaceTime,SurfaceforcingsDelta18oSurfaceEnum,time*yts);
|
---|
| 519 | +
|
---|
| 520 | + /*Compute the temperature and precipitation*/
|
---|
| 521 | + for(int iv=0;iv<NUMVERTICES;iv++){
|
---|
| 522 | + ComputeDelta18oTemperaturePrecipitation(Delta18oSurfacePresent, Delta18oSurfaceLgm, Delta18oSurfaceTime,
|
---|
| 523 | + Delta18oPresent, Delta18oLgm, Delta18oTime,
|
---|
| 524 | + &PrecipitationsPresentday[iv][0],
|
---|
| 525 | + &Delta18oTemperaturesLgm[iv][0], &Delta18oTemperaturesPresentday[iv][0],
|
---|
| 526 | + &monthlytemperatures[iv][0], &monthlyprec[iv][0]);
|
---|
| 527 | + }
|
---|
| 528 | +
|
---|
| 529 | + /*Update inputs*/
|
---|
| 530 | + TransientInput* NewTemperatureInput = new TransientInput(SurfaceforcingsMonthlytemperaturesEnum);
|
---|
| 531 | + TransientInput* NewPrecipitationInput = new TransientInput(SurfaceforcingsPrecipitationEnum);
|
---|
| 532 | + for (int imonth=0;imonth<12;imonth++) {
|
---|
| 533 | + for(int iv=0;iv<NUMVERTICES;iv++) {
|
---|
| 534 | + TriaP1Input* newmonthinput1 = new TriaP1Input(SurfaceforcingsMonthlytemperaturesEnum,&monthlytemperatures[iv][imonth]);
|
---|
| 535 | + NewTemperatureInput->AddTimeInput(newmonthinput1,imonth/12.*yts);
|
---|
| 536 | + TriaP1Input* newmonthinput2 = new TriaP1Input(SurfaceforcingsPrecipitationEnum,&monthlyprec[iv][imonth]);
|
---|
| 537 | + NewPrecipitationInput->AddTimeInput(newmonthinput2,imonth/12.*yts);
|
---|
| 538 | + }
|
---|
| 539 | + }
|
---|
| 540 | + this->inputs->AddInput(NewTemperatureInput);
|
---|
| 541 | + this->inputs->AddInput(NewPrecipitationInput);
|
---|
| 542 | +}
|
---|
| 543 | +/*}}}*/
|
---|
| 544 | /*FUNCTION Tria::Echo{{{*/
|
---|
| 545 | void Tria::Echo(void){
|
---|
| 546 | _printLine_("Tria:");
|
---|
| 547 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h
|
---|
| 548 | ===================================================================
|
---|
| 549 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h (revision 12747)
|
---|
| 550 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h (revision 12748)
|
---|
| 551 | @@ -79,6 +79,7 @@
|
---|
| 552 | void CreateKMatrix(Matrix* Kff, Matrix* Kfs,Vector* df);
|
---|
| 553 | void CreatePVector(Vector* pf);
|
---|
| 554 | void CreateJacobianMatrix(Matrix* Jff);
|
---|
| 555 | + void Delta18oParameterization(void);
|
---|
| 556 | int GetNodeIndex(Node* node);
|
---|
| 557 | int Sid();
|
---|
| 558 | bool IsOnBed();
|
---|
| 559 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
|
---|
| 560 | ===================================================================
|
---|
| 561 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp (revision 12747)
|
---|
| 562 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp (revision 12748)
|
---|
| 563 | @@ -684,6 +684,66 @@
|
---|
| 564 |
|
---|
| 565 | }
|
---|
| 566 | /*}}}*/
|
---|
| 567 | +/*FUNCTION Penta::Delta18oParameterization{{{*/
|
---|
| 568 | +void Penta::Delta18oParameterization(void){
|
---|
| 569 | +
|
---|
| 570 | + IssmDouble monthlytemperatures[NUMVERTICES][12],monthlyprec[NUMVERTICES][12];
|
---|
| 571 | + IssmDouble Delta18oTemperaturesPresentday[NUMVERTICES][12],Delta18oTemperaturesLgm[NUMVERTICES][12];
|
---|
| 572 | + IssmDouble PrecipitationsPresentday[NUMVERTICES][12];
|
---|
| 573 | + IssmDouble Delta18oPresent,Delta18oLgm,Delta18oTime;
|
---|
| 574 | + IssmDouble Delta18oSurfacePresent,Delta18oSurfaceLgm,Delta18oSurfaceTime;
|
---|
| 575 | + IssmDouble time,yts,finaltime;
|
---|
| 576 | + this->parameters->FindParam(&time,TimeEnum);
|
---|
| 577 | + this->parameters->FindParam(&yts,ConstantsYtsEnum);
|
---|
| 578 | + this->parameters->FindParam(&finaltime,TimesteppingFinalTimeEnum);
|
---|
| 579 | +
|
---|
| 580 | + /*Recover present day temperature and precipitation*/
|
---|
| 581 | + Input* input=inputs->GetInput(SurfaceforcingsDelta18oTemperaturesPresentdayEnum); _assert_(input);
|
---|
| 582 | + Input* input2=inputs->GetInput(SurfaceforcingsDelta18oTemperaturesLgmEnum); _assert_(input2);
|
---|
| 583 | + Input* input3=inputs->GetInput(SurfaceforcingsPrecipitationsPresentdayEnum); _assert_(input3);
|
---|
| 584 | + GaussPenta* gauss=new GaussPenta();
|
---|
| 585 | + for(int month=0;month<12;month++) {
|
---|
| 586 | + for(int iv=0;iv<NUMVERTICES;iv++) {
|
---|
| 587 | + gauss->GaussVertex(iv);
|
---|
| 588 | + input->GetInputValue(&Delta18oTemperaturesPresentday[iv][month],gauss,month/12.*yts);
|
---|
| 589 | + input2->GetInputValue(&Delta18oTemperaturesLgm[iv][month],gauss,month/12.*yts);
|
---|
| 590 | + input3->GetInputValue(&PrecipitationsPresentday[iv][month],gauss,month/12.*yts);
|
---|
| 591 | + monthlyprec[iv][month]=monthlyprec[iv][month]*yts; // convertion to m/yr
|
---|
| 592 | + }
|
---|
| 593 | + }
|
---|
| 594 | +
|
---|
| 595 | + /*Recover delta18o and Delta18oSurface at present day, lgm and at time t*/
|
---|
| 596 | + this->parameters->FindParam(&Delta18oPresent,SurfaceforcingsDelta18oEnum,finaltime*yts);
|
---|
| 597 | + this->parameters->FindParam(&Delta18oLgm,SurfaceforcingsDelta18oEnum,(finaltime-21000)*yts);
|
---|
| 598 | + this->parameters->FindParam(&Delta18oTime,SurfaceforcingsDelta18oEnum,time*yts);
|
---|
| 599 | + this->parameters->FindParam(&Delta18oSurfacePresent,SurfaceforcingsDelta18oSurfaceEnum,finaltime*yts);
|
---|
| 600 | + this->parameters->FindParam(&Delta18oSurfaceLgm,SurfaceforcingsDelta18oSurfaceEnum,(finaltime-21000)*yts);
|
---|
| 601 | + this->parameters->FindParam(&Delta18oSurfaceTime,SurfaceforcingsDelta18oSurfaceEnum,time*yts);
|
---|
| 602 | +
|
---|
| 603 | + /*Compute the temperature and precipitation*/
|
---|
| 604 | + for(int iv=0;iv<NUMVERTICES;iv++){
|
---|
| 605 | + ComputeDelta18oTemperaturePrecipitation(Delta18oSurfacePresent, Delta18oSurfaceLgm, Delta18oSurfaceTime,
|
---|
| 606 | + Delta18oPresent, Delta18oLgm, Delta18oTime,
|
---|
| 607 | + &PrecipitationsPresentday[iv][0],
|
---|
| 608 | + &Delta18oTemperaturesLgm[iv][0], &Delta18oTemperaturesPresentday[iv][0],
|
---|
| 609 | + &monthlytemperatures[iv][0], &monthlyprec[iv][0]);
|
---|
| 610 | + }
|
---|
| 611 | +
|
---|
| 612 | + /*Update inputs*/
|
---|
| 613 | + TransientInput* NewTemperatureInput = new TransientInput(SurfaceforcingsMonthlytemperaturesEnum);
|
---|
| 614 | + TransientInput* NewPrecipitationInput = new TransientInput(SurfaceforcingsPrecipitationEnum);
|
---|
| 615 | + for (int imonth=0;imonth<12;imonth++) {
|
---|
| 616 | + for(int iv=0;iv<NUMVERTICES;iv++) {
|
---|
| 617 | + PentaP1Input* newmonthinput1 = new PentaP1Input(SurfaceforcingsMonthlytemperaturesEnum,&monthlytemperatures[iv][imonth]);
|
---|
| 618 | + NewTemperatureInput->AddTimeInput(newmonthinput1,imonth/12.*yts);
|
---|
| 619 | + PentaP1Input* newmonthinput2 = new PentaP1Input(SurfaceforcingsPrecipitationEnum,&monthlyprec[iv][imonth]);
|
---|
| 620 | + NewPrecipitationInput->AddTimeInput(newmonthinput2,imonth/12.*yts);
|
---|
| 621 | + }
|
---|
| 622 | + }
|
---|
| 623 | + this->inputs->AddInput(NewTemperatureInput);
|
---|
| 624 | + this->inputs->AddInput(NewPrecipitationInput);
|
---|
| 625 | +}
|
---|
| 626 | +/*}}}*/
|
---|
| 627 | /*FUNCTION Penta::Echo{{{*/
|
---|
| 628 |
|
---|
| 629 | void Penta::Echo(void){
|
---|
| 630 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h
|
---|
| 631 | ===================================================================
|
---|
| 632 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h (revision 12747)
|
---|
| 633 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h (revision 12748)
|
---|
| 634 | @@ -83,6 +83,7 @@
|
---|
| 635 | void CreateKMatrix(Matrix* Kff, Matrix* Kfs,Vector* df);
|
---|
| 636 | void CreatePVector(Vector* pf);
|
---|
| 637 | void CreateJacobianMatrix(Matrix* Jff);
|
---|
| 638 | + void Delta18oParameterization(void);
|
---|
| 639 | void DeleteResults(void);
|
---|
| 640 | int GetNodeIndex(Node* node);
|
---|
| 641 | void GetSolutionFromInputs(Vector* solution);
|
---|
| 642 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsIsdelta18oEnum.m
|
---|
| 643 | ===================================================================
|
---|
| 644 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsIsdelta18oEnum.m (revision 0)
|
---|
| 645 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsIsdelta18oEnum.m (revision 12748)
|
---|
| 646 | @@ -0,0 +1,11 @@
|
---|
| 647 | +function macro=SurfaceforcingsIsdelta18oEnum()
|
---|
| 648 | +%SURFACEFORCINGSISDELTA18OENUM - Enum of SurfaceforcingsIsdelta18o
|
---|
| 649 | +%
|
---|
| 650 | +% WARNING: DO NOT MODIFY THIS FILE
|
---|
| 651 | +% this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
|
---|
| 652 | +% Please read src/c/EnumDefinitions/README for more information
|
---|
| 653 | +%
|
---|
| 654 | +% Usage:
|
---|
| 655 | +% macro=SurfaceforcingsIsdelta18oEnum()
|
---|
| 656 | +
|
---|
| 657 | +macro=StringToEnum('SurfaceforcingsIsdelta18o');
|
---|
| 658 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oEnum.m
|
---|
| 659 | ===================================================================
|
---|
| 660 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oEnum.m (revision 0)
|
---|
| 661 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oEnum.m (revision 12748)
|
---|
| 662 | @@ -0,0 +1,11 @@
|
---|
| 663 | +function macro=SurfaceforcingsDelta18oEnum()
|
---|
| 664 | +%SURFACEFORCINGSDELTA18OENUM - Enum of SurfaceforcingsDelta18o
|
---|
| 665 | +%
|
---|
| 666 | +% WARNING: DO NOT MODIFY THIS FILE
|
---|
| 667 | +% this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
|
---|
| 668 | +% Please read src/c/EnumDefinitions/README for more information
|
---|
| 669 | +%
|
---|
| 670 | +% Usage:
|
---|
| 671 | +% macro=SurfaceforcingsDelta18oEnum()
|
---|
| 672 | +
|
---|
| 673 | +macro=StringToEnum('SurfaceforcingsDelta18o');
|
---|
| 674 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oSurfaceEnum.m
|
---|
| 675 | ===================================================================
|
---|
| 676 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oSurfaceEnum.m (revision 0)
|
---|
| 677 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oSurfaceEnum.m (revision 12748)
|
---|
| 678 | @@ -0,0 +1,11 @@
|
---|
| 679 | +function macro=SurfaceforcingsDelta18oSurfaceEnum()
|
---|
| 680 | +%SURFACEFORCINGSDELTA18OSURFACEENUM - Enum of SurfaceforcingsDelta18oSurface
|
---|
| 681 | +%
|
---|
| 682 | +% WARNING: DO NOT MODIFY THIS FILE
|
---|
| 683 | +% this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
|
---|
| 684 | +% Please read src/c/EnumDefinitions/README for more information
|
---|
| 685 | +%
|
---|
| 686 | +% Usage:
|
---|
| 687 | +% macro=SurfaceforcingsDelta18oSurfaceEnum()
|
---|
| 688 | +
|
---|
| 689 | +macro=StringToEnum('SurfaceforcingsDelta18oSurface');
|
---|
| 690 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsPrecipitationsPresentdayEnum.m
|
---|
| 691 | ===================================================================
|
---|
| 692 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsPrecipitationsPresentdayEnum.m (revision 0)
|
---|
| 693 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsPrecipitationsPresentdayEnum.m (revision 12748)
|
---|
| 694 | @@ -0,0 +1,11 @@
|
---|
| 695 | +function macro=SurfaceforcingsPrecipitationsPresentdayEnum()
|
---|
| 696 | +%SURFACEFORCINGSPRECIPITATIONSPRESENTDAYENUM - Enum of SurfaceforcingsPrecipitationsPresentday
|
---|
| 697 | +%
|
---|
| 698 | +% WARNING: DO NOT MODIFY THIS FILE
|
---|
| 699 | +% this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
|
---|
| 700 | +% Please read src/c/EnumDefinitions/README for more information
|
---|
| 701 | +%
|
---|
| 702 | +% Usage:
|
---|
| 703 | +% macro=SurfaceforcingsPrecipitationsPresentdayEnum()
|
---|
| 704 | +
|
---|
| 705 | +macro=StringToEnum('SurfaceforcingsPrecipitationsPresentday');
|
---|
| 706 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oTemperaturesPresentdayEnum.m
|
---|
| 707 | ===================================================================
|
---|
| 708 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oTemperaturesPresentdayEnum.m (revision 0)
|
---|
| 709 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oTemperaturesPresentdayEnum.m (revision 12748)
|
---|
| 710 | @@ -0,0 +1,11 @@
|
---|
| 711 | +function macro=SurfaceforcingsDelta18oTemperaturesPresentdayEnum()
|
---|
| 712 | +%SURFACEFORCINGSDELTA18OTEMPERATURESPRESENTDAYENUM - Enum of SurfaceforcingsDelta18oTemperaturesPresentday
|
---|
| 713 | +%
|
---|
| 714 | +% WARNING: DO NOT MODIFY THIS FILE
|
---|
| 715 | +% this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
|
---|
| 716 | +% Please read src/c/EnumDefinitions/README for more information
|
---|
| 717 | +%
|
---|
| 718 | +% Usage:
|
---|
| 719 | +% macro=SurfaceforcingsDelta18oTemperaturesPresentdayEnum()
|
---|
| 720 | +
|
---|
| 721 | +macro=StringToEnum('SurfaceforcingsDelta18oTemperaturesPresentday');
|
---|
| 722 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oTemperaturesLgmEnum.m
|
---|
| 723 | ===================================================================
|
---|
| 724 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oTemperaturesLgmEnum.m (revision 0)
|
---|
| 725 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/SurfaceforcingsDelta18oTemperaturesLgmEnum.m (revision 12748)
|
---|
| 726 | @@ -0,0 +1,11 @@
|
---|
| 727 | +function macro=SurfaceforcingsDelta18oTemperaturesLgmEnum()
|
---|
| 728 | +%SURFACEFORCINGSDELTA18OTEMPERATURESLGMENUM - Enum of SurfaceforcingsDelta18oTemperaturesLgm
|
---|
| 729 | +%
|
---|
| 730 | +% WARNING: DO NOT MODIFY THIS FILE
|
---|
| 731 | +% this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
|
---|
| 732 | +% Please read src/c/EnumDefinitions/README for more information
|
---|
| 733 | +%
|
---|
| 734 | +% Usage:
|
---|
| 735 | +% macro=SurfaceforcingsDelta18oTemperaturesLgmEnum()
|
---|
| 736 | +
|
---|
| 737 | +macro=StringToEnum('SurfaceforcingsDelta18oTemperaturesLgm');
|
---|
| 738 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m
|
---|
| 739 | ===================================================================
|
---|
| 740 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m (revision 12747)
|
---|
| 741 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m (revision 12748)
|
---|
| 742 | @@ -8,4 +8,4 @@
|
---|
| 743 | % Usage:
|
---|
| 744 | % macro=MaximumNumberOfEnums()
|
---|
| 745 |
|
---|
| 746 | -macro=449;
|
---|
| 747 | +macro=455;
|
---|
| 748 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/EnumDefinitions.py
|
---|
| 749 | ===================================================================
|
---|
| 750 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/EnumDefinitions.py (revision 12747)
|
---|
| 751 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/EnumDefinitions.py (revision 12748)
|
---|
| 752 | @@ -1376,6 +1376,66 @@
|
---|
| 753 |
|
---|
| 754 | return StringToEnum('SettingsWaitonlock')
|
---|
| 755 |
|
---|
| 756 | +def SurfaceforcingsDelta18oEnum():
|
---|
| 757 | + """
|
---|
| 758 | + SURFACEFORCINGSDELTA18OENUM - Enum of SurfaceforcingsDelta18o
|
---|
| 759 | +
|
---|
| 760 | + Usage:
|
---|
| 761 | + macro=SurfaceforcingsDelta18oEnum()
|
---|
| 762 | + """
|
---|
| 763 | +
|
---|
| 764 | + return StringToEnum('SurfaceforcingsDelta18o')
|
---|
| 765 | +
|
---|
| 766 | +def SurfaceforcingsDelta18oTemperaturesPresentdayEnum():
|
---|
| 767 | + """
|
---|
| 768 | + SURFACEFORCINGSDELTA18OTEMPERATURESPRESENTDAYENUM - Enum of SurfaceforcingsDelta18oTemperaturesPresentday
|
---|
| 769 | +
|
---|
| 770 | + Usage:
|
---|
| 771 | + macro=SurfaceforcingsDelta18oTemperaturesPresentdayEnum()
|
---|
| 772 | + """
|
---|
| 773 | +
|
---|
| 774 | + return StringToEnum('SurfaceforcingsDelta18oTemperaturesPresentday')
|
---|
| 775 | +
|
---|
| 776 | +def SurfaceforcingsDelta18oTemperaturesLgmEnum():
|
---|
| 777 | + """
|
---|
| 778 | + SURFACEFORCINGSDELTA18OTEMPERATURESLGMENUM - Enum of SurfaceforcingsDelta18oTemperaturesLgm
|
---|
| 779 | +
|
---|
| 780 | + Usage:
|
---|
| 781 | + macro=SurfaceforcingsDelta18oTemperaturesLgmEnum()
|
---|
| 782 | + """
|
---|
| 783 | +
|
---|
| 784 | + return StringToEnum('SurfaceforcingsDelta18oTemperaturesLgm')
|
---|
| 785 | +
|
---|
| 786 | +def SurfaceforcingsDelta18oSurfaceEnum():
|
---|
| 787 | + """
|
---|
| 788 | + SURFACEFORCINGSDELTA18OSURFACEENUM - Enum of SurfaceforcingsDelta18oSurface
|
---|
| 789 | +
|
---|
| 790 | + Usage:
|
---|
| 791 | + macro=SurfaceforcingsDelta18oSurfaceEnum()
|
---|
| 792 | + """
|
---|
| 793 | +
|
---|
| 794 | + return StringToEnum('SurfaceforcingsDelta18oSurface')
|
---|
| 795 | +
|
---|
| 796 | +def SurfaceforcingsIsdelta18oEnum():
|
---|
| 797 | + """
|
---|
| 798 | + SURFACEFORCINGSISDELTA18OENUM - Enum of SurfaceforcingsIsdelta18o
|
---|
| 799 | +
|
---|
| 800 | + Usage:
|
---|
| 801 | + macro=SurfaceforcingsIsdelta18oEnum()
|
---|
| 802 | + """
|
---|
| 803 | +
|
---|
| 804 | + return StringToEnum('SurfaceforcingsIsdelta18o')
|
---|
| 805 | +
|
---|
| 806 | +def SurfaceforcingsPrecipitationsPresentdayEnum():
|
---|
| 807 | + """
|
---|
| 808 | + SURFACEFORCINGSPRECIPITATIONSPRESENTDAYENUM - Enum of SurfaceforcingsPrecipitationsPresentday
|
---|
| 809 | +
|
---|
| 810 | + Usage:
|
---|
| 811 | + macro=SurfaceforcingsPrecipitationsPresentdayEnum()
|
---|
| 812 | + """
|
---|
| 813 | +
|
---|
| 814 | + return StringToEnum('SurfaceforcingsPrecipitationsPresentday')
|
---|
| 815 | +
|
---|
| 816 | def DebugProfilingEnum():
|
---|
| 817 | """
|
---|
| 818 | DEBUGPROFILINGENUM - Enum of DebugProfiling
|
---|
| 819 | @@ -4504,5 +4564,5 @@
|
---|
| 820 | macro=MaximumNumberOfEnums()
|
---|
| 821 | """
|
---|
| 822 |
|
---|
| 823 | - return 449
|
---|
| 824 | + return 455
|
---|
| 825 |
|
---|
| 826 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m
|
---|
| 827 | ===================================================================
|
---|
| 828 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m (revision 12747)
|
---|
| 829 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m (revision 12748)
|
---|
| 830 | @@ -9,6 +9,7 @@
|
---|
| 831 | mass_balance = NaN;
|
---|
| 832 | ispdd = 0;
|
---|
| 833 | issmbgradients = 0;
|
---|
| 834 | + isdelta18o = 0;
|
---|
| 835 | hc = NaN;
|
---|
| 836 | smb_pos_max = NaN;
|
---|
| 837 | smb_pos_min = NaN;
|
---|
| 838 | @@ -17,6 +18,11 @@
|
---|
| 839 | a_neg = NaN;
|
---|
| 840 | b_neg = NaN;
|
---|
| 841 | monthlytemperatures = NaN;
|
---|
| 842 | + delta18o = NaN;
|
---|
| 843 | + delta18o_surface = NaN;
|
---|
| 844 | + temperatures_presentday = NaN;
|
---|
| 845 | + temperatures_lgm = NaN;
|
---|
| 846 | + precipitations_presentday = NaN;
|
---|
| 847 | end
|
---|
| 848 | methods
|
---|
| 849 | function obj = surfaceforcings(varargin) % {{{
|
---|
| 850 | @@ -32,6 +38,7 @@
|
---|
| 851 | %pdd method not used in default mode
|
---|
| 852 | obj.ispdd=0;
|
---|
| 853 | obj.issmbgradients=0;
|
---|
| 854 | + obj.isdelta18o=0;
|
---|
| 855 |
|
---|
| 856 | end % }}}
|
---|
| 857 | function md = checkconsistency(obj,md,solution,analyses) % {{{
|
---|
| 858 | @@ -40,7 +47,16 @@
|
---|
| 859 | md = checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]);
|
---|
| 860 | checkfield(md,'surfaceforcings.issmbgradients','numel',1,'values',[0 1]);
|
---|
| 861 | if(obj.ispdd)
|
---|
| 862 | - md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
|
---|
| 863 | + if(obj.isdelta18o==0)
|
---|
| 864 | + md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
|
---|
| 865 | + md = checkfield(md,'surfaceforcings.precipitation','forcing',1,'NaN',1);
|
---|
| 866 | + else
|
---|
| 867 | + md = checkfield(md,'surfaceforcings.delta18o','NaN',1);
|
---|
| 868 | + md = checkfield(md,'surfaceforcings.delta18o_surface','NaN',1);
|
---|
| 869 | + md = checkfield(md,'surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
|
---|
| 870 | + md = checkfield(md,'surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
|
---|
| 871 | + md = checkfield(md,'surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
|
---|
| 872 | + end
|
---|
| 873 | elseif(obj.issmbgradients)
|
---|
| 874 | checkfield(md,'surfaceforcings.hc','forcing',1,'NaN',1);
|
---|
| 875 | checkfield(md,'surfaceforcings.smb_pos_max','forcing',1,'NaN',1);
|
---|
| 876 | @@ -60,10 +76,15 @@
|
---|
| 877 | function disp(obj) % {{{
|
---|
| 878 | disp(sprintf(' surface forcings parameters:'));
|
---|
| 879 |
|
---|
| 880 | - fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]');
|
---|
| 881 | fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]');
|
---|
| 882 | fielddisplay(obj,'ispdd','is pdd activated (0 or 1, default is 0)');
|
---|
| 883 | - fielddisplay(obj,'monthlytemperatures','monthly surface temperatures required if pdd is activated');
|
---|
| 884 | + fielddisplay(obj,'isdelta18o','is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)');
|
---|
| 885 | + fielddisplay(obj,'monthlytemperatures','monthly surface temperatures [Kelvin], required if pdd is activated and delta18o not activated');
|
---|
| 886 | + fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]');
|
---|
| 887 | + fielddisplay(obj,'temperatures_presentday','monthly present day surface temperatures [Kelvin], required if pdd is activated and delta18o activated');
|
---|
| 888 | + fielddisplay(obj,'temperatures_lgm','monthly LGM surface temperatures [Kelvin], required if pdd is activated and delta18o activated');
|
---|
| 889 | + fielddisplay(obj,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o activated');
|
---|
| 890 | + fielddisplay(obj,'delta18o_surface','surface elevation of the delta18o site, required if pdd is activated and delta18o activated');
|
---|
| 891 | fielddisplay(obj,'issmbgradients','is smb gradients method activated (0 or 1, default is 0)');
|
---|
| 892 | fielddisplay(obj,'hc',' elevation of intersection between accumulation and ablation regime required if smb gradients is activated');
|
---|
| 893 | fielddisplay(obj,'smb_pos_max',' maximum value of positive smb required if smb gradients is activated');
|
---|
| 894 | @@ -78,8 +99,17 @@
|
---|
| 895 | WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1);
|
---|
| 896 | WriteData(fid,'object',obj,'fieldname','mass_balance','format','DoubleMat','mattype',1);
|
---|
| 897 | WriteData(fid,'object',obj,'fieldname','ispdd','format','Boolean');
|
---|
| 898 | + WriteData(fid,'object',obj,'fieldname','isdelta18o','format','Boolean');
|
---|
| 899 | if obj.ispdd,
|
---|
| 900 | + if obj.isdelta18o
|
---|
| 901 | + WriteData(fid,'object',obj,'fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
|
---|
| 902 | + WriteData(fid,'object',obj,'fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
|
---|
| 903 | + WriteData(fid,'object',obj,'fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
|
---|
| 904 | + WriteData(fid,'object',obj,'fieldname','delta18o_surface','format','DoubleMat','mattype',1);
|
---|
| 905 | + else
|
---|
| 906 | WriteData(fid,'object',obj,'fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
|
---|
| 907 | + WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1);
|
---|
| 908 | + end
|
---|
| 909 | end
|
---|
| 910 | WriteData(fid,'object',obj,'fieldname','issmbgradients','format','Boolean');
|
---|
| 911 | if obj.issmbgradients,
|
---|