Skip to content

TerraNeo: Refactor temperature initialization methods and update parameters for improved flexibility

Parry Choi requested to merge parry/TempInit-cleanUp into master

Summary

This merge request includes updates and improvement to address issue #287 (closed) . The changes are aimed at enhancing functionality, fixing bugs, and improving code quality. It also ensures compatibility with older versions and includes a new test case for legacy parameter files.

Changes Made

  1. Temperature Initialization Parameter Refactoring:
    • Added new switch parameter initialTemperatureDeviatonMethod for different temperature deviation methods, including SINGLE_SPHRANDOM_SUPERPOSITION_SPH, and WHITE_NOISE.
    • Merged parameter noiseFactor to buoyancyFactor
    • Added superpositionSPHRandomSeed for controlling the coefficients generated in RANDOM_SUPERPOSITION_SPH
    • Parameters related are regroupped in .prm files
    • Remove unused parameters, e.g. temperatureSphericalHarmonic
    • Include version parameter is added in the file for version control (Update 2024.12.19 - 2)
    • shearHeatingScaling is renamed to lithosphereShearHeatingScaling (Update 2024.12.20)
  2. Temperature Initialization Code Cleanup:
  3. Bug Fixes:

Parameter File Version 0.2 Standard (Update 2024.12.19 - 2)

This merge request establishes version 0.2 as the new standard for parameter files. TerraNeo parameter files now require a version field, with version 0.2; indicating compliance with the updated structure and features. Files without a version field will default to version 0.1 to maintain backward compatibility. The introduction of versioning ensures clarity and enables seamless evolution of the parameter file format in future updates.

Additional Updates

2024.12.19 - 1

  • Backward Compatibility: Adjusted code to support old parameter file versions.
  • New Test Case: Added a dedicated test case to validate legacy parameter file functionality

2024.12.19 - 2

  • Add versioning support to parameter files and update test configurations
    • A new ParameterFileVersion struct is created for this specific purpose
    • All .prm file without version parameter will be seen as version 0.1 (previous version)

2024.12.20

  • shearHeatingScaling is renamed to lithosphereShearHeatingScaling as discussed in the meeting on 2024.12.20
Edited by Parry Choi

Merge request reports