NCEPLIBS environment variables on Mac

I have completed the steps to build the NCEPLIB-external and NCEPLIBS libraries, however, when I get to step 2.3 of the user guide (https://ufs-mrweather-app.readthedocs.io/en/ufs-v1.1.0/quickstart.html#setup-the-environment) for the Medium Range Weather App, I am running into problems. Since I am not using a pre-configured system, I jumped to the second green box. The $NCEPLIBS_DIR variable is not set, and I was unable to find the parent directory (or the file) of setenv_nceplibs.sh to set the environment variable. Do you think there is an issue with how I built NCEPLIBS? Or am I doing something else wrong?

Thanks,

Sam

Sam,

You need to manually set environment variable NCEPLIBS_DIR to the location where you installed the NCEPLIBS. After that, you should be able to execute step 2.3 of the user guide.

This is also described in the section below of the NCEPLIBS README.md.

Let us know if this works.

Ligia

 

Setting your environment to build the UFS Weather Model

NCEPLIBS produces a shell script that can be sourced to setup your environment to build the UFS Weather Model. Located in <install>/bin are setenv_nceplibs.sh and setenv_nceplibs.csh. Sourcing them will set environment variables that tell the model where to find various libraries such as NCEPLIBS and NetCDF:

. <install>/bin/setenv_nceplibs.sh

or, if running C shell,

source <install>/bin/setenv_nceplibs.csh

 

 

 

Permalink

In reply to by ligia.bernardet

Ok, I think I did something wrong when building NCEPLIBS then, because that directory and file doesn't exist. When I run the command "make install" I get the error "make: *** No rule to make target `install'.  Stop." There is also no install directory under my build directory. 

When I explicitly gave make the install directory by adding this to the cmake command

-DCMAKE_INSTALL_PREFIX=/usr/local/ufs-develop/src/NCEPLIBS/build/install

I didn't get an error when running "make install" because the install directory was created. However, there is no bin directory under the install directory

I would guess that your NCEPLIBS-external install wasn't ok, or you didn't specify the location of the NCEPLIBS-external install in your cmake command for NCEPLIBS. I wouldn't install into the build directory either.

Just to be clear, even if you decide to not install the basic dependencies as we suggest, you still need to follow the instructions from item 2. on:

https://github.com/NOAA-EMC/NCEPLIBS-external/blob/ufs-v1.1.0/doc/README_macos_gccgfortran.txt
https://github.com/NOAA-EMC/NCEPLIBS-external/blob/ufs-v1.1.0/doc/README_macos_clanggfortran.txt

You can add specific flags to use existing netCDF installations etc, see https://github.com/NOAA-EMC/NCEPLIBS-external/blob/ufs-v1.1.0/README.md.

However, we don't recommend this, since we can only support installations that follow the above instructions.

Yeah, those were the instructions that I followed to download NCEPLIBS-external. Is there a way to check whether it worked?

 

When I moved on to work on NCEPLIBS, there were several different instruction paths given. Step 3 in the doc you sent says it needs updating (I now see I was using the developer version, but you used the full release which doesn't have the disclaimer). And then there are also instructions in https://github.com/NOAA-EMC/NCEPLIBS/tree/release/public-v1. I did a lot of trial and error since I didn't know which of those instructions are more up to date. Which is the correct documentation?