Where to Add NETCDF_PATH

freddyzhangy

Freddy Zhang
New Member
Hello,

I have been trying to build a case on CESM2.1.1, and I am getting an error where the path for NETCDF is not defined. I am not sure where to add the path for NETCDF. Could I get some help for that? I have attached the current environment variables for my machine and the error message that shows up when I try to build the case.

Thanks,
Freddy
 

Attachments

fischer

CSEG and Liaisons
Staff member
Hi Freddy,

In your env_mach_specific.xml, in the environment_variables section. You'll add the NETCDF_PATH

For example.

<environment_variables>
<env name="OMP_STACKSIZE">256M</env>
<env name="NETCDF_PATH">/data/software/netcdf/4.4.1.1-gnu540</env>
</environment_variables>

Or the NETCDF_C_PATH and NETCDF_FORTRAN_PATH. Which ever is needed.

Chris
 

freddyzhangy

Freddy Zhang
New Member
Hi Freddy,

In your env_mach_specific.xml, in the environment_variables section. You'll add the NETCDF_PATH

For example.

<environment_variables>
<env name="OMP_STACKSIZE">256M</env>
<env name="NETCDF_PATH">/data/software/netcdf/4.4.1.1-gnu540</env>
</environment_variables>

Or the NETCDF_C_PATH and NETCDF_FORTRAN_PATH. Which ever is needed.

Chris

Hi Chris,

Thank you so much for your help. I will be sure to add that line into the xml file.

Freddy
 

freddyzhangy

Freddy Zhang
New Member
Hi Chris,

I have had some trouble setting the correct path for netcdf. I installed netcdf through yum so I used the rpm command to find the location of the netcdf package on my machine. When I use that file location, which is: /usr/lib64/lbnetcdf.so.7.2.0 , it says there is an issue with the C compiler. Is there a different path I am supposed to assign to netcdf_path?

Thanks for your help,

Freddy
 

Attachments

Back
Top