Ice Sheet System Model  4.18
Code documentation
Functions
ComputeDelta18oTemperaturePrecipitation.cpp File Reference
#include "./elements.h"
#include "../Numerics/numerics.h"
#include <cmath>

Go to the source code of this file.

Functions

void ComputeDelta18oTemperaturePrecipitation (IssmDouble Delta18oSurfacePresent, IssmDouble Delta18oSurfaceLgm, IssmDouble Delta18oSurfaceTime, IssmDouble Delta18oPresent, IssmDouble Delta18oLgm, IssmDouble Delta18oTime, IssmDouble *PrecipitationsPresentday, IssmDouble *TemperaturesLgm, IssmDouble *TemperaturesPresentday, IssmDouble *monthlytemperaturesout, IssmDouble *monthlyprecout)
 

Function Documentation

◆ ComputeDelta18oTemperaturePrecipitation()

void ComputeDelta18oTemperaturePrecipitation ( IssmDouble  Delta18oSurfacePresent,
IssmDouble  Delta18oSurfaceLgm,
IssmDouble  Delta18oSurfaceTime,
IssmDouble  Delta18oPresent,
IssmDouble  Delta18oLgm,
IssmDouble  Delta18oTime,
IssmDouble PrecipitationsPresentday,
IssmDouble TemperaturesLgm,
IssmDouble TemperaturesPresentday,
IssmDouble monthlytemperaturesout,
IssmDouble monthlyprecout 
)

Definition at line 10 of file ComputeDelta18oTemperaturePrecipitation.cpp.

14  {
15 
16  IssmDouble monthlytemperaturestmp[12],monthlyprectmp[12];
17  IssmDouble delta18oLapseRate=-6.2*pow(10.,-3);
18  IssmDouble glacialindex; // used to vary present day temperature
19 
20  glacialindex = (Delta18oTime-Delta18oPresent-delta18oLapseRate*(Delta18oSurfaceTime-Delta18oSurfacePresent))
21  /(Delta18oLgm-Delta18oPresent-delta18oLapseRate*(Delta18oSurfaceLgm-Delta18oSurfacePresent)); // Tarasov 2004 paper
22 
23  for (int imonth = 0; imonth<12; imonth++){
24  monthlytemperaturestmp[imonth] = glacialindex*TemperaturesLgm[imonth] + (1.-glacialindex)*TemperaturesPresentday[imonth];
25  monthlyprectmp[imonth] = PrecipitationsPresentday[imonth];
26 
27  /*Assign output pointer*/
28  *(monthlytemperaturesout+imonth) = monthlytemperaturestmp[imonth];
29  *(monthlyprecout+imonth) = monthlyprectmp[imonth];
30  }
31 }
IssmDouble
double IssmDouble
Definition: types.h:37