Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit f6b8726

Browse files
Merge pull request #35 from openclimatefix/issue/cartopy
Issue/cartopy
2 parents 6d9b9bf + da45c28 commit f6b8726

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/workflows.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ jobs:
1212
pytest_numcpus: "4"
1313
# pytest-cov looks at this folder
1414
pytest_cov_dir: "ocf_datapipes"
15+
# extra things to install
16+
sudo_apt_install: 'libgeos-dev libproj-dev'

ocf_datapipes/transform/xarray/reproject_topographic_data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
from pathlib import Path
22
from typing import Union
33

4-
import cartopy.crs as ccrs
54
import numpy as np
65
import pyproj
76
import pyresample
87
import xarray as xr
98
from torchdata.datapipes import functional_datapipe
109
from torchdata.datapipes.iter import IterDataPipe
1110

11+
try:
12+
import cartopy.crs as ccrs
13+
except:
14+
pass
15+
1216

1317
@functional_datapipe("reproject_topography")
1418
class ReprojectTopographyIterDataPipe(IterDataPipe):

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ jpeg_xl_float_with_nans
1818
h5netcdf
1919
tqdm
2020
bottleneck
21-
cartopy
2221
pyproj
2322
pyresample

0 commit comments

Comments
 (0)