daliagachc / wrf_management

package created to manage the run of wrf at uhel supercomputer (taito)
0 stars 0 forks source link

python and netcdf4 on taito #9

Open Rulock opened 5 years ago

Rulock commented 5 years ago

I've followed tips by Juha Lento to create consistent conda environment (https://github.com/jlento/atm-doc/blob/master/conda/vocabulary.md). Ended up with seemingly proper one:

(python3_netcdf) [kadantse@taito-login3 wrfmod]$ conda list
# packages in environment at /wrk/kadantse/DONOTREMOVE/miniconda3/envs/python3_netcdf:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.6             h14c3975_1002    conda-forge
ca-certificates           2019.3.9             hecc5488_0    conda-forge
certifi                   2019.3.9                 py37_0    conda-forge
cftime                    1.0.3.4         py37hd352d35_1001    conda-forge
curl                      7.64.0               h646f8bb_0    conda-forge
hdf4                      4.2.13            h9a582f1_1002    conda-forge
hdf5                      1.10.4          nompi_h3c11f04_1106    conda-forge
jpeg                      9c                h14c3975_1001    conda-forge
krb5                      1.16.3            hc83ff2d_1000    conda-forge
libblas                   3.8.0                9_openblas    conda-forge
libcblas                  3.8.0                9_openblas    conda-forge
libcurl                   7.64.0               h01ee5af_0    conda-forge
libedit                   3.1.20170329      hf8c457e_1001    conda-forge
libffi                    3.2.1             he1b5a44_1006    conda-forge
libgcc-ng                 8.2.0                hdf63c60_1  
libgfortran-ng            7.3.0                hdf63c60_0  
liblapack                 3.8.0                9_openblas    conda-forge
libnetcdf                 4.6.2             hbdf4f91_1001    conda-forge
libssh2                   1.8.0             h1ad7b7a_1003    conda-forge
libstdcxx-ng              8.2.0                hdf63c60_1  
ncurses                   6.1               hf484d3e_1002    conda-forge
netcdf4                   1.5.1.2          py37had58050_0    conda-forge
numpy                     1.16.3           py37he5ce36f_0    conda-forge
openblas                  0.3.6                h6e990d7_2    conda-forge
openssl                   1.0.2r               h14c3975_0    conda-forge
pip                       19.1                     py37_0    conda-forge
python                    3.7.0             hd21baee_1006    conda-forge
readline                  7.0               hf8c457e_1001    conda-forge
setuptools                41.0.1                   py37_0    conda-forge
sqlite                    3.26.0            h67949de_1001    conda-forge
tk                        8.6.9             h84994c4_1001    conda-forge
wheel                     0.33.4                   py37_0    conda-forge
xz                        5.2.4             h14c3975_1001    conda-forge
zlib                      1.2.11            h14c3975_1004    conda-forge

But then suddenly:

(python3_netcdf) [kadantse@taito-login3 wrfmod]$ python -c "import netcdf4"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'netcdf4'

I think I'd better prepare wrf-inputs locally, check it carefully and upload it back. And then I'd get back to solving this issue.

daliagachc commented 5 years ago

i think that python cares about lowercase. it should be:

import netCDF4

In any case i agree that since the files are not that big, doing it locally seems like the best option. Anyhow, would you please upload the python version of the script? doesn't need to be a working version but i would prefer to start from there rather than write it again.

Rulock commented 5 years ago

I'm pretty sure I have checked all case sensitive variants at least twice but now it miraculously works also on taito! :) The script is uploaded to https://github.com/daliagachc/wrf_management/tree/master/wrf_management/scripts Also available at /wrk/kadantse/wrfimp_longrun