warmstart module
warmstart module
This module performs a warm start simulation for the Energy Balance Model (EBM) project. It calculates two primary metrics for a range of instellation (scaleQ) values:
Mean surface temperature (Tg)
Mean ice line latitude
- The simulation uses the following process:
Initialization: - Normalizes the stellar parameter from the defaults. - Retrieves setup data (grid resolution, simulation time step, and weighting factors)
using get_setup_data from the seasonal_setup module.
Warm Start Simulation: - Runs an initial seasonal simulation using seasonal_run to obtain baseline outputs.
Parameter Sweep: - Iterates over a range of scaleQ values (decreasing from 1.35 in steps of 0.05). - For each value, updates the defaults and runs the seasonal simulation. - Computes a mean temperature metric using weighted contributions from land and water. - Determines the ice line latitude by interpolating water temperature data (for temperatures
around the threshold of -2.013°C) for the northern hemisphere.
Output: - Aggregates the scaleQ, mean ice line latitude, and mean temperature values. - Saves these values to a text file (G_dwarf_ws.txt) with tab delimiters. - Generates plots showing the relationship between scaleQ and the computed metrics.
- Requirements:
NumPy, Matplotlib, SciPy
Custom modules: defaults, seasonal_setup, and seasonal
- Usage:
Simply run the script to perform the simulation and save the results. The default is set to warmstart simulation. You can change coldstartdef=1 in defaults.py to get a outputs for coldstart case. Then, you can combine the runs from warmstart and coldstart to plot a climate hysteresis curve!