From cb86c48dd9a6135bc684149490ecfffe653a740c Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Mon, 22 Jan 2024 15:21:16 -0800 Subject: [PATCH 01/14] Changed dEnergyBin to iEnergyyBin. It's not working. --- src/flare.c | 43 ++++++++++++++++++++----------------------- src/vplanet.h | 2 +- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/flare.c b/src/flare.c index 3489fd84b..8daed086a 100644 --- a/src/flare.c +++ b/src/flare.c @@ -23,7 +23,7 @@ void BodyCopyFlare(BODY *dest, BODY *src, int foo, int iNumBodies, int iBody) { dest[iBody].iFlareFFD = src[iBody].iFlareFFD; dest[iBody].iFlareBandPass = src[iBody].iFlareBandPass; // dest[iBody].iFlareSlopeUnits = src[iBody].iFlareSlopeUnits; - dest[iBody].dEnergyBin = src[iBody].dEnergyBin; + dest[iBody].iEnergyBin = src[iBody].iEnergyBin; // dest[iBody].dFlareSlope = src[iBody].dFlareSlope; // dest[iBody].dFlareYInt = src[iBody].dFlareYInt; } @@ -38,11 +38,11 @@ void ReadFlareEnergyBin(BODY *body, int iFile) { // This parameter cannot exist in primary file int lTmp = -1; - double dTmp; + int iTmp; - AddOptionDouble(files->Infile[iFile].cIn, + AddOptionInt(files->Infile[iFile].cIn, options->cName, - &dTmp, + &iTmp, &lTmp, control->Io.iVerbose); if (lTmp >= 0) { @@ -51,10 +51,10 @@ void ReadFlareEnergyBin(BODY *body, files->Infile[iFile].cIn, lTmp, control->Io.iVerbose); - body[iFile - 1].dEnergyBin = dTmp; + body[iFile - 1].iEnergyBin = iTmp; UpdateFoundOption(&files->Infile[iFile], options, lTmp, iFile); } else if (iFile > 0) - body[iFile - 1].dEnergyBin = options->dDefault; + body[iFile - 1].iEnergyBin = (int)options->dDefault; } void ReadFlareFFD(BODY *body, @@ -525,14 +525,15 @@ void InitializeOptionsFlare(OPTIONS *options, fnReadOption fnRead[]) { sprintf(options[OPT_LXUVFLARECONST].cDimension, "energy/time"); fnRead[OPT_LXUVFLARECONST] = &ReadLXUVFlareConst; + // XXX Change to iEnergyBin for next major release sprintf(options[OPT_FLAREENERGYBIN].cName, "dEnergyBin"); sprintf(options[OPT_FLAREENERGYBIN].cDescr, "Number of energies consider between the minimum and maximum " "energies to calculate the luminosity by flares"); sprintf(options[OPT_FLAREENERGYBIN].cDefault, "100 energies between dFlareMinEnergy and dFlareMaxEnergy"); - options[OPT_FLAREENERGYBIN].dDefault = 100.0; - options[OPT_FLAREENERGYBIN].iType = 2; + options[OPT_FLAREENERGYBIN].dDefault = 100; + options[OPT_FLAREENERGYBIN].iType = 1; options[OPT_FLAREENERGYBIN].bMultiFile = 1; options[OPT_FLAREENERGYBIN].dNeg = 1; sprintf(options[OPT_FLAREENERGYBIN].cNeg, "None"); @@ -921,15 +922,15 @@ void InitializeBodyFlare(BODY *body, CONTROL *control, UPDATE *update, int iBody, int iModule) { // double *daEnergyERGXUV, *daLXUVFlare, *daFFD, *daEnergyJOUXUV, *daLogEner; // double *daLogEnerXUV, *daEnergyERG, *daEnergyJOU, *daEnerJOU; - body[iBody].daEnergyERGXUV = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daLXUVFlare = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daFFD = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daEnergyJOUXUV = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daLogEner = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daLogEnerXUV = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daEnergyERG = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daEnergyJOU = malloc(body[iBody].dEnergyBin * sizeof(double)); - body[iBody].daEnerJOU = malloc(body[iBody].dEnergyBin * sizeof(double)); + body[iBody].daEnergyERGXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daLXUVFlare = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daFFD = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyJOUXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daLogEner = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daLogEnerXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyERG = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnerJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); body[iBody].dLXUVFlare = fdLXUVFlare(body, control->Evolve.dTimeStep, iBody); } @@ -1683,7 +1684,7 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { double dEnergyMinXUV, dEnergyMaxXUV, dLogEnergyMinXUV; int iLogEnergyMinERGXUV, iLogEnergyMaxERGXUV, iLogEnergyMinXUV, iLogEnergyMaxXUV; - double dEnergyStep, dEnergyStepXUV, dEnergyBin; + double dEnergyStep, dEnergyStepXUV; // ######################### 1. Choosing how to calculate FFD: slopes(age) or @@ -1715,10 +1716,6 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { dLogEnergyMinXUV = fdBandPassXUV(body, iBody, body[iBody].dFlareMinEnergy); - // Defining the array size (dEnergybin) of energies - dEnergyBin = body[iBody].dEnergyBin; - iEnergyBin = (int)dEnergyBin; - // Declaring the XUV Energy arrays of size dEnergyBin // double daEnergyJOUXUV[iEnergyBin + 1], daLogEnerXUV[iEnergyBin + 1], // daEnergyERGXUV[iEnergyBin + 1]; @@ -1747,7 +1744,7 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { // ############################ 4. Filling the energy arrays // ######################################################################## - for (i = 0; i < iEnergyBin + 1; i++) { + for (i = 0; i < body[iBody].iEnergyBin + 1; i++) { // XUV energy (energy_joules) body[iBody].daEnergyJOUXUV[i] = fdEnergyJoulesXUV(dLogEnergyMinXUV + i * dEnergyStep); diff --git a/src/vplanet.h b/src/vplanet.h index 06037e0a5..d02d69eb0 100644 --- a/src/vplanet.h +++ b/src/vplanet.h @@ -878,7 +878,7 @@ struct BODY { int iFlareBandPass; /**< Option to choose in which band pass the input energy are*/ int iFlareSlopeUnits; /**< Mode to choose in which units the FFD slopes are*/ - double dEnergyBin; /**< Number of energies consider between the minimum and + int iEnergyBin; /**< Number of energies consider between the minimum and maximum energies to calculate the luminosity by flares*/ double *daEnergyERG; double *daEnergyJOU; From 48d5a72d4a95cd060405f3ab84e33718a86ef67f Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Tue, 23 Jan 2024 10:27:24 -0800 Subject: [PATCH 02/14] Working on correcting bug with flare energy bins. However, my disk filled up and failed to save flare.c properly and I'm now getting a bizarre message about malloc not functioning. --- src/flare.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/flare.c b/src/flare.c index 8daed086a..c820ca59c 100644 --- a/src/flare.c +++ b/src/flare.c @@ -922,15 +922,15 @@ void InitializeBodyFlare(BODY *body, CONTROL *control, UPDATE *update, int iBody, int iModule) { // double *daEnergyERGXUV, *daLXUVFlare, *daFFD, *daEnergyJOUXUV, *daLogEner; // double *daLogEnerXUV, *daEnergyERG, *daEnergyJOU, *daEnerJOU; - body[iBody].daEnergyERGXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daLXUVFlare = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daFFD = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnergyJOUXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daLogEner = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daLogEnerXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnergyERG = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnergyJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnerJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyERGXUV = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daLXUVFlare = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daEnergyJOUXUV = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daFFD = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daLogEner = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daLogEnerXUV = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daEnergyERG = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daEnergyJOU = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daEnerJOU = malloc(body[iBody].iEnergyBin * sizeof(int)); body[iBody].dLXUVFlare = fdLXUVFlare(body, control->Evolve.dTimeStep, iBody); } @@ -1679,7 +1679,6 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { double dLXUVFlare = 0.0; double dLogEnergyMinERG, dLogEnergyMaxERG, dEnergyMin, dEnergyMax, dLogEnergyMin, dLogEnergyMax; - int iEnergyBin = 0; int i, iLogEnergyMinERG, iLogEnergyMaxERG, iLogEnergyMin, iLogEnergyMax; double dEnergyMinXUV, dEnergyMaxXUV, dLogEnergyMinXUV; int iLogEnergyMinERGXUV, iLogEnergyMaxERGXUV, iLogEnergyMinXUV, @@ -1735,7 +1734,7 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { // Defining the energy step used in line 1097, 1099, and 1101 to fill the // energy arrays - dEnergyStep = (dLogEnergyMaxERG - dLogEnergyMinERG) / iEnergyBin; + dEnergyStep = (dLogEnergyMaxERG - dLogEnergyMinERG) / body[iBody].iEnergyBin; // Declaring the Kepler Energy arrays of size iEnergyBin // double daEnergyERG[iEnergyBin + 1], daEnergyJOU[iEnergyBin + 1], @@ -1759,8 +1758,8 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { body[iBody].dFlareEnergy3 = body[iBody].daEnerJOU[2]; body[iBody].dFlareEnergy4 = body[iBody].daEnerJOU[3]; body[iBody].dFlareEnergyMin = body[iBody].daEnerJOU[0]; - body[iBody].dFlareEnergyMid = body[iBody].daEnerJOU[iEnergyBin / 2]; - body[iBody].dFlareEnergyMax = body[iBody].daEnerJOU[iEnergyBin]; + body[iBody].dFlareEnergyMid = body[iBody].daEnerJOU[(int)(body[iBody].iEnergyBin / 2.)]; + body[iBody].dFlareEnergyMax = body[iBody].daEnerJOU[body[iBody].iEnergyBin]; // ############################ 5. Filling the FFD arrays // ######################################################################## @@ -1769,7 +1768,7 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { // double daFFD[iEnergyBin + 1]; // When DAVENPORT or LACY are selected, we have to calculate the FFD first. - for (i = 0; i < iEnergyBin + 1; i++) { + for (i = 0; i < body[iBody].iEnergyBin + 1; i++) { body[iBody].daFFD[i] = fdFFD(body, iBody, body[iBody].daLogEner[i], dFlareSlope, dFlareYInt); } @@ -1779,15 +1778,15 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { body[iBody].dFlareFreq3 = body[iBody].daFFD[2]; body[iBody].dFlareFreq4 = body[iBody].daFFD[3]; body[iBody].dFlareFreqMin = body[iBody].daFFD[0]; - body[iBody].dFlareFreqMid = body[iBody].daFFD[iEnergyBin / 2]; - body[iBody].dFlareFreqMax = body[iBody].daFFD[iEnergyBin]; + body[iBody].dFlareFreqMid = body[iBody].daFFD[(int)(body[iBody].iEnergyBin / 2)]; + body[iBody].dFlareFreqMax = body[iBody].daFFD[body[iBody].iEnergyBin-1]; // ############################ 6. Calculating the XUV luminosity by flares // ######################################################################## // double daLXUVFlare[iEnergyBin]; // Calculating the luminosity by flares for DAVENPORT or LACY mode // if the user select to calculate the luminosity using a FFD model - for (i = 0; i < iEnergyBin; i++) { + for (i = 0; i < body[iBody].iEnergyBin; i++) { body[iBody].daLXUVFlare[i] = (body[iBody].daEnergyJOUXUV[i + 1] - body[iBody].daEnergyJOUXUV[i]) * From 395193dcaf31d1896ed2bcf68838bbc6a55e905b Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Tue, 23 Jan 2024 10:39:09 -0800 Subject: [PATCH 03/14] Fixed issue with mallocking in flare.c. --- src/flare.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/flare.c b/src/flare.c index c820ca59c..4ea88f747 100644 --- a/src/flare.c +++ b/src/flare.c @@ -922,15 +922,15 @@ void InitializeBodyFlare(BODY *body, CONTROL *control, UPDATE *update, int iBody, int iModule) { // double *daEnergyERGXUV, *daLXUVFlare, *daFFD, *daEnergyJOUXUV, *daLogEner; // double *daLogEnerXUV, *daEnergyERG, *daEnergyJOU, *daEnerJOU; - body[iBody].daEnergyERGXUV = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daLXUVFlare = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daEnergyJOUXUV = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daFFD = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daLogEner = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daLogEnerXUV = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daEnergyERG = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daEnergyJOU = malloc(body[iBody].iEnergyBin * sizeof(int)); - body[iBody].daEnerJOU = malloc(body[iBody].iEnergyBin * sizeof(int)); + body[iBody].daEnergyERGXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daLXUVFlare = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyJOUXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daFFD = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daLogEner = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daLogEnerXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyERG = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnerJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); body[iBody].dLXUVFlare = fdLXUVFlare(body, control->Evolve.dTimeStep, iBody); } From 4f7318cfe4c1ad70c906a23210e9daf3a7ec8c7a Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Tue, 23 Jan 2024 14:25:05 -0800 Subject: [PATCH 04/14] Resolved memory leaks in flare.c. Still not sure about the lengths of the arrays in that module. --- src/flare.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/flare.c b/src/flare.c index 4ea88f747..24d6223e3 100644 --- a/src/flare.c +++ b/src/flare.c @@ -922,15 +922,15 @@ void InitializeBodyFlare(BODY *body, CONTROL *control, UPDATE *update, int iBody, int iModule) { // double *daEnergyERGXUV, *daLXUVFlare, *daFFD, *daEnergyJOUXUV, *daLogEner; // double *daLogEnerXUV, *daEnergyERG, *daEnergyJOU, *daEnerJOU; - body[iBody].daEnergyERGXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daLXUVFlare = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnergyJOUXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daFFD = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daLogEner = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daLogEnerXUV = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnergyERG = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnergyJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); - body[iBody].daEnerJOU = malloc(body[iBody].iEnergyBin * sizeof(double)); + body[iBody].daEnergyERGXUV = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daLXUVFlare = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daEnergyJOUXUV = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daFFD = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daLogEner = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daLogEnerXUV = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daEnergyERG = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daEnergyJOU = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); + body[iBody].daEnerJOU = malloc((body[iBody].iEnergyBin+1) * sizeof(double)); body[iBody].dLXUVFlare = fdLXUVFlare(body, control->Evolve.dTimeStep, iBody); } From 16d3bcb3536b0e7ed9845f6df4eaeed3a1845dee Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Tue, 23 Jan 2024 15:53:59 -0800 Subject: [PATCH 05/14] CHanged idexing in flare.c back to just the total number of bins, which I still think is wrong, but it's what Laura had originally. --- src/flare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flare.c b/src/flare.c index 24d6223e3..50bccbbbf 100644 --- a/src/flare.c +++ b/src/flare.c @@ -1779,7 +1779,7 @@ double fdLXUVFlare(BODY *body, double dDeltaTime, int iBody) { body[iBody].dFlareFreq4 = body[iBody].daFFD[3]; body[iBody].dFlareFreqMin = body[iBody].daFFD[0]; body[iBody].dFlareFreqMid = body[iBody].daFFD[(int)(body[iBody].iEnergyBin / 2)]; - body[iBody].dFlareFreqMax = body[iBody].daFFD[body[iBody].iEnergyBin-1]; + body[iBody].dFlareFreqMax = body[iBody].daFFD[body[iBody].iEnergyBin]; // ############################ 6. Calculating the XUV luminosity by flares // ######################################################################## // double daLXUVFlare[iEnergyBin]; From abfe0e2d52d300f3eee224ac95ebaf81edd11e4b Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Wed, 24 Jan 2024 09:35:37 -0800 Subject: [PATCH 06/14] Changed output times in Flare tests. --- .../test_AtmEscFlareDavenport.py | 426 +++++++++--------- .../AtmEscFlareDavenport/vpl.in | 2 +- .../AtmEscFlareLacy/test_AtmEscFlareLacy.py | 426 +++++++++--------- .../AtmescFlareStellar/AtmEscFlareLacy/vpl.in | 2 +- 4 files changed, 404 insertions(+), 452 deletions(-) diff --git a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py index f4a6ead79..e24811166 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py +++ b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py @@ -1,226 +1,202 @@ -import astropy.units as u -import pytest -from benchmark import Benchmark, benchmark - - -@benchmark( - { - "log.initial.system.Age": {"value": 3.1557600000e14, "unit": u.sec}, - "log.initial.system.Time": {"value": 0.0000000000, "unit": u.sec}, - "log.initial.system.TotAngMom": { - "value": 3.7230704732e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.system.TotEnergy": {"value": -7.1876127212e39, "unit": u.Joule}, - "log.initial.system.PotEnergy": {"value": -7.2010481575e39, "unit": u.Joule}, - "log.initial.system.KinEnergy": {"value": 1.3444021724e37, "unit": u.Joule}, - "log.initial.system.DeltaTime": {"value": 0.0000000000, "unit": u.sec}, - "log.initial.star.Mass": {"value": 2.3860992000e29, "unit": u.kg}, - "log.initial.star.Radius": {"value": 3.1661898155e08, "unit": u.m}, - "log.initial.star.RadGyra": {"value": 0.4610332834}, - "log.initial.star.RotAngMom": { - "value": 3.6973713815e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.star.RotVel": {"value": 2.3025182093e04, "unit": u.m / u.sec}, - "log.initial.star.BodyType": {"value": 0.0000000000}, - "log.initial.star.RotRate": {"value": 7.2722052166e-05, "unit": 1 / u.sec}, - "log.initial.star.RotPer": {"value": 8.6400000000e04, "unit": u.sec}, - "log.initial.star.Density": {"value": 1794.6883475331, "unit": u.kg / u.m**3}, - "log.initial.star.HZLimitDryRunaway": {"value": 1.7757648517e10, "unit": u.m}, - "log.initial.star.HZLimRecVenus": {"value": 1.5942915196e10, "unit": u.m}, - "log.initial.star.HZLimRunaway": {"value": 2.1005311219e10, "unit": u.m}, - "log.initial.star.HZLimMoistGreenhouse": { - "value": 2.1095107199e10, - "unit": u.m, - }, - "log.initial.star.HZLimMaxGreenhouse": {"value": 4.0266652294e10, "unit": u.m}, - "log.initial.star.HZLimEarlyMars": {"value": 4.3914925610e10, "unit": u.m}, - "log.initial.star.Instellation": { - "value": -1.0000000000, - "unit": u.kg / u.sec**3, - }, - "log.initial.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, - "log.initial.star.LXUVTot": { - "value": 7.4586842042e21, - "unit": u.kg / u.sec**3, - }, - "log.initial.star.LostEnergy": {"value": 5.5626846463e-309, "unit": u.Joule}, - "log.initial.star.LostAngMom": { - "value": 5.5626846463e-309, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.star.Luminosity": {"value": 6.5779241790e24, "unit": u.W}, - "log.initial.star.LXUVStellar": {"value": 1.7103286997e-05, "unit": u.LSUN}, - "log.initial.star.Temperature": {"value": 3095.3300004448, "unit": u.K}, - "log.initial.star.LXUVFrac": {"value": 0.0010000000}, - "log.initial.star.RossbyNumber": {"value": 0.0155317554}, - "log.initial.star.DRotPerDtStellar": {"value": -1.1359491987e-10}, - "log.initial.star.LXUVFlare": {"value": 2.2900676680e-06, "unit": u.LSUN}, - "log.initial.star.FlareFreq1": {"value": 7.6539612209e-07, "unit": 1 / u.sec}, - "log.initial.star.FlareFreq2": {"value": 7.1257446845e-07, "unit": 1 / u.sec}, - "log.initial.star.FlareFreq3": {"value": 6.6339815220e-07, "unit": 1 / u.sec}, - "log.initial.star.FlareFreq4": {"value": 6.1761560065e-07, "unit": 1 / u.sec}, - "log.initial.star.FlareFreqMin": {"value": 7.6539612209e-07, "unit": 1 / u.sec}, - "log.initial.star.FlareFreqMid": {"value": 2.1433162542e-08, "unit": 1 / u.sec}, - "log.initial.star.FlareFreqMax": {"value": 6.0018654825e-10, "unit": 1 / u.sec}, - "log.initial.star.FlareEnergy1": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.initial.star.FlareEnergy2": {"value": 1.0715193052e26, "unit": u.Joule}, - "log.initial.star.FlareEnergy3": {"value": 1.1481536215e26, "unit": u.Joule}, - "log.initial.star.FlareEnergy4": {"value": 1.2302687708e26, "unit": u.Joule}, - "log.initial.star.FlareEnergyMin": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.initial.star.FlareEnergyMid": {"value": 3.1622776602e27, "unit": u.Joule}, - "log.initial.star.FlareEnergyMax": {"value": 1.0000000000e29, "unit": u.Joule}, - "log.initial.b.Mass": {"value": 7.5846762200e24, "unit": u.kg}, - "log.initial.b.Radius": {"value": 8.8005344212e06, "unit": u.m}, - "log.initial.b.RadGyra": {"value": 0.5000000000}, - "log.initial.b.BodyType": {"value": 0.0000000000}, - "log.initial.b.Density": {"value": 2656.5702144167, "unit": u.kg / u.m**3}, - "log.initial.b.HZLimitDryRunaway": {"value": 1.7814747212e10, "unit": u.m}, - "log.initial.b.HZLimRecVenus": {"value": 1.5942915196e10, "unit": u.m}, - "log.initial.b.HZLimRunaway": {"value": 2.1005311219e10, "unit": u.m}, - "log.initial.b.HZLimMoistGreenhouse": {"value": 2.1095107199e10, "unit": u.m}, - "log.initial.b.HZLimMaxGreenhouse": {"value": 4.0266652294e10, "unit": u.m}, - "log.initial.b.HZLimEarlyMars": {"value": 4.3914925610e10, "unit": u.m}, - "log.initial.b.Instellation": { - "value": 9975.5972427825, - "unit": u.kg / u.sec**3, - }, - "log.initial.b.MeanMotion": {"value": 6.4573248494e-06, "unit": 1 / u.sec}, - "log.initial.b.OrbPeriod": {"value": 9.7303224691e05, "unit": u.sec}, - "log.initial.b.SemiMajorAxis": {"value": 7.2554967289e09, "unit": u.m}, - "log.initial.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec**3}, - "log.initial.b.SurfWaterMass": {"value": 1.5000000000, "unit": u.TO}, - "log.initial.b.EnvelopeMass": {"value": 0.0010000000, "unit": u.Mearth}, - "log.initial.b.OxygenMass": {"value": 0.0000000000, "unit": u.bar}, - "log.initial.b.RGLimit": {"value": 2.0225735532e10, "unit": u.m}, - "log.initial.b.XO": {"value": 0.3333333333}, - "log.initial.b.EtaO": {"value": 0.0000000000}, - "log.initial.b.PlanetRadius": {"value": 1.3798050236, "unit": u.Rearth}, - "log.initial.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, - "log.initial.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, - "log.initial.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, - "log.initial.b.PresXUV": {"value": 5.0000000000}, - "log.initial.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, - "log.initial.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, - "log.initial.b.AtmGasConst": {"value": 4124.0000000000}, - "log.initial.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, - "log.initial.b.DEnvMassDt": {"value": -7.8244286870e06, "unit": u.kg / u.sec}, - "log.initial.b.FXUV": {"value": 11.3112932829, "unit": u.W / u.m**2}, - "log.initial.b.AtmXAbsEffH2O": {"value": 0.3000000000}, - "log.initial.b.RocheRadius": {"value": 1.5935887288e08, "unit": u.m}, - "log.initial.b.BondiRadius": {"value": 1.9083081091e08, "unit": u.m}, - "log.initial.b.HEscapeRegime": {"value": 3.0000000000}, - "log.initial.b.RRCriticalFlux": { - "value": 27.7437416693, - "unit": u.W / u.m**2, - }, - "log.initial.b.KTide": {"value": 0.9172472694}, - "log.initial.b.RGDuration": {"value": 0.00000e00, "unit": u.yr}, - "log.final.system.Age": {"value": 3.4713360000e15, "unit": u.sec}, - "log.final.system.Time": {"value": 3.1557600000e15, "unit": u.sec}, - "log.final.system.TotAngMom": { - "value": 3.7341162641e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.final.system.TotEnergy": {"value": -7.1773342023e39, "unit": u.Joule}, - "log.final.system.PotEnergy": {"value": -1.6690303200e40, "unit": u.Joule}, - "log.final.system.KinEnergy": {"value": 1.4205256840e37, "unit": u.Joule}, - "log.final.system.DeltaTime": {"value": 3.1862524358e09, "unit": u.sec}, - "log.final.star.Mass": {"value": 2.3860992000e29, "unit": u.kg}, - "log.final.star.Radius": {"value": 1.3660557908e08, "unit": u.m}, - "log.final.star.RadGyra": {"value": 0.4634687359}, - "log.final.star.RotAngMom": { - "value": 1.6484382022e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.final.star.RotVel": {"value": 2.3543707420e04, "unit": u.m / u.sec}, - "log.final.star.BodyType": {"value": 0.0000000000}, - "log.final.star.RotRate": {"value": 0.0001723481, "unit": 1 / u.sec}, - "log.final.star.RotPer": {"value": 3.6456372483e04, "unit": u.sec}, - "log.final.star.Density": {"value": 2.2345731490e04, "unit": u.kg / u.m**3}, - "log.final.star.HZLimitDryRunaway": {"value": 7.5300174373e09, "unit": u.m}, - "log.final.star.HZLimRecVenus": {"value": 6.7635711614e09, "unit": u.m}, - "log.final.star.HZLimRunaway": {"value": 8.9093399396e09, "unit": u.m}, - "log.final.star.HZLimMoistGreenhouse": {"value": 8.9493215229e09, "unit": u.m}, - "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098864655e10, "unit": u.m}, - "log.final.star.HZLimEarlyMars": {"value": 1.8648060368e10, "unit": u.m}, - "log.final.star.Instellation": { - "value": -1.0000000000, - "unit": u.kg / u.sec**3, - }, - "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, - "log.final.star.LXUVTot": {"value": 1.3924485711e21, "unit": u.kg / u.sec**3}, - "log.final.star.LostEnergy": {"value": 9.4987723965e39, "unit": u.Joule}, - "log.final.star.LostAngMom": { - "value": 2.0599992484e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.final.star.Luminosity": {"value": 1.1827961871e24, "unit": u.W}, - "log.final.star.LXUVStellar": {"value": 2.7351908390e-06, "unit": u.LSUN}, - "log.final.star.Temperature": {"value": 3070.1003556256, "unit": u.K}, - "log.final.star.LXUVFrac": {"value": 0.0008893793}, - "log.final.star.RossbyNumber": {"value": 0.0064694656}, - "log.final.star.DRotPerDtStellar": {"value": -2.9636378511e-12}, - "log.final.star.LXUVFlare": {"value": 8.8531477149e-07, "unit": u.LSUN}, - "log.final.star.FlareFreq1": {"value": 3.7279360348e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreq2": {"value": 3.4532301760e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreq3": {"value": 3.1987669684e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreq4": {"value": 2.9630547623e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMin": {"value": 3.7279360348e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMid": {"value": 8.1156296479e-09, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMax": {"value": 1.7667536129e-10, "unit": 1 / u.sec}, - "log.final.star.FlareEnergy1": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.final.star.FlareEnergy2": {"value": 1.0715193052e26, "unit": u.Joule}, - "log.final.star.FlareEnergy3": {"value": 1.1481536215e26, "unit": u.Joule}, - "log.final.star.FlareEnergy4": {"value": 1.2302687708e26, "unit": u.Joule}, - "log.final.star.FlareEnergyMin": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.final.star.FlareEnergyMid": {"value": 3.1622776602e27, "unit": u.Joule}, - "log.final.star.FlareEnergyMax": {"value": 1.0000000000e29, "unit": u.Joule}, - "log.final.b.Mass": {"value": 7.5787040340e24, "unit": u.kg}, - "log.final.b.Radius": {"value": 6.8050745192e06, "unit": u.m}, - "log.final.b.RadGyra": {"value": 0.5000000000}, - "log.final.b.BodyType": {"value": 0.0000000000}, - "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m**3}, - "log.final.b.HZLimitDryRunaway": {"value": 7.5542297745e09, "unit": u.m}, - "log.final.b.HZLimRecVenus": {"value": 6.7635711614e09, "unit": u.m}, - "log.final.b.HZLimRunaway": {"value": 8.9093399396e09, "unit": u.m}, - "log.final.b.HZLimMoistGreenhouse": {"value": 8.9493215229e09, "unit": u.m}, - "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098864655e10, "unit": u.m}, - "log.final.b.HZLimEarlyMars": {"value": 1.8648060368e10, "unit": u.m}, - "log.final.b.Instellation": { - "value": 1793.7419255380, - "unit": u.kg / u.sec**3, - }, - "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec}, - "log.final.b.OrbPeriod": {"value": 9.7303225908e05, "unit": u.sec}, - "log.final.b.SemiMajorAxis": {"value": 7.2554967289e09, "unit": u.m}, - "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec**3}, - "log.final.b.SurfWaterMass": {"value": 1.0402555565, "unit": u.TO}, - "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth}, - "log.final.b.OxygenMass": {"value": 43.5900025681, "unit": u.bar}, - "log.final.b.RGLimit": {"value": 8.5788975828e09, "unit": u.m}, - "log.final.b.XO": {"value": 0.3712050013}, - "log.final.b.EtaO": {"value": 0.5563589055}, - "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth}, - "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, - "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.PresXUV": {"value": 5.0000000000}, - "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, - "log.final.b.AtmGasConst": {"value": 4124.0000000000}, - "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, - "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec}, - "log.final.b.FXUV": {"value": 2.1116853506, "unit": u.W / u.m**2}, - "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000}, - "log.final.b.RocheRadius": {"value": 1.5931703542e08, "unit": u.m}, - "log.final.b.BondiRadius": {"value": 2.9268134182e08, "unit": u.m}, - "log.final.b.HEscapeRegime": {"value": 8.0000000000}, - "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m**2}, - "log.final.b.KTide": {"value": 0.9359679029}, - "log.final.b.RGDuration": {"value": 0.00000e00, "unit": u.yr}, - } +from benchmark import Benchmark, benchmark +import astropy.units as u +import pytest + +@benchmark( + { + "log.initial.system.Age": {"value": 3.1557600000e+14, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.0000000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 3.7230704732e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -7.1876127212e+39, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -7.2010481575e+39, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.3444021724e+37, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.0000000000, "unit": u.sec}, + "log.initial.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg}, + "log.initial.star.Radius": {"value": 3.1661898155e+08, "unit": u.m}, + "log.initial.star.RadGyra": {"value": 0.4610332834}, + "log.initial.star.RotAngMom": {"value": 3.6973713815e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.star.RotVel": {"value": 2.3025182093e+04, "unit": u.m / u.sec}, + "log.initial.star.BodyType": {"value": 0.0000000000}, + "log.initial.star.RotRate": {"value": 7.2722052166e-05, "unit": 1 / u.sec}, + "log.initial.star.RotPer": {"value": 8.6400000000e+04, "unit": u.sec}, + "log.initial.star.Density": {"value": 1794.6883475331, "unit": u.kg / u.m ** 3}, + "log.initial.star.HZLimitDryRunaway": {"value": 1.7757648517e+10, "unit": u.m}, + "log.initial.star.HZLimRecVenus": {"value": 1.5942915196e+10, "unit": u.m}, + "log.initial.star.HZLimRunaway": {"value": 2.1005311219e+10, "unit": u.m}, + "log.initial.star.HZLimMoistGreenhouse": {"value": 2.1095107199e+10, "unit": u.m}, + "log.initial.star.HZLimMaxGreenhouse": {"value": 4.0266652294e+10, "unit": u.m}, + "log.initial.star.HZLimEarlyMars": {"value": 4.3914925610e+10, "unit": u.m}, + "log.initial.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.initial.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, + "log.initial.star.LXUVTot": {"value": 7.4586842042e+21, "unit": u.kg / u.sec ** 3}, + "log.initial.star.LostEnergy": {"value": 5.5626846463e-309, "unit": u.Joule}, + "log.initial.star.LostAngMom": {"value": 5.5626846463e-309, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.star.Luminosity": {"value": 6.5779241790e+24, "unit": u.W}, + "log.initial.star.LXUVStellar": {"value": 1.7103286997e-05, "unit": u.LSUN}, + "log.initial.star.Temperature": {"value": 3095.3300004448, "unit": u.K}, + "log.initial.star.LXUVFrac": {"value": 0.0010000000}, + "log.initial.star.RossbyNumber": {"value": 0.0155317554}, + "log.initial.star.DRotPerDtStellar": {"value": -1.1359491987e-10}, + "log.initial.star.LXUVFlare": {"value": 2.2900676680e-06, "unit": u.LSUN}, + "log.initial.star.FlareFreq1": {"value": 7.6539612209e-07, "unit": 1 / u.sec}, + "log.initial.star.FlareFreq2": {"value": 7.1257446845e-07, "unit": 1 / u.sec}, + "log.initial.star.FlareFreq3": {"value": 6.6339815220e-07, "unit": 1 / u.sec}, + "log.initial.star.FlareFreq4": {"value": 6.1761560065e-07, "unit": 1 / u.sec}, + "log.initial.star.FlareFreqMin": {"value": 7.6539612209e-07, "unit": 1 / u.sec}, + "log.initial.star.FlareFreqMid": {"value": 2.1433162542e-08, "unit": 1 / u.sec}, + "log.initial.star.FlareFreqMax": {"value": 6.0018654825e-10, "unit": 1 / u.sec}, + "log.initial.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule}, + "log.initial.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule}, + "log.initial.b.Mass": {"value": 7.5846762200e+24, "unit": u.kg}, + "log.initial.b.Radius": {"value": 8.8005344212e+06, "unit": u.m}, + "log.initial.b.RadGyra": {"value": 0.5000000000}, + "log.initial.b.BodyType": {"value": 0.0000000000}, + "log.initial.b.Density": {"value": 2656.5702144167, "unit": u.kg / u.m ** 3}, + "log.initial.b.HZLimitDryRunaway": {"value": 1.7814747212e+10, "unit": u.m}, + "log.initial.b.HZLimRecVenus": {"value": 1.5942915196e+10, "unit": u.m}, + "log.initial.b.HZLimRunaway": {"value": 2.1005311219e+10, "unit": u.m}, + "log.initial.b.HZLimMoistGreenhouse": {"value": 2.1095107199e+10, "unit": u.m}, + "log.initial.b.HZLimMaxGreenhouse": {"value": 4.0266652294e+10, "unit": u.m}, + "log.initial.b.HZLimEarlyMars": {"value": 4.3914925610e+10, "unit": u.m}, + "log.initial.b.Instellation": {"value": 9975.5972427825, "unit": u.kg / u.sec ** 3}, + "log.initial.b.MeanMotion": {"value": 6.4573248494e-06, "unit": 1 / u.sec}, + "log.initial.b.OrbPeriod": {"value": 9.7303224691e+05, "unit": u.sec}, + "log.initial.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m}, + "log.initial.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.initial.b.SurfWaterMass": {"value": 1.5000000000, "unit": u.TO}, + "log.initial.b.EnvelopeMass": {"value": 0.0010000000, "unit": u.Mearth}, + "log.initial.b.OxygenMass": {"value": 0.0000000000, "unit": u.bar}, + "log.initial.b.RGLimit": {"value": 2.0225735532e+10, "unit": u.m}, + "log.initial.b.XO": {"value": 0.3333333333}, + "log.initial.b.EtaO": {"value": 0.0000000000}, + "log.initial.b.PlanetRadius": {"value": 1.3798050236, "unit": u.Rearth}, + "log.initial.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, + "log.initial.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, + "log.initial.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, + "log.initial.b.PresXUV": {"value": 5.0000000000}, + "log.initial.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, + "log.initial.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, + "log.initial.b.AtmGasConst": {"value": 4124.0000000000}, + "log.initial.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, + "log.initial.b.DEnvMassDt": {"value": -7.8244286870e+06, "unit": u.kg / u.sec}, + "log.initial.b.FXUV": {"value": 11.3112932829, "unit": u.W / u.m ** 2}, + "log.initial.b.AtmXAbsEffH2O": {"value": 0.3000000000}, + "log.initial.b.RocheRadius": {"value": 1.5935887288e+08, "unit": u.m}, + "log.initial.b.BondiRadius": {"value": 1.9083081091e+08, "unit": u.m}, + "log.initial.b.HEscapeRegime": {"value": 3.0000000000}, + "log.initial.b.RRCriticalFlux": {"value": 27.7437416693, "unit": u.W / u.m ** 2}, + "log.initial.b.CrossoverMass": {"value": 0.0000000000, "unit": u.kg}, + "log.initial.b.WaterEscapeRegime": {"value": 8.0000000000}, + "log.initial.b.FXUVCRITDRAG": {"value": 0.1090267838, "unit": u.W / u.m ** 2}, + "log.initial.b.HREFFLUX": {"value": 9.6829037992e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.b.XO2": {"value": 0.0000000000}, + "log.initial.b.XH2O": {"value": 1.0000000000}, + "log.initial.b.HDiffFlux": {"value": 8.4375341524e+16, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.b.HRefODragMod": {"value": 0.0077519380}, + "log.initial.b.KTide": {"value": 0.9172472694}, + "log.initial.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.4713360000e+15, "unit": u.sec}, + "log.final.system.Time": {"value": 3.1557600000e+15, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 3.7341579011e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -7.1773447078e+39, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -1.6690355074e+40, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.4205267538e+37, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 3.7660480936e+10, "unit": u.sec}, + "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg}, + "log.final.star.Radius": {"value": 1.3660515451e+08, "unit": u.m}, + "log.final.star.RadGyra": {"value": 0.4634687441}, + "log.final.star.RotAngMom": {"value": 1.6484337287e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.star.RotVel": {"value": 2.3543715870e+04, "unit": u.m / u.sec}, + "log.final.star.BodyType": {"value": 0.0000000000}, + "log.final.star.RotRate": {"value": 0.0001723487, "unit": 1 / u.sec}, + "log.final.star.RotPer": {"value": 3.6456246094e+04, "unit": u.sec}, + "log.final.star.Density": {"value": 2.2345939842e+04, "unit": u.kg / u.m ** 3}, + "log.final.star.HZLimitDryRunaway": {"value": 7.5299891659e+09, "unit": u.m}, + "log.final.star.HZLimRecVenus": {"value": 6.7635458270e+09, "unit": u.m}, + "log.final.star.HZLimRunaway": {"value": 8.9093065315e+09, "unit": u.m}, + "log.final.star.HZLimMoistGreenhouse": {"value": 8.9492880013e+09, "unit": u.m}, + "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098800924e+10, "unit": u.m}, + "log.final.star.HZLimEarlyMars": {"value": 1.8647990862e+10, "unit": u.m}, + "log.final.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, + "log.final.star.LXUVTot": {"value": 1.3924392185e+21, "unit": u.kg / u.sec ** 3}, + "log.final.star.LostEnergy": {"value": 9.4988137536e+39, "unit": u.Joule}, + "log.final.star.LostAngMom": {"value": 2.0600453589e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.star.Luminosity": {"value": 1.1827873055e+24, "unit": u.W}, + "log.final.star.LXUVStellar": {"value": 2.7351703006e-06, "unit": u.LSUN}, + "log.final.star.Temperature": {"value": 3070.0998661274, "unit": u.K}, + "log.final.star.LXUVFrac": {"value": 0.0008893793}, + "log.final.star.RossbyNumber": {"value": 0.0064694415}, + "log.final.star.DRotPerDtStellar": {"value": -2.9636773892e-12}, + "log.final.star.LXUVFlare": {"value": 8.8531477149e-07, "unit": u.LSUN}, + "log.final.star.FlareFreq1": {"value": 3.7279360348e-07, "unit": 1 / u.sec}, + "log.final.star.FlareFreq2": {"value": 3.4532301760e-07, "unit": 1 / u.sec}, + "log.final.star.FlareFreq3": {"value": 3.1987669684e-07, "unit": 1 / u.sec}, + "log.final.star.FlareFreq4": {"value": 2.9630547623e-07, "unit": 1 / u.sec}, + "log.final.star.FlareFreqMin": {"value": 3.7279360348e-07, "unit": 1 / u.sec}, + "log.final.star.FlareFreqMid": {"value": 8.1156296479e-09, "unit": 1 / u.sec}, + "log.final.star.FlareFreqMax": {"value": 1.7667536129e-10, "unit": 1 / u.sec}, + "log.final.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.final.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule}, + "log.final.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule}, + "log.final.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule}, + "log.final.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.final.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule}, + "log.final.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule}, + "log.final.b.Mass": {"value": 7.5787040340e+24, "unit": u.kg}, + "log.final.b.Radius": {"value": 6.8050745192e+06, "unit": u.m}, + "log.final.b.RadGyra": {"value": 0.5000000000}, + "log.final.b.BodyType": {"value": 0.0000000000}, + "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m ** 3}, + "log.final.b.HZLimitDryRunaway": {"value": 7.5542014122e+09, "unit": u.m}, + "log.final.b.HZLimRecVenus": {"value": 6.7635458270e+09, "unit": u.m}, + "log.final.b.HZLimRunaway": {"value": 8.9093065315e+09, "unit": u.m}, + "log.final.b.HZLimMoistGreenhouse": {"value": 8.9492880013e+09, "unit": u.m}, + "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098800924e+10, "unit": u.m}, + "log.final.b.HZLimEarlyMars": {"value": 1.8647990862e+10, "unit": u.m}, + "log.final.b.Instellation": {"value": 1793.7284563913, "unit": u.kg / u.sec ** 3}, + "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec}, + "log.final.b.OrbPeriod": {"value": 9.7303225908e+05, "unit": u.sec}, + "log.final.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m}, + "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.final.b.SurfWaterMass": {"value": 1.0402108220, "unit": u.TO}, + "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth}, + "log.final.b.OxygenMass": {"value": 43.5932915978, "unit": u.bar}, + "log.final.b.RGLimit": {"value": 8.5788654152e+09, "unit": u.m}, + "log.final.b.XO": {"value": 0.3712092327}, + "log.final.b.EtaO": {"value": 0.5563641730}, + "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth}, + "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, + "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, + "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, + "log.final.b.PresXUV": {"value": 5.0000000000}, + "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, + "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, + "log.final.b.AtmGasConst": {"value": 4124.0000000000}, + "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, + "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec}, + "log.final.b.FXUV": {"value": 2.1116711671, "unit": u.W / u.m ** 2}, + "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000}, + "log.final.b.RocheRadius": {"value": 1.5931703542e+08, "unit": u.m}, + "log.final.b.BondiRadius": {"value": 2.9268184331e+08, "unit": u.m}, + "log.final.b.HEscapeRegime": {"value": 8.0000000000}, + "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m ** 2}, + "log.final.b.CrossoverMass": {"value": 4.8764660612e-26, "unit": u.kg}, + "log.final.b.WaterEscapeRegime": {"value": 3.0000000000}, + "log.final.b.FXUVCRITDRAG": {"value": 0.2220623340, "unit": u.W / u.m ** 2}, + "log.final.b.HREFFLUX": {"value": 1.3709166600e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.b.XO2": {"value": 0.0828667832}, + "log.final.b.XH2O": {"value": 0.9171332168}, + "log.final.b.HDiffFlux": {"value": 1.3299128469e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.b.HRefODragMod": {"value": 0.1834554926}, + "log.final.b.KTide": {"value": 0.9359679029}, + "log.final.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } ) -class TestAtmEscFlareDavenport(Benchmark): - pass +class Test_AtmEscFlareDavenport(Benchmark): + pass diff --git a/tests/AtmescFlareStellar/AtmEscFlareDavenport/vpl.in b/tests/AtmescFlareStellar/AtmEscFlareDavenport/vpl.in index 67e5fdb69..e2b98800f 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareDavenport/vpl.in +++ b/tests/AtmescFlareStellar/AtmEscFlareDavenport/vpl.in @@ -36,4 +36,4 @@ bDoForward 1 # Perform a forward evolution? bVarDt 1 # Use variable timestepping? dEta 0.01 # Coefficient for variable timestepping dStopTime 1e8 -dOutputTime 1e7 +dOutputTime 1e8 diff --git a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py index ab0c79397..09dee7103 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py +++ b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py @@ -1,226 +1,202 @@ -import astropy.units as u -import pytest -from benchmark import Benchmark, benchmark - - -@benchmark( - { - "log.initial.system.Age": {"value": 3.1557600000e14, "unit": u.sec}, - "log.initial.system.Time": {"value": 0.0000000000, "unit": u.sec}, - "log.initial.system.TotAngMom": { - "value": 3.7230704732e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.system.TotEnergy": {"value": -7.1876127212e39, "unit": u.Joule}, - "log.initial.system.PotEnergy": {"value": -7.2010481575e39, "unit": u.Joule}, - "log.initial.system.KinEnergy": {"value": 1.3444021724e37, "unit": u.Joule}, - "log.initial.system.DeltaTime": {"value": 0.0000000000, "unit": u.sec}, - "log.initial.star.Mass": {"value": 2.3860992000e29, "unit": u.kg}, - "log.initial.star.Radius": {"value": 3.1661898155e08, "unit": u.m}, - "log.initial.star.RadGyra": {"value": 0.4610332834}, - "log.initial.star.RotAngMom": { - "value": 3.6973713815e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.star.RotVel": {"value": 2.3025182093e04, "unit": u.m / u.sec}, - "log.initial.star.BodyType": {"value": 0.0000000000}, - "log.initial.star.RotRate": {"value": 7.2722052166e-05, "unit": 1 / u.sec}, - "log.initial.star.RotPer": {"value": 8.6400000000e04, "unit": u.sec}, - "log.initial.star.Density": {"value": 1794.6883475331, "unit": u.kg / u.m**3}, - "log.initial.star.HZLimitDryRunaway": {"value": 1.7757648517e10, "unit": u.m}, - "log.initial.star.HZLimRecVenus": {"value": 1.5942915196e10, "unit": u.m}, - "log.initial.star.HZLimRunaway": {"value": 2.1005311219e10, "unit": u.m}, - "log.initial.star.HZLimMoistGreenhouse": { - "value": 2.1095107199e10, - "unit": u.m, - }, - "log.initial.star.HZLimMaxGreenhouse": {"value": 4.0266652294e10, "unit": u.m}, - "log.initial.star.HZLimEarlyMars": {"value": 4.3914925610e10, "unit": u.m}, - "log.initial.star.Instellation": { - "value": -1.0000000000, - "unit": u.kg / u.sec**3, - }, - "log.initial.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, - "log.initial.star.LXUVTot": { - "value": 9.4027677015e21, - "unit": u.kg / u.sec**3, - }, - "log.initial.star.LostEnergy": {"value": 5.5626846463e-309, "unit": u.Joule}, - "log.initial.star.LostAngMom": { - "value": 5.5626846463e-309, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.star.Luminosity": {"value": 6.5779241790e24, "unit": u.W}, - "log.initial.star.LXUVStellar": {"value": 1.7103286997e-05, "unit": u.LSUN}, - "log.initial.star.Temperature": {"value": 3095.3300004448, "unit": u.K}, - "log.initial.star.LXUVFrac": {"value": 0.0010000000}, - "log.initial.star.RossbyNumber": {"value": 0.0155317554}, - "log.initial.star.DRotPerDtStellar": {"value": -1.1359491987e-10}, - "log.initial.star.LXUVFlare": {"value": 7.3448869539e-06, "unit": u.LSUN}, - "log.initial.star.FlareFreq1": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, - "log.initial.star.FlareFreq2": {"value": 1.8540389414e-06, "unit": 1 / u.sec}, - "log.initial.star.FlareFreq3": {"value": 1.7335110204e-06, "unit": 1 / u.sec}, - "log.initial.star.FlareFreq4": {"value": 1.6208184147e-06, "unit": 1 / u.sec}, - "log.initial.star.FlareFreqMin": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, - "log.initial.star.FlareFreqMid": {"value": 6.8817495244e-08, "unit": 1 / u.sec}, - "log.initial.star.FlareFreqMax": {"value": 2.3882876161e-09, "unit": 1 / u.sec}, - "log.initial.star.FlareEnergy1": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.initial.star.FlareEnergy2": {"value": 1.0715193052e26, "unit": u.Joule}, - "log.initial.star.FlareEnergy3": {"value": 1.1481536215e26, "unit": u.Joule}, - "log.initial.star.FlareEnergy4": {"value": 1.2302687708e26, "unit": u.Joule}, - "log.initial.star.FlareEnergyMin": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.initial.star.FlareEnergyMid": {"value": 3.1622776602e27, "unit": u.Joule}, - "log.initial.star.FlareEnergyMax": {"value": 1.0000000000e29, "unit": u.Joule}, - "log.initial.b.Mass": {"value": 7.5846762200e24, "unit": u.kg}, - "log.initial.b.Radius": {"value": 8.8005344212e06, "unit": u.m}, - "log.initial.b.RadGyra": {"value": 0.5000000000}, - "log.initial.b.BodyType": {"value": 0.0000000000}, - "log.initial.b.Density": {"value": 2656.5702144167, "unit": u.kg / u.m**3}, - "log.initial.b.HZLimitDryRunaway": {"value": 1.7814747212e10, "unit": u.m}, - "log.initial.b.HZLimRecVenus": {"value": 1.5942915196e10, "unit": u.m}, - "log.initial.b.HZLimRunaway": {"value": 2.1005311219e10, "unit": u.m}, - "log.initial.b.HZLimMoistGreenhouse": {"value": 2.1095107199e10, "unit": u.m}, - "log.initial.b.HZLimMaxGreenhouse": {"value": 4.0266652294e10, "unit": u.m}, - "log.initial.b.HZLimEarlyMars": {"value": 4.3914925610e10, "unit": u.m}, - "log.initial.b.Instellation": { - "value": 9975.5972427825, - "unit": u.kg / u.sec**3, - }, - "log.initial.b.MeanMotion": {"value": 6.4573248494e-06, "unit": 1 / u.sec}, - "log.initial.b.OrbPeriod": {"value": 9.7303224691e05, "unit": u.sec}, - "log.initial.b.SemiMajorAxis": {"value": 7.2554967289e09, "unit": u.m}, - "log.initial.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec**3}, - "log.initial.b.SurfWaterMass": {"value": 1.5000000000, "unit": u.TO}, - "log.initial.b.EnvelopeMass": {"value": 0.0010000000, "unit": u.Mearth}, - "log.initial.b.OxygenMass": {"value": 0.0000000000, "unit": u.bar}, - "log.initial.b.RGLimit": {"value": 2.0225735532e10, "unit": u.m}, - "log.initial.b.XO": {"value": 0.3333333333}, - "log.initial.b.EtaO": {"value": 0.0000000000}, - "log.initial.b.PlanetRadius": {"value": 1.3798050236, "unit": u.Rearth}, - "log.initial.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, - "log.initial.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, - "log.initial.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, - "log.initial.b.PresXUV": {"value": 5.0000000000}, - "log.initial.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, - "log.initial.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, - "log.initial.b.AtmGasConst": {"value": 4124.0000000000}, - "log.initial.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, - "log.initial.b.DEnvMassDt": {"value": -9.8638423785e06, "unit": u.kg / u.sec}, - "log.initial.b.FXUV": {"value": 14.2595476939, "unit": u.W / u.m**2}, - "log.initial.b.AtmXAbsEffH2O": {"value": 0.3000000000}, - "log.initial.b.RocheRadius": {"value": 1.5935887288e08, "unit": u.m}, - "log.initial.b.BondiRadius": {"value": 1.9083081091e08, "unit": u.m}, - "log.initial.b.HEscapeRegime": {"value": 3.0000000000}, - "log.initial.b.RRCriticalFlux": { - "value": 27.7437416693, - "unit": u.W / u.m**2, - }, - "log.initial.b.KTide": {"value": 0.9172472694}, - "log.initial.b.RGDuration": {"value": 0.00000e00, "unit": u.yr}, - "log.final.system.Age": {"value": 3.4713360000e15, "unit": u.sec}, - "log.final.system.Time": {"value": 3.1557600000e15, "unit": u.sec}, - "log.final.system.TotAngMom": { - "value": 3.7312616335e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.final.system.TotEnergy": {"value": -7.1795920701e39, "unit": u.Joule}, - "log.final.system.PotEnergy": {"value": -1.6690041852e40, "unit": u.Joule}, - "log.final.system.KinEnergy": {"value": 1.4186306842e37, "unit": u.Joule}, - "log.final.system.DeltaTime": {"value": 3.5142876233e09, "unit": u.sec}, - "log.final.star.Mass": {"value": 2.3860992000e29, "unit": u.kg}, - "log.final.star.Radius": {"value": 1.3660771818e08, "unit": u.m}, - "log.final.star.RadGyra": {"value": 0.4634686947}, - "log.final.star.RotAngMom": { - "value": 1.6473639655e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.final.star.RotVel": {"value": 2.3528000463e04, "unit": u.m / u.sec}, - "log.final.star.BodyType": {"value": 0.0000000000}, - "log.final.star.RotRate": {"value": 0.0001722304, "unit": 1 / u.sec}, - "log.final.star.RotPer": {"value": 3.6481281488e04, "unit": u.sec}, - "log.final.star.Density": {"value": 2.2344681790e04, "unit": u.kg / u.m**3}, - "log.final.star.HZLimitDryRunaway": {"value": 7.5301598725e09, "unit": u.m}, - "log.final.star.HZLimRecVenus": {"value": 6.7636987997e09, "unit": u.m}, - "log.final.star.HZLimRunaway": {"value": 8.9095082541e09, "unit": u.m}, - "log.final.star.HZLimMoistGreenhouse": {"value": 8.9494904093e09, "unit": u.m}, - "log.final.star.HZLimMaxGreenhouse": {"value": 1.7099185746e10, "unit": u.m}, - "log.final.star.HZLimEarlyMars": {"value": 1.8648410552e10, "unit": u.m}, - "log.final.star.Instellation": { - "value": -1.0000000000, - "unit": u.kg / u.sec**3, - }, - "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, - "log.final.star.LXUVTot": {"value": 3.8768377163e21, "unit": u.kg / u.sec**3}, - "log.final.star.LostEnergy": {"value": 9.4962721299e39, "unit": u.Joule}, - "log.final.star.LostAngMom": { - "value": 2.0582188545e41, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.final.star.Luminosity": {"value": 1.1828409343e24, "unit": u.W}, - "log.final.star.LXUVStellar": {"value": 2.7352943159e-06, "unit": u.LSUN}, - "log.final.star.Temperature": {"value": 3070.1028201381, "unit": u.K}, - "log.final.star.LXUVFrac": {"value": 0.0008893793}, - "log.final.star.RossbyNumber": {"value": 0.0064738940}, - "log.final.star.DRotPerDtStellar": {"value": -2.9654117549e-12}, - "log.final.star.LXUVFlare": {"value": 7.3448869539e-06, "unit": u.LSUN}, - "log.final.star.FlareFreq1": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreq2": {"value": 1.8540389414e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreq3": {"value": 1.7335110204e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreq4": {"value": 1.6208184147e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMin": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMid": {"value": 6.8817495244e-08, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMax": {"value": 2.3882876161e-09, "unit": 1 / u.sec}, - "log.final.star.FlareEnergy1": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.final.star.FlareEnergy2": {"value": 1.0715193052e26, "unit": u.Joule}, - "log.final.star.FlareEnergy3": {"value": 1.1481536215e26, "unit": u.Joule}, - "log.final.star.FlareEnergy4": {"value": 1.2302687708e26, "unit": u.Joule}, - "log.final.star.FlareEnergyMin": {"value": 1.0000000000e26, "unit": u.Joule}, - "log.final.star.FlareEnergyMid": {"value": 3.1622776602e27, "unit": u.Joule}, - "log.final.star.FlareEnergyMax": {"value": 1.0000000000e29, "unit": u.Joule}, - "log.final.b.Mass": {"value": 7.5787040340e24, "unit": u.kg}, - "log.final.b.Radius": {"value": 6.8050745192e06, "unit": u.m}, - "log.final.b.RadGyra": {"value": 0.5000000000}, - "log.final.b.BodyType": {"value": 0.0000000000}, - "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m**3}, - "log.final.b.HZLimitDryRunaway": {"value": 7.5543726676e09, "unit": u.m}, - "log.final.b.HZLimRecVenus": {"value": 6.7636987997e09, "unit": u.m}, - "log.final.b.HZLimRunaway": {"value": 8.9095082541e09, "unit": u.m}, - "log.final.b.HZLimMoistGreenhouse": {"value": 8.9494904093e09, "unit": u.m}, - "log.final.b.HZLimMaxGreenhouse": {"value": 1.7099185746e10, "unit": u.m}, - "log.final.b.HZLimEarlyMars": {"value": 1.8648410552e10, "unit": u.m}, - "log.final.b.Instellation": { - "value": 1793.8097857806, - "unit": u.kg / u.sec**3, - }, - "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec}, - "log.final.b.OrbPeriod": {"value": 9.7303225908e05, "unit": u.sec}, - "log.final.b.SemiMajorAxis": {"value": 7.2554967289e09, "unit": u.m}, - "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec**3}, - "log.final.b.SurfWaterMass": {"value": 0.3508535487, "unit": u.TO}, - "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth}, - "log.final.b.OxygenMass": {"value": 46.4309612009, "unit": u.bar}, - "log.final.b.RGLimit": {"value": 8.5790596482e09, "unit": u.m}, - "log.final.b.XO": {"value": 0.4398761903}, - "log.final.b.EtaO": {"value": 0.0000000000}, - "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth}, - "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, - "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.PresXUV": {"value": 5.0000000000}, - "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, - "log.final.b.AtmGasConst": {"value": 4124.0000000000}, - "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, - "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec}, - "log.final.b.FXUV": {"value": 5.8793276695, "unit": u.W / u.m**2}, - "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000}, - "log.final.b.RocheRadius": {"value": 1.5931703542e08, "unit": u.m}, - "log.final.b.BondiRadius": {"value": 2.9267881535e08, "unit": u.m}, - "log.final.b.HEscapeRegime": {"value": 8.0000000000}, - "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m**2}, - "log.final.b.KTide": {"value": 0.9359679029}, - "log.final.b.RGDuration": {"value": 0.00000e00, "unit": u.yr}, - } +from benchmark import Benchmark, benchmark +import astropy.units as u +import pytest + +@benchmark( + { + "log.initial.system.Age": {"value": 3.1557600000e+14, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.0000000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 3.7230704732e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -7.1876127212e+39, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -7.2010481575e+39, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.3444021724e+37, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.0000000000, "unit": u.sec}, + "log.initial.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg}, + "log.initial.star.Radius": {"value": 3.1661898155e+08, "unit": u.m}, + "log.initial.star.RadGyra": {"value": 0.4610332834}, + "log.initial.star.RotAngMom": {"value": 3.6973713815e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.star.RotVel": {"value": 2.3025182093e+04, "unit": u.m / u.sec}, + "log.initial.star.BodyType": {"value": 0.0000000000}, + "log.initial.star.RotRate": {"value": 7.2722052166e-05, "unit": 1 / u.sec}, + "log.initial.star.RotPer": {"value": 8.6400000000e+04, "unit": u.sec}, + "log.initial.star.Density": {"value": 1794.6883475331, "unit": u.kg / u.m ** 3}, + "log.initial.star.HZLimitDryRunaway": {"value": 1.7757648517e+10, "unit": u.m}, + "log.initial.star.HZLimRecVenus": {"value": 1.5942915196e+10, "unit": u.m}, + "log.initial.star.HZLimRunaway": {"value": 2.1005311219e+10, "unit": u.m}, + "log.initial.star.HZLimMoistGreenhouse": {"value": 2.1095107199e+10, "unit": u.m}, + "log.initial.star.HZLimMaxGreenhouse": {"value": 4.0266652294e+10, "unit": u.m}, + "log.initial.star.HZLimEarlyMars": {"value": 4.3914925610e+10, "unit": u.m}, + "log.initial.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.initial.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, + "log.initial.star.LXUVTot": {"value": 9.4027677015e+21, "unit": u.kg / u.sec ** 3}, + "log.initial.star.LostEnergy": {"value": 5.5626846463e-309, "unit": u.Joule}, + "log.initial.star.LostAngMom": {"value": 5.5626846463e-309, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.star.Luminosity": {"value": 6.5779241790e+24, "unit": u.W}, + "log.initial.star.LXUVStellar": {"value": 1.7103286997e-05, "unit": u.LSUN}, + "log.initial.star.Temperature": {"value": 3095.3300004448, "unit": u.K}, + "log.initial.star.LXUVFrac": {"value": 0.0010000000}, + "log.initial.star.RossbyNumber": {"value": 0.0155317554}, + "log.initial.star.DRotPerDtStellar": {"value": -1.1359491987e-10}, + "log.initial.star.LXUVFlare": {"value": 7.3448869539e-06, "unit": u.LSUN}, + "log.initial.star.FlareFreq1": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, + "log.initial.star.FlareFreq2": {"value": 1.8540389414e-06, "unit": 1 / u.sec}, + "log.initial.star.FlareFreq3": {"value": 1.7335110204e-06, "unit": 1 / u.sec}, + "log.initial.star.FlareFreq4": {"value": 1.6208184147e-06, "unit": 1 / u.sec}, + "log.initial.star.FlareFreqMin": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, + "log.initial.star.FlareFreqMid": {"value": 6.8817495244e-08, "unit": 1 / u.sec}, + "log.initial.star.FlareFreqMax": {"value": 2.3882876161e-09, "unit": 1 / u.sec}, + "log.initial.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.initial.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule}, + "log.initial.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule}, + "log.initial.b.Mass": {"value": 7.5846762200e+24, "unit": u.kg}, + "log.initial.b.Radius": {"value": 8.8005344212e+06, "unit": u.m}, + "log.initial.b.RadGyra": {"value": 0.5000000000}, + "log.initial.b.BodyType": {"value": 0.0000000000}, + "log.initial.b.Density": {"value": 2656.5702144167, "unit": u.kg / u.m ** 3}, + "log.initial.b.HZLimitDryRunaway": {"value": 1.7814747212e+10, "unit": u.m}, + "log.initial.b.HZLimRecVenus": {"value": 1.5942915196e+10, "unit": u.m}, + "log.initial.b.HZLimRunaway": {"value": 2.1005311219e+10, "unit": u.m}, + "log.initial.b.HZLimMoistGreenhouse": {"value": 2.1095107199e+10, "unit": u.m}, + "log.initial.b.HZLimMaxGreenhouse": {"value": 4.0266652294e+10, "unit": u.m}, + "log.initial.b.HZLimEarlyMars": {"value": 4.3914925610e+10, "unit": u.m}, + "log.initial.b.Instellation": {"value": 9975.5972427825, "unit": u.kg / u.sec ** 3}, + "log.initial.b.MeanMotion": {"value": 6.4573248494e-06, "unit": 1 / u.sec}, + "log.initial.b.OrbPeriod": {"value": 9.7303224691e+05, "unit": u.sec}, + "log.initial.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m}, + "log.initial.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.initial.b.SurfWaterMass": {"value": 1.5000000000, "unit": u.TO}, + "log.initial.b.EnvelopeMass": {"value": 0.0010000000, "unit": u.Mearth}, + "log.initial.b.OxygenMass": {"value": 0.0000000000, "unit": u.bar}, + "log.initial.b.RGLimit": {"value": 2.0225735532e+10, "unit": u.m}, + "log.initial.b.XO": {"value": 0.3333333333}, + "log.initial.b.EtaO": {"value": 0.0000000000}, + "log.initial.b.PlanetRadius": {"value": 1.3798050236, "unit": u.Rearth}, + "log.initial.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, + "log.initial.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, + "log.initial.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, + "log.initial.b.PresXUV": {"value": 5.0000000000}, + "log.initial.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, + "log.initial.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, + "log.initial.b.AtmGasConst": {"value": 4124.0000000000}, + "log.initial.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, + "log.initial.b.DEnvMassDt": {"value": -9.8638423785e+06, "unit": u.kg / u.sec}, + "log.initial.b.FXUV": {"value": 14.2595476939, "unit": u.W / u.m ** 2}, + "log.initial.b.AtmXAbsEffH2O": {"value": 0.3000000000}, + "log.initial.b.RocheRadius": {"value": 1.5935887288e+08, "unit": u.m}, + "log.initial.b.BondiRadius": {"value": 1.9083081091e+08, "unit": u.m}, + "log.initial.b.HEscapeRegime": {"value": 3.0000000000}, + "log.initial.b.RRCriticalFlux": {"value": 27.7437416693, "unit": u.W / u.m ** 2}, + "log.initial.b.CrossoverMass": {"value": 0.0000000000, "unit": u.kg}, + "log.initial.b.WaterEscapeRegime": {"value": 8.0000000000}, + "log.initial.b.FXUVCRITDRAG": {"value": 0.1090267838, "unit": u.W / u.m ** 2}, + "log.initial.b.HREFFLUX": {"value": 1.2206723412e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.b.XO2": {"value": 0.0000000000}, + "log.initial.b.XH2O": {"value": 1.0000000000}, + "log.initial.b.HDiffFlux": {"value": 8.4375341524e+16, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.b.HRefODragMod": {"value": 0.0077519380}, + "log.initial.b.KTide": {"value": 0.9172472694}, + "log.initial.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.4713360000e+15, "unit": u.sec}, + "log.final.system.Time": {"value": 3.1557600000e+15, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 3.7311341059e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -7.1802001227e+39, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -1.6690359127e+40, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.4184861863e+37, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 2.9847629316e+10, "unit": u.sec}, + "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg}, + "log.final.star.Radius": {"value": 1.3660512134e+08, "unit": u.m}, + "log.final.star.RadGyra": {"value": 0.4634687447}, + "log.final.star.RotAngMom": {"value": 1.6472489290e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.star.RotVel": {"value": 2.3526799645e+04, "unit": u.m / u.sec}, + "log.final.star.BodyType": {"value": 0.0000000000}, + "log.final.star.RotRate": {"value": 0.0001722249, "unit": 1 / u.sec}, + "log.final.star.RotPer": {"value": 3.6482449982e+04, "unit": u.sec}, + "log.final.star.Density": {"value": 2.2345956122e+04, "unit": u.kg / u.m ** 3}, + "log.final.star.HZLimitDryRunaway": {"value": 7.5299869568e+09, "unit": u.m}, + "log.final.star.HZLimRecVenus": {"value": 6.7635438474e+09, "unit": u.m}, + "log.final.star.HZLimRunaway": {"value": 8.9093039211e+09, "unit": u.m}, + "log.final.star.HZLimMoistGreenhouse": {"value": 8.9492853820e+09, "unit": u.m}, + "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098795944e+10, "unit": u.m}, + "log.final.star.HZLimEarlyMars": {"value": 1.8647985431e+10, "unit": u.m}, + "log.final.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, + "log.final.star.LXUVTot": {"value": 3.8767894028e+21, "unit": u.kg / u.sec ** 3}, + "log.final.star.LostEnergy": {"value": 9.4959827978e+39, "unit": u.Joule}, + "log.final.star.LostAngMom": {"value": 2.0582063633e+41, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.star.Luminosity": {"value": 1.1827866115e+24, "unit": u.W}, + "log.final.star.LXUVStellar": {"value": 2.7351686957e-06, "unit": u.LSUN}, + "log.final.star.Temperature": {"value": 3070.0998278738, "unit": u.K}, + "log.final.star.LXUVFrac": {"value": 0.0008893793}, + "log.final.star.RossbyNumber": {"value": 0.0064740915}, + "log.final.star.DRotPerDtStellar": {"value": -2.9658114783e-12}, + "log.final.star.LXUVFlare": {"value": 7.3448869539e-06, "unit": u.LSUN}, + "log.final.star.FlareFreq1": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, + "log.final.star.FlareFreq2": {"value": 1.8540389414e-06, "unit": 1 / u.sec}, + "log.final.star.FlareFreq3": {"value": 1.7335110204e-06, "unit": 1 / u.sec}, + "log.final.star.FlareFreq4": {"value": 1.6208184147e-06, "unit": 1 / u.sec}, + "log.final.star.FlareFreqMin": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, + "log.final.star.FlareFreqMid": {"value": 6.8817495244e-08, "unit": 1 / u.sec}, + "log.final.star.FlareFreqMax": {"value": 2.3882876161e-09, "unit": 1 / u.sec}, + "log.final.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.final.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule}, + "log.final.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule}, + "log.final.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule}, + "log.final.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule}, + "log.final.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule}, + "log.final.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule}, + "log.final.b.Mass": {"value": 7.5787040340e+24, "unit": u.kg}, + "log.final.b.Radius": {"value": 6.8050745192e+06, "unit": u.m}, + "log.final.b.RadGyra": {"value": 0.5000000000}, + "log.final.b.BodyType": {"value": 0.0000000000}, + "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m ** 3}, + "log.final.b.HZLimitDryRunaway": {"value": 7.5541991960e+09, "unit": u.m}, + "log.final.b.HZLimRecVenus": {"value": 6.7635438474e+09, "unit": u.m}, + "log.final.b.HZLimRunaway": {"value": 8.9093039211e+09, "unit": u.m}, + "log.final.b.HZLimMoistGreenhouse": {"value": 8.9492853820e+09, "unit": u.m}, + "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098795944e+10, "unit": u.m}, + "log.final.b.HZLimEarlyMars": {"value": 1.8647985431e+10, "unit": u.m}, + "log.final.b.Instellation": {"value": 1793.7274039253, "unit": u.kg / u.sec ** 3}, + "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec}, + "log.final.b.OrbPeriod": {"value": 9.7303225908e+05, "unit": u.sec}, + "log.final.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m}, + "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, + "log.final.b.SurfWaterMass": {"value": 0.3509650099, "unit": u.TO}, + "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth}, + "log.final.b.OxygenMass": {"value": 46.4328090748, "unit": u.bar}, + "log.final.b.RGLimit": {"value": 8.5788629016e+09, "unit": u.m}, + "log.final.b.XO": {"value": 0.4398513218}, + "log.final.b.EtaO": {"value": 0.0000000000}, + "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth}, + "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, + "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, + "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, + "log.final.b.PresXUV": {"value": 5.0000000000}, + "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, + "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, + "log.final.b.AtmGasConst": {"value": 4124.0000000000}, + "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, + "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec}, + "log.final.b.FXUV": {"value": 5.8792544008, "unit": u.W / u.m ** 2}, + "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000}, + "log.final.b.RocheRadius": {"value": 1.5931703542e+08, "unit": u.m}, + "log.final.b.BondiRadius": {"value": 2.9268188250e+08, "unit": u.m}, + "log.final.b.HEscapeRegime": {"value": 8.0000000000}, + "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m ** 2}, + "log.final.b.CrossoverMass": {"value": 8.3894445387e-26, "unit": u.kg}, + "log.final.b.WaterEscapeRegime": {"value": 4.0000000000}, + "log.final.b.FXUVCRITDRAG": {"value": 0.1978208482, "unit": u.W / u.m ** 2}, + "log.final.b.HREFFLUX": {"value": 3.8168669119e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.b.XO2": {"value": 0.2219353904}, + "log.final.b.XH2O": {"value": 0.7780646096}, + "log.final.b.HDiffFlux": {"value": 1.1847326044e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.b.HRefODragMod": {"value": 0.1024764157}, + "log.final.b.KTide": {"value": 0.9359679029}, + "log.final.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } ) -class TestAtmEscFlareLacy(Benchmark): - pass +class Test_AtmEscFlareLacy(Benchmark): + pass diff --git a/tests/AtmescFlareStellar/AtmEscFlareLacy/vpl.in b/tests/AtmescFlareStellar/AtmEscFlareLacy/vpl.in index 67e5fdb69..e2b98800f 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareLacy/vpl.in +++ b/tests/AtmescFlareStellar/AtmEscFlareLacy/vpl.in @@ -36,4 +36,4 @@ bDoForward 1 # Perform a forward evolution? bVarDt 1 # Use variable timestepping? dEta 0.01 # Coefficient for variable timestepping dStopTime 1e8 -dOutputTime 1e7 +dOutputTime 1e8 From 7dcca31c5ac1c1a5c51e95b3bf3c75ea318df943 Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Wed, 31 Jan 2024 15:00:07 -0800 Subject: [PATCH 07/14] Added check for commas and upper case use of module names in maketest.py --- .../test_AtmEscFlareDavenport.py | 192 +++++++++--------- .../AtmEscFlareLacy/test_AtmEscFlareLacy.py | 192 +++++++++--------- tests/maketest.py | 2 +- 3 files changed, 193 insertions(+), 193 deletions(-) diff --git a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py index e24811166..8d40567a5 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py +++ b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py @@ -100,102 +100,102 @@ "log.initial.b.HRefODragMod": {"value": 0.0077519380}, "log.initial.b.KTide": {"value": 0.9172472694}, "log.initial.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, - "log.final.system.Age": {"value": 3.4713360000e+15, "unit": u.sec}, - "log.final.system.Time": {"value": 3.1557600000e+15, "unit": u.sec}, - "log.final.system.TotAngMom": {"value": 3.7341579011e+41, "unit": (u.kg * u.m ** 2) / u.sec}, - "log.final.system.TotEnergy": {"value": -7.1773447078e+39, "unit": u.Joule}, - "log.final.system.PotEnergy": {"value": -1.6690355074e+40, "unit": u.Joule}, - "log.final.system.KinEnergy": {"value": 1.4205267538e+37, "unit": u.Joule}, - "log.final.system.DeltaTime": {"value": 3.7660480936e+10, "unit": u.sec}, - "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg}, - "log.final.star.Radius": {"value": 1.3660515451e+08, "unit": u.m}, - "log.final.star.RadGyra": {"value": 0.4634687441}, - "log.final.star.RotAngMom": {"value": 1.6484337287e+41, "unit": (u.kg * u.m ** 2) / u.sec}, - "log.final.star.RotVel": {"value": 2.3543715870e+04, "unit": u.m / u.sec}, - "log.final.star.BodyType": {"value": 0.0000000000}, - "log.final.star.RotRate": {"value": 0.0001723487, "unit": 1 / u.sec}, - "log.final.star.RotPer": {"value": 3.6456246094e+04, "unit": u.sec}, - "log.final.star.Density": {"value": 2.2345939842e+04, "unit": u.kg / u.m ** 3}, - "log.final.star.HZLimitDryRunaway": {"value": 7.5299891659e+09, "unit": u.m}, - "log.final.star.HZLimRecVenus": {"value": 6.7635458270e+09, "unit": u.m}, - "log.final.star.HZLimRunaway": {"value": 8.9093065315e+09, "unit": u.m}, - "log.final.star.HZLimMoistGreenhouse": {"value": 8.9492880013e+09, "unit": u.m}, - "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098800924e+10, "unit": u.m}, - "log.final.star.HZLimEarlyMars": {"value": 1.8647990862e+10, "unit": u.m}, - "log.final.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, - "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, - "log.final.star.LXUVTot": {"value": 1.3924392185e+21, "unit": u.kg / u.sec ** 3}, - "log.final.star.LostEnergy": {"value": 9.4988137536e+39, "unit": u.Joule}, - "log.final.star.LostAngMom": {"value": 2.0600453589e+41, "unit": (u.kg * u.m ** 2) / u.sec}, - "log.final.star.Luminosity": {"value": 1.1827873055e+24, "unit": u.W}, - "log.final.star.LXUVStellar": {"value": 2.7351703006e-06, "unit": u.LSUN}, - "log.final.star.Temperature": {"value": 3070.0998661274, "unit": u.K}, - "log.final.star.LXUVFrac": {"value": 0.0008893793}, - "log.final.star.RossbyNumber": {"value": 0.0064694415}, - "log.final.star.DRotPerDtStellar": {"value": -2.9636773892e-12}, - "log.final.star.LXUVFlare": {"value": 8.8531477149e-07, "unit": u.LSUN}, - "log.final.star.FlareFreq1": {"value": 3.7279360348e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreq2": {"value": 3.4532301760e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreq3": {"value": 3.1987669684e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreq4": {"value": 2.9630547623e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMin": {"value": 3.7279360348e-07, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMid": {"value": 8.1156296479e-09, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMax": {"value": 1.7667536129e-10, "unit": 1 / u.sec}, - "log.final.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule}, - "log.final.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule}, - "log.final.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule}, - "log.final.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule}, - "log.final.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule}, - "log.final.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule}, - "log.final.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule}, - "log.final.b.Mass": {"value": 7.5787040340e+24, "unit": u.kg}, - "log.final.b.Radius": {"value": 6.8050745192e+06, "unit": u.m}, - "log.final.b.RadGyra": {"value": 0.5000000000}, - "log.final.b.BodyType": {"value": 0.0000000000}, - "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m ** 3}, - "log.final.b.HZLimitDryRunaway": {"value": 7.5542014122e+09, "unit": u.m}, - "log.final.b.HZLimRecVenus": {"value": 6.7635458270e+09, "unit": u.m}, - "log.final.b.HZLimRunaway": {"value": 8.9093065315e+09, "unit": u.m}, - "log.final.b.HZLimMoistGreenhouse": {"value": 8.9492880013e+09, "unit": u.m}, - "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098800924e+10, "unit": u.m}, - "log.final.b.HZLimEarlyMars": {"value": 1.8647990862e+10, "unit": u.m}, - "log.final.b.Instellation": {"value": 1793.7284563913, "unit": u.kg / u.sec ** 3}, - "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec}, - "log.final.b.OrbPeriod": {"value": 9.7303225908e+05, "unit": u.sec}, - "log.final.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m}, - "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, - "log.final.b.SurfWaterMass": {"value": 1.0402108220, "unit": u.TO}, - "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth}, - "log.final.b.OxygenMass": {"value": 43.5932915978, "unit": u.bar}, - "log.final.b.RGLimit": {"value": 8.5788654152e+09, "unit": u.m}, - "log.final.b.XO": {"value": 0.3712092327}, - "log.final.b.EtaO": {"value": 0.5563641730}, - "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth}, - "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, - "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.PresXUV": {"value": 5.0000000000}, - "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, - "log.final.b.AtmGasConst": {"value": 4124.0000000000}, - "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, - "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec}, - "log.final.b.FXUV": {"value": 2.1116711671, "unit": u.W / u.m ** 2}, - "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000}, - "log.final.b.RocheRadius": {"value": 1.5931703542e+08, "unit": u.m}, - "log.final.b.BondiRadius": {"value": 2.9268184331e+08, "unit": u.m}, - "log.final.b.HEscapeRegime": {"value": 8.0000000000}, - "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m ** 2}, - "log.final.b.CrossoverMass": {"value": 4.8764660612e-26, "unit": u.kg}, - "log.final.b.WaterEscapeRegime": {"value": 3.0000000000}, - "log.final.b.FXUVCRITDRAG": {"value": 0.2220623340, "unit": u.W / u.m ** 2}, - "log.final.b.HREFFLUX": {"value": 1.3709166600e+18, "unit": 1 / u.m ** 2 / u.sec}, - "log.final.b.XO2": {"value": 0.0828667832}, - "log.final.b.XH2O": {"value": 0.9171332168}, - "log.final.b.HDiffFlux": {"value": 1.3299128469e+17, "unit": 1 / u.m ** 2 / u.sec}, - "log.final.b.HRefODragMod": {"value": 0.1834554926}, - "log.final.b.KTide": {"value": 0.9359679029}, - "log.final.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.4713360000e+15, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.Time": {"value": 3.1557600000e+15, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.TotAngMom": {"value": 3.7341579011e+41, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.system.TotEnergy": {"value": -7.1773447078e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.PotEnergy": {"value": -1.6690355074e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.KinEnergy": {"value": 1.4205267538e+37, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.DeltaTime": {"value": 3.7660480936e+10, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg, "rtol": 1e-4}, + "log.final.star.Radius": {"value": 1.3660515451e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.star.RadGyra": {"value": 0.4634687441, "rtol": 1e-4}, + "log.final.star.RotAngMom": {"value": 1.6484337287e+41, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.RotVel": {"value": 2.3543715870e+04, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.star.BodyType": {"value": 0.0000000000, "rtol": 1e-4}, + "log.final.star.RotRate": {"value": 0.0001723487, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.RotPer": {"value": 3.6456246094e+04, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.Density": {"value": 2.2345939842e+04, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.star.HZLimitDryRunaway": {"value": 7.5299891659e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRecVenus": {"value": 6.7635458270e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRunaway": {"value": 8.9093065315e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMoistGreenhouse": {"value": 8.9492880013e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098800924e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimEarlyMars": {"value": 1.8647990862e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.star.LXUVTot": {"value": 1.3924392185e+21, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.star.LostEnergy": {"value": 9.4988137536e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.LostAngMom": {"value": 2.0600453589e+41, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.Luminosity": {"value": 1.1827873055e+24, "unit": u.W, "rtol": 1e-4}, + "log.final.star.LXUVStellar": {"value": 2.7351703006e-06, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.Temperature": {"value": 3070.0998661274, "unit": u.K, "rtol": 1e-4}, + "log.final.star.LXUVFrac": {"value": 0.0008893793, "rtol": 1e-4}, + "log.final.star.RossbyNumber": {"value": 0.0064694415, "rtol": 1e-4}, + "log.final.star.DRotPerDtStellar": {"value": -2.9636773892e-12, "rtol": 1e-4}, + "log.final.star.LXUVFlare": {"value": 8.8531477149e-07, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.FlareFreq1": {"value": 3.7279360348e-07, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreq2": {"value": 3.4532301760e-07, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreq3": {"value": 3.1987669684e-07, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreq4": {"value": 2.9630547623e-07, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreqMin": {"value": 3.7279360348e-07, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreqMid": {"value": 8.1156296479e-09, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreqMax": {"value": 1.7667536129e-10, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule, "rtol": 1e-4}, + "log.final.b.Mass": {"value": 7.5787040340e+24, "unit": u.kg, "rtol": 1e-4}, + "log.final.b.Radius": {"value": 6.8050745192e+06, "unit": u.m, "rtol": 1e-4}, + "log.final.b.RadGyra": {"value": 0.5000000000, "rtol": 1e-4}, + "log.final.b.BodyType": {"value": 0.0000000000, "rtol": 1e-4}, + "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.b.HZLimitDryRunaway": {"value": 7.5542014122e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRecVenus": {"value": 6.7635458270e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRunaway": {"value": 8.9093065315e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMoistGreenhouse": {"value": 8.9492880013e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098800924e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimEarlyMars": {"value": 1.8647990862e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.b.Instellation": {"value": 1793.7284563913, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.b.OrbPeriod": {"value": 9.7303225908e+05, "unit": u.sec, "rtol": 1e-4}, + "log.final.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.SurfWaterMass": {"value": 1.0402108220, "unit": u.TO, "rtol": 1e-4}, + "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth, "rtol": 1e-4}, + "log.final.b.OxygenMass": {"value": 43.5932915978, "unit": u.bar, "rtol": 1e-4}, + "log.final.b.RGLimit": {"value": 8.5788654152e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.XO": {"value": 0.3712092327, "rtol": 1e-4}, + "log.final.b.EtaO": {"value": 0.5563641730, "rtol": 1e-4}, + "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth, "rtol": 1e-4}, + "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg, "rtol": 1e-4}, + "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.b.PresXUV": {"value": 5.0000000000, "rtol": 1e-4}, + "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K, "rtol": 1e-4}, + "log.final.b.AtmGasConst": {"value": 4124.0000000000, "rtol": 1e-4}, + "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa, "rtol": 1e-4}, + "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec, "rtol": 1e-4}, + "log.final.b.FXUV": {"value": 2.1116711671, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000, "rtol": 1e-4}, + "log.final.b.RocheRadius": {"value": 1.5931703542e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.BondiRadius": {"value": 2.9268184331e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HEscapeRegime": {"value": 8.0000000000, "rtol": 1e-4}, + "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.CrossoverMass": {"value": 4.8764660612e-26, "unit": u.kg, "rtol": 1e-4}, + "log.final.b.WaterEscapeRegime": {"value": 3.0000000000, "rtol": 1e-4}, + "log.final.b.FXUVCRITDRAG": {"value": 0.2220623340, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.HREFFLUX": {"value": 1.3709166600e+18, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.XO2": {"value": 0.0828667832, "rtol": 1e-4}, + "log.final.b.XH2O": {"value": 0.9171332168, "rtol": 1e-4}, + "log.final.b.HDiffFlux": {"value": 1.3299128469e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.HRefODragMod": {"value": 0.1834554926, "rtol": 1e-4}, + "log.final.b.KTide": {"value": 0.9359679029, "rtol": 1e-4}, + "log.final.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr, "rtol": 1e-4}, } ) class Test_AtmEscFlareDavenport(Benchmark): diff --git a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py index 09dee7103..9bc7eb697 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py +++ b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py @@ -100,102 +100,102 @@ "log.initial.b.HRefODragMod": {"value": 0.0077519380}, "log.initial.b.KTide": {"value": 0.9172472694}, "log.initial.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, - "log.final.system.Age": {"value": 3.4713360000e+15, "unit": u.sec}, - "log.final.system.Time": {"value": 3.1557600000e+15, "unit": u.sec}, - "log.final.system.TotAngMom": {"value": 3.7311341059e+41, "unit": (u.kg * u.m ** 2) / u.sec}, - "log.final.system.TotEnergy": {"value": -7.1802001227e+39, "unit": u.Joule}, - "log.final.system.PotEnergy": {"value": -1.6690359127e+40, "unit": u.Joule}, - "log.final.system.KinEnergy": {"value": 1.4184861863e+37, "unit": u.Joule}, - "log.final.system.DeltaTime": {"value": 2.9847629316e+10, "unit": u.sec}, - "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg}, - "log.final.star.Radius": {"value": 1.3660512134e+08, "unit": u.m}, - "log.final.star.RadGyra": {"value": 0.4634687447}, - "log.final.star.RotAngMom": {"value": 1.6472489290e+41, "unit": (u.kg * u.m ** 2) / u.sec}, - "log.final.star.RotVel": {"value": 2.3526799645e+04, "unit": u.m / u.sec}, - "log.final.star.BodyType": {"value": 0.0000000000}, - "log.final.star.RotRate": {"value": 0.0001722249, "unit": 1 / u.sec}, - "log.final.star.RotPer": {"value": 3.6482449982e+04, "unit": u.sec}, - "log.final.star.Density": {"value": 2.2345956122e+04, "unit": u.kg / u.m ** 3}, - "log.final.star.HZLimitDryRunaway": {"value": 7.5299869568e+09, "unit": u.m}, - "log.final.star.HZLimRecVenus": {"value": 6.7635438474e+09, "unit": u.m}, - "log.final.star.HZLimRunaway": {"value": 8.9093039211e+09, "unit": u.m}, - "log.final.star.HZLimMoistGreenhouse": {"value": 8.9492853820e+09, "unit": u.m}, - "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098795944e+10, "unit": u.m}, - "log.final.star.HZLimEarlyMars": {"value": 1.8647985431e+10, "unit": u.m}, - "log.final.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, - "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m}, - "log.final.star.LXUVTot": {"value": 3.8767894028e+21, "unit": u.kg / u.sec ** 3}, - "log.final.star.LostEnergy": {"value": 9.4959827978e+39, "unit": u.Joule}, - "log.final.star.LostAngMom": {"value": 2.0582063633e+41, "unit": (u.kg * u.m ** 2) / u.sec}, - "log.final.star.Luminosity": {"value": 1.1827866115e+24, "unit": u.W}, - "log.final.star.LXUVStellar": {"value": 2.7351686957e-06, "unit": u.LSUN}, - "log.final.star.Temperature": {"value": 3070.0998278738, "unit": u.K}, - "log.final.star.LXUVFrac": {"value": 0.0008893793}, - "log.final.star.RossbyNumber": {"value": 0.0064740915}, - "log.final.star.DRotPerDtStellar": {"value": -2.9658114783e-12}, - "log.final.star.LXUVFlare": {"value": 7.3448869539e-06, "unit": u.LSUN}, - "log.final.star.FlareFreq1": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreq2": {"value": 1.8540389414e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreq3": {"value": 1.7335110204e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreq4": {"value": 1.6208184147e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMin": {"value": 1.9829469531e-06, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMid": {"value": 6.8817495244e-08, "unit": 1 / u.sec}, - "log.final.star.FlareFreqMax": {"value": 2.3882876161e-09, "unit": 1 / u.sec}, - "log.final.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule}, - "log.final.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule}, - "log.final.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule}, - "log.final.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule}, - "log.final.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule}, - "log.final.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule}, - "log.final.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule}, - "log.final.b.Mass": {"value": 7.5787040340e+24, "unit": u.kg}, - "log.final.b.Radius": {"value": 6.8050745192e+06, "unit": u.m}, - "log.final.b.RadGyra": {"value": 0.5000000000}, - "log.final.b.BodyType": {"value": 0.0000000000}, - "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m ** 3}, - "log.final.b.HZLimitDryRunaway": {"value": 7.5541991960e+09, "unit": u.m}, - "log.final.b.HZLimRecVenus": {"value": 6.7635438474e+09, "unit": u.m}, - "log.final.b.HZLimRunaway": {"value": 8.9093039211e+09, "unit": u.m}, - "log.final.b.HZLimMoistGreenhouse": {"value": 8.9492853820e+09, "unit": u.m}, - "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098795944e+10, "unit": u.m}, - "log.final.b.HZLimEarlyMars": {"value": 1.8647985431e+10, "unit": u.m}, - "log.final.b.Instellation": {"value": 1793.7274039253, "unit": u.kg / u.sec ** 3}, - "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec}, - "log.final.b.OrbPeriod": {"value": 9.7303225908e+05, "unit": u.sec}, - "log.final.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m}, - "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3}, - "log.final.b.SurfWaterMass": {"value": 0.3509650099, "unit": u.TO}, - "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth}, - "log.final.b.OxygenMass": {"value": 46.4328090748, "unit": u.bar}, - "log.final.b.RGLimit": {"value": 8.5788629016e+09, "unit": u.m}, - "log.final.b.XO": {"value": 0.4398513218}, - "log.final.b.EtaO": {"value": 0.0000000000}, - "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth}, - "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg}, - "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.PresXUV": {"value": 5.0000000000}, - "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m}, - "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K}, - "log.final.b.AtmGasConst": {"value": 4124.0000000000}, - "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa}, - "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec}, - "log.final.b.FXUV": {"value": 5.8792544008, "unit": u.W / u.m ** 2}, - "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000}, - "log.final.b.RocheRadius": {"value": 1.5931703542e+08, "unit": u.m}, - "log.final.b.BondiRadius": {"value": 2.9268188250e+08, "unit": u.m}, - "log.final.b.HEscapeRegime": {"value": 8.0000000000}, - "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m ** 2}, - "log.final.b.CrossoverMass": {"value": 8.3894445387e-26, "unit": u.kg}, - "log.final.b.WaterEscapeRegime": {"value": 4.0000000000}, - "log.final.b.FXUVCRITDRAG": {"value": 0.1978208482, "unit": u.W / u.m ** 2}, - "log.final.b.HREFFLUX": {"value": 3.8168669119e+18, "unit": 1 / u.m ** 2 / u.sec}, - "log.final.b.XO2": {"value": 0.2219353904}, - "log.final.b.XH2O": {"value": 0.7780646096}, - "log.final.b.HDiffFlux": {"value": 1.1847326044e+17, "unit": 1 / u.m ** 2 / u.sec}, - "log.final.b.HRefODragMod": {"value": 0.1024764157}, - "log.final.b.KTide": {"value": 0.9359679029}, - "log.final.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.4713360000e+15, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.Time": {"value": 3.1557600000e+15, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.TotAngMom": {"value": 3.7311341059e+41, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.system.TotEnergy": {"value": -7.1802001227e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.PotEnergy": {"value": -1.6690359127e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.KinEnergy": {"value": 1.4184861863e+37, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.DeltaTime": {"value": 2.9847629316e+10, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg, "rtol": 1e-4}, + "log.final.star.Radius": {"value": 1.3660512134e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.star.RadGyra": {"value": 0.4634687447, "rtol": 1e-4}, + "log.final.star.RotAngMom": {"value": 1.6472489290e+41, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.RotVel": {"value": 2.3526799645e+04, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.star.BodyType": {"value": 0.0000000000, "rtol": 1e-4}, + "log.final.star.RotRate": {"value": 0.0001722249, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.RotPer": {"value": 3.6482449982e+04, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.Density": {"value": 2.2345956122e+04, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.star.HZLimitDryRunaway": {"value": 7.5299869568e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRecVenus": {"value": 6.7635438474e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRunaway": {"value": 8.9093039211e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMoistGreenhouse": {"value": 8.9492853820e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMaxGreenhouse": {"value": 1.7098795944e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimEarlyMars": {"value": 1.8647985431e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.star.Instellation": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.star.CriticalSemiMajorAxis": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.star.LXUVTot": {"value": 3.8767894028e+21, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.star.LostEnergy": {"value": 9.4959827978e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.LostAngMom": {"value": 2.0582063633e+41, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.Luminosity": {"value": 1.1827866115e+24, "unit": u.W, "rtol": 1e-4}, + "log.final.star.LXUVStellar": {"value": 2.7351686957e-06, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.Temperature": {"value": 3070.0998278738, "unit": u.K, "rtol": 1e-4}, + "log.final.star.LXUVFrac": {"value": 0.0008893793, "rtol": 1e-4}, + "log.final.star.RossbyNumber": {"value": 0.0064740915, "rtol": 1e-4}, + "log.final.star.DRotPerDtStellar": {"value": -2.9658114783e-12, "rtol": 1e-4}, + "log.final.star.LXUVFlare": {"value": 7.3448869539e-06, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.FlareFreq1": {"value": 1.9829469531e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreq2": {"value": 1.8540389414e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreq3": {"value": 1.7335110204e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreq4": {"value": 1.6208184147e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreqMin": {"value": 1.9829469531e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreqMid": {"value": 6.8817495244e-08, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareFreqMax": {"value": 2.3882876161e-09, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.FlareEnergy1": {"value": 1.0000000000e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergy2": {"value": 1.0715193052e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergy3": {"value": 1.1481536215e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergy4": {"value": 1.2302687708e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergyMin": {"value": 1.0000000000e+26, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergyMid": {"value": 3.1622776602e+27, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.FlareEnergyMax": {"value": 1.0000000000e+29, "unit": u.Joule, "rtol": 1e-4}, + "log.final.b.Mass": {"value": 7.5787040340e+24, "unit": u.kg, "rtol": 1e-4}, + "log.final.b.Radius": {"value": 6.8050745192e+06, "unit": u.m, "rtol": 1e-4}, + "log.final.b.RadGyra": {"value": 0.5000000000, "rtol": 1e-4}, + "log.final.b.BodyType": {"value": 0.0000000000, "rtol": 1e-4}, + "log.final.b.Density": {"value": 5741.2661742908, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.b.HZLimitDryRunaway": {"value": 7.5541991960e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRecVenus": {"value": 6.7635438474e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRunaway": {"value": 8.9093039211e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMoistGreenhouse": {"value": 8.9492853820e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMaxGreenhouse": {"value": 1.7098795944e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimEarlyMars": {"value": 1.8647985431e+10, "unit": u.m, "rtol": 1e-4}, + "log.final.b.Instellation": {"value": 1793.7274039253, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.MeanMotion": {"value": 6.4573247685e-06, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.b.OrbPeriod": {"value": 9.7303225908e+05, "unit": u.sec, "rtol": 1e-4}, + "log.final.b.SemiMajorAxis": {"value": 7.2554967289e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.LXUVTot": {"value": -1.0000000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.SurfWaterMass": {"value": 0.3509650099, "unit": u.TO, "rtol": 1e-4}, + "log.final.b.EnvelopeMass": {"value": 0.0000000000, "unit": u.Mearth, "rtol": 1e-4}, + "log.final.b.OxygenMass": {"value": 46.4328090748, "unit": u.bar, "rtol": 1e-4}, + "log.final.b.RGLimit": {"value": 8.5788629016e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.XO": {"value": 0.4398513218, "rtol": 1e-4}, + "log.final.b.EtaO": {"value": 0.0000000000, "rtol": 1e-4}, + "log.final.b.PlanetRadius": {"value": 1.0669438421, "unit": u.Rearth, "rtol": 1e-4}, + "log.final.b.OxygenMantleMass": {"value": 0.0000000000, "unit": u.kg, "rtol": 1e-4}, + "log.final.b.RadXUV": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.b.RadSolid": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.b.PresXUV": {"value": 5.0000000000, "rtol": 1e-4}, + "log.final.b.ScaleHeight": {"value": -1.0000000000, "unit": u.m, "rtol": 1e-4}, + "log.final.b.ThermTemp": {"value": 400.0000000000, "unit": u.K, "rtol": 1e-4}, + "log.final.b.AtmGasConst": {"value": 4124.0000000000, "rtol": 1e-4}, + "log.final.b.PresSurf": {"value": -1.0000000000, "unit": u.Pa, "rtol": 1e-4}, + "log.final.b.DEnvMassDt": {"value": 5.5626846463e-309, "unit": u.kg / u.sec, "rtol": 1e-4}, + "log.final.b.FXUV": {"value": 5.8792544008, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.AtmXAbsEffH2O": {"value": 0.3000000000, "rtol": 1e-4}, + "log.final.b.RocheRadius": {"value": 1.5931703542e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.BondiRadius": {"value": 2.9268188250e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HEscapeRegime": {"value": 8.0000000000, "rtol": 1e-4}, + "log.final.b.RRCriticalFlux": {"value": 62.3818675680, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.CrossoverMass": {"value": 8.3894445387e-26, "unit": u.kg, "rtol": 1e-4}, + "log.final.b.WaterEscapeRegime": {"value": 4.0000000000, "rtol": 1e-4}, + "log.final.b.FXUVCRITDRAG": {"value": 0.1978208482, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.HREFFLUX": {"value": 3.8168669119e+18, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.XO2": {"value": 0.2219353904, "rtol": 1e-4}, + "log.final.b.XH2O": {"value": 0.7780646096, "rtol": 1e-4}, + "log.final.b.HDiffFlux": {"value": 1.1847326044e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.HRefODragMod": {"value": 0.1024764157, "rtol": 1e-4}, + "log.final.b.KTide": {"value": 0.9359679029, "rtol": 1e-4}, + "log.final.b.RGDuration": {"value": 0.00000e+00, "unit": u.yr, "rtol": 1e-4}, } ) class Test_AtmEscFlareLacy(Benchmark): diff --git a/tests/maketest.py b/tests/maketest.py index d168b5e31..faf4a40d7 100644 --- a/tests/maketest.py +++ b/tests/maketest.py @@ -136,7 +136,7 @@ def GetSNames(bodyfiles): for line in content: if line: if line[0] == "saModules": - if "stellar" in line: + if "stellar".casefold() in line or "stellar,".casefold() in line: stellar = True if line[0] == "sName": body_names.append(line[1]) From 057f04a4114c83ec3353c39a457ccfb04ece2a0f Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Thu, 1 Feb 2024 17:40:39 -0800 Subject: [PATCH 08/14] Removed dDt from argument list to WriteOutput --- src/evolve.c | 8 +++----- src/output.c | 2 +- src/output.h | 2 +- tests/AtmescStellar/DiffLimWaterEscape/star.in | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/evolve.c b/src/evolve.c index 6aada70bd..f39db055d 100644 --- a/src/evolve.c +++ b/src/evolve.c @@ -633,7 +633,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, /* Write out initial conditions */ WriteOutput(body, control, files, output, system, update, fnWrite, - control->Evolve.dTime, dDt); + control->Evolve.dTime); /* If Runge-Kutta need to copy actual update to that in control->Evolve. This transfer all the meta-data about the @@ -671,8 +671,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, if (fbCheckHalt(body, control, update, fnUpdate)) { fdGetUpdateInfo(body, control, system, update, fnUpdate); WriteOutput(body, control, files, output, system, update, fnWrite, - control->Evolve.dTime, - control->Io.dOutputTime / control->Evolve.nSteps); + control->Evolve.dTime); return; } @@ -687,8 +686,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, if (control->Evolve.dTime >= control->Io.dNextOutput) { control->Evolve.nSteps += nSteps; WriteOutput(body, control, files, output, system, update, fnWrite, - control->Evolve.dTime, - control->Io.dOutputTime / control->Evolve.nSteps); + control->Evolve.dTime); // Timesteps are synchronized with the output time, so this statement is // sufficient control->Io.dNextOutput += control->Io.dOutputTime; diff --git a/src/output.c b/src/output.c index 3b6bb76cd..94918a9b2 100644 --- a/src/output.c +++ b/src/output.c @@ -2214,7 +2214,7 @@ void WriteLog(BODY *body, CONTROL *control, FILES *files, MODULE *module, void WriteOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, SYSTEM *system, UPDATE *update, fnWriteOutput *fnWrite, - double dTime, double dDt) { + double dTime) { int iBody, iCol, iOut, iSubOut, iExtra = 0, iGrid, iLat, jBody, j; double dCol[NUMOPT], *dTmp, dGrid[NUMOPT]; FILE *fp; diff --git a/src/output.h b/src/output.h index 428b325db..330172cb0 100644 --- a/src/output.h +++ b/src/output.h @@ -118,7 +118,7 @@ void WriteLogEntry(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UPDATE *, void InitializeOutputFunctions(MODULE *, OUTPUT *, int); void WriteOutput(BODY *, CONTROL *, FILES *, OUTPUT *, SYSTEM *, UPDATE *, - fnWriteOutput *, double, double); + fnWriteOutput *, double); void WriteLog(BODY *, CONTROL *, FILES *, MODULE *, OPTIONS *, OUTPUT *, SYSTEM *, UPDATE *, fnUpdateVariable ***, fnWriteOutput *, int); void InitializeOutput(FILES*,OUTPUT *, fnWriteOutput *); diff --git a/tests/AtmescStellar/DiffLimWaterEscape/star.in b/tests/AtmescStellar/DiffLimWaterEscape/star.in index 8b34d092c..0a7048cdd 100755 --- a/tests/AtmescStellar/DiffLimWaterEscape/star.in +++ b/tests/AtmescStellar/DiffLimWaterEscape/star.in @@ -6,4 +6,4 @@ sStellarModel baraffe dSatXUVFrac 1.e-3.03 dSatXUVTime -3.146 dXUVBeta 1.172 -saOutputOrder Time -Luminosity -LXUVTot Temperature HZLimRecVenus HZLimRunaway HZLimMaxGreenhouse HZLimEarlyMars +saOutputOrder Time -Luminosity -LXUVTot Temperature HZLimRecVenus HZLimRunaway HZLimMaxGreenhouse HZLimEarlyMars DeltaTime From 3c3be017be9d13017de9df94bd8a77f94525b9a3 Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Thu, 1 Feb 2024 17:47:08 -0800 Subject: [PATCH 09/14] Removed dTime from argument list to WriteOutput. --- src/evolve.c | 9 +++------ src/output.c | 3 +-- src/output.h | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/evolve.c b/src/evolve.c index f39db055d..72414785f 100644 --- a/src/evolve.c +++ b/src/evolve.c @@ -632,8 +632,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, } /* Write out initial conditions */ - WriteOutput(body, control, files, output, system, update, fnWrite, - control->Evolve.dTime); + WriteOutput(body, control, files, output, system, update, fnWrite); /* If Runge-Kutta need to copy actual update to that in control->Evolve. This transfer all the meta-data about the @@ -670,8 +669,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, /* Halt? */ if (fbCheckHalt(body, control, update, fnUpdate)) { fdGetUpdateInfo(body, control, system, update, fnUpdate); - WriteOutput(body, control, files, output, system, update, fnWrite, - control->Evolve.dTime); + WriteOutput(body, control, files, output, system, update, fnWrite); return; } @@ -685,8 +683,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, /* Time for Output? */ if (control->Evolve.dTime >= control->Io.dNextOutput) { control->Evolve.nSteps += nSteps; - WriteOutput(body, control, files, output, system, update, fnWrite, - control->Evolve.dTime); + WriteOutput(body, control, files, output, system, update, fnWrite); // Timesteps are synchronized with the output time, so this statement is // sufficient control->Io.dNextOutput += control->Io.dOutputTime; diff --git a/src/output.c b/src/output.c index 94918a9b2..97e1009e5 100644 --- a/src/output.c +++ b/src/output.c @@ -2213,8 +2213,7 @@ void WriteLog(BODY *body, CONTROL *control, FILES *files, MODULE *module, } void WriteOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, - SYSTEM *system, UPDATE *update, fnWriteOutput *fnWrite, - double dTime) { + SYSTEM *system, UPDATE *update, fnWriteOutput *fnWrite) { int iBody, iCol, iOut, iSubOut, iExtra = 0, iGrid, iLat, jBody, j; double dCol[NUMOPT], *dTmp, dGrid[NUMOPT]; FILE *fp; diff --git a/src/output.h b/src/output.h index 330172cb0..dede94e80 100644 --- a/src/output.h +++ b/src/output.h @@ -118,7 +118,7 @@ void WriteLogEntry(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UPDATE *, void InitializeOutputFunctions(MODULE *, OUTPUT *, int); void WriteOutput(BODY *, CONTROL *, FILES *, OUTPUT *, SYSTEM *, UPDATE *, - fnWriteOutput *, double); + fnWriteOutput *); void WriteLog(BODY *, CONTROL *, FILES *, MODULE *, OPTIONS *, OUTPUT *, SYSTEM *, UPDATE *, fnUpdateVariable ***, fnWriteOutput *, int); void InitializeOutput(FILES*,OUTPUT *, fnWriteOutput *); From bd733c56ca642190f227fe660dc42d77b5fb148e Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Feb 2024 09:44:09 -0800 Subject: [PATCH 10/14] Modified maketest to skip final DeltaTime if STELLAR module called. For some reason the number of steps taken in the mac and linux version can be different by 50%! --- src/evolve.c | 1 + .../test_AtmEscFlareDavenport.py | 1 - .../AtmEscFlareLacy/test_AtmEscFlareLacy.py | 1 - .../test_DiffLimWaterEscape.py | 105 +++++++++--------- tests/AtmescStellar/DiffLimWaterEscape/vpl.in | 2 +- tests/maketest.py | 39 ++++--- 6 files changed, 77 insertions(+), 72 deletions(-) diff --git a/src/evolve.c b/src/evolve.c index 72414785f..4872a75f1 100644 --- a/src/evolve.c +++ b/src/evolve.c @@ -687,6 +687,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, // Timesteps are synchronized with the output time, so this statement is // sufficient control->Io.dNextOutput += control->Io.dOutputTime; + printf("%d\n",nSteps); nSteps = 0; } diff --git a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py index 8d40567a5..7a19a3521 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py +++ b/tests/AtmescFlareStellar/AtmEscFlareDavenport/test_AtmEscFlareDavenport.py @@ -106,7 +106,6 @@ "log.final.system.TotEnergy": {"value": -7.1773447078e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.6690355074e+40, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.KinEnergy": {"value": 1.4205267538e+37, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.DeltaTime": {"value": 3.7660480936e+10, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 1.3660515451e+08, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.4634687441, "rtol": 1e-4}, diff --git a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py index 9bc7eb697..645ffe2e0 100644 --- a/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py +++ b/tests/AtmescFlareStellar/AtmEscFlareLacy/test_AtmEscFlareLacy.py @@ -106,7 +106,6 @@ "log.final.system.TotEnergy": {"value": -7.1802001227e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.6690359127e+40, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.KinEnergy": {"value": 1.4184861863e+37, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.DeltaTime": {"value": 2.9847629316e+10, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Mass": {"value": 2.3860992000e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 1.3660512134e+08, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.4634687447, "rtol": 1e-4}, diff --git a/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py b/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py index 3d835f2c5..957db6871 100644 --- a/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py +++ b/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py @@ -135,57 +135,56 @@ "log.initial.e.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, "log.final.system.Age": {"value": 3.001128e+16, "unit": u.sec, "rtol": 1e-4}, "log.final.system.Time": {"value": 2.997972e+16, "unit": u.sec, "rtol": 1e-4}, - "log.final.system.TotAngMom": {"value": 1.140605e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, - "log.final.system.TotEnergy": {"value": -1.890023e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.TotAngMom": {"value": 1.140596e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.system.TotEnergy": {"value": -1.891237e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.631379e+40, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.KinEnergy": {"value": 9.851807e+35, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.DeltaTime": {"value": 2.721322e+11, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.KinEnergy": {"value": 9.848447e+35, "unit": u.Joule, "rtol": 1e-4}, "log.final.star.Mass": {"value": 1.789574e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 7.861410e+07, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.465100, "rtol": 1e-4}, - "log.final.star.RotAngMom": {"value": 2.171174e+40, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, - "log.final.star.RotVel": {"value": 7134.305972, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.star.RotAngMom": {"value": 2.170804e+40, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.RotVel": {"value": 7133.089239, "unit": u.m / u.sec, "rtol": 1e-4}, "log.final.star.BodyType": {"value": 0.000000, "rtol": 1e-4}, - "log.final.star.RotRate": {"value": 9.075097e-05, "unit": 1 / u.sec, "rtol": 1e-4}, - "log.final.star.RotPer": {"value": 6.923546e+04, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.RotRate": {"value": 9.073549e-05, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.RotPer": {"value": 6.924727e+04, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Density": {"value": 8.793460e+04, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.star.HZLimitDryRunaway": {"value": 3.236261e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimitDryRunaway": {"value": 3.236263e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, "log.final.star.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.star.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, - "log.final.star.LXUVTot": {"value": 5.680619e-07, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.star.LostEnergy": {"value": 1.442281e+40, "unit": u.Joule, "rtol": 1e-4}, - "log.final.star.LostAngMom": {"value": 1.116766e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.LXUVTot": {"value": 5.680627e-07, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.LostEnergy": {"value": 1.442160e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.LostAngMom": {"value": 1.116760e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, "log.final.star.Luminosity": {"value": 0.000568, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.star.LXUVStellar": {"value": 2.184766e+20, "unit": u.W, "rtol": 1e-4}, - "log.final.star.Temperature": {"value": 2649.348933, "unit": u.K, "rtol": 1e-4}, + "log.final.star.LXUVStellar": {"value": 2.184769e+20, "unit": u.W, "rtol": 1e-4}, + "log.final.star.Temperature": {"value": 2649.349670, "unit": u.K, "rtol": 1e-4}, "log.final.star.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, - "log.final.star.RossbyNumber": {"value": 0.009905, "rtol": 1e-4}, - "log.final.star.DRotPerDtStellar": {"value": 1.447229e-12, "rtol": 1e-4}, + "log.final.star.RossbyNumber": {"value": 0.009906, "rtol": 1e-4}, + "log.final.star.DRotPerDtStellar": {"value": 1.447475e-12, "rtol": 1e-4}, "log.final.b.Mass": {"value": 8.223700e+24, "unit": u.kg, "rtol": 1e-4}, "log.final.b.Radius": {"value": 7.124338e+06, "unit": u.m, "rtol": 1e-4}, "log.final.b.RadGyra": {"value": 0.500000, "rtol": 1e-4}, "log.final.b.BodyType": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.Density": {"value": 5429.316562, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.b.HZLimitDryRunaway": {"value": 3.236287e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.Instellation": {"value": 5825.743992, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.HZLimitDryRunaway": {"value": 3.236289e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.Instellation": {"value": 5825.751791, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.b.MeanMotion": {"value": 4.813397e-05, "unit": 1 / u.sec, "rtol": 1e-4}, "log.final.b.OrbPeriod": {"value": 1.305354e+05, "unit": u.sec, "rtol": 1e-4}, "log.final.b.SemiMajorAxis": {"value": 1.727522e+09, "unit": u.m, "rtol": 1e-4}, "log.final.b.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.b.SurfWaterMass": {"value": 0.000000, "unit": u.TO, "rtol": 1e-4}, "log.final.b.EnvelopeMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, - "log.final.b.OxygenMass": {"value": 1146.053603, "unit": u.bar, "rtol": 1e-4}, - "log.final.b.RGLimit": {"value": 3.704010e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.OxygenMass": {"value": 1146.046267, "unit": u.bar, "rtol": 1e-4}, + "log.final.b.RGLimit": {"value": 3.704012e+09, "unit": u.m, "rtol": 1e-4}, "log.final.b.XO": {"value": 1.000000, "rtol": 1e-4}, "log.final.b.EtaO": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.PlanetRadius": {"value": 7.124338e+06, "unit": u.m, "rtol": 1e-4}, @@ -198,16 +197,16 @@ "log.final.b.AtmGasConst": {"value": 4124.000000, "rtol": 1e-4}, "log.final.b.PresSurf": {"value": -1.000000, "unit": u.Pa, "rtol": 1e-4}, "log.final.b.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec, "rtol": 1e-4}, - "log.final.b.FXUV": {"value": 5.825744, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.FXUV": {"value": 5.825752, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.b.AtmXAbsEffH2O": {"value": 0.041374, "rtol": 1e-4}, "log.final.b.RocheRadius": {"value": 4.290313e+07, "unit": u.m, "rtol": 1e-4}, - "log.final.b.BondiRadius": {"value": 9.942293e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.BondiRadius": {"value": 9.942290e+08, "unit": u.m, "rtol": 1e-4}, "log.final.b.HEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.b.RRCriticalFlux": {"value": 41.454587, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.b.CrossoverMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, "log.final.b.WaterEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.b.FXUVCRITDRAG": {"value": 0.000000, "unit": u.W / u.m ** 2, "rtol": 1e-4}, - "log.final.b.HREFFLUX": {"value": 4.676160e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.HREFFLUX": {"value": 4.676164e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, "log.final.b.XO2": {"value": 1.000000, "rtol": 1e-4}, "log.final.b.XH2O": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.HDiffFlux": {"value": 0.000000, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, @@ -219,22 +218,22 @@ "log.final.e.RadGyra": {"value": 0.500000, "rtol": 1e-4}, "log.final.e.BodyType": {"value": 0.000000, "rtol": 1e-4}, "log.final.e.Density": {"value": 4858.600773, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.e.HZLimitDryRunaway": {"value": 3.236326e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.Instellation": {"value": 905.968971, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.e.HZLimitDryRunaway": {"value": 3.236329e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.Instellation": {"value": 905.970184, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.e.MeanMotion": {"value": 1.191967e-05, "unit": 1 / u.sec, "rtol": 1e-4}, "log.final.e.OrbPeriod": {"value": 5.271275e+05, "unit": u.sec, "rtol": 1e-4}, "log.final.e.SemiMajorAxis": {"value": 4.380718e+09, "unit": u.m, "rtol": 1e-4}, "log.final.e.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, - "log.final.e.SurfWaterMass": {"value": 3.053422, "unit": u.TO, "rtol": 1e-4}, + "log.final.e.SurfWaterMass": {"value": 3.052434, "unit": u.TO, "rtol": 1e-4}, "log.final.e.EnvelopeMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, - "log.final.e.OxygenMass": {"value": 1031.243496, "unit": u.bar, "rtol": 1e-4}, - "log.final.e.RGLimit": {"value": 3.765018e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.XO": {"value": 0.554278, "rtol": 1e-4}, + "log.final.e.OxygenMass": {"value": 1031.463102, "unit": u.bar, "rtol": 1e-4}, + "log.final.e.RGLimit": {"value": 3.765020e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.XO": {"value": 0.554357, "rtol": 1e-4}, "log.final.e.EtaO": {"value": 0.000000, "rtol": 1e-4}, "log.final.e.PlanetRadius": {"value": 5.880608e+06, "unit": u.m, "rtol": 1e-4}, "log.final.e.OxygenMantleMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, @@ -246,22 +245,22 @@ "log.final.e.AtmGasConst": {"value": 4124.000000, "rtol": 1e-4}, "log.final.e.PresSurf": {"value": -1.000000, "unit": u.Pa, "rtol": 1e-4}, "log.final.e.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec, "rtol": 1e-4}, - "log.final.e.FXUV": {"value": 0.905969, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.e.FXUV": {"value": 0.905970, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.e.AtmXAbsEffH2O": {"value": 0.073282, "rtol": 1e-4}, "log.final.e.RocheRadius": {"value": 8.653872e+07, "unit": u.m, "rtol": 1e-4}, - "log.final.e.BondiRadius": {"value": 3.142136e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.e.BondiRadius": {"value": 3.142135e+08, "unit": u.m, "rtol": 1e-4}, "log.final.e.HEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.e.RRCriticalFlux": {"value": 26.551159, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.e.CrossoverMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, "log.final.e.WaterEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, - "log.final.e.FXUVCRITDRAG": {"value": 0.297807, "unit": u.W / u.m ** 2, "rtol": 1e-4}, - "log.final.e.HREFFLUX": {"value": 2.112523e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, - "log.final.e.XO2": {"value": 0.426457, "rtol": 1e-4}, - "log.final.e.XH2O": {"value": 0.573543, "rtol": 1e-4}, - "log.final.e.HDiffFlux": {"value": 6.894047e+16, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, - "log.final.e.HRefODragMod": {"value": 0.003131, "rtol": 1e-4}, + "log.final.e.FXUVCRITDRAG": {"value": 0.297754, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.e.HREFFLUX": {"value": 2.112525e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.e.XO2": {"value": 0.426589, "rtol": 1e-4}, + "log.final.e.XH2O": {"value": 0.573411, "rtol": 1e-4}, + "log.final.e.HDiffFlux": {"value": 6.892821e+16, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.e.HRefODragMod": {"value": 0.003130, "rtol": 1e-4}, "log.final.e.KTide": {"value": 0.898227, "rtol": 1e-4}, - "log.final.e.RGDuration": {"value": 3.80345e+08, "unit": u.yr, "rtol": 1e-4}, + "log.final.e.RGDuration": {"value": 3.80438e+08, "unit": u.yr, "rtol": 1e-4}, } ) class Test_DiffLimWaterEscape(Benchmark): diff --git a/tests/AtmescStellar/DiffLimWaterEscape/vpl.in b/tests/AtmescStellar/DiffLimWaterEscape/vpl.in index 6a28b602b..10d93eaa2 100755 --- a/tests/AtmescStellar/DiffLimWaterEscape/vpl.in +++ b/tests/AtmescStellar/DiffLimWaterEscape/vpl.in @@ -14,4 +14,4 @@ bDoForward 1 bVarDt 1 dEta 0.1 dStopTime 0.95e9 -dOutputTime 0.95e9 +dOutputTime 0.95e7 diff --git a/tests/maketest.py b/tests/maketest.py index faf4a40d7..3060b9a57 100644 --- a/tests/maketest.py +++ b/tests/maketest.py @@ -138,6 +138,7 @@ def GetSNames(bodyfiles): if line[0] == "saModules": if "stellar".casefold() in line or "stellar,".casefold() in line: stellar = True + print("WARNING: Stellar module detected, rtol will be set to 1e-4 for all values.") if line[0] == "sName": body_names.append(line[1]) @@ -475,15 +476,18 @@ def WriteTest(data, dirname, stellar): if "log" in k and v[0] != "": if "final" in k and stellar == True: - t.write( - ' "' - + k - + '": {"value": ' - + str(v[1]) - + ', "unit": ' - + v[0] - + ', "rtol": 1e-4}, \n' - ) + if "DeltaTime" in k: + print("WARNING: Skipping final DeltaTime") + else: + t.write( + ' "' + + k + + '": {"value": ' + + str(v[1]) + + ', "unit": ' + + v[0] + + ', "rtol": 1e-4}, \n' + ) else: t.write( ' "' @@ -496,13 +500,16 @@ def WriteTest(data, dirname, stellar): ) if "log" in k and v[0] == "": if "final" in k and stellar == True: - t.write( - ' "' - + k - + '": {"value": ' - + str(v[1]) - + ', "rtol": 1e-4}, \n' - ) + if "DeltaTime" in k: + print("WARNING: Skipping final DeltaTime") + else: + t.write( + ' "' + + k + + '": {"value": ' + + str(v[1]) + + ', "rtol": 1e-4}, \n' + ) else: t.write(' "' + k + '": {"value": ' + str(v[1]) + "}, \n") From b21125ee7fc9416a4bedf60c4bea414bd0073fce Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Feb 2024 09:57:01 -0800 Subject: [PATCH 11/14] Chnaged output time in test DiffWaterLimEscape back to the stop time. --- src/evolve.c | 2 +- .../test_DiffLimWaterEscape.py | 104 +++++++++--------- tests/AtmescStellar/DiffLimWaterEscape/vpl.in | 2 +- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/evolve.c b/src/evolve.c index 4872a75f1..ea0931ddf 100644 --- a/src/evolve.c +++ b/src/evolve.c @@ -687,7 +687,7 @@ void Evolve(BODY *body, CONTROL *control, FILES *files, MODULE *module, // Timesteps are synchronized with the output time, so this statement is // sufficient control->Io.dNextOutput += control->Io.dOutputTime; - printf("%d\n",nSteps); + //printf("%d\n",nSteps); nSteps = 0; } diff --git a/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py b/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py index 957db6871..e941677dd 100644 --- a/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py +++ b/tests/AtmescStellar/DiffLimWaterEscape/test_DiffLimWaterEscape.py @@ -135,56 +135,56 @@ "log.initial.e.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, "log.final.system.Age": {"value": 3.001128e+16, "unit": u.sec, "rtol": 1e-4}, "log.final.system.Time": {"value": 2.997972e+16, "unit": u.sec, "rtol": 1e-4}, - "log.final.system.TotAngMom": {"value": 1.140596e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, - "log.final.system.TotEnergy": {"value": -1.891237e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.TotAngMom": {"value": 1.140605e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.system.TotEnergy": {"value": -1.890023e+39, "unit": u.Joule, "rtol": 1e-4}, "log.final.system.PotEnergy": {"value": -1.631379e+40, "unit": u.Joule, "rtol": 1e-4}, - "log.final.system.KinEnergy": {"value": 9.848447e+35, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.KinEnergy": {"value": 9.851807e+35, "unit": u.Joule, "rtol": 1e-4}, "log.final.star.Mass": {"value": 1.789574e+29, "unit": u.kg, "rtol": 1e-4}, "log.final.star.Radius": {"value": 7.861410e+07, "unit": u.m, "rtol": 1e-4}, "log.final.star.RadGyra": {"value": 0.465100, "rtol": 1e-4}, - "log.final.star.RotAngMom": {"value": 2.170804e+40, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, - "log.final.star.RotVel": {"value": 7133.089239, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.star.RotAngMom": {"value": 2.171174e+40, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.RotVel": {"value": 7134.305972, "unit": u.m / u.sec, "rtol": 1e-4}, "log.final.star.BodyType": {"value": 0.000000, "rtol": 1e-4}, - "log.final.star.RotRate": {"value": 9.073549e-05, "unit": 1 / u.sec, "rtol": 1e-4}, - "log.final.star.RotPer": {"value": 6.924727e+04, "unit": u.sec, "rtol": 1e-4}, + "log.final.star.RotRate": {"value": 9.075097e-05, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.star.RotPer": {"value": 6.923546e+04, "unit": u.sec, "rtol": 1e-4}, "log.final.star.Density": {"value": 8.793460e+04, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.star.HZLimitDryRunaway": {"value": 3.236263e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.star.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimitDryRunaway": {"value": 3.236261e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.star.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, "log.final.star.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.star.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, - "log.final.star.LXUVTot": {"value": 5.680627e-07, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.star.LostEnergy": {"value": 1.442160e+40, "unit": u.Joule, "rtol": 1e-4}, - "log.final.star.LostAngMom": {"value": 1.116760e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.star.LXUVTot": {"value": 5.680619e-07, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.star.LostEnergy": {"value": 1.442281e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.star.LostAngMom": {"value": 1.116766e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, "log.final.star.Luminosity": {"value": 0.000568, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.star.LXUVStellar": {"value": 2.184769e+20, "unit": u.W, "rtol": 1e-4}, - "log.final.star.Temperature": {"value": 2649.349670, "unit": u.K, "rtol": 1e-4}, + "log.final.star.LXUVStellar": {"value": 2.184766e+20, "unit": u.W, "rtol": 1e-4}, + "log.final.star.Temperature": {"value": 2649.348933, "unit": u.K, "rtol": 1e-4}, "log.final.star.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, - "log.final.star.RossbyNumber": {"value": 0.009906, "rtol": 1e-4}, - "log.final.star.DRotPerDtStellar": {"value": 1.447475e-12, "rtol": 1e-4}, + "log.final.star.RossbyNumber": {"value": 0.009905, "rtol": 1e-4}, + "log.final.star.DRotPerDtStellar": {"value": 1.447229e-12, "rtol": 1e-4}, "log.final.b.Mass": {"value": 8.223700e+24, "unit": u.kg, "rtol": 1e-4}, "log.final.b.Radius": {"value": 7.124338e+06, "unit": u.m, "rtol": 1e-4}, "log.final.b.RadGyra": {"value": 0.500000, "rtol": 1e-4}, "log.final.b.BodyType": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.Density": {"value": 5429.316562, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.b.HZLimitDryRunaway": {"value": 3.236289e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.b.Instellation": {"value": 5825.751791, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.b.HZLimitDryRunaway": {"value": 3.236287e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.Instellation": {"value": 5825.743992, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.b.MeanMotion": {"value": 4.813397e-05, "unit": 1 / u.sec, "rtol": 1e-4}, "log.final.b.OrbPeriod": {"value": 1.305354e+05, "unit": u.sec, "rtol": 1e-4}, "log.final.b.SemiMajorAxis": {"value": 1.727522e+09, "unit": u.m, "rtol": 1e-4}, "log.final.b.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.b.SurfWaterMass": {"value": 0.000000, "unit": u.TO, "rtol": 1e-4}, "log.final.b.EnvelopeMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, - "log.final.b.OxygenMass": {"value": 1146.046267, "unit": u.bar, "rtol": 1e-4}, - "log.final.b.RGLimit": {"value": 3.704012e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.b.OxygenMass": {"value": 1146.053603, "unit": u.bar, "rtol": 1e-4}, + "log.final.b.RGLimit": {"value": 3.704010e+09, "unit": u.m, "rtol": 1e-4}, "log.final.b.XO": {"value": 1.000000, "rtol": 1e-4}, "log.final.b.EtaO": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.PlanetRadius": {"value": 7.124338e+06, "unit": u.m, "rtol": 1e-4}, @@ -197,16 +197,16 @@ "log.final.b.AtmGasConst": {"value": 4124.000000, "rtol": 1e-4}, "log.final.b.PresSurf": {"value": -1.000000, "unit": u.Pa, "rtol": 1e-4}, "log.final.b.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec, "rtol": 1e-4}, - "log.final.b.FXUV": {"value": 5.825752, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.b.FXUV": {"value": 5.825744, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.b.AtmXAbsEffH2O": {"value": 0.041374, "rtol": 1e-4}, "log.final.b.RocheRadius": {"value": 4.290313e+07, "unit": u.m, "rtol": 1e-4}, - "log.final.b.BondiRadius": {"value": 9.942290e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.b.BondiRadius": {"value": 9.942293e+08, "unit": u.m, "rtol": 1e-4}, "log.final.b.HEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.b.RRCriticalFlux": {"value": 41.454587, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.b.CrossoverMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, "log.final.b.WaterEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.b.FXUVCRITDRAG": {"value": 0.000000, "unit": u.W / u.m ** 2, "rtol": 1e-4}, - "log.final.b.HREFFLUX": {"value": 4.676164e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.b.HREFFLUX": {"value": 4.676160e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, "log.final.b.XO2": {"value": 1.000000, "rtol": 1e-4}, "log.final.b.XH2O": {"value": 0.000000, "rtol": 1e-4}, "log.final.b.HDiffFlux": {"value": 0.000000, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, @@ -218,22 +218,22 @@ "log.final.e.RadGyra": {"value": 0.500000, "rtol": 1e-4}, "log.final.e.BodyType": {"value": 0.000000, "rtol": 1e-4}, "log.final.e.Density": {"value": 4858.600773, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, - "log.final.e.HZLimitDryRunaway": {"value": 3.236329e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimRecVenus": {"value": 2.926997e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimRunaway": {"value": 3.845737e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimMoistGreenhouse": {"value": 3.872909e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimMaxGreenhouse": {"value": 7.519106e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.HZLimEarlyMars": {"value": 8.200585e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.Instellation": {"value": 905.970184, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.e.HZLimitDryRunaway": {"value": 3.236326e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimRecVenus": {"value": 2.926995e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimRunaway": {"value": 3.845735e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimMoistGreenhouse": {"value": 3.872906e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimMaxGreenhouse": {"value": 7.519102e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.HZLimEarlyMars": {"value": 8.200580e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.Instellation": {"value": 905.968971, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, "log.final.e.MeanMotion": {"value": 1.191967e-05, "unit": 1 / u.sec, "rtol": 1e-4}, "log.final.e.OrbPeriod": {"value": 5.271275e+05, "unit": u.sec, "rtol": 1e-4}, "log.final.e.SemiMajorAxis": {"value": 4.380718e+09, "unit": u.m, "rtol": 1e-4}, "log.final.e.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, - "log.final.e.SurfWaterMass": {"value": 3.052434, "unit": u.TO, "rtol": 1e-4}, + "log.final.e.SurfWaterMass": {"value": 3.053422, "unit": u.TO, "rtol": 1e-4}, "log.final.e.EnvelopeMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, - "log.final.e.OxygenMass": {"value": 1031.463102, "unit": u.bar, "rtol": 1e-4}, - "log.final.e.RGLimit": {"value": 3.765020e+09, "unit": u.m, "rtol": 1e-4}, - "log.final.e.XO": {"value": 0.554357, "rtol": 1e-4}, + "log.final.e.OxygenMass": {"value": 1031.243496, "unit": u.bar, "rtol": 1e-4}, + "log.final.e.RGLimit": {"value": 3.765018e+09, "unit": u.m, "rtol": 1e-4}, + "log.final.e.XO": {"value": 0.554278, "rtol": 1e-4}, "log.final.e.EtaO": {"value": 0.000000, "rtol": 1e-4}, "log.final.e.PlanetRadius": {"value": 5.880608e+06, "unit": u.m, "rtol": 1e-4}, "log.final.e.OxygenMantleMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, @@ -245,22 +245,22 @@ "log.final.e.AtmGasConst": {"value": 4124.000000, "rtol": 1e-4}, "log.final.e.PresSurf": {"value": -1.000000, "unit": u.Pa, "rtol": 1e-4}, "log.final.e.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec, "rtol": 1e-4}, - "log.final.e.FXUV": {"value": 0.905970, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.e.FXUV": {"value": 0.905969, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.e.AtmXAbsEffH2O": {"value": 0.073282, "rtol": 1e-4}, "log.final.e.RocheRadius": {"value": 8.653872e+07, "unit": u.m, "rtol": 1e-4}, - "log.final.e.BondiRadius": {"value": 3.142135e+08, "unit": u.m, "rtol": 1e-4}, + "log.final.e.BondiRadius": {"value": 3.142136e+08, "unit": u.m, "rtol": 1e-4}, "log.final.e.HEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, "log.final.e.RRCriticalFlux": {"value": 26.551159, "unit": u.W / u.m ** 2, "rtol": 1e-4}, "log.final.e.CrossoverMass": {"value": 0.000000, "unit": u.kg, "rtol": 1e-4}, "log.final.e.WaterEscapeRegime": {"value": 8.000000, "rtol": 1e-4}, - "log.final.e.FXUVCRITDRAG": {"value": 0.297754, "unit": u.W / u.m ** 2, "rtol": 1e-4}, - "log.final.e.HREFFLUX": {"value": 2.112525e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, - "log.final.e.XO2": {"value": 0.426589, "rtol": 1e-4}, - "log.final.e.XH2O": {"value": 0.573411, "rtol": 1e-4}, - "log.final.e.HDiffFlux": {"value": 6.892821e+16, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, - "log.final.e.HRefODragMod": {"value": 0.003130, "rtol": 1e-4}, + "log.final.e.FXUVCRITDRAG": {"value": 0.297807, "unit": u.W / u.m ** 2, "rtol": 1e-4}, + "log.final.e.HREFFLUX": {"value": 2.112523e+17, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.e.XO2": {"value": 0.426457, "rtol": 1e-4}, + "log.final.e.XH2O": {"value": 0.573543, "rtol": 1e-4}, + "log.final.e.HDiffFlux": {"value": 6.894047e+16, "unit": 1 / u.m ** 2 / u.sec, "rtol": 1e-4}, + "log.final.e.HRefODragMod": {"value": 0.003131, "rtol": 1e-4}, "log.final.e.KTide": {"value": 0.898227, "rtol": 1e-4}, - "log.final.e.RGDuration": {"value": 3.80438e+08, "unit": u.yr, "rtol": 1e-4}, + "log.final.e.RGDuration": {"value": 3.80345e+08, "unit": u.yr, "rtol": 1e-4}, } ) class Test_DiffLimWaterEscape(Benchmark): diff --git a/tests/AtmescStellar/DiffLimWaterEscape/vpl.in b/tests/AtmescStellar/DiffLimWaterEscape/vpl.in index 10d93eaa2..6a28b602b 100755 --- a/tests/AtmescStellar/DiffLimWaterEscape/vpl.in +++ b/tests/AtmescStellar/DiffLimWaterEscape/vpl.in @@ -14,4 +14,4 @@ bDoForward 1 bVarDt 1 dEta 0.1 dStopTime 0.95e9 -dOutputTime 0.95e7 +dOutputTime 0.95e9 From 375802594600ab27a41f26e079418d0b11f44ce8 Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Feb 2024 10:27:51 -0800 Subject: [PATCH 12/14] Updated dependencies in GitHub workflows for node.js v20. Dropped Python 3.12 from macos tests. --- .github/workflows/docs.yml | 4 ++-- .github/workflows/examples.yml | 4 ++-- .github/workflows/memcheck.yml | 4 ++-- .github/workflows/pip-install.yml | 12 ++++++------ .github/workflows/tests-linux.yml | 8 ++++---- .github/workflows/tests-macos.yml | 9 +++++---- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9b8823ce6..277cae886 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,11 +11,11 @@ jobs: name: "Build docs" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python id: setup_python - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: vplanet environment-file: environment.yml diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 4e4cef7c7..2e8bdedd2 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -19,7 +19,7 @@ jobs: - python-version: '3.10' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -35,7 +35,7 @@ jobs: - name: Set up Python id: setup_python - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: vplanet environment-file: environment.yml diff --git a/.github/workflows/memcheck.yml b/.github/workflows/memcheck.yml index 3cbe46259..d98abf6e6 100644 --- a/.github/workflows/memcheck.yml +++ b/.github/workflows/memcheck.yml @@ -12,13 +12,13 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python id: setup_python - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: vplanet environment-file: environment.yml diff --git a/.github/workflows/pip-install.yml b/.github/workflows/pip-install.yml index e15b8ef42..3a2af3031 100644 --- a/.github/workflows/pip-install.yml +++ b/.github/workflows/pip-install.yml @@ -16,12 +16,12 @@ jobs: - os: ubuntu-22.04 python-version: '3.6' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: python-version: ${{ matrix.python }} @@ -49,7 +49,7 @@ jobs: CIBW_SKIP: '*-manylinux_i686' CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl @@ -62,7 +62,7 @@ jobs: submodules: true fetch-depth: 0 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 name: Install Python with: python-version: ${{ matrix.python }} @@ -70,7 +70,7 @@ jobs: - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz @@ -78,7 +78,7 @@ jobs: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: artifact path: dist diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 726ec8a3e..5bb2b3721 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -21,13 +21,13 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python id: setup_python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -48,7 +48,7 @@ jobs: - name: Check test ouptut created id: check_test_file - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true @@ -64,6 +64,6 @@ jobs: files: junit/test-*.xml - name: CodeCov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./.coverage diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index eb315d46b..cf2beaa4a 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -13,16 +13,17 @@ jobs: strategy: matrix: os: [macos-11, macos-12, macos-13] - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python id: setup_python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -39,7 +40,7 @@ jobs: - name: Check test ouptut created id: check_test_file - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" fail: true From 3303c24c1905fe026962c80b4893a3421da6dbc9 Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Feb 2024 10:50:44 -0800 Subject: [PATCH 13/14] Removed check for test-results.xml from macos unit test yml file since we are not running make coverage. --- .github/workflows/tests-macos.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index cf2beaa4a..f5b7a34db 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -38,13 +38,6 @@ jobs: if: steps.setup_python.outcome == 'success' run: make test - - name: Check test ouptut created - id: check_test_file - uses: andstor/file-existence-action@v3 - with: - files: "/home/runner/work/vplanet/vplanet/junit/test-results.xml" - fail: true - - name: Get unique id uses: Tiryoh/gha-jobid-action@v1 id: jobs From 644257bac603018b295bde836aac224e4b56fd49 Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Fri, 2 Feb 2024 10:52:43 -0800 Subject: [PATCH 14/14] Rmoved Pubhlishing of macos unit tests. --- .github/workflows/tests-macos.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index f5b7a34db..b9bf0b3d0 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -42,8 +42,3 @@ jobs: uses: Tiryoh/gha-jobid-action@v1 id: jobs - - name: Publish unit test results - uses: EnricoMi/publish-unit-test-result-action/composite@v2 - if: always() - with: - files: junit/test-*.xml