Instalação
Criar ambiente conda
conda create -n cptec python=3.10
conda activate cptec
Via conda
conda install -c conda-forge cptec-model
Via pip
pip install cptec-model
Via fonte
Instalar Pacotes Requeridos
conda install -c conda-forge matplotlib pycurl cfgrib netCDF4 pynio xarray dask esmpy scipy mpi4py xesmf ipykernel
Instalar Pacote cptec-model
git clone https://github.com/framework-CPTEC/CPTEC-user.git
cd CPTEC-user
python setup.py install
Erros Encontrados
EcCodes
Engine 'cfgrib' loading failed:
Could not load the ecCodes library!
Ação
python -m eccodes selfcheck
RuntimeError: Could not load the ecCodes library!
pip uninstall eccodes
pip install eccodes==1.2.0
python -m eccodes selfcheck
ecCodes library not found using ['eccodes', 'libeccodes.so', 'libeccodes']
pip install ecmwflibs
python -m eccodes selfcheck
Found: ecCodes v2.30.0.
Your system is ready.
PyNio
Unexpected err=ValueError("unrecognized engine pynio must be one of: ['netcdf4', 'scipy',
'cfgrib', 'store']"), type(err)=<class 'ValueError'>
Ação
conda install -c conda-forge pynio
PyCurl
import pycurl
ImportError: pycurl: libcurl link-time ssl backends (secure-transport, openssl)
do not include compile-time ssl backend (none/other)
Ação
1 - pip uninstall pycurl
2 - conda install -c conda-forge pycurl
Caso o erro persista, verifique o link para maiores detalhes: http://pycurl.io/docs/7.21.5/install.html#ssl.