From 31e2e2482b0522ccea72c2507ff8d6d0e50d6d6f Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Fri, 2 Aug 2024 17:04:38 -0700 Subject: [PATCH] More updates to string formatting. --- src/atmesc.c | 142 +++++++++++++++++++++---------------------- src/atmesc.h | 24 ++++---- src/binary.c | 68 ++++++++++----------- src/binary.h | 34 +++++------ src/control.c | 122 ++++++++++++++++++++----------------- src/control.h | 30 +++++----- src/distorb.c | 50 ++++++++-------- src/distorb.h | 32 +++++----- src/distrot.c | 52 ++++++++-------- src/distrot.h | 26 ++++---- src/eqtide.c | 132 ++++++++++++++++++++-------------------- src/eqtide.h | 68 ++++++++++----------- src/flare.c | 62 +++++++++---------- src/flare.h | 30 +++++----- src/galhabit.c | 38 ++++++------ src/galhabit.h | 26 ++++---- src/magmoc.c | 88 +++++++++++++-------------- src/magmoc.h | 46 +++++++------- src/output.c | 159 +++++++++++++++++++++++++------------------------ src/output.h | 9 +-- src/poise.c | 118 ++++++++++++++++++------------------ src/poise.h | 34 +++++------ src/radheat.c | 144 ++++++++++++++++++++++---------------------- src/radheat.h | 124 +++++++++++++++++++------------------- src/spinbody.c | 16 ++--- src/spinbody.h | 16 ++--- src/stellar.c | 12 ++-- src/stellar.h | 12 ++-- src/thermint.c | 128 +++++++++++++++++++-------------------- src/thermint.h | 128 +++++++++++++++++++-------------------- src/vplanet.h | 2 +- 31 files changed, 994 insertions(+), 978 deletions(-) diff --git a/src/atmesc.c b/src/atmesc.c index fc8372192..8c8e709d4 100644 --- a/src/atmesc.c +++ b/src/atmesc.c @@ -2643,12 +2643,12 @@ Logs the surface water mass. */ void WriteSurfaceWaterMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dSurfaceWaterMass; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2670,9 +2670,9 @@ Logs the H escape regime */ void WriteHEscapeRegime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].iHEscapeRegime; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** @@ -2690,13 +2690,13 @@ Logs the atmospheric oxygen mass. */ void WriteOxygenMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dOxygenMass; if (output->bDoNeg[iBody]) { *dTmp *= 1.e-5 * ((BIGG * body[iBody].dMass) / (4. * PI * pow(body[iBody].dRadius, 4))); - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2718,10 +2718,10 @@ Logs Ktide, the gravitational enhancement of mass loss. */ void WriteKTide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dKTide; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** @@ -2739,13 +2739,13 @@ Logs the mantle oxygen mass. */ void WriteOxygenMantleMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dOxygenMantleMass; if (output->bDoNeg[iBody]) { *dTmp *= 1.e-5 * ((BIGG * body[iBody].dMass) / (4. * PI * pow(body[iBody].dRadius, 4))); - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2767,12 +2767,12 @@ Logs the planet radius. */ void WritePlanetRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dRadius; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -2794,12 +2794,12 @@ Logs the envelope mass. */ void WriteEnvelopeMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dEnvelopeMass; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2821,7 +2821,7 @@ Logs the semi-major axis corresponding to the current runaway greenhouse limit. */ void WriteRGLimit(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { // Get the RG flux double flux = fdHZRG14(body, iBody); @@ -2838,7 +2838,7 @@ void WriteRGLimit(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -2860,10 +2860,10 @@ Logs the oxygen mixing ratio at the base of the hydrodynamic wind. */ void WriteOxygenMixingRatio(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fdAtomicOxygenMixingRatio(body[iBody].dSurfaceWaterMass, body[iBody].dOxygenMass); - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** @@ -2881,9 +2881,9 @@ Logs the oxygen eta parameter from Luger and Barnes (2015). */ void WriteOxygenEta(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dOxygenEta; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** @@ -2901,9 +2901,9 @@ Logs the XUV absorption efficiency for water. */ void WriteAtmXAbsEffH2O(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dAtmXAbsEffH2O; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** @@ -2921,12 +2921,12 @@ Logs the planet's radius in the XUV. */ void WritePlanetRadXUV(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dRadXUV; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -2950,17 +2950,17 @@ Logs the atmospheric mass loss rate. */ void WriteDEnvMassDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = *(update[iBody].pdDEnvelopeMassDtAtmesc); //*dTmp = fnUpdate[iBody][update[iBody].iEnvelopeMass][0]; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { //*dTmp *= fdUnitsTime(units->iTime)/fdUnitsMass(units->iMass); - fvFormattedString(&cUnit, "kg/s"); // XXX Why isn't the other line commented out??? + fvFormattedString(cUnit, "kg/s"); // XXX Why isn't the other line commented out??? } } @@ -2979,12 +2979,12 @@ Logs the thermospheric temperature. */ void WriteThermTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dThermTemp; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { // System units are Kelvins *dTmp = fdUnitsTemp(*dTmp, U_KELVIN, units->iTemp); @@ -3007,12 +3007,12 @@ Logs the temperature of the flow. */ void WriteFlowTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlowTemp; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { // System units are Kelvins *dTmp = fdUnitsTemp(*dTmp, U_KELVIN, units->iTemp); @@ -3035,14 +3035,14 @@ Logs the surface pressure. */ void WritePresSurf(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dPresSurf; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { - fvFormattedString(&cUnit, "Pa"); + fvFormattedString(cUnit, "Pa"); // XXX } } @@ -3061,12 +3061,12 @@ Logs the pressure at the XUV absorption radius. */ void WritePresXUV(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dPresXUV; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { //*dTmp /= fdUnitsPressure(units->iLength); // fsUnitsLength(units->iLength,cUnit); @@ -3088,12 +3088,12 @@ Logs the time at which the flow transitioned to Jeans escape. */ void WriteJeansTime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dJeansTime; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -3115,12 +3115,12 @@ Logs the atmospheric scale height. */ void WriteScaleHeight(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dScaleHeight; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -3142,12 +3142,12 @@ Logs the gas constant. */ void WriteAtmGasConst(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dAtmGasConst; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } @@ -3167,12 +3167,12 @@ Logs the planet's solid radius. */ void WriteRadSolid(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dRadSolid; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -3194,12 +3194,12 @@ Logs the planet's Roche radius. */ void WriteRocheRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dRocheRadius; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -3222,12 +3222,12 @@ Logs the planet's Bondi radius. */ void WriteBondiRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dBondiRadius; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -3249,14 +3249,14 @@ Logs the XUV flux received by the planet. */ void WriteFXUV(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFXUV; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { - fvFormattedString(&cUnit, "W/m^2"); + fvFormattedString(cUnit, "W/m^2"); } } @@ -3276,16 +3276,16 @@ and energy-limited H envelope escape regimes */ void WriteRRCriticalFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { // Calculate critical flux for body *dTmp = fdRRCriticalFlux(body, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { - fvFormattedString(&cUnit, "W/m^2"); + fvFormattedString(cUnit, "W/m^2"); } } @@ -3304,12 +3304,12 @@ Logs the crossover mass. */ void WriteCrossoverMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCrossoverMass; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -3331,9 +3331,9 @@ Logs the Water escape regime */ void WriteWaterEscapeRegime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].iWaterEscapeRegime; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } @@ -3352,7 +3352,7 @@ Logs the XUV flux received by the planet. */ void WriteFXUVCRITDRAG(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double BDIFF = 4.8e19 * pow(body[iBody].dFlowTemp, 0.75); double XO = fdAtomicOxygenMixingRatio(body[iBody].dSurfaceWaterMass, body[iBody].dOxygenMass); @@ -3369,9 +3369,9 @@ void WriteFXUVCRITDRAG(BODY *body, CONTROL *control, OUTPUT *output, } if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { - fvFormattedString(&cUnit, "W/m^2"); + fvFormattedString(cUnit, "W/m^2"); // XXX } } @@ -3390,9 +3390,9 @@ Logs the Hydrogen Reference Flux */ void WriteHREFFLUX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFHRef; - fvFormattedString(&cUnit, "m^-2 s^-1"); + fvFormattedString(cUnit, "m^-2 s^-1"); // XXX } /** @@ -3411,9 +3411,9 @@ limited regime) */ void WriteHDiffLimFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dFHDiffLim; - fvFormattedString(&cUnit, "m^-2 s^-1"); + fvFormattedString(cUnit, "m^-2 s^-1"); // XXX } /** @@ -3431,7 +3431,7 @@ Modifier for H Ref Flux to include oxygen drag at a snapshot in time */ void WriteHRefODragMod(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].dCrossoverMass / ATOMMASS - 1. != 0) { double rat = (body[iBody].dCrossoverMass / ATOMMASS - QOH) / (body[iBody].dCrossoverMass / ATOMMASS - 1.); @@ -3441,7 +3441,7 @@ void WriteHRefODragMod(BODY *body, CONTROL *control, OUTPUT *output, } else { *dTmp = -1; } - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } @@ -3460,10 +3460,10 @@ Logs the molecular oxygen mixing ratio. */ void WriteMolecOxygenMixingRatio(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fdMolecOxygenMixingRatio(body[iBody].dSurfaceWaterMass, body[iBody].dOxygenMass); - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** @@ -3481,10 +3481,10 @@ Logs the water mixing ratio. */ void WriteWaterAtmMixingRatio(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fdWaterAtmMixingRatio(body[iBody].dSurfaceWaterMass, body[iBody].dOxygenMass); - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /** diff --git a/src/atmesc.h b/src/atmesc.h index 629cb236c..bb4392110 100644 --- a/src/atmesc.h +++ b/src/atmesc.h @@ -177,29 +177,29 @@ void InitializeOutputFunctionAtmEsc(OUTPUT *, int, int); void FinalizeOutputFunctionAtmEsc(OUTPUT *, int, int); void WriteSurfaceWaterMass(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteOxygenMass(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteOxygenMantleMass(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteEnvelopeMass(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteRGLimit(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteBondiRadius(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteRocheRadius(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteOxygenMixingRatio(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteOxygenEta(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteAtmXAbsEffH2O(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteRRCriticalFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteHEscapeRegime(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); /* Logging Functions */ void LogOptionsAtmEsc(CONTROL *, FILE *); diff --git a/src/binary.c b/src/binary.c index 8847b41a8..af19513c3 100644 --- a/src/binary.c +++ b/src/binary.c @@ -1018,7 +1018,7 @@ void VerifyHaltBinary(BODY *body, CONTROL *control, OPTIONS *options, int iBody, void WriteFreeEccBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Note: Only makes sense for planets (iBodyType == 0) if (body[iBody].iBodyType == 0) { *dTmp = body[iBody].dFreeEcc; @@ -1026,12 +1026,12 @@ void WriteFreeEccBinary(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = -1; } - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } void WriteFreeIncBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Note: Only makes sense for planets (iBodyType == 0) if (body[iBody].iBodyType == 0) { *dTmp = body[iBody].dFreeInc; @@ -1041,7 +1041,7 @@ void WriteFreeIncBinary(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsAngle(units->iAngle); fsUnitsAngle(units->iAngle, cUnit); @@ -1051,7 +1051,7 @@ void WriteFreeIncBinary(BODY *body, CONTROL *control, OUTPUT *output, /** Write the binary primary star radial position */ void WriteBinPriRBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Compute current binary true anomaly double meanAnomaly = body[1].dMeanMotion * body[0].dAge + body[1].dLL13PhiAB; @@ -1069,7 +1069,7 @@ void WriteBinPriRBinary(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = body[1].dMass * radius * dInvMass; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -1079,7 +1079,7 @@ void WriteBinPriRBinary(BODY *body, CONTROL *control, OUTPUT *output, /** Write the binary secondary star radial position */ void WriteBinSecRBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Compute current binary true anomaly double meanAnomaly = body[1].dMeanMotion * body[1].dAge + body[1].dLL13PhiAB; @@ -1097,7 +1097,7 @@ void WriteBinSecRBinary(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = body[0].dMass * radius * dInvMass; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -1107,7 +1107,7 @@ void WriteBinSecRBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteBinPriPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { // Compute current binary true anomaly double meanAnomaly = body[1].dMeanMotion * body[0].dAge + body[1].dLL13PhiAB; @@ -1117,7 +1117,7 @@ void WriteBinPriPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = fndEccToTrue(eccAnomaly, body[1].dEcc); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsAngle(units->iAngle); fsUnitsAngle(units->iAngle, cUnit); @@ -1127,7 +1127,7 @@ void WriteBinPriPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteBinSecPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { // Compute current binary true anomaly double meanAnomaly = body[1].dMeanMotion * body[1].dAge + body[1].dLL13PhiAB; @@ -1138,7 +1138,7 @@ void WriteBinSecPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = fndEccToTrue(eccAnomaly, body[1].dEcc) + PI; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsAngle(units->iAngle); fsUnitsAngle(units->iAngle, cUnit); @@ -1148,7 +1148,7 @@ void WriteBinSecPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteCBPPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iBodyType == 0) { *dTmp = body[iBody].dCBPPhi; } else { @@ -1157,7 +1157,7 @@ void WriteCBPPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsAngle(units->iAngle); fsUnitsAngle(units->iAngle, cUnit); @@ -1166,12 +1166,12 @@ void WriteCBPPhiBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteCBPPhiDotBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dCBPPhiDot; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1180,7 +1180,7 @@ void WriteCBPPhiDotBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteLL13N0Binary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Note: Only applies to planets (iBodyType == 0) if (body[iBody].iBodyType == 0) { *dTmp = body[iBody].dLL13N0; @@ -1190,7 +1190,7 @@ void WriteLL13N0Binary(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -1200,7 +1200,7 @@ void WriteLL13N0Binary(BODY *body, CONTROL *control, OUTPUT *output, void WriteLL13K0Binary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Note: Only applies to planets (iBodyType == 0) if (body[iBody].iBodyType == 0) { *dTmp = body[iBody].dLL13K0; @@ -1210,7 +1210,7 @@ void WriteLL13K0Binary(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -1219,7 +1219,7 @@ void WriteLL13K0Binary(BODY *body, CONTROL *control, OUTPUT *output, void WriteLL13V0Binary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Note: Only applies to planets (iBodyType == 0) if (body[iBody].iBodyType == 0) { *dTmp = body[iBody].dLL13V0; @@ -1229,7 +1229,7 @@ void WriteLL13V0Binary(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -1239,12 +1239,12 @@ void WriteLL13V0Binary(BODY *body, CONTROL *control, OUTPUT *output, /** Write the circumbinary planet orbital radius (CBPR) */ void WriteCBPRBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCBPR; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -1254,12 +1254,12 @@ void WriteCBPRBinary(BODY *body, CONTROL *control, OUTPUT *output, /** Write the circumbinary planet guiding radius (CBPR0) */ void WriteCBPR0Binary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dR0; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -1268,12 +1268,12 @@ void WriteCBPR0Binary(BODY *body, CONTROL *control, OUTPUT *output, void WriteCBPZBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCBPZ; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -1282,12 +1282,12 @@ void WriteCBPZBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteCBPRDotBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCBPRDot; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) / fdUnitsLength(units->iLength); fsUnitsVel(units, cUnit); @@ -1296,12 +1296,12 @@ void WriteCBPRDotBinary(BODY *body, CONTROL *control, OUTPUT *output, void WriteCBPZDotBinary(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCBPZDot; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) / fdUnitsLength(units->iLength); fsUnitsVel(units, cUnit); @@ -1312,7 +1312,7 @@ void WriteCBPZDotBinary(BODY *body, CONTROL *control, OUTPUT *output, orbit assuming P_bin << P_cbp */ void WriteCBPInsol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { // Make sure that this is a planet, if not, -1 if (iBody < 2 || body[iBody].iBodyType != 0) { @@ -1322,7 +1322,7 @@ void WriteCBPInsol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, } // Always in units of insolation received by Earth - fvFormattedString(&cUnit, "F/F_Earth"); + fvFormattedString(cUnit, "F/F_Earth"); } void InitializeOutputBinary(OUTPUT *output, fnWriteOutput fnWrite[]) { diff --git a/src/binary.h b/src/binary.h index 68b6483fe..c2a595960 100644 --- a/src/binary.h +++ b/src/binary.h @@ -122,39 +122,39 @@ void InitializeOutputFunctionBinary(OUTPUT *, int, int); void InitializeOutputBinary(OUTPUT *, fnWriteOutput[]); void FinalizeOutputFunctionBinary(OUTPUT *, int, int); void WriteFreeEccBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteFreeIncBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteLL13N0Binary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteLL13K0Binary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteLL13V0Binary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteCBPRBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteCBPR0Binary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBinPriRBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBinPriPhiBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBinSecRBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBinSecPhiBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteCBPZBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteCBPZDotBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteCBPPhiBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteCBPRDotBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteCBPPhiDotBinary(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteCBPInsol(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); /* Logging Functions */ void LogOptionsBinary(CONTROL *, FILE *); diff --git a/src/control.c b/src/control.c index 7ae552c3a..d4dc71098 100644 --- a/src/control.c +++ b/src/control.c @@ -866,21 +866,21 @@ double fdUnitsLength(int iType) { } } -void fsUnitsLength(int iType, char cUnit[]) { +void fsUnitsLength(int iType, char **cUnit) { if (iType == U_METER) { - fvFormattedString(&cUnit, "m"); + fvFormattedString(cUnit, "m"); } else if (iType == U_CENTIMETER) { - fvFormattedString(&cUnit, "cm"); + fvFormattedString(cUnit, "cm"); } else if (iType == U_KILOMETER) { - fvFormattedString(&cUnit, "km"); + fvFormattedString(cUnit, "km"); } else if (iType == U_SOLARRADIUS) { - fvFormattedString(&cUnit, "Rsun"); + fvFormattedString(cUnit, "Rsun"); } else if (iType == U_EARTHRADIUS) { - fvFormattedString(&cUnit, "Rearth"); + fvFormattedString(cUnit, "Rearth"); } else if (iType == U_JUPRADIUS) { - fvFormattedString(&cUnit, "Rjupiter"); + fvFormattedString(cUnit, "Rjupiter"); } else if (iType == U_AU) { - fvFormattedString(&cUnit, "au"); + fvFormattedString(cUnit, "au"); } else { fprintf(stderr, "ERROR: Unknown iUnitLength %d.\n", iType); exit(EXIT_UNITS); @@ -905,17 +905,17 @@ double fdUnitsTime(int iType) { } } -void fsUnitsTime(int iType, char cUnit[]) { +void fsUnitsTime(int iType, char **cUnit) { if (iType == U_SECOND) { - fvFormattedString(&cUnit, "sec"); + fvFormattedString(cUnit, "sec"); } else if (iType == U_DAY) { - fvFormattedString(&cUnit, "day"); + fvFormattedString(cUnit, "day"); } else if (iType == U_YEAR) { - fvFormattedString(&cUnit, "year"); + fvFormattedString(cUnit, "year"); } else if (iType == U_MYR) { - fvFormattedString(&cUnit, "Myr"); + fvFormattedString(cUnit, "Myr"); } else if (iType == U_GYR) { - fvFormattedString(&cUnit, "Gyr"); + fvFormattedString(cUnit, "Gyr"); } else { fprintf(stderr, "ERROR: Unknown iUnitTime: %d.\n", iType); exit(EXIT_UNITS); @@ -941,19 +941,19 @@ double fdUnitsMass(int iType) { } } -void fsUnitsMass(int iType, char cUnit[]) { +void fsUnitsMass(int iType, char **cUnit) { if (iType == U_KILOGRAM) { - fvFormattedString(&cUnit, "kg"); + fvFormattedString(cUnit, "kg"); } else if (iType == U_GRAM) { - fvFormattedString(&cUnit, "gm"); + fvFormattedString(cUnit, "gm"); } else if (iType == U_SOLARMASS) { - fvFormattedString(&cUnit, "Msun"); + fvFormattedString(cUnit, "Msun"); } else if (iType == U_EARTHMASS) { - fvFormattedString(&cUnit, "Mearth"); + fvFormattedString(cUnit, "Mearth"); } else if (iType == U_JUPITERMASS) { - fvFormattedString(&cUnit, "Mjupiter"); + fvFormattedString(cUnit, "Mjupiter"); } else if (iType == U_NEPTUNEMASS) { - fvFormattedString(&cUnit, "Mneptune"); + fvFormattedString(cUnit, "Mneptune"); } else { fprintf(stderr, "ERROR: Unknown iUnitMass: %d.\n", iType); @@ -972,39 +972,51 @@ double fdUnitsAngle(int iType) { } } -void fsUnitsAngle(int iType, char cUnit[]) { +void fsUnitsAngle(int iType, char **cUnit) { if (iType == U_RADIANS) { - fvFormattedString(&cUnit, "rad"); + fvFormattedString(cUnit, "rad"); } else if (iType == U_DEGREES) { - fvFormattedString(&cUnit, "deg"); + fvFormattedString(cUnit, "deg"); } else { fprintf(stderr, "ERROR: Unknown Angle type %d\n.", iType); exit(EXIT_UNITS); } } -void fsUnitsViscosity(UNITS *units, char cUnit[]) { - char cTmp[OUTLEN]; - - fsUnitsLength(units->iLength, cUnit); - strcat(cUnit, "^2/"); - fsUnitsTime(units->iTime, cTmp); - strcat(cUnit, cTmp); +void fsUnitsViscosity(UNITS *units, char **cUnit) { + char *cUnitLength=NULL,*cUnitTime=NULL; + + fsUnitsLength(units->iLength, &cUnitLength); + fsUnitsTime(units->iTime, &cUnitTime); + // strcat(cUnit, "^2/"); + // fsUnitsTime(units->iTime, cTmp); + // strcat(cUnit, cTmp); + fvFormattedString(cUnit,cUnitLength,"^2/",cUnitTime); + free(cUnitLength); + free(cUnitTime); } -void fsUnitsAngMom(UNITS *units, char cUnit[]) { - char cTmp[OPTLEN]; +void fsUnitsAngMom(UNITS *units, char **cUnit) { + char *cUnitMass=NULL,*cUnitLength=NULL,*cUnitTime=NULL; + + fsUnitsMass(units->iMass, &cUnitMass); + fsUnitsLength(units->iLength, &cUnitLength); + fsUnitsTime(units->iTime, &cUnitTime); + // fsUnitsMass(units->iMass, cUnit); + // fsUnitsLength(units->iLength, cTmp); + // strcat(cUnit, "*"); + // strcat(cUnit, cTmp); + // strcat(cUnit, "^2/"); + // fsUnitsTime(units->iTime, cTmp); + // strcat(cUnit, cTmp); + fvFormattedString(cUnit,cUnitMass,"*",cUnitLength,"^2/",cUnitTime); + free(cUnitMass); + free(cUnitLength); + free(cUnitTime); - fsUnitsMass(units->iMass, cUnit); - fsUnitsLength(units->iLength, cTmp); - strcat(cUnit, "*"); - strcat(cUnit, cTmp); - strcat(cUnit, "^2/"); - fsUnitsTime(units->iTime, cTmp); - strcat(cUnit, cTmp); } -void fsUnitsDensity(UNITS *units, char cUnit[]) { +void fsUnitsDensity(UNITS *units, char **cUnit) { char cTmp[OPTLEN]; fsUnitsMass(units->iMass, cUnit); @@ -1014,7 +1026,7 @@ void fsUnitsDensity(UNITS *units, char cUnit[]) { strcat(cUnit, "^3"); } -void fsUnitsVel(UNITS *units, char cUnit[]) { +void fsUnitsVel(UNITS *units, char **cUnit) { char cTmp[OPTLEN]; fsUnitsLength(units->iLength, cUnit); @@ -1023,7 +1035,7 @@ void fsUnitsVel(UNITS *units, char cUnit[]) { strcat(cUnit, cTmp); } -void fsUnitsRate(int iType, char cUnit[]) { +void fsUnitsRate(int iType, char **cUnit) { char cTmp[OPTLEN]; fvFormattedString(&cUnit, "/"); @@ -1036,7 +1048,7 @@ void fsUnitsRate(int iType, char cUnit[]) { }*/ -void fsUnitsAngRate(UNITS *units, char cUnit[]) { +void fsUnitsAngRate(UNITS *units, char **cUnit) { char cTmp[OPTLEN]; fsUnitsAngle(units->iAngle, cUnit); @@ -1045,7 +1057,7 @@ void fsUnitsAngRate(UNITS *units, char cUnit[]) { strcat(cUnit, cTmp); } -void fsUnitsEnergy(UNITS *units, char cUnit[]) { +void fsUnitsEnergy(UNITS *units, char **cUnit) { char cTmp[OPTLEN]; fsUnitsMass(units->iMass, cUnit); @@ -1064,7 +1076,7 @@ double fdUnitsEnergy(int iTime, int iMass, int iLength) { return dConversion; } -void fsUnitsPower(UNITS *units, char cUnit[]) { +void fsUnitsPower(UNITS *units, char **cUnit) { char cTmp[OPTLEN]; fsUnitsMass(units->iMass, cUnit); @@ -1082,7 +1094,7 @@ double fdUnitsPower(int iTime, int iMass, int iLength) { (fdUnitsTime(iTime) * fdUnitsTime(iTime) * fdUnitsTime(iTime)); } -void fsUnitsEnergyFlux(UNITS *units, char cUnit[]) { +void fsUnitsEnergyFlux(UNITS *units, char **cUnit) { char cTmp[OPTLEN]; fsUnitsEnergy(units, cUnit); @@ -1148,13 +1160,13 @@ double fdUnitsTemp(double dTemp, int iOldType, int iNewType) { } } -void fsUnitsTemp(int iType, char cUnit[]) { +void fsUnitsTemp(int iType, char **cUnit) { if (iType == U_KELVIN) { - fvFormattedString(&cUnit, "K"); + fvFormattedString(cUnit, "K"); } else if (iType == U_CELSIUS) { - fvFormattedString(&cUnit, "Celsius"); + fvFormattedString(cUnit, "Celsius"); } else if (iType == U_FARENHEIT) { - fvFormattedString(&cUnit, "F"); + fvFormattedString(cUnit, "F"); } else { fprintf(stderr, "ERROR: Unknown iUnitTemp %d.\n", iType); exit(EXIT_UNITS); @@ -1162,13 +1174,13 @@ void fsUnitsTemp(int iType, char cUnit[]) { } // XXX This looks fishy. Should time also be checked here -void fsUnitsTempRate(int iType, char cUnit[]) { +void fsUnitsTempRate(int iType, char **cUnit) { if (iType == U_KELVIN) { - fvFormattedString(&cUnit, "K/s"); + fvFormattedString(cUnit, "K/s"); } else if (iType == U_CELSIUS) { - fvFormattedString(&cUnit, "C/s"); + fvFormattedString(cUnit, "C/s"); } else if (iType == U_FARENHEIT) { - fvFormattedString(&cUnit, "F/s"); + fvFormattedString(cUnit, "F/s"); } else { fprintf(stderr, "ERROR: Unknown iUnitTempRate %d.\n", iType); exit(EXIT_UNITS); diff --git a/src/control.h b/src/control.h index a28887bd4..beb49f434 100644 --- a/src/control.h +++ b/src/control.h @@ -38,21 +38,21 @@ double fdUnitsEnergy(int, int, int); double fdUnitsEnergyFlux(int, int, int); // double fdUnitsRate(int); -void fsUnitsLength(int, char[]); -void fsUnitsTime(int, char[]); -void fsUnitsAngle(int, char[]); -void fsUnitsMass(int, char[]); -void fsUnitsTemp(int, char[]); -void fsUnitsTempRate(int, char[]); -void fsUnitsAngMom(UNITS *, char[]); -void fsUnitsDensity(UNITS *, char[]); -void fsUnitsVel(UNITS *, char[]); -void fsUnitsRate(int, char[]); -void fsUnitsAngRate(UNITS *, char[]); -void fsUnitsPower(UNITS *, char[]); -void fsUnitsEnergy(UNITS *, char[]); -void fsUnitsEnergyFlux(UNITS *, char[]); -void fsUnitsViscosity(UNITS *, char[]); +void fsUnitsLength(int, char**); +void fsUnitsTime(int, char**); +void fsUnitsAngle(int, char**); +void fsUnitsMass(int, char**); +void fsUnitsTemp(int, char**); +void fsUnitsTempRate(int, char**); +void fsUnitsAngMom(UNITS *, char**); +void fsUnitsDensity(UNITS *, char**); +void fsUnitsVel(UNITS *, char**); +void fsUnitsRate(int, char**); +void fsUnitsAngRate(UNITS *, char**); +void fsUnitsPower(UNITS *, char**); +void fsUnitsEnergy(UNITS *, char**); +void fsUnitsEnergyFlux(UNITS *, char**); +void fsUnitsViscosity(UNITS *, char**); void InfileCopy(INFILE *, INFILE *); diff --git a/src/distorb.c b/src/distorb.c index 7236ce00c..f2a8f22ff 100644 --- a/src/distorb.c +++ b/src/distorb.c @@ -1791,7 +1791,7 @@ void WriteEigen(CONTROL *control, SYSTEM *system) { void WriteBodyDEccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1809,7 +1809,7 @@ void WriteBodyDEccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1818,7 +1818,7 @@ void WriteBodyDEccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDSincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1842,7 +1842,7 @@ void WriteBodyDSincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1851,7 +1851,7 @@ void WriteBodyDSincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDLongPDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1869,7 +1869,7 @@ void WriteBodyDLongPDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); @@ -1880,7 +1880,7 @@ void WriteBodyDLongPDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDLongADtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1904,7 +1904,7 @@ void WriteBodyDLongADtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); @@ -1915,7 +1915,7 @@ void WriteBodyDLongADtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDIncDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1941,7 +1941,7 @@ void WriteBodyDIncDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); @@ -1952,17 +1952,17 @@ void WriteBodyDIncDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodySinc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = sqrt(body[iBody].dPinc * body[iBody].dPinc + body[iBody].dQinc * body[iBody].dQinc); - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } /* void WriteBodyLongA(BODY *body,CONTROL *control,OUTPUT *output,SYSTEM -*system,UNITS *units,UPDATE *update,int iBody,double *dTmp,char cUnit[]) { if +*system,UNITS *units,UPDATE *update,int iBody,double *dTmp,char **cUnit) { if (body[iBody].bDistOrb) { *dTmp = atan2(body[iBody].dPinc, body[iBody].dQinc); } else if (body[iBody].bGalHabit) { *dTmp = body[iBody].dLongA; } @@ -1986,23 +1986,23 @@ else if (body[iBody].bGalHabit) { *dTmp = body[iBody].dLongA; void WriteBodyPinc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dPinc; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } void WriteBodyQinc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dQinc; - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } void WriteBodyDHeccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* need to put check for star's output options in verify */ double dDeriv; int iPert; @@ -2017,7 +2017,7 @@ void WriteBodyDHeccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2026,7 +2026,7 @@ void WriteBodyDHeccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDKeccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* need to put check for star's output options in verify */ double dDeriv; int iPert; @@ -2041,7 +2041,7 @@ void WriteBodyDKeccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2050,7 +2050,7 @@ void WriteBodyDKeccDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDPincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* need to put check for star's output options in verify */ double dDeriv; int iPert; @@ -2065,7 +2065,7 @@ void WriteBodyDPincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2074,7 +2074,7 @@ void WriteBodyDPincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDQincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* need to put check for star's output options in verify */ double dDeriv; int iPert; @@ -2089,7 +2089,7 @@ void WriteBodyDQincDtDistOrb(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); diff --git a/src/distorb.h b/src/distorb.h index 50c7acca8..8baae76e5 100644 --- a/src/distorb.h +++ b/src/distorb.h @@ -121,37 +121,37 @@ int fbCheckMutualIncDistorb(BODY *, EVOLVE *, HALT *, IO *, UPDATE *, int); void HelpOutputDistOrb(OUTPUT *); void WriteBodyDEccDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDSincDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDLongPDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDLongADtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDIncDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodySinc(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyLongP(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyArgP(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyHecc(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyKecc(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyPinc(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyQinc(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyDHeccDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDKeccDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDPincDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDQincDtDistOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void InitializeOutputDistOrb(OUTPUT *, fnWriteOutput[]); void WriteEigen(CONTROL *, SYSTEM *); diff --git a/src/distrot.c b/src/distrot.c index 9aa13b84e..d6f0e8c09 100644 --- a/src/distrot.c +++ b/src/distrot.c @@ -939,7 +939,7 @@ void VerifyHaltDistRot(BODY *body, CONTROL *control, OPTIONS *options, void WriteBodyDOblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv, dObldx, dObldy, dObldz; int iPert; @@ -980,7 +980,7 @@ void WriteBodyDOblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -991,7 +991,7 @@ void WriteBodyDOblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteOblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv, dObldx, dObldy, dObldz; int iPert; @@ -1036,7 +1036,7 @@ void WriteOblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1047,7 +1047,7 @@ void WriteOblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WritePrecATimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv, dpAdx, dpAdy; int iPert; @@ -1077,7 +1077,7 @@ void WritePrecATimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -1088,7 +1088,7 @@ void WritePrecATimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDPrecADtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv, dpAdx, dpAdy; int iPert; @@ -1114,7 +1114,7 @@ void WriteBodyDPrecADtDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); @@ -1125,7 +1125,7 @@ void WriteBodyDPrecADtDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDXoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1139,7 +1139,7 @@ void WriteBodyDXoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1148,7 +1148,7 @@ void WriteBodyDXoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDYoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1162,7 +1162,7 @@ void WriteBodyDYoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1171,7 +1171,7 @@ void WriteBodyDYoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDZoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1185,7 +1185,7 @@ void WriteBodyDZoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1194,7 +1194,7 @@ void WriteBodyDZoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteXoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1212,7 +1212,7 @@ void WriteXoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1221,7 +1221,7 @@ void WriteXoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteYoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1239,7 +1239,7 @@ void WriteYoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1248,7 +1248,7 @@ void WriteYoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteZoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -1266,7 +1266,7 @@ void WriteZoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1276,7 +1276,7 @@ void WriteZoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyCassOne(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double h, inc, longa, Lnorm = 0.0, obliq, eqnode; int i, jBody; @@ -1376,7 +1376,7 @@ void WriteBodyCassOne(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyCassTwo(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double h, inc, longa, Lnorm = 0.0, obliq, eqnode; int i, jBody; @@ -1479,24 +1479,24 @@ void WriteBodyCassTwo(BODY *body, CONTROL *control, OUTPUT *output, void WriteDynEllip(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (iBody > 0) { *dTmp = body[iBody].dDynEllip; } else { *dTmp = -1; } - fvFormattedString(&cUnit, "%s", ""); + fvFormattedString(cUnit, "%s", ""); } void WritePrecFNat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = fndCentralTorqueR(body, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); diff --git a/src/distrot.h b/src/distrot.h index 793a96053..cc2e9b879 100644 --- a/src/distrot.h +++ b/src/distrot.h @@ -77,31 +77,31 @@ void FinalizeUpdateZoblDistRot(BODY *, UPDATE *, int *, int, int, int); void HelpOutputDistRot(OUTPUT *); void WriteBodyDOblDtDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDPrecADtDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDXoblDtDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDYoblADtDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDZoblDtDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyXobl(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyYobl(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyZobl(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteOblTimeDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WritePrecATimeDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteXoblTimeDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteYoblTimeDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteZoblTimeDistRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void InitializeOutputDistRot(OUTPUT *, fnWriteOutput[]); diff --git a/src/eqtide.c b/src/eqtide.c index 4074b5d27..1a77c2f52 100644 --- a/src/eqtide.c +++ b/src/eqtide.c @@ -2273,7 +2273,7 @@ void VerifyHaltEqtide(BODY *body, CONTROL *control, OPTIONS *options, int iBody, void WriteBodyDsemiDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Broken int iPert; @@ -2306,7 +2306,7 @@ void WriteBodyDsemiDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyDeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Broken needs to be changed after switch to Hecc + Kecc int iPert; @@ -2337,11 +2337,11 @@ void WriteBodyDeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteLockTime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dLockTime; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2350,12 +2350,12 @@ void WriteLockTime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteTidalRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dTidalRadius; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -2364,7 +2364,7 @@ void WriteTidalRadius(BODY *body, CONTROL *control, OUTPUT *output, void WriteDOblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dFoo; int iPert; @@ -2378,7 +2378,7 @@ void WriteDOblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) / fdUnitsAngle(units->iAngle); fsUnitsAngRate(units, cUnit); @@ -2387,7 +2387,7 @@ void WriteDOblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteTidalQOcean(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Return -1 if dImK2Ocean is 0. There may be a better way to do this. */ if (body[iBody].dImK2Ocean > 0) { @@ -2396,12 +2396,12 @@ void WriteTidalQOcean(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = -1; } - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } void WriteTidalQEnv(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Return -1 if dImK2Env is 0. There may be a better way to do this. */ if (body[iBody].dImK2Env > 0) { @@ -2410,12 +2410,12 @@ void WriteTidalQEnv(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = -1; } - fvFormattedString(&cUnit, ""); + fvFormattedString(cUnit, ""); } void WriteDSemiDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dDeriv; /* Ensure that we don't overwrite pdDsemiDt */ @@ -2424,7 +2424,7 @@ void WriteDSemiDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) / fdUnitsLength(units->iLength); fsUnitsVel(units, cUnit); @@ -2433,13 +2433,13 @@ void WriteDSemiDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDEccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dDeccDtEqtide; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2448,7 +2448,7 @@ void WriteDEccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDMeanMotionDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1.5 * pow(BIGG * (body[0].dMass + body[iBody].dMass) / @@ -2458,7 +2458,7 @@ void WriteDMeanMotionDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) / fdUnitsLength(units->iLength); fsUnitsRate(units->iTime, cUnit); @@ -2468,7 +2468,7 @@ void WriteDMeanMotionDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDOrbPerDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = 1.5 * pow(4 * PI * PI * body[iBody].dSemi / @@ -2481,13 +2481,13 @@ void WriteDOrbPerDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, fvFormattedString(&cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) / fdUnitsLength(units->iLength); - fvFormattedString(&cUnit, "%s", ""); + fvFormattedString(cUnit, "%s", ""); } } void WriteDRotPerDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -2501,7 +2501,7 @@ void WriteDRotPerDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, *dTmp = dDeriv * (-2 * PI / (body[iBody].dRotRate * body[iBody].dRotRate)); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { fvFormattedString(&cUnit, ""); } @@ -2509,7 +2509,7 @@ void WriteDRotPerDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDRotRateDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; @@ -2523,7 +2523,7 @@ void WriteDRotRateDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime) * fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2533,7 +2533,7 @@ void WriteDRotRateDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDHeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dDeriv; /* Ensure that we don't overwrite pdDsemiDt */ @@ -2542,7 +2542,7 @@ void WriteDHeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2551,7 +2551,7 @@ void WriteDHeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDKeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dDeriv; /* Ensure that we don't overwrite pdDsemiDt */ @@ -2560,7 +2560,7 @@ void WriteDKeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2569,7 +2569,7 @@ void WriteDKeccDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDXoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dDeriv = 0; int iPert; @@ -2582,7 +2582,7 @@ void WriteDXoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2591,7 +2591,7 @@ void WriteDXoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDYoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dDeriv = 0; int iPert; @@ -2604,7 +2604,7 @@ void WriteDYoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2613,7 +2613,7 @@ void WriteDYoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteDZoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { double dDeriv = 0; int iPert; @@ -2626,7 +2626,7 @@ void WriteDZoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2639,7 +2639,7 @@ void WriteDZoblDtEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteEccTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv, dEcc; // Complicated because primary variable is h or k @@ -2656,7 +2656,7 @@ void WriteEccTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2665,7 +2665,7 @@ void WriteEccTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteEqRotPer(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); *dTmp = fdFreqToPer(fdEqRotRate( @@ -2674,7 +2674,7 @@ void WriteEqRotPer(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2683,7 +2683,7 @@ void WriteEqRotPer(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteEqRotPerCont(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); @@ -2699,7 +2699,7 @@ void WriteEqRotPerCont(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2708,7 +2708,7 @@ void WriteEqRotPerCont(BODY *body, CONTROL *control, OUTPUT *output, void WriteEqRotPerDiscrete(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); if (control->Evolve.iEqtideModel == CPL) { @@ -2720,7 +2720,7 @@ void WriteEqRotPerDiscrete(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2729,7 +2729,7 @@ void WriteEqRotPerDiscrete(BODY *body, CONTROL *control, OUTPUT *output, void WriteEqRotRate(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); *dTmp = fdEqRotRate(body, iBody, body[iOrbiter].dMeanMotion, @@ -2738,7 +2738,7 @@ void WriteEqRotRate(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2747,7 +2747,7 @@ void WriteEqRotRate(BODY *body, CONTROL *control, OUTPUT *output, void WriteEqRotRateCont(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); @@ -2762,7 +2762,7 @@ void WriteEqRotRateCont(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2771,7 +2771,7 @@ void WriteEqRotRateCont(BODY *body, CONTROL *control, OUTPUT *output, void WriteEqRotRateDiscrete(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); if (control->Evolve.iEqtideModel == CPL) { @@ -2783,7 +2783,7 @@ void WriteEqRotRateDiscrete(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2793,7 +2793,7 @@ void WriteEqRotRateDiscrete(BODY *body, CONTROL *control, OUTPUT *output, // Equilibrium Tidal Power void WriteEqTidePower(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { int iOrbiter = fiAssignTidalOrbiter(body, iBody); if (control->Evolve.iEqtideModel == CPL) { @@ -2812,7 +2812,7 @@ void WriteEqTidePower(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -2825,7 +2825,7 @@ void WriteEqTidePower(BODY *body, CONTROL *control, OUTPUT *output, void WriteGammaOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Broken */ //*dTmp = @@ -2838,7 +2838,7 @@ void WriteGammaOrb(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteGammaRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Broken @@ -2854,7 +2854,7 @@ void WriteGammaRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteK2Ocean(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dK2Ocean; @@ -2863,7 +2863,7 @@ void WriteK2Ocean(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteK2Env(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dK2Env; @@ -2872,7 +2872,7 @@ void WriteK2Env(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteOblTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Broken @@ -2895,14 +2895,14 @@ void WriteOblTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteRotTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fdTimescaleMulti(body[iBody].dRotRate, *(update[iBody].padDrotDtEqtide), body[iBody].iTidePerts); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2915,12 +2915,12 @@ void WriteRotTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteSemiTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fdTimescale(body[iBody].dSemi, *(update[iBody].pdDsemiDtEqtide)); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2933,7 +2933,7 @@ void WriteSemiTimescaleEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WritePowerEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get total tidal power */ *dTmp = fdTidePower(body, iBody, control->Evolve.iEqtideModel); //*dTmp = body[iBody].dTidalPowMan; @@ -2950,7 +2950,7 @@ fprintf(stderr,"TidalZ: %lf\n",body[iBody].dTidalZ[jBody]); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsPower(units->iTime, units->iMass, units->iLength); fsUnitsPower(units, cUnit); @@ -2959,14 +2959,14 @@ fprintf(stderr,"TidalZ: %lf\n",body[iBody].dTidalZ[jBody]); void WriteEnergyFluxEqtide(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total tidal surface energy flux */ *dTmp = fdSurfEnFluxEqtide(body, system, update, iBody, control->Evolve.iEqtideModel); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergyFlux(units->iTime, units->iMass, units->iLength); fsUnitsEnergyFlux(units, cUnit); @@ -2975,12 +2975,12 @@ void WriteEnergyFluxEqtide(BODY *body, CONTROL *control, OUTPUT *output, void WriteTidalTau(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dTidalTau; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTime(units->iTime); fsUnitsTime(units->iTime, cUnit); @@ -2989,7 +2989,7 @@ void WriteTidalTau(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteTideLock(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = control->Evolve.bForceEqSpin[iBody]; strcat(cUnit, ""); diff --git a/src/eqtide.h b/src/eqtide.h index bef4fb018..8cb8db7b8 100644 --- a/src/eqtide.h +++ b/src/eqtide.h @@ -186,76 +186,76 @@ void FinalizeUpdateSemiEqtide(BODY *, UPDATE *, int *, int, int, int); void HelpOutputEqtide(OUTPUT *); void WriteBodyDsemiDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteBodyDeccDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDOblDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteDSemiDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDEccDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteDMeanMotionDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDOrbPerDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDRotPerDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDRotRateDtEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteEccTimescaleEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteEqRotPer(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteEqRotPerCont(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteEqRotPerDiscrete(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteEqRotRate(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteEqRotRateCont(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteEqRotRateDiscrete(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteGammaOrb(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteGammaRot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteOblTimescaleEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteRotTimescaleEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteSemiTimescaleEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WritePowerEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteSurfEnFluxEqtide(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteEqPower(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteEqSurfEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTidalQ(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteTidalTau(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTideLock(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteLockTime(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); // void // WriteImK2(BODY*,CONTROL*,OUTPUT*,SYSTEM*,UNITS*,UPDATE*,int,double*,char[]); void WriteK2Ocean(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteK2Env(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteTidalQOcean(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTidalQEnv(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void InitializeOutputEqtide(OUTPUT *, fnWriteOutput[]); void WriteTidalRadius(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); /* Logging Functions */ void LogOptionsEqtide(CONTROL *, FILE *); diff --git a/src/flare.c b/src/flare.c index 54aca8b47..c35ddb651 100644 --- a/src/flare.c +++ b/src/flare.c @@ -992,11 +992,11 @@ void WriteLXUVFlare(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = fdLXUVFlare(body, control->Evolve.dTimeStep, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergyFlux(units->iTime, units->iMass, units->iLength); fsUnitsEnergyFlux(units, cUnit); @@ -1034,7 +1034,7 @@ void WriteLXUVFlareLower(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dLXUVFlareLower; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -1053,11 +1053,11 @@ void WriteFlareFreq1(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreq1; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1071,11 +1071,11 @@ void WriteFlareFreq2(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreq2; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1089,11 +1089,11 @@ void WriteFlareFreq3(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreq3; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1107,11 +1107,11 @@ void WriteFlareFreq4(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreq4; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1125,11 +1125,11 @@ void WriteFlareFreqMin(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreqMin; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1143,11 +1143,11 @@ void WriteFlareFreqMid(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreqMid; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1161,11 +1161,11 @@ void WriteFlareFreqMax(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareFreqMax; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1179,11 +1179,11 @@ void WriteFlareEnergy1(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergy1; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); @@ -1198,11 +1198,11 @@ void WriteFlareEnergy2(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergy2; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); @@ -1217,11 +1217,11 @@ void WriteFlareEnergy3(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergy3; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); @@ -1236,11 +1236,11 @@ void WriteFlareEnergy4(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergy4; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); @@ -1254,11 +1254,11 @@ void WriteFlareEnergyMin(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergyMin; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); @@ -1272,11 +1272,11 @@ void WriteFlareEnergyMid(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergyMid; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); @@ -1291,11 +1291,11 @@ void WriteFlareEnergyMax(BODY *body, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dFlareEnergyMax; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsEnergy(units->iTime, units->iMass, units->iLength); fsUnitsEnergy(units, cUnit); diff --git a/src/flare.h b/src/flare.h index 7647a8180..8d8ca979c 100644 --- a/src/flare.h +++ b/src/flare.h @@ -108,35 +108,35 @@ void InitializeOutputFunctionFlare(OUTPUT *, int, int); void FinalizeOutputFunctionFlare(OUTPUT *, int, int); void WriteLXUVFlare(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreq1(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreq2(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreq3(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreq4(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreqMin(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreqMid(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareFreqMax(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareEnergy1(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareEnergy2(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareEnergy3(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareEnergy4(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFlareEnergyMin(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteFlareEnergyMid(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteFlareEnergyMax(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); /* Logging Functions */ void LogOptionsFlare(CONTROL *, FILE *); diff --git a/src/galhabit.c b/src/galhabit.c index 63b7a5e2c..b85545188 100644 --- a/src/galhabit.c +++ b/src/galhabit.c @@ -1412,13 +1412,13 @@ void VerifyHaltGalHabit(BODY *body, CONTROL *control, OPTIONS *options, void WriteBodyPeriQ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dSemi * (1.0 - body[iBody].dEcc); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -1427,42 +1427,42 @@ void WriteBodyPeriQ(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyEccX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dEccX; } void WriteBodyEccY(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dEccY; } void WriteBodyEccZ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dEccZ; } void WriteBodyAngMX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dAngMX; } void WriteBodyAngMY(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dAngMY; } void WriteBodyAngMZ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dAngMZ; } @@ -1470,28 +1470,28 @@ void WriteBodyAngMZ(BODY *body, CONTROL *control, OUTPUT *output, void WriteNEncounters(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = (double)system->iNEncounters; } void WriteNBadImpulse(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = (double)body[iBody].iBadImpulse; } void WriteFVelDisp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = system->dScalingFVelDisp; } void WriteDEccDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dex, dey, dez; if (body[iBody].bGalacTides) { @@ -1509,7 +1509,7 @@ void WriteDEccDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); fsUnitsRate(units->iTime, cUnit); @@ -1518,7 +1518,7 @@ void WriteDEccDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, void WriteDIncDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dhx, dhy, dhz, qx, qy, qz; if (body[iBody].bGalacTides) { @@ -1553,7 +1553,7 @@ void WriteDIncDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); @@ -1563,7 +1563,7 @@ void WriteDIncDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, void WriteDLongADtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dhx, dhy, dhz, qx, qy, qz; if (body[iBody].bGalacTides) { @@ -1598,7 +1598,7 @@ void WriteDLongADtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); @@ -1608,7 +1608,7 @@ void WriteDLongADtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, void WriteDArgPDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dex, dey, dez, dhx, dhy, dhz, qx, qy, qz, dLAdt, dedt; if (body[iBody].bGalacTides) { @@ -1651,7 +1651,7 @@ void WriteDArgPDtGalHTidal(BODY *body, CONTROL *control, OUTPUT *output, if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp *= fdUnitsTime(units->iTime); *dTmp /= fdUnitsAngle(units->iAngle); diff --git a/src/galhabit.h b/src/galhabit.h index 20b1d60f8..8a49e326a 100644 --- a/src/galhabit.h +++ b/src/galhabit.h @@ -91,31 +91,31 @@ void FinalizeUpdatePeriQGalHabit(BODY *, UPDATE *, int *, int, int, int); void FinalizeUpdateArgPGalHabit(BODY *, UPDATE *, int *, int, int, int); void FinalizeUpdateIncGalHabit(BODY *, UPDATE *, int *, int, int, int); void FinalizeUpdateLongAGalHabit(BODY *, UPDATE *, int *, int, int, int); - +void InitializeOutputGalHabit(OUTPUT *, fnWriteOutput[]); void HelpOutputGalHabit(OUTPUT *); + void WriteBodyPeriQ(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteDEccDtGalHTidal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDIncDtGalHTidal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDArgPDtGalHTidal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteDLongADtGalHTidal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); -void InitializeOutputGalHabit(OUTPUT *, fnWriteOutput[]); + UPDATE *, int, double *, char**); void WriteBodyEccX(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyEccY(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyEccZ(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyAngMX(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyAngMY(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteBodyAngMZ(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); /* Logging Functions */ void LogOptionsGalHabit(CONTROL *, FILE *); diff --git a/src/magmoc.c b/src/magmoc.c index eb5949c21..cea343cf5 100644 --- a/src/magmoc.c +++ b/src/magmoc.c @@ -2212,11 +2212,11 @@ void VerifyHaltMagmOc(BODY *body, CONTROL *control, OPTIONS *options, int iBody, void WritePotTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dPotTemp; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTemp(units->iTemp, 1, 0); fsUnitsTemp(units->iTemp, cUnit); @@ -2225,11 +2225,11 @@ void WritePotTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteSurfTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dSurfTemp; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsTemp(units->iTemp, 1, 0); fsUnitsTemp(units->iTemp, cUnit); @@ -2238,11 +2238,11 @@ void WriteSurfTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteSolidRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dSolidRadius; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -2251,11 +2251,11 @@ void WriteSolidRadius(BODY *body, CONTROL *control, OUTPUT *output, void WriteWaterMassMOAtm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dWaterMassMOAtm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2264,11 +2264,11 @@ void WriteWaterMassMOAtm(BODY *body, CONTROL *control, OUTPUT *output, void WriteWaterMassSol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dWaterMassSol; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2277,11 +2277,11 @@ void WriteWaterMassSol(BODY *body, CONTROL *control, OUTPUT *output, void WriteCO2MassMOAtm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCO2MassMOAtm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2290,11 +2290,11 @@ void WriteCO2MassMOAtm(BODY *body, CONTROL *control, OUTPUT *output, void WriteCO2MassSol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCO2MassSol; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2303,11 +2303,11 @@ void WriteCO2MassSol(BODY *body, CONTROL *control, OUTPUT *output, void WriteOxygenMassMOAtm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dOxygenMassMOAtm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2316,11 +2316,11 @@ void WriteOxygenMassMOAtm(BODY *body, CONTROL *control, OUTPUT *output, void WriteOxygenMassSol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dOxygenMassSol; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2329,44 +2329,44 @@ void WriteOxygenMassSol(BODY *body, CONTROL *control, OUTPUT *output, void WritePressWaterAtm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPressWaterAtm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WritePressCO2Atm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPressCO2Atm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WritePressOxygenAtm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dPressOxygenAtm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WriteHydrogenMassSpace(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dHydrogenMassSpace; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2375,11 +2375,11 @@ void WriteHydrogenMassSpace(BODY *body, CONTROL *control, OUTPUT *output, void WriteOxygenMassSpace(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dOxygenMassSpace; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsMass(units->iMass); fsUnitsMass(units->iMass, cUnit); @@ -2388,57 +2388,57 @@ void WriteOxygenMassSpace(BODY *body, CONTROL *control, OUTPUT *output, void WriteFracFe2O3Man(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dFracFe2O3Man; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WriteNetFluxAtmo(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dNetFluxAtmo; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WriteWaterFracMelt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dWaterFracMelt; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WriteCO2FracMelt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dCO2FracMelt; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } void WriteRadioPower(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody] .dRadioHeat; //* (4/3*PI*body[iBody].dManMeltDensity*(pow(body[iBody].dRadius,3)-pow(body[iBody].dCoreRadius,3))); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsPower(units->iTime, units->iMass, units->iLength); fsUnitsPower(units, cUnit); @@ -2447,13 +2447,13 @@ void WriteRadioPower(BODY *body, CONTROL *control, OUTPUT *output, void WriteTidalPower(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody] .dTidalHeat; // * (4/3*PI*body[iBody].dManMeltDensity*(pow(body[iBody].dRadius,3)-pow(body[iBody].dCoreRadius,3))); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsPower(units->iTime, units->iMass, units->iLength); fsUnitsPower(units, cUnit); @@ -2462,11 +2462,11 @@ void WriteTidalPower(BODY *body, CONTROL *control, OUTPUT *output, void WriteHZInnerEdge(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHZInnerEdge; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { *dTmp /= fdUnitsLength(units->iLength); fsUnitsLength(units->iLength, cUnit); @@ -2475,11 +2475,11 @@ void WriteHZInnerEdge(BODY *body, CONTROL *control, OUTPUT *output, void WriteMeltFraction(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dMeltFraction; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; - fvFormattedString(&cUnit, output->cNeg); + fvFormattedString(cUnit, output->cNeg); } else { } } diff --git a/src/magmoc.h b/src/magmoc.h index 408158f82..3173772f5 100644 --- a/src/magmoc.h +++ b/src/magmoc.h @@ -209,51 +209,51 @@ void InitializeOutputFunctionMagmOc(OUTPUT *, int, int); void FinalizeOutputFunctionMagmOc(OUTPUT *, int, int); void WritePotTemp(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteSurfTemp(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteSolidRadius(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteWaterMassMOAtm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteWaterMassSol(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteCO2MassMOAtm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteCO2MassSol(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteOxygenMassMOAtm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteOxygenMassSol(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WritePressWaterAtm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WritePressCO2Atm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WritePressOxygenAtm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteHydrogenMassSpace(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteOxygenMassSpace(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteFracFe2O3Man(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteNetFluxAtmo(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteWaterFracMelt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteCO2FracMelt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteRadioPower(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTidalPower(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteSemiMajorAxis(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteHZInnerEdge(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteMeltFraction(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); /* Logging Functions */ void LogOptionsMagmOc(CONTROL *, FILE *); diff --git a/src/output.c b/src/output.c index c731acfff..754900e3f 100644 --- a/src/output.c +++ b/src/output.c @@ -15,7 +15,7 @@ void WriteAge(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dAge; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -33,7 +33,7 @@ void WriteAge(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, /* iBodyType */ void WriteBodyType(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].iBodyType; strcpy(cUnit, ""); } @@ -45,7 +45,7 @@ void WriteBodyType(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, /* Climate-obliquity-precession parameter */ void WriteCOPP(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dEcc * sin(body[iBody].dLongP + body[iBody].dPrecA) * sin(body[iBody].dObliquity); @@ -56,7 +56,7 @@ void WriteCOPP(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, * orbit) */ void WriteCriticalSemi(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Only valid for simulations of tidally-interacting binary stars that have // 2 bodies: 0, 1, both stars, with bStellar = bEqtide = 1 @@ -88,7 +88,7 @@ void WriteCriticalSemi(BODY *body, CONTROL *control, OUTPUT *output, void WriteDeltaTime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (control->Evolve.bVarDt) { if (control->Evolve.dTime > 0) { @@ -115,7 +115,7 @@ void WriteDeltaTime(BODY *body, CONTROL *control, OUTPUT *output, void WriteDensity(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = fdSphereDensity(body[iBody].dMass, body[iBody].dRadius); @@ -135,7 +135,7 @@ void WriteDensity(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteHecc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dHecc; strcpy(cUnit, ""); @@ -145,7 +145,7 @@ void WriteHecc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteHZLimitDryRunaway(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dLuminosity; int jBody; @@ -175,7 +175,7 @@ void WriteHZLimitDryRunaway(BODY *body, CONTROL *control, OUTPUT *output, void WriteHZLimitRecentVenus(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLim; double *daHZLimits; // Array of HZ limits @@ -215,7 +215,7 @@ void WriteHZLimitRecentVenus(BODY *body, CONTROL *control, OUTPUT *output, void WriteHZLimitRunawayGreenhouse(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double *daHZLimits; // Array of HZ limits daHZLimits = malloc(6 * sizeof(double)); @@ -246,7 +246,7 @@ void WriteHZLimitRunawayGreenhouse(BODY *body, CONTROL *control, OUTPUT *output, void WriteHZLimitMoistGreenhouse(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double *daHZLimits; // Array of HZ limits daHZLimits = malloc(6 * sizeof(double)); @@ -276,7 +276,7 @@ void WriteHZLimitMoistGreenhouse(BODY *body, CONTROL *control, OUTPUT *output, void WriteHZLimitMaxGreenhouse(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double *daHZLimits; // Array of HZ limits daHZLimits = malloc(6 * sizeof(double)); @@ -306,7 +306,7 @@ void WriteHZLimitMaxGreenhouse(BODY *body, CONTROL *control, OUTPUT *output, void WriteHZLimitEarlyMars(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double *daHZLimits; // Array of HZ limits daHZLimits = malloc(6 * sizeof(double)); @@ -340,7 +340,7 @@ void WriteHZLimitEarlyMars(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyInc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bDistOrb) { *dTmp = fdInclination(body, iBody); } else { @@ -358,7 +358,7 @@ void WriteBodyInc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteInstellation(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Should have special case if bBinary=1 // if (body[iBody].bSpiNBody) @@ -391,7 +391,7 @@ void WriteInstellation(BODY *body, CONTROL *control, OUTPUT *output, void WriteK2Man(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { // This is calculated during PropsAux if (body[iBody].bEqtide) { *dTmp = body[iBody].dK2Man; @@ -406,7 +406,7 @@ void WriteK2Man(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteImK2Man(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bEqtide) { *dTmp = body[iBody].dImK2Man; @@ -422,7 +422,7 @@ void WriteImK2Man(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteKecc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dKecc; strcpy(cUnit, ""); @@ -434,7 +434,7 @@ void WriteKecc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteBodyLongA(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].bDistOrb) { *dTmp = fdLongA(body, iBody); } else { @@ -459,7 +459,7 @@ void WriteBodyLongA(BODY *body, CONTROL *control, OUTPUT *output, void WriteLongP(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bSpiNBody || body[iBody].bBinary) { @@ -494,7 +494,7 @@ void WriteLongP(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteBodyArgP(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { double varpi, Omega; if (body[iBody].bDistOrb) { @@ -519,7 +519,7 @@ void WriteBodyArgP(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteLXUVTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Multiple modules can contribute to this output */ int iModule; @@ -554,7 +554,7 @@ void WriteLXUVTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dMass; if (output->bDoNeg[iBody]) { @@ -572,7 +572,7 @@ void WriteMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteObliquity(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = atan2(sqrt(pow(body[iBody].dXobl, 2) + pow(body[iBody].dYobl, 2)), body[iBody].dZobl); @@ -588,7 +588,7 @@ void WriteObliquity(BODY *body, CONTROL *control, OUTPUT *output, void WriteBodyPrecA(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].bDistRot == 0 && body[iBody].bPoise == 1) { *dTmp = body[iBody].dPrecA; } else { @@ -613,7 +613,7 @@ void WriteBodyPrecA(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbAngMom(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { char cTmp; double *pdOrbMom; if (body[iBody].bSpiNBody) { @@ -639,7 +639,7 @@ void WriteOrbAngMom(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbEcc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bBinary != 1) { // Not doing binary if (iBody > 0) { if (body[iBody].bDistOrb || body[iBody].bEqtide) { @@ -666,7 +666,7 @@ void WriteOrbEcc(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, // XXX This function doesn't work! void WriteLostEng(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = -1; *dTmp = body[iBody].dLostEng; @@ -684,7 +684,7 @@ void WriteLostEng(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteOrbEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdOrbEnergy(body, control, system, iBody); @@ -699,7 +699,7 @@ void WriteOrbEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbMeanMotion(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].bBinary == 0) { // Not doing binary if (iBody > 0) { @@ -726,7 +726,7 @@ void WriteOrbMeanMotion(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbPeriod(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].bBinary == 0) { // Not doing binary if (iBody > 0) { @@ -759,7 +759,7 @@ void WriteOrbPeriod(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbSemi(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bBinary == 0) { // Not doing binary if (iBody > 0) { @@ -792,7 +792,7 @@ void WriteOrbSemi(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dRadius; if (output->bDoNeg[iBody]) { @@ -806,14 +806,14 @@ void WriteRadius(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteRadGyra(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dRadGyra; - fvFormattedString(&cUnit, "%s", ""); + fvFormattedString(cUnit, "%s", ""); } void WriteRotAngMom(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdRotAngMom(body[iBody].dRadGyra, body[iBody].dMass, body[iBody].dRadius, body[iBody].dRotRate); @@ -831,7 +831,7 @@ void WriteRotAngMom(BODY *body, CONTROL *control, OUTPUT *output, void WriteRotKinEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdRotKinEnergy(body[iBody].dMass, body[iBody].dRadius, body[iBody].dRadGyra, body[iBody].dRotRate); @@ -846,7 +846,7 @@ void WriteRotKinEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteRotRate(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dRotRate; if (output->bDoNeg[iBody]) { @@ -860,7 +860,7 @@ void WriteRotRate(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteRotPer(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = fdFreqToPer(body[iBody].dRotRate); if (output->bDoNeg[iBody]) { @@ -874,7 +874,7 @@ void WriteRotPer(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteRotVel(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = fdRotVel(body[iBody].dRadius, body[iBody].dRotRate); if (output->bDoNeg[iBody]) { @@ -892,7 +892,7 @@ the solid interior, ocean, and/envelope. */ void WriteSurfaceEnergyFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Surface Energy Flux is complicated because it either all comes through thermint, or it can be from eqtide and/or radheat. */ @@ -945,7 +945,7 @@ void WriteSurfaceEnergyFlux(BODY *body, CONTROL *control, OUTPUT *output, void WriteTidalQ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bEqtide) { if (body[iBody].bThermint && !body[iBody].bOcean && !body[iBody].bEnv) { @@ -979,7 +979,7 @@ void WriteTidalQ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteTidalQMantle(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { // Updated every timestep by PropsAuxEqtideThermint if (body[iBody].bEqtide) { @@ -992,7 +992,7 @@ void WriteTidalQMantle(BODY *body, CONTROL *control, OUTPUT *output, void WriteTime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = control->Evolve.iDir * control->Evolve.dTime; if (output->bDoNeg[iBody]) { @@ -1006,7 +1006,7 @@ void WriteTime(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteTotAngMom(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdTotAngMom(body, control, system); @@ -1023,7 +1023,7 @@ void WriteTotAngMom(BODY *body, CONTROL *control, OUTPUT *output, void WriteLostAngMom(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dLostAngMom; @@ -1040,7 +1040,7 @@ void WriteLostAngMom(BODY *body, CONTROL *control, OUTPUT *output, void WriteTotEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdTotEnergy(body, control, system); @@ -1055,7 +1055,7 @@ void WriteTotEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WritePotEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdPotEnergy(body, control, system, iBody); @@ -1070,7 +1070,7 @@ void WritePotEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteKinEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdKinEnergy(body, control, system, iBody); @@ -1085,7 +1085,7 @@ void WriteKinEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbKinEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdOrbKinEnergy(body, control, system, iBody); @@ -1100,7 +1100,7 @@ void WriteOrbKinEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteOrbPotEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (iBody > 0) { *dTmp = fdOrbPotEnergy(body, control, system, iBody); @@ -1119,7 +1119,7 @@ void WriteOrbPotEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteTotOrbEnergy(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fdTotOrbEnergy(body, control, system); if (output->bDoNeg[iBody]) { @@ -1133,7 +1133,7 @@ void WriteTotOrbEnergy(BODY *body, CONTROL *control, OUTPUT *output, void WriteImK2(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { // ImK2 should always be up to date if (body[iBody].bEqtide) { @@ -1146,7 +1146,7 @@ void WriteImK2(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteK2(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bThermint && !body[iBody].bOcean && !body[iBody].bEnv) { *dTmp = fdK2Man(body, iBody); @@ -1158,7 +1158,7 @@ void WriteK2(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteXobl(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dXobl; strcpy(cUnit, ""); @@ -1166,7 +1166,7 @@ void WriteXobl(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteYobl(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dYobl; strcpy(cUnit, ""); @@ -1174,7 +1174,7 @@ void WriteYobl(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteZobl(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dZobl; strcpy(cUnit, ""); @@ -1182,7 +1182,7 @@ void WriteZobl(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteMeanAnomaly(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dMeanA; @@ -1197,7 +1197,7 @@ void WriteMeanAnomaly(BODY *body, CONTROL *control, OUTPUT *output, void WriteMeanLongitude(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (control->Evolve.bUsingDistOrb && iBody != 0) { *dTmp = body[iBody].dMeanL + sqrt(body[iBody].dMu / @@ -1846,15 +1846,15 @@ void UnitsSI(UNITS *units) { void WriteLogEntry(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UPDATE *update, fnWriteOutput fnWrite, FILE *fp, int iBody) { double *dTmp; - char cUnit[48]; + char *cUnit=NULL; UNITS units; int i, j, iNumIndices; - cUnit[0] = '\0'; + //cUnit[0] = '\0'; dTmp = malloc(output->iNum * sizeof(double)); UnitsSI(&units); - fnWrite(body, control, output, system, &units, update, iBody, dTmp, cUnit); + fnWrite(body, control, output, system, &units, update, iBody, dTmp, &cUnit); fprintf(fp, "(%s) %s [%s]: ", output->cName, output->cDescr, cUnit); for (j = 0; j < output->iNum; j++) { @@ -1862,6 +1862,7 @@ void WriteLogEntry(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, fprintf(fp, " "); } free(dTmp); + free(cUnit); fprintf(fp, "\n"); } @@ -2009,7 +2010,7 @@ void LogOutputOrder(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, int iCol, iOut, iSubOut, iExtra = 0; char cCol[MODULEOUTEND][OUTLEN+2]; // +2 for brackets double *dTmp; - char cUnit[OUTLEN], *cTmp; + char *cUnit=NULL, *cTmp; for (iCol = 0; iCol < files->Outfile[iBody].iNumCols; iCol++) { for (iOut = 0; iOut < MODULEOUTEND; iOut++) { @@ -2018,7 +2019,7 @@ void LogOutputOrder(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, /* Match! */ dTmp = malloc(output[iOut].iNum * sizeof(double)); fnWrite[iOut](body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); for (iSubOut = 0; iSubOut < output[iOut].iNum; iSubOut++) { strcpy(cCol[iCol + iSubOut + iExtra], files->Outfile[iBody].caCol[iCol]); @@ -2044,7 +2045,7 @@ void LogGridOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, int iCol, iOut, iSubOut, iExtra = 0; char cCol[MODULEOUTEND][OUTLEN+2]; // +2 for brackets double *dTmp; - char cUnit[OUTLEN], *cTmp; + char *cUnit=NULL, *cTmp; for (iCol = 0; iCol < files->Outfile[iBody].iNumGrid; iCol++) { for (iOut = 0; iOut < MODULEOUTEND; iOut++) { @@ -2053,7 +2054,7 @@ void LogGridOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, /* Match! */ dTmp = malloc(output[iOut].iNum * sizeof(double)); fnWrite[iOut](body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); for (iSubOut = 0; iSubOut < output[iOut].iNum; iSubOut++) { strcpy(cCol[iCol + iSubOut + iExtra], files->Outfile[iBody].caGrid[iCol]); @@ -2233,8 +2234,9 @@ void WriteOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, strlen(output[iOut].cName)) == 0) { /* Match! */ dTmp = malloc(output[iOut].iNum * sizeof(double)); + cUnit=NULL; fnWrite[iOut](body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); for (iSubOut = 0; iSubOut < output[iOut].iNum; iSubOut++) { dCol[iCol + iSubOut + iExtra] = dTmp[iSubOut]; } @@ -2269,9 +2271,10 @@ void WriteOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, if (memcmp(files->Outfile[iBody].caGrid[iGrid], output[iOut].cName, strlen(output[iOut].cName)) == 0) { body[iBody].iWriteLat = iLat; + cUnit=NULL; fnWrite[iOut](body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); dGrid[iGrid] = *dTmp; } } @@ -2284,18 +2287,18 @@ void WriteOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, if (control->Evolve.dTime == 0 && iLat == 0) { if (body[iBody].iClimateModel == SEA) { WriteDailyInsol(body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); WriteSeasonalTemp(body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); WriteSeasonalIceBalance(body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); WriteSeasonalFluxes(body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); WritePlanckB(body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); if (body[iBody].dSeasOutputTime != 0) { body[iBody].dSeasNextOutput = body[iBody].dSeasOutputTime; @@ -2310,18 +2313,18 @@ void WriteOutput(BODY *body, CONTROL *control, FILES *files, OUTPUT *output, if (control->Evolve.dTime >= body[iBody].dSeasNextOutput && iLat == 0) { WriteDailyInsol(body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); WriteSeasonalTemp(body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); WriteSeasonalIceBalance(body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); WriteSeasonalFluxes(body, control, &output[iOut], system, &control->Units[iBody], update, iBody, dTmp, - cUnit); + &cUnit); WritePlanckB(body, control, &output[iOut], system, - &control->Units[iBody], update, iBody, dTmp, cUnit); + &control->Units[iBody], update, iBody, dTmp, &cUnit); body[iBody].dSeasNextOutput = control->Evolve.dTime + body[iBody].dSeasOutputTime; diff --git a/src/output.h b/src/output.h index dede94e80..369fea3a5 100644 --- a/src/output.h +++ b/src/output.h @@ -110,8 +110,7 @@ /* @cond DOXYGEN_OVERRIDE */ -void WriteBodyPrecA(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + void Bary2OrbElems(BODY *body, int iBody); void WriteLogEntry(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UPDATE *, fnWriteOutput, FILE *, int); @@ -122,7 +121,9 @@ void WriteOutput(BODY *, CONTROL *, FILES *, OUTPUT *, SYSTEM *, UPDATE *, void WriteLog(BODY *, CONTROL *, FILES *, MODULE *, OPTIONS *, OUTPUT *, SYSTEM *, UPDATE *, fnUpdateVariable ***, fnWriteOutput *, int); void InitializeOutput(FILES*,OUTPUT *, fnWriteOutput *); -void WriteTime(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); +void WriteTime(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, + double *, char**); +void WriteBodyPrecA(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, + int, double *, char**); /* @endcond */ diff --git a/src/poise.c b/src/poise.c index 98b011249..c9538308f 100644 --- a/src/poise.c +++ b/src/poise.c @@ -2683,7 +2683,7 @@ void VerifyHaltPoise(BODY *body, CONTROL *control, OPTIONS *options, int iBody, void WriteTGlobal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TGlobal */ *dTmp = body[iBody].dTGlobal; if (output->bDoNeg[iBody]) { @@ -2697,7 +2697,7 @@ void WriteTGlobal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteAlbedoGlobal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get AlbedoGlobal */ *dTmp = body[iBody].dAlbedoGlobal; strcpy(cUnit, ""); @@ -2705,7 +2705,7 @@ void WriteAlbedoGlobal(BODY *body, CONTROL *control, OUTPUT *output, void WriteSnowball(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get snowball status */ *dTmp = (double)body[iBody].bSnowball; strcpy(cUnit, ""); @@ -2713,7 +2713,7 @@ void WriteSnowball(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteIceCapNorthLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2725,7 +2725,7 @@ void WriteIceCapNorthLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapNorthLatLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2743,7 +2743,7 @@ void WriteIceCapNorthLatLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapNorthSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2754,7 +2754,7 @@ void WriteIceCapNorthSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapNorthLatSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2772,7 +2772,7 @@ void WriteIceCapNorthLatSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapSouthLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2783,7 +2783,7 @@ void WriteIceCapSouthLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapSouthLatLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2801,7 +2801,7 @@ void WriteIceCapSouthLatLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapSouthSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2812,7 +2812,7 @@ void WriteIceCapSouthSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceCapSouthLatSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatIceEdge, bCap; double dLat; @@ -2831,7 +2831,7 @@ void WriteIceCapSouthLatSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBeltLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { int iLatNorth, iLatSouth, bBelt; double dLatNorth, dLatSouth; @@ -2844,7 +2844,7 @@ void WriteIceBeltLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBeltNorthLatLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatNorth, iLatSouth, bBelt; double dLatNorth, dLatSouth; @@ -2863,7 +2863,7 @@ void WriteIceBeltNorthLatLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBeltSouthLatLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatNorth, iLatSouth, bBelt; double dLatSouth, dLatNorth; @@ -2882,7 +2882,7 @@ void WriteIceBeltSouthLatLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBeltSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { int iLatNorth, iLatSouth, bBelt; double dLatNorth, dLatSouth; @@ -2895,7 +2895,7 @@ void WriteIceBeltSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBeltNorthLatSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatNorth, iLatSouth, bBelt; double dLatNorth, dLatSouth; @@ -2914,7 +2914,7 @@ void WriteIceBeltNorthLatSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBeltSouthLatSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { int iLatNorth, iLatSouth, bBelt; double dLatNorth, dLatSouth; @@ -2933,7 +2933,7 @@ void WriteIceBeltSouthLatSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteSnowballLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = (double)fbSnowballLand(body, iBody); strcpy(cUnit, ""); @@ -2941,7 +2941,7 @@ void WriteSnowballLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteSnowballSea(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = (double)fbSnowballSea(body, iBody); strcpy(cUnit, ""); @@ -2949,7 +2949,7 @@ void WriteSnowballSea(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceFree(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = (double)fbIceFree(body, iBody); strcpy(cUnit, ""); @@ -2957,7 +2957,7 @@ void WriteIceFree(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteSkipSeas(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get AlbedoGlobal */ *dTmp = body[iBody].bSkipSeas; strcpy(cUnit, ""); @@ -2965,7 +2965,7 @@ void WriteSkipSeas(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteTempLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -2989,7 +2989,7 @@ void WriteTempLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteTempMinLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3014,7 +3014,7 @@ void WriteTempMinLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteTempMaxLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3038,7 +3038,7 @@ void WriteTempMaxLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteTempMaxLand(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3062,7 +3062,7 @@ void WriteTempMaxLand(BODY *body, CONTROL *control, OUTPUT *output, void WriteTempMaxWater(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3084,7 +3084,7 @@ void WriteTempMaxWater(BODY *body, CONTROL *control, OUTPUT *output, void WriteTempLandLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3106,7 +3106,7 @@ void WriteTempLandLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteTempWaterLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3128,7 +3128,7 @@ void WriteTempWaterLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteLatitude(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].daLats[body[iBody].iWriteLat]; @@ -3146,7 +3146,7 @@ void WriteLatitude(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteAlbedoLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3162,7 +3162,7 @@ void WriteAlbedoLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteAlbedoLandLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3177,7 +3177,7 @@ void WriteAlbedoLandLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteAlbedoWaterLat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3192,7 +3192,7 @@ void WriteAlbedoWaterLat(BODY *body, CONTROL *control, OUTPUT *output, void WriteFluxInGlobal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dFluxInGlobal; @@ -3209,7 +3209,7 @@ void WriteFluxInGlobal(BODY *body, CONTROL *control, OUTPUT *output, void WriteFluxOutGlobal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dFluxOutGlobal; @@ -3227,7 +3227,7 @@ void WriteFluxOutGlobal(BODY *body, CONTROL *control, OUTPUT *output, void WriteTotIceMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dIceMassTot; @@ -3245,7 +3245,7 @@ void WriteTotIceMass(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceFlowTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dIceFlowTot; @@ -3260,7 +3260,7 @@ void WriteIceFlowTot(BODY *body, CONTROL *control, OUTPUT *output, void WriteAreaIceCov(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { fvAreaIceCovered(body, iBody); *dTmp = body[iBody].dAreaIceCov; @@ -3276,7 +3276,7 @@ void WriteAreaIceCov(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceBalanceTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dIceBalanceTot; @@ -3294,7 +3294,7 @@ void WriteIceBalanceTot(BODY *body, CONTROL *control, OUTPUT *output, void WriteAnnualInsol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].daAnnualInsol[body[iBody].iWriteLat]; @@ -3311,7 +3311,7 @@ void WriteAnnualInsol(BODY *body, CONTROL *control, OUTPUT *output, void WritePeakInsol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].daPeakInsol[body[iBody].iWriteLat]; @@ -3328,7 +3328,7 @@ void WritePeakInsol(BODY *body, CONTROL *control, OUTPUT *output, void WriteDailyInsol(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { char *cOut; FILE *fp; @@ -3381,7 +3381,7 @@ void WriteDailyInsol(BODY *body, CONTROL *control, OUTPUT *output, void WritePlanckB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { char *cOut; FILE *fp; @@ -3435,7 +3435,7 @@ void WritePlanckB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteSeasonalTemp(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { char *cOut; FILE *fp; @@ -3491,7 +3491,7 @@ void WriteSeasonalTemp(BODY *body, CONTROL *control, OUTPUT *output, void WriteSeasonalFluxes(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { char *cOutM, *cOutI, *cOutO, *cOutD; FILE *fpM, *fpI, *fpO, *fpD; @@ -3587,7 +3587,7 @@ void WriteSeasonalFluxes(BODY *body, CONTROL *control, OUTPUT *output, void WriteSeasonalIceBalance(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { char *cOut; FILE *fp; @@ -3640,7 +3640,7 @@ void WriteSeasonalIceBalance(BODY *body, CONTROL *control, OUTPUT *output, void WriteFluxMerid(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3665,7 +3665,7 @@ void WriteFluxMerid(BODY *body, CONTROL *control, OUTPUT *output, void WriteFluxIn(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3689,7 +3689,7 @@ void WriteFluxIn(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteFluxOut(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { @@ -3713,7 +3713,7 @@ void WriteFluxOut(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteDivFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].iClimateModel == ANN || body[iBody].bSkipSeas == 1) { *dTmp = body[iBody].daDivFlux[body[iBody].iWriteLat]; @@ -3730,7 +3730,7 @@ void WriteDivFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteIceMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bIceSheets) { *dTmp = body[iBody].daIceMass[body[iBody].iWriteLat]; @@ -3750,7 +3750,7 @@ void WriteIceMass(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteIceHeight(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].bIceSheets) { *dTmp = body[iBody].daIceMass[body[iBody].iWriteLat] / RHOICE; @@ -3768,7 +3768,7 @@ void WriteIceHeight(BODY *body, CONTROL *control, OUTPUT *output, void WriteBedrockH(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { if (body[iBody].bIceSheets) { *dTmp = body[iBody].daBedrockH[body[iBody].iWriteLat]; @@ -3786,7 +3786,7 @@ void WriteBedrockH(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WritePlanckBAvg(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { if (body[iBody].bIceSheets) { *dTmp = body[iBody].daPlanckBAvg[body[iBody].iWriteLat]; @@ -3804,7 +3804,7 @@ void WritePlanckBAvg(BODY *body, CONTROL *control, OUTPUT *output, void WriteDIceMassDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { //*dTmp = body[iBody].daIceBalanceAnnual[body[iBody].iWriteLat]; if (body[iBody].bIceSheets) { @@ -3823,7 +3823,7 @@ void WriteDIceMassDt(BODY *body, CONTROL *control, OUTPUT *output, void WriteIceAccum(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { //*dTmp = body[iBody].daIceBalanceAnnual[body[iBody].iWriteLat]; if (body[iBody].bIceSheets) { @@ -3842,7 +3842,7 @@ void WriteIceAccum(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteIceAblate(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { //*dTmp = body[iBody].daIceBalanceAnnual[body[iBody].iWriteLat]; if (body[iBody].bIceSheets) { @@ -3862,7 +3862,7 @@ void WriteIceAblate(BODY *body, CONTROL *control, OUTPUT *output, void WriteDIceMassDtFlow(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { // *dTmp = body[iBody].daIceBalanceAnnual[body[iBody].iWriteLat]; if (body[iBody].bIceSheets) { @@ -3881,7 +3881,7 @@ void WriteDIceMassDtFlow(BODY *body, CONTROL *control, OUTPUT *output, void WriteEnergyResL(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].daEnergyResL[body[iBody].iWriteLat]; @@ -3895,7 +3895,7 @@ void WriteEnergyResL(BODY *body, CONTROL *control, OUTPUT *output, void WriteEnergyResW(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].daEnergyResW[body[iBody].iWriteLat]; diff --git a/src/poise.h b/src/poise.h index ed3931494..2e028c21e 100644 --- a/src/poise.h +++ b/src/poise.h @@ -209,39 +209,39 @@ void FinalizeUpdateIceMassPoise(BODY *, UPDATE *, int *, int, int, int); void HelpOutputPoise(OUTPUT *); void WriteTGlobal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteAlbedoGlobal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTempLat(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteTempMinLW(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTempMaxLW(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteAlbedoLat(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteAnnualInsol(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteDailyInsol(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WritePlanckB(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WritePlanckBAvg(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteSeasonalTemp(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteSeasonalFluxes(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteSeasonalIceBalance(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void WriteFluxMerid(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteFluxIn(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteFluxOut(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteDivFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void InitializeOutputPoise(OUTPUT *, fnWriteOutput[]); /* Logging Functions */ diff --git a/src/radheat.c b/src/radheat.c index 282daa0f2..196eb23c9 100644 --- a/src/radheat.c +++ b/src/radheat.c @@ -3659,7 +3659,7 @@ void fvVerifyHaltRadheat(BODY *body, CONTROL *control, OPTIONS *options, */ void fvWrite26AlPowerMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 26Al *dTmp = -(*(update[iBody].pdD26AlNumManDt))*ENERGY26Al; */ *dTmp = fd26AlPowerMan(update, iBody); @@ -3686,7 +3686,7 @@ void fvWrite26AlPowerMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlEnFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get surface heat flux from 26Al */ *dTmp = fd26AlEnFlux(body, update, iBody); if (output->bDoNeg[iBody]) { @@ -3712,7 +3712,7 @@ void fvWrite26AlEnFlux(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD26AlNumDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = *(update[iBody].pdD26AlNumManDt); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3737,7 +3737,7 @@ void fvWriteD26AlNumDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlTimescale(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -3755,7 +3755,7 @@ void fvWrite26AlTimescale(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlMassMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d26AlNumMan * MASS26AL; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3780,7 +3780,7 @@ void fvWrite26AlMassMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD26AlPowerDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -3798,7 +3798,7 @@ void fvWriteD26AlPowerDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlNumMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d26AlNumMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3823,7 +3823,7 @@ void fvWrite26AlNumMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlPowerCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 26Al */ *dTmp = fd26AlPowerCore(update, iBody); if (output->bDoNeg[iBody]) { @@ -3849,7 +3849,7 @@ void fvWrite26AlPowerCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlMassCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d26AlNumCore * MASS26AL; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3874,7 +3874,7 @@ void fvWrite26AlMassCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlNumCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d26AlNumCore; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3898,7 +3898,7 @@ void fvWrite26AlNumCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite26AlPowerTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fd26AlPower(update, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3926,7 +3926,7 @@ void fvWrite26AlPowerTot(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KPowerMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get total power from 40K *dTmp = -(*(update[iBody].pdD40KNumManDt))*ENERGY40K; */ *dTmp = fd40KPowerMan(update, iBody); @@ -3953,7 +3953,7 @@ void fvWrite40KPowerMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KEnFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get surface heat flux from 40K */ *dTmp = fd40KEnFlux(body, update, iBody); if (output->bDoNeg[iBody]) { @@ -3979,7 +3979,7 @@ void fvWrite40KEnFlux(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD40KNumDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = *(update[iBody].pdD40KNumManDt); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4004,7 +4004,7 @@ void fvWriteD40KNumDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KTimescale(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -4022,7 +4022,7 @@ void fvWrite40KTimescale(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KMassMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d40KNumMan * MASS40K; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4048,7 +4048,7 @@ void fvWrite40KMassMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD40KPowerDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -4066,7 +4066,7 @@ void fvWriteD40KPowerDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KNumMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d40KNumMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4091,7 +4091,7 @@ void fvWrite40KNumMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KPowerCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 40K */ *dTmp = fd40KPowerCore(update, iBody); if (output->bDoNeg[iBody]) { @@ -4117,7 +4117,7 @@ void fvWrite40KPowerCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KMassCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d40KNumCore * MASS40K; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4142,7 +4142,7 @@ void fvWrite40KMassCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KNumCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d40KNumCore; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4167,7 +4167,7 @@ void fvWrite40KNumCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 40K */ *dTmp = fd40KPowerCrust(update, iBody); if (output->bDoNeg[iBody]) { @@ -4193,7 +4193,7 @@ void fvWrite40KPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KMassCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d40KNumCrust * MASS40K; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4218,7 +4218,7 @@ void fvWrite40KMassCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KNumCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d40KNumCrust; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4242,7 +4242,7 @@ void fvWrite40KNumCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite40KPowerTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = fd40KPower(update, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4269,7 +4269,7 @@ void fvWrite40KPowerTot(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThEnFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get surface heat flux from 232Th */ *dTmp = fd232ThEnFlux(body, update, iBody); @@ -4296,7 +4296,7 @@ void fvWrite232ThEnFlux(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD232ThNumDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = *(update[iBody].pdD232ThNumManDt); if (output->bDoNeg[iBody]) { @@ -4322,7 +4322,7 @@ void fvWriteD232ThNumDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWritedD232ThPowerDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -4340,7 +4340,7 @@ void fvWritedD232ThPowerDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThTimescale(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -4358,7 +4358,7 @@ void fvWrite232ThTimescale(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThPowerMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total heat from 232Th */ *dTmp = fd232ThPowerMan(update, iBody); if (output->bDoNeg[iBody]) { @@ -4384,7 +4384,7 @@ void fvWrite232ThPowerMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThMassMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d232ThNumMan * MASS232TH; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4409,7 +4409,7 @@ void fvWrite232ThMassMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThNumMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d232ThNumMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4434,7 +4434,7 @@ void fvWrite232ThNumMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThPowerCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total heat from 232Th */ *dTmp = fd232ThPowerCore(update, iBody); if (output->bDoNeg[iBody]) { @@ -4460,7 +4460,7 @@ void fvWrite232ThPowerCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThMassCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d232ThNumCore * MASS232TH; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4485,7 +4485,7 @@ void fvWrite232ThMassCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThNumCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d232ThNumCore; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4510,7 +4510,7 @@ void fvWrite232ThNumCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total heat from 232Th */ *dTmp = fd232ThPowerCrust(update, iBody); if (output->bDoNeg[iBody]) { @@ -4536,7 +4536,7 @@ void fvWrite232ThPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThMassCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d232ThNumCrust * MASS232TH; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4561,7 +4561,7 @@ void fvWrite232ThMassCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThNumCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d232ThNumCrust; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4585,7 +4585,7 @@ void fvWrite232ThNumCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite232ThPowerTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fd232ThPower(update, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4612,7 +4612,7 @@ void fvWrite232ThPowerTot(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UEnFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get surface heat flux from 238U */ *dTmp = fd238UEnFlux(body, update, iBody); if (output->bDoNeg[iBody]) { @@ -4638,7 +4638,7 @@ void fvWrite238UEnFlux(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD238UNumDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = *(update[iBody].pdD238UNumManDt); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4663,7 +4663,7 @@ void fvWriteD238UNumDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWritedD238UPowerDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -4681,7 +4681,7 @@ void fvWritedD238UPowerDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UTimescale(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } @@ -4701,7 +4701,7 @@ void fvWrite238UTimescale(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UPowerMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 238U */ *dTmp = fd238UPowerMan(update, iBody); if (output->bDoNeg[iBody]) { @@ -4727,7 +4727,7 @@ void fvWrite238UPowerMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UMassMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d238UNumMan * MASS238U; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4752,7 +4752,7 @@ void fvWrite238UMassMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UNumMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d238UNumMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4777,7 +4777,7 @@ void fvWrite238UNumMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UPowerCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 238U */ *dTmp = fd238UPowerCore(update, iBody); if (output->bDoNeg[iBody]) { @@ -4803,7 +4803,7 @@ void fvWrite238UPowerCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UMassCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d238UNumCore * MASS238U; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4828,7 +4828,7 @@ void fvWrite238UMassCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UNumCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d238UNumCore; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4853,7 +4853,7 @@ void fvWrite238UNumCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 238U */ *dTmp = fd238UPowerCrust(update, iBody); if (output->bDoNeg[iBody]) { @@ -4879,7 +4879,7 @@ void fvWrite238UPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UMassCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d238UNumCrust * MASS238U; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4904,7 +4904,7 @@ void fvWrite238UMassCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UNumCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d238UNumCrust; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4928,7 +4928,7 @@ void fvWrite238UNumCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite238UPowerTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fd238UPower(update, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -4956,7 +4956,7 @@ void fvWrite238UPowerTot(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UEnFlux(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get surface heat flux from 235U */ *dTmp = fd235UEnFlux(body, update, iBody); @@ -4983,7 +4983,7 @@ void fvWrite235UEnFlux(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteD235UNumDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = *(update[iBody].pdD235UNumManDt); if (output->bDoNeg[iBody]) { @@ -5009,7 +5009,7 @@ void fvWriteD235UNumDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWritedD235UPowerDt(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } /** @@ -5027,7 +5027,7 @@ void fvWritedD235UPowerDt(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UTimescale(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = -1; } @@ -5047,7 +5047,7 @@ void fvWrite235UTimescale(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UPowerMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 235U */ *dTmp = -(*(update[iBody].pdD235UNumManDt)) * ENERGY235U; if (output->bDoNeg[iBody]) { @@ -5073,7 +5073,7 @@ void fvWrite235UPowerMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UMassMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d235UNumMan * MASS235U; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5098,7 +5098,7 @@ void fvWrite235UMassMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UNumMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d235UNumMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5123,7 +5123,7 @@ void fvWrite235UNumMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UPowerCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 235U */ *dTmp = fd235UPowerCore(update, iBody); if (output->bDoNeg[iBody]) { @@ -5149,7 +5149,7 @@ void fvWrite235UPowerCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UMassCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d235UNumCore * MASS235U; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5174,7 +5174,7 @@ void fvWrite235UMassCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UNumCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].d235UNumCore; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5199,7 +5199,7 @@ void fvWrite235UNumCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get total power from 235U */ *dTmp = fd235UPowerCrust(update, iBody); if (output->bDoNeg[iBody]) { @@ -5225,7 +5225,7 @@ void fvWrite235UPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UMassCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d235UNumCrust * MASS235U; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5250,7 +5250,7 @@ void fvWrite235UMassCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UNumCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].d235UNumCrust; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5274,7 +5274,7 @@ void fvWrite235UNumCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWrite235UPowerTot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fd235UPower(update, iBody); if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -5302,7 +5302,7 @@ void fvWrite235UPowerTot(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteRadPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Radiogenic Power Production in crust*/ *dTmp = fdRadPowerCrust(update, iBody); if (output->bDoNeg[iBody]) { @@ -5328,7 +5328,7 @@ void fvWriteRadPowerCrust(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteRadPowerMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Radiogenic Power Production in mantle*/ *dTmp = fdRadPowerMan(update, iBody); if (output->bDoNeg[iBody]) { @@ -5354,7 +5354,7 @@ void fvWriteRadPowerMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteRadPowerCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Total Radiogenic Power Production in core*/ *dTmp = fdRadPowerCore(update, iBody); if (output->bDoNeg[iBody]) { @@ -5380,7 +5380,7 @@ void fvWriteRadPowerCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteRadPowerTotal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Total Radiogenic Power Production */ *dTmp = body[iBody].dRadPowerTotal; if (output->bDoNeg[iBody]) { @@ -5406,7 +5406,7 @@ void fvWriteRadPowerTotal(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteSurfEnFluxRadTotal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Radiogenic Surface Energy Flux */ *dTmp = fdSurfEnFluxRadTotal(body, system, update, iBody, iBody); if (output->bDoNeg[iBody]) { diff --git a/src/radheat.h b/src/radheat.h index f81e11b1d..27cda729d 100644 --- a/src/radheat.h +++ b/src/radheat.h @@ -441,134 +441,134 @@ void fvVerifyHaltRadheat(BODY *, CONTROL *, OPTIONS *, int, int *); #define OUT_SURFENFLUXRADTOTAL 1195 void fvWrite26AlPowerMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite26AlEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteD26AlPowerDt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite26AlTimescale(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite26AlMassMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite26AlNumMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWrite26AlPowerCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite26AlMassCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite26AlNumCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KPowerMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteD40KPowerDt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KTimescale(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KMassMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWrite40KNumMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWrite40KPowerCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KMassCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KNumCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWrite40KPowerCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KMassCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite40KNumCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThPowerMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteD232ThPowerDt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThTimescale(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThMassMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThNumMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThPowerCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThMassCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThNumCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThPowerCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThMassCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite232ThNumCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UPowerMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteD238UPowerDt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UTimescale(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UMassMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UNumMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWrite238UPowerCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UMassCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UNumCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UPowerCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UMassCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite238UNumCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UPowerMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteD235UPowerDt(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UTimescale(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UMassMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UNumMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWrite235UPowerCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UMassCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UNumCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UPowerCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UMassCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWrite235UNumCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRadPowerMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRadPowerCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRadPowerCrust(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRadPowerTotal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRadEnFlux(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvHelpOutputRadheat(OUTPUT *); void fvInitializeOutputRadheat(OUTPUT *, fnWriteOutput[]); diff --git a/src/spinbody.c b/src/spinbody.c index 05cadee53..35a9dec46 100644 --- a/src/spinbody.c +++ b/src/spinbody.c @@ -891,49 +891,49 @@ void VerifyHaltSpiNBody(BODY *body, CONTROL *control, OPTIONS *options, void WritePositionX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPositionX; strcpy(cUnit, ""); } void WritePositionY(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPositionY; strcpy(cUnit, ""); } void WritePositionZ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPositionZ; strcpy(cUnit, ""); } void WriteVelX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dVelX; strcpy(cUnit, ""); } void WriteVelY(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dVelY; strcpy(cUnit, ""); } void WriteVelZ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dVelZ; strcpy(cUnit, ""); } void WriteInclinationSpinBody(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dInc; if (output->bDoNeg[iBody]) { @@ -947,7 +947,7 @@ void WriteInclinationSpinBody(BODY *body, CONTROL *control, OUTPUT *output, void WriteLongASpinBody(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dLongA; if (output->bDoNeg[iBody]) { diff --git a/src/spinbody.h b/src/spinbody.h index 7999aa32e..8a4ba0dbc 100644 --- a/src/spinbody.h +++ b/src/spinbody.h @@ -106,28 +106,28 @@ void FinalizeUpdatePositionZSpiNBody(BODY *body, UPDATE *update, int *iEqn, void WritePositionX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]); + double *dTmp, char **cUnit); void WritePositionY(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]); + double *dTmp, char **cUnit); void WritePositionZ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]); + double *dTmp, char **cUnit); void WriteVelX(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]); + char **cUnit); void WriteVelY(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]); + char **cUnit); void WriteVelZ(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]); + char **cUnit); void WriteInclinationSpinBody(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]); + int iBody, double *dTmp, char **cUnit); void WriteLongASpinBody(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]); + double *dTmp, char **cUnit); void InitializeOutputSpiNBody(OUTPUT *output, fnWriteOutput fnWrite[]); int fbHaltMaxMutualIncSpiNBody(BODY *, EVOLVE *, HALT *, IO *, UPDATE *, diff --git a/src/stellar.c b/src/stellar.c index 3bbae058b..56fa80834 100644 --- a/src/stellar.c +++ b/src/stellar.c @@ -1259,7 +1259,7 @@ void VerifyHaltStellar(BODY *body, CONTROL *control, OPTIONS *options, void WriteLuminosity(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dLuminosity; if (output->bDoNeg[iBody]) { @@ -1273,7 +1273,7 @@ void WriteLuminosity(BODY *body, CONTROL *control, OUTPUT *output, void WriteTemperature(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dTemperature; // Kelvin only fsUnitsTemp(0, cUnit); @@ -1281,7 +1281,7 @@ void WriteTemperature(BODY *body, CONTROL *control, OUTPUT *output, void WriteLXUV(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dLXUV; if (output->bDoNeg[iBody]) { @@ -1295,14 +1295,14 @@ void WriteLXUV(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, void WriteLXUVFrac(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dLXUV / body[iBody].dLuminosity; strcpy(cUnit, ""); } void WriteRossbyNumber(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dRotPer / fdCranmerSaar2011TauCZ(body[iBody].dTemperature); strcpy(cUnit, ""); @@ -1310,7 +1310,7 @@ void WriteRossbyNumber(BODY *body, CONTROL *control, OUTPUT *output, void WriteDRotPerDtStellar(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { double dDeriv; int iPert; diff --git a/src/stellar.h b/src/stellar.h index 8d0aeb19e..c00718755 100644 --- a/src/stellar.h +++ b/src/stellar.h @@ -129,17 +129,17 @@ void InitializeOutputFunctionStellar(OUTPUT *, int, int); void FinalizeOutputFunctionStellar(OUTPUT *, int, int); void WriteLuminosity(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteTemperature(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteLXUV(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void WriteLXUVFrac(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteRossbyNumber(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void WriteDRotPerDtStellar(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); /* Logging Functions */ void LogOptionsStellar(CONTROL *, FILE *); diff --git a/src/thermint.c b/src/thermint.c index 2762c068b..d279d8e9c 100644 --- a/src/thermint.c +++ b/src/thermint.c @@ -2118,7 +2118,7 @@ void fvVerifyHaltThermint(BODY *body, CONTROL *control, OPTIONS *options, */ void fvWriteTMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TMan */ *dTmp = body[iBody].dTMan; if (output->bDoNeg[iBody]) { @@ -2146,7 +2146,7 @@ void fvWriteTMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteTUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TUMan */ *dTmp = body[iBody].dTUMan; if (output->bDoNeg[iBody]) { @@ -2170,7 +2170,7 @@ void fvWriteTUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteTsolUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TsolUMan */ *dTmp = body[iBody].dTsolUMan; if (output->bDoNeg[iBody]) { @@ -2194,7 +2194,7 @@ void fvWriteTsolUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *syste */ void fvWriteTLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TLMan */ *dTmp = body[iBody].dTLMan; if (output->bDoNeg[iBody]) { @@ -2218,7 +2218,7 @@ void fvWriteTLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteTJumpUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get TLMan */ *dTmp = body[iBody].dTJumpUMan; if (output->bDoNeg[iBody]) { @@ -2242,7 +2242,7 @@ void fvWriteTJumpUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTJumpLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get TLMan */ *dTmp = body[iBody].dTJumpLMan; if (output->bDoNeg[iBody]) { @@ -2266,7 +2266,7 @@ void fvWriteTJumpLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteSignTJumpUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get TLMan */ *dTmp = body[iBody].dSignTJumpUMan; if (output->bDoNeg[iBody]) { @@ -2290,7 +2290,7 @@ void fvWriteSignTJumpUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteSignTJumpLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { /* Get TLMan */ *dTmp = body[iBody].dSignTJumpLMan; if (output->bDoNeg[iBody]) { @@ -2314,7 +2314,7 @@ void fvWriteSignTJumpLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTCMB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TCore */ *dTmp = body[iBody].dTCMB; if (output->bDoNeg[iBody]) { @@ -2338,7 +2338,7 @@ void fvWriteTCMB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteTCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { /* Get TCore */ *dTmp = body[iBody].dTCore; if (output->bDoNeg[iBody]) { @@ -2362,7 +2362,7 @@ void fvWriteTCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteViscUManArr(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get ViscUManArr */ *dTmp = body[iBody].dViscUManArr; if (output->bDoNeg[iBody]) { @@ -2389,7 +2389,7 @@ void fvWriteViscUManArr(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteViscUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dViscUMan; if (output->bDoNeg[iBody]) { @@ -2416,7 +2416,7 @@ void fvWriteViscUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteDynamicViscosity(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = fdDynamicViscosity(body, iBody); if (output->bDoNeg[iBody]) { @@ -2442,7 +2442,7 @@ void fvWriteDynamicViscosity(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteViscLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dViscLMan; if (output->bDoNeg[iBody]) { @@ -2469,7 +2469,7 @@ void fvWriteViscLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteViscMMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dViscMMan; if (output->bDoNeg[iBody]) { @@ -2496,7 +2496,7 @@ void fvWriteViscMMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteViscJumpMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get TLMan */ *dTmp = body[iBody].dViscJumpMan; if (output->bDoNeg[iBody]) { @@ -2520,7 +2520,7 @@ void fvWriteViscJumpMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteBLUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dBLUMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2543,7 +2543,7 @@ void fvWriteBLUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteBLLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dBLLMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2566,7 +2566,7 @@ void fvWriteBLLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteShmodUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dShmodUMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2589,7 +2589,7 @@ void fvWriteShmodUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteFMeltUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dFMeltUMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2612,7 +2612,7 @@ void fvWriteFMeltUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteFMeltLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dFMeltLMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2635,7 +2635,7 @@ void fvWriteFMeltLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteMeltfactorUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dMeltfactorUMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2658,7 +2658,7 @@ void fvWriteMeltfactorUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteMeltfactorLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dMeltfactorLMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2681,7 +2681,7 @@ void fvWriteMeltfactorLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteDepthMeltMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dDepthMeltMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2704,7 +2704,7 @@ void fvWriteDepthMeltMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTDepthMeltMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dTDepthMeltMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2727,7 +2727,7 @@ void fvWriteTDepthMeltMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTJumpMeltMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dTJumpMeltMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2750,7 +2750,7 @@ void fvWriteTJumpMeltMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteMeltMassFluxMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dMeltMassFluxMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2773,7 +2773,7 @@ void fvWriteMeltMassFluxMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteRayleighMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dRayleighMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2796,7 +2796,7 @@ void fvWriteRayleighMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteEruptEff(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dEruptEff; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2820,7 +2820,7 @@ void fvWriteEruptEff(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteRIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dRIC; if (output->bDoNeg[iBody]) { @@ -2844,7 +2844,7 @@ void fvWriteRIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteDRICDTCMB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dDRICDTCMB; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2867,7 +2867,7 @@ void fvWriteDRICDTCMB(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteChiOC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dChiOC; // *dTmp = body[iBody].dRIC; if (output->bDoNeg[iBody]) { @@ -2891,7 +2891,7 @@ void fvWriteChiOC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteChiIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dChiIC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2914,7 +2914,7 @@ void fvWriteChiIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteMassOC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dMassOC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2937,7 +2937,7 @@ void fvWriteMassOC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteMassIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dMassIC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2960,7 +2960,7 @@ void fvWriteMassIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteMassChiOC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dMassChiOC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -2983,7 +2983,7 @@ void fvWriteMassChiOC(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteMassChiIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dMassChiIC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3006,7 +3006,7 @@ void fvWriteMassChiIC(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteDTChi(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dDTChi; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3029,7 +3029,7 @@ void fvWriteDTChi(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteThermConductOC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dThermConductOC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3052,7 +3052,7 @@ void fvWriteThermConductOC(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteCoreBuoyTherm(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dCoreBuoyTherm; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3075,7 +3075,7 @@ void fvWriteCoreBuoyTherm(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteCoreBuoyCompo(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dCoreBuoyCompo; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3098,7 +3098,7 @@ void fvWriteCoreBuoyCompo(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteCoreBuoyTotal(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dCoreBuoyTotal; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3121,7 +3121,7 @@ void fvWriteCoreBuoyTotal(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteGravICB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dGravICB; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3144,7 +3144,7 @@ void fvWriteGravICB(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteMagMom(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dMagMom; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3167,7 +3167,7 @@ void fvWriteMagMom(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWriteRICDot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, - char cUnit[]) { + char **cUnit) { *dTmp = body[iBody].dRICDot; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3190,7 +3190,7 @@ void fvWriteRICDot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, */ void fvWritePresSWind(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPresSWind; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3213,7 +3213,7 @@ void fvWritePresSWind(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteMagPauseRad(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dMagPauseRad; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3238,7 +3238,7 @@ void fvWriteMagPauseRad(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHfluxUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHfluxUMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3261,7 +3261,7 @@ void fvWriteHfluxUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHfluxLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHfluxLMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3284,7 +3284,7 @@ void fvWriteHfluxLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHfluxCMB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHfluxCMB; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3307,7 +3307,7 @@ void fvWriteHfluxCMB(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHfluxCMBAd(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHfluxCMBAd; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3330,7 +3330,7 @@ void fvWriteHfluxCMBAd(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHfluxCMBConv(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dHfluxCMBConv; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3353,7 +3353,7 @@ void fvWriteHfluxCMBConv(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowUMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3376,7 +3376,7 @@ void fvWriteHflowUMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowSurf(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowSurf; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3399,7 +3399,7 @@ void fvWriteHflowSurf(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowLMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowLMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3422,7 +3422,7 @@ void fvWriteHflowLMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowCMB(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowCMB; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3445,7 +3445,7 @@ void fvWriteHflowCMB(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowLatentMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowLatentMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3468,7 +3468,7 @@ void fvWriteHflowLatentMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowMeltMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowMeltMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3491,7 +3491,7 @@ void fvWriteHflowMeltMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowSecMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowSecMan; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3515,7 +3515,7 @@ void fvWriteHflowSecMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteHflowLatentIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, - int iBody, double *dTmp, char cUnit[]) { + int iBody, double *dTmp, char **cUnit) { *dTmp = body[iBody].dHflowLatentIC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3538,7 +3538,7 @@ void fvWriteHflowLatentIC(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWritePowerGravIC(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dPowerGravIC; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; @@ -3561,7 +3561,7 @@ void fvWritePowerGravIC(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTDotMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get TDotMan */ *dTmp = (*(update[iBody].pdTDotMan)); if (output->bDoNeg[iBody]) { @@ -3591,7 +3591,7 @@ void fvWriteTDotMan(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTDotCore(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { /* Get TDotCore */ *dTmp = (*(update[iBody].pdTDotCore)); if (output->bDoNeg[iBody]) { @@ -3622,7 +3622,7 @@ void fvWriteTDotCore(BODY *body, CONTROL *control, OUTPUT *output, */ void fvWriteTrefLind(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, - double *dTmp, char cUnit[]) { + double *dTmp, char **cUnit) { *dTmp = body[iBody].dTrefLind; if (output->bDoNeg[iBody]) { *dTmp *= output->dNeg; diff --git a/src/thermint.h b/src/thermint.h index 23838a68f..4e17a884f 100644 --- a/src/thermint.h +++ b/src/thermint.h @@ -592,133 +592,133 @@ void fvInitializeOutputFunctionThermint(OUTPUT *, int, int); void fvFinalizeOutputFunctionThermint(OUTPUT *, int, int); void fvWriteTMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteTUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteTsolUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteTLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteTJumpUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteTJumpLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteSignTJumpUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteSignTJumpLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteTCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteTCMB(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteTICB(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteBLUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteBLLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteViscUManArr(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteViscUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteViscLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteViscMMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteShmodUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteShmodLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteFMeltUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteFMeltLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteMeltfactorUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteMeltfactorLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteDepthMeltMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteTDepthMeltMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteTJumpMeltMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteMeltMassFluxMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRayleighMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteTDotMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteTDotCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHfluxUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHflowUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHflowSecMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHfluxLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHflowLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHflowTidalMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHflowTidalCore(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHflowLatentMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHflowMeltMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHflowLatentIC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWritePowerGravIC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHflowICB(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHflowSurf(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteTidalPowMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteRIC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteDRICDTCMB(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteChiOC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteChiIC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteMassOC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteMassIC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteMassChiOC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteMassChiIC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteDTChi(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int, - double *, char[]); + double *, char**); void fvWriteThermConductOC(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteHfluxCMBAd(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteHfluxCMBConv(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteCoreBuoyTherm(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteCoreBuoyCompo(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteCoreBuoyTotal(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); void fvWriteGravICB(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteRICDot(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteMagMom(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWritePresSWind(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, - int, double *, char[]); + int, double *, char**); void fvWriteMagPauseRad(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); /* Logging Functions */ void fvLogOptionsThermint(CONTROL *, FILE *); void fvLogThermint(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UPDATE *, diff --git a/src/vplanet.h b/src/vplanet.h index 6e0c527cb..31c74509a 100644 --- a/src/vplanet.h +++ b/src/vplanet.h @@ -1992,7 +1992,7 @@ struct OUTPUT { typedef void (*fnReadOption)(BODY *, CONTROL *, FILES *, OPTIONS *, SYSTEM *, int); typedef void (*fnWriteOutput)(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, - UPDATE *, int, double *, char[]); + UPDATE *, int, double *, char**); /*