Skip to content

Commit 258d1f2

Browse files
committed
add .yml for Travis CI
1 parent 7ee90af commit 258d1f2

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.DS_Store

-10 KB
Binary file not shown.

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
language: python
2+
script: true

tests/test_proj.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,24 @@
5050

5151
ax = axes[0]
5252
m=ax.pcolormesh(XLON, XLAT, np.abs(lats-XLAT))
53-
ax.set_title('error of lats (m)')
53+
ax.set_title('error of lats (deg)')
5454
ax.colorbar(m, loc='b')
5555

5656
ax = axes[1]
5757
m=ax.pcolormesh(XLON, XLAT, np.abs(lons-XLON))
58-
ax.set_title('error of lons (m)')
58+
ax.set_title('error of lons (deg)')
5959
ax.colorbar(m, loc='b')
6060

6161
axes.format(abc='(a)')
6262

6363

64+
#%% write proj info into NetCDF
65+
from pyproj import CRS
66+
67+
projcrs = CRS(crs.proj4_init)
68+
69+
cf = projcrs.to_cf()
70+
crs_new = projcrs.from_cf(cf)
71+
crs_new == projcrs
72+
73+

0 commit comments

Comments
 (0)