intake / intake/intake-xarray

how to template path expansion for opendap sources

Open
#63 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
76
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Suppose I have a OpeNDAP url like this:

```yaml
urlpath: http://thredds..../MET/{{ variable }}/{{ variable }}_{{ '%04d' % year }}.nc
```

and I want to template the expansion of the `year` variable from 1979..2020 so that all years are concatenated into a single dataset. How would I do this?

For reference, here is a working intake datasource:

```yaml
gridmet_opendap:
description: 'GRIDMET data from OpeNDAP'
args:
urlpath: http://thredds.northwestknowledge.net:8080/thredds/dodsC/MET/{{ variable }}/{{ variable }}_{{ '%04d' % year }}.nc
auth: urs
chunks:
lat: 585
lon: 1386
driver: opendap
parameters:
variable:
description: climate variable
type: str
default: pr
allowed: ["pr", "tmmn", "tmmx"]
year:
description: year
type: int
default: 2000
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.