Chap with climate data from OCS
chap-core with an Open Climate Service beside it, so Chap has climate data to fetch from inside the same deployment.
chap-devops init mychap --models chapkit_simple_multistep_model --with ocs,s3
cd mychap
chap-devops up
chap-devops status # chap-core, ocs and s3 lines, then the models
The first chap-devops up pulls the images that are not on the machine yet: the
chap-core images, the model image and the OCS image. The OCS image alone is
about 3 GB on disk. With the chap-core and model images already present, the
first chap-devops up took about a minute in one test run. It ends with one line:
started chap, chapkit-simple-multistep-model, ocs, postgres, redis, s3, worker
chap-devops status then shows this:
chap-core up http://localhost:8700 2.4.0 auth: off
ocs up http://localhost:8790 0 datasets 32.0 KB data
s3 up internal
MODEL STATE REACH LAST PING
chapkit-simple-multistep-model registered, not configured via chap-core 1s ago
1 model registered
chapkit-simple-multistep-model: chap-core has no configured model for it, so nothing can run it; run `chap-devops models configs sync`
registered, not configured is the normal state after a plain chap-devops up.
A backtest and the Modeling App need a configured model. Make them:
chap-devops models configs sync
chapkit_simple_multistep_model: created configured model monthly_climate
chapkit_simple_multistep_model: created configured model monthly_selfhistory
chap-devops up --wait does the same step for you. See
Configured models. Now chap-devops status shows
the model as registered:
MODEL STATE REACH LAST PING
chapkit-simple-multistep-model registered via chap-core 2s ago
1 model registered
chap-core reaches OCS at http://ocs:9000 on the compose network, and you
reach it at http://localhost:8790. chap-devops does not configure chap-core to
fetch from OCS. chap-core has no setting for it: the two run side by side, and
you connect them. See OCS.
init writes ocs/climate-service.yaml, which is yours to edit. chap-devops changes
only its read_only and plugins_dir keys. It also puts the data source credentials into .env, commented
out. ERA5-Land needs one or both of a Copernicus Climate Data Store account
and an Earth Data Hub account. WorldPop and CHIRPS3 need no account.
It worked when chap-devops status shows chap-core, ocs and s3 as up and each
model as registered.
Climate data in and out
To put climate data in and get it out, see Ingesting a first dataset and the sections after it. The same commands work here. Three days of CHIRPS3 took between 10 and 40 seconds, and one year of monthly CHIRPS3 between 30 seconds and one minute.
The per-district CSV in Getting it out reads the districts from a DHIS2 on port 8780. This deployment has no DHIS2. Do one of these:
- Give
geometriesa GeoJSONFeatureCollectionof your own districts. The feature ids become thelocationcolumn. - Add the demo DHIS2 with
chap-devops components enable dhis2, thenchap-devops up.chap-devops upreturns while DHIS2 still starts. Runchap-devops statusagain untildhis2showsup. See Growing a deployment.
The extent is Laos, like the demo DHIS2, until you change it.
chap-devops doctor warns about this on its components line, and tells you how
to change it. See
ocs/climate-service.yaml.
Next: OCS, and Data source credentials for which dataset needs which account.
All shapes: Use cases.