Skip to content

Commit

Permalink
ECMWF files
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Sep 5, 2023
1 parent 9526d9f commit e6dd7f7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dags_tests/compile_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

def test_compiles():
assert True
24 changes: 24 additions & 0 deletions nwp/assets/ecmwf/mars.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

from dagster import Output, asset
from ecmwfapi import ECMWFService

server = ECMWFService("mars")

@asset
def download_mars_file():
server.execute(
req={
"class": "od",
"date": "20230815/to/20230816",
"expver": "1",
"levtype": "sfc",
"param": "28.228/49.128/123.128/165.128/166.128/239.228/246.228/247.228",
"step": "0/t0/48/by/1",
"stream": "oper",
"time": "00:00:00,12:00:00",
"type": "fc",
},
target="20230815.grib"
)

return Output(None, metadata={"filepath": "20230815.grib"})

0 comments on commit e6dd7f7

Please sign in to comment.