Created
July 8, 2020 11:34
-
-
Save Try2Code/12a285584bc9c1067e57e7b66eeff4df to your computer and use it in GitHub Desktop.
How to use CDO inside Julia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# {{{ some steps before | |
# import Pkg | |
# Pkg.add("PyCall") | |
# }}} | |
using PyCall | |
pycdo = pyimport("cdo") | |
cdo = pycdo.Cdo() | |
print(cdo.topo()) | |
numpy_data = cdo.topo(;returnArray="topo") | |
#print(numpy_data) | |
xarray_data = cdo.topo(;returnXArray="topo") | |
#print(xarray_data) | |
# chains | |
masked_data = cdo.setrtomiss(-100000,0;input="-expr,'logTopo=log(abs(topo)+0.1)' -topo,r10x10", returnArray="logTopo") | |
print(masked_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment