Schedule icon
If icon
Get icon
Parallel icon
Download icon
Queries icon
Fail icon
Set icon
Log icon

NASA POWER daily degree-day mart

Build heating, cooling, and growing degree days from NASA POWER daily weather for three sites, and fail when fill values remain.

Categories
Data

NASA POWER publishes daily temperature, rain, and solar data for any land point. No API key. This flow loads three sites, builds heating, cooling, and growing degree days in DuckDB, and fails when fill values remain.

How it works

  1. monthly_power_refresh (io.kestra.plugin.core.trigger.Schedule) runs at 07:20 UTC on the 8th. Missed runs are not replayed.
  2. inputs_ok (io.kestra.plugin.core.flow.If) checks three distinct slugs, coordinates, community AG, bases, and auto or YYYY-MM-DD dates.
  3. previous_window (io.kestra.plugin.core.kv.Get) reads the last good window.
  4. fetch_sites (io.kestra.plugin.core.flow.Parallel) downloads temperature, rain, and solar for each site. auto is 30 days ending 20 days ago.
  5. build_mart (io.kestra.plugin.jdbc.duckdb.Queries) nulls the header fill value and writes degree days to Parquet and CSV. Days are local solar time.
  6. coverage_ok (io.kestra.plugin.core.flow.If) fails when gaps exceed max_missing_days. Otherwise remember_window stores the window and log_pass prints the rollup.

What you get

  • Parquet days and a site CSV of means, degree-day sums, elevation, and the API version.
  • A failed run on a short or filled window, and a KV marker only after that gate passes.

Who it's for

  • Data engineers landing public weather for energy, agriculture, or climate models.

Why orchestrate this with Kestra

  • Parallel calls, retries, and DuckDB share one run, so a short archive does not move the marker.
  • Sites, dates, and bases are inputs. The schedule and Execute use the same flow.

Prerequisites

  • Kestra 2.0 or later, the DuckDB plugin, and HTTPS to power.larc.nasa.gov.

Secrets

  • None. The API is open. Do not paste a key into the flow.

Quick start

  1. Import the blueprint.
  2. Execute with Berlin, Madrid, Nairobi and auto dates.
  3. Read the log and open daily and site_summary. The schedule waits for the 8th.

How to extend

  • Retarget the sites and bases, then copy the Parquet file after log_pass.
  • Add a site by copying one download and one UNION ALL branch, or alert from fail_coverage.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.