create_region - ModuleNotFoundError: No module named 'netCDF4'

F-Colby-UML

New member
Hi Folks,
Am trying to run create_region and am getting the error of not finding a module named netCDF4.

I have loaded module netcdf-c version 4.9.2

Is there something else I need?

thanks,
Frank Colby
UMass Lowell
 
Hi Frank,

To be able to run the create_region utility, you will need to install the python prerequisites numpy and netCDF4 to your python virtual environment. Loading the netcdf-c module does not make this available to the python interpreter.

Firstly, check that you have a working python interpreter in your shell/environment. You can execute "python --version" to check the version. Then you can install the necessary dependencies by going into MPAS-Limited-Area directory and then executing:
pip install -r requirements.txt
That said, it is recommended to first create your Python virtual environment, then activate the environment, and then use the pip install command above. You can check this page for instructions: Install packages in a virtual environment using pip and venv - Python Packaging User Guide. If you use a virtual environment, you need to activate it in your shell before you can execute the create_region utility in the future.


Abishek
 
Back
Top