"""
Locations of the data files shipped next to the script, and planetary constants.

Paths are resolved relative to this file rather than to the working directory, so
the tool can be run from anywhere.
"""

import os

# .../display_netcdf/dispnc/paths.py -> .../display_netcdf
_PKG_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.dirname(_PKG_DIR)

# MOLA topography, 1 degree per pixel. Overridable for testing or for a
# different planet's topography.
TOPO_NPY = os.environ.get('DISPLAY_NETCDF_TOPO',
                          os.path.join(ROOT, 'MOLA_1px_per_deg.npy'))

# Sample files used by the README examples and the regression baseline
EXAMPLES_DIR = os.path.join(ROOT, 'sample_files')

# Planet average radius [m]
planet_radius = 3389500  # Mars radius [m]

# Surface gravity [m/s2]. Only a fallback: an LMDZ file carries its own value in
# `controle`, which is what vertical.py reads first, so a run of the generic
# model on another planet is still weighed with its own gravity.
planet_gravity = 3.72  # Mars [m/s2]

# The atmosphere's scale height [m], H = R*T/g, used only when the file gives no
# way to derive one: 191.8 J/kg/K over 3.72 m/s2 at 200 K is Mars' 10.3 km.
scale_height = 10300.0
