Files

8.6 KiB

ExoPlaSim web UI

The workbench is single-user. It opens at the project root without a sign-in page. All requests use the workspace name from config/web.json. The application does not use sessions, CSRF checks, or network-access gates.

Network access

This is a private development toy. It has no accounts or access-control flow.

The application uses the existing PHP hosting setup. It needs no application-specific nginx configuration, locations, aliases, rewrites, or protocol redirects. HTTP works directly. Use HTTP on this host. Its shared HTTPS server currently serves PHP as text and does not run the workbench. This host issue is separate from the application.

Keep the repository outside the webroot. The installer publishes only an ordinary PHP entry file and browser assets to public_root. Configuration, simulator sources, tests, Git history, and runtime data are not public files.

Install

  1. Place the checkout outside the host's webroot.
  2. Run scripts/install-web --dry-run to review the configured public and private paths.
  3. Run scripts/install-web to publish browser assets, generate the catalog, and install the PHP worker unit.
  4. Run systemctl status exoplasim-worker.service to check the worker.

The installer preserves job data. It does not create account storage. It copies the model package into the runtime tree, where only the worker account can write. It does not change ownership of the source tree. PHP is the queue worker. Python runs only science command-line tasks. The installed worker is active and enabled at boot. The configured memory and CPU limits protect the shared host. CPU quota follows limits.max_cpus; memory and process priority follow worker_memory_bytes and worker_nice. Large models can exceed these limits. A second installer run preserves the worker PID when the unit does not change.

API

GET and POST requests use ordinary query parameters. Saves and map uploads do not require cookies or special security headers.

JSON responses use { "ok": true, "data": ... } or { "ok": false, "error": ..., "errors": ... }. The frame route returns little-endian float32 bytes and an X-Frame-Shape header.

Route Response data
?api=schema Parameter catalog
?api=experiments Experiment list or saved experiment
?api=experiment_delete true after delete
?api=jobs Job list or queued job
?api=cancel, ?api=retry Updated job
?api=log&id=… {text, offset, next_offset}
?api=results&id=… {index, dataset, datasets, latest, downloads}
?api=series&id=… {time, time_unit, mean, min, max, unit} for the selected level
?api=frame&id=… One bounded spatial frame as binary data
?api=download&id=…&artifact=… An approved log, field, raw NPZ and metadata, dataset index, model config, restart, terrain recipe, or SRA file
?api=generate {job} for a planet-generation job
?api=maps&resolution=… Saved map versions and grid; POST saves an immutable float32 map
?api=map&id=… Saved map bytes with shape and metadata headers

The parameter catalog is the only validation rules source. The installer generates the catalog with scripts/web/parameters.py. PHP rejects saves when the catalog is missing or invalid. PHP starts science command-line tasks only through the queue worker.

Input maps

The editor supports height in metres, a binary land-sea mask, land roughness in metres, and broadband land albedo from 0 to 1. Their native contracts are defined in scripts/web/mapcatalog.py. Temperature and rainfall results are not editable inputs. Broadband albedo does not replace the separate two-band albedo inputs.

Saved versions and queued job captures are immutable. Retry uses the original captures, not the current experiment. The worker converts height to land-masked geopotential with the selected gravity. Other maps retain their native units. Roughness and albedo files are placed after model configuration, because that wrapper deletes SRA files when height or land inputs change. The original and converted inputs remain available as downloads.

A blank step count runs a full model year. Custom step counts retain native output samples instead of annual twelve-bin averaging. Snapshot cadence is capped at the run length, so a short run can finish with readable snapshots.

Output views

Select Temperature / rainfall / elevation in the results View menu to show an RGB composite. Red shows surface temperature in kelvin. Green shows total water-equivalent precipitation in mm/day, including snow. Blue shows elevation in metres, calculated from surface geopotential with the saved job's gravity. The legend names this green channel Precipitation, not rain alone.

Each channel uses its own dataset-wide minimum and maximum. The scales stay fixed during playback. The inspector shows all three physical values. The global-mean chart shows temperature. The composite is available only when all three compatible native fields are present. Both the flat map and globe use the same RGB values without globe lighting altering the composite colors.

Checks

Run these checks after a source change:

php tests/web-http.php
php tests/web-api.php
php -d zend.assertions=1 -d assert.exception=1 tests/web-backend.php
php tests/web-worker.php
php web/tests/exoplasim-workbench-smoke.php
php web/tests/filebase-path-guard.php
php web/tests/smoke.php
.venv/bin/python -m unittest discover -s tests -p 'test_web_*.py'
php tests/web-public.php
node tests/web-map-brush.js
node tests/web-composite.js
python3 tests/web-installer.py

Evaluate tests/web-gui-editor.js, tests/web-gui-composite.js, and tests/web-gui-workbench.js in the workbench browser tab, one at a time. Wait for each returned report. Use a dev tab without unsaved work. The scripts restore their temporary fetch overrides and remove their preset fixtures. Their queue-response test is mocked, not a native simulation.

For real keyboard validation, select a clean saved preset and run python3 tests/web-gui-numbers.py --helper <browser-helper-path> --target <tab-id>. The test enters incomplete numbers in gravity and run steps. It blocks persistence requests and restores the selected preset.

Direct HTTP checks return 200 for the workbench, schema, and browser assets without a protocol redirect. Private configuration and server-schema URLs return 404 because those files are outside the webroot. VM 101 opens the HTTP workbench with 93 parameters, existing jobs, and the completed edited planet. No application-specific nginx configuration remains.

Current limits

VM 101 displays completed T21 climate runs. Earlier 1440-step runs have 85 spatial fields and 12 postprocessed time samples. The completed four-map, 240-step run has one native output time sample with finite temperature. Its native land mask matches the generated surface. The browser fetched the raw model NPZ and downloaded the complete terrain recipe. Seeded previews retain the generator version, sampled mass, resolved parameters, and relative surface file names. Bathymetry is the nonpositive part of elevation, in metres. Earlier generator previews have incorrect bathymetry units and must not be used for bathymetry analysis.

Browser checks cover save, clone, export, import, delete, cancellation of a real simulator, retry after the source preset changes and is deleted, and worker restart recovery. Edits made while a save is pending remain unsaved and are not replaced by the response. The software globe works when WebGL is unavailable. Installation holds a runtime lock while it copies files. The worker cannot claim a new job during this period. Installation refuses queued or running jobs, even when the service is stopped, and restarts the worker to load PHP changes.

Terrain and planet-parameter generation are repeatable from the saved seed. Native climate runs retain the upstream initial-noise behavior, which seeds its generator from the clock by default. Identical parameter sets do not therefore guarantee byte-identical weather output. Native diagnostics and restart files remain in the job directory.

Whole-model scientific acceptance remains serial T21 with ten layers. Other resolutions, MPI, long climate statistics, and GPU acceleration are not accepted. Browser checks also cover playback stopping on dataset changes, touch-value inspection, map undo returning to a clean state, recovery from a map-load failure, and software fallback after context-loss events. Physical GPU context recovery remains untested. Final desktop, mobile, source, failure, repository delivery, and clean-checkout checks passed. Evidence and retained screenshots are in docs/work/2026-10-11/final-ui.md.