opendap
cprat=ga.exp("cprat") # export variable from grads to python
cprat.shape
url='http://apdrc.soest.hawaii.edu:80/dods/public_data/CFSv2/monthly_ensemble_reforecast/cprat'
ga=GaNum(Bin='grads')
ga("sdfopen " + url)
ga("d cprat") # This draw figure in x-window for grads.
from grads.ganum import GaNum
OPenDAPは、地球科学分野で広く使われている遠隔データアクセスのプロトコルで、遠方のサーバーに置かれたデータに、ローカルな解析ソフトウェアでアクセスして解析を実行することができる。GrADsはOPenDAPをサポートしているので、pyGradsでもその機能を使うことができる。例は以下の通り。
OPenDAP is a remote data access protocol used widely in earth science research field. OPenDAP is supported by GrADs and thus pyGrads can also use OPenDAP. A sample is shown below.
from grads.ganum import GaNum
url='http://apdrc.soest.hawaii.edu:80/dods/public_data/CFSv2/monthly_ensemble_reforecast/cprat'
ga=GaNum(Bin='grads')
ga("sdfopen " + url)
ga("d cprat") # This draw figure in x-window for grads.
cprat=ga.exp("cprat") # export variable from grads to python
cprat.shape