"""Scientific map contracts for ExoPlaSim surface inputs.""" FIELDS = { "height": {"label": "Surface height", "unit": "m", "native_unit": "m2 s-2", "native_parameter": "topomap", "native_code": 129, "min": -12000.0, "max": 12000.0, "default": 0.0, "brush_step": 100.0, "categorical": False}, "landmask": {"label": "Land-sea mask", "unit": "1", "native_parameter": "landmap", "native_code": 172, "min": 0.0, "max": 1.0, "default": 0.0, "brush_step": 1.0, "categorical": True}, "roughness": {"label": "Land surface roughness", "unit": "m", "native_unit": "m", "native_parameter": "resources", "native_code": 173, "min": 0.0, "max": 100.0, "default": 2.0, "brush_step": 0.1, "categorical": False}, "albedo": {"label": "Broadband land albedo", "unit": "1", "native_unit": "1", "native_parameter": "resources", "native_code": 174, "min": 0.0, "max": 1.0, "default": 0.22, "brush_step": 0.01, "categorical": False, "months": 14}, } def map_schema(): try: from .terrain import _gaussian_grid except ImportError: from terrain import _gaussian_grid try: from .terrain import _RESOLUTIONS except ImportError: from terrain import _RESOLUTIONS grids = {} for key, nlat in _RESOLUTIONS.items(): lat, lon, _ = _gaussian_grid(key) grids[key] = {"lat": lat.tolist(), "lon": lon.tolist(), "nlat": nlat, "nlon": nlat * 2} return {"grids": grids, "fields": FIELDS}