NCDFUTIL: Marine, earth, and atmospheric modeling tools on Henry2 at NC State

Contact: Lisa L. Lowe, lllowe@ncsu.edu

Marine, earth, and atmospheric modeling tools

UFS model

I recommend putting this in your .bashrc or .tcshrc. (If you do not want to do that, you will need to type it before loading UFS libraries.)

module use --append /usr/local/usrapps/ncdfutil/modulefiles


Load the NCEP libraries

module load ufs/NCEPLIBS


To download and compile UFS, follow my notes, but also follow along with the official instructions here:

https://github.com/ufs-community/ufs-weather-model/wiki/Getting-Started


Use the v2.0.0 tag. I have tested with v2. I had an old version of ufs in my directory, and I could just do 'git checkout' the version 2, and it worked. But when I tested from scratch doing git clone then git checkout, it gave me an error suggesting I had made changes already. So...I don't know why (stuff happens with development branches?), but I had to use the "-f" flag to checkout the tag.

git clone https://github.com/ufs-community/ufs-weather-model.git ufs-weather-model

cd ufs-weather-model

git checkout -f ufs-v2.0.0

git submodule update --init --recursive


The instructions say to look at NCEP-external Wiki or go here:

https://ufs-weather-model.readthedocs.io/en/ufs-v1.1.0/BuildingAndRunning.html


Look at that page to see what is involved, but if you loaded the NCEPLIBS, you should only need to do

./build.sh


If you get errors, please check your environment. Check for (and remove!) any environment variables in your login or startup files. Log out, then back in again, and only load the NCEPLIBS as outlined above. Also make sure you did the submodule update step.


Running ./build.sh will create the executable ufs_weather_model. Another weird thing that happened is that the first time I compiled this, 'ufs_weather_model' had the proper executable mode, and the second it didn't. So, if it does not have it already, do

chmod u+x ufs_weather_model


If you don't want to bother to compile at all, you can copy my executable just to try it out:

/usr/local/usrapps/ncdfutil/ufs/2.0.0-intel2018/ufs_weather_model


Follow the instructions on the Getting-Started to download the simple-test-case, for example I did:

cd /share/$GROUP/$USER

wget https://ftp.emc.ncep.noaa.gov/EIB/UFS/simple-test-case.tar.gz

tar -zxf simple-test-case.tar.gz

cd simple-test-case

cp /rs1/researchers/l/lllowe/ufs_weather_model/ufs_weather_model .


Instead of downloading their LSF script, copy the one on Henry2:

cp /usr/local/usrapps/ncdfutil/ufs/2.0.0-intel2018/submit_ufs.sh .


To submit, as usual, do:

bsub < submit_ufs.sh


That submit script is in bash. If it doesn't work, you might not have a proper .bashrc. You can request help for that, but since the default shell for Henry2 is still tcsh, it may be better to just copy this alternate script, with all the bash stuff removed:

cp /usr/local/usrapps/ncdfutil/ufs/2.0.0-intel2018/submit_ufs.csh .

bsub < submit_ufs.csh


Many folks use ncl as part of the ncdfutil environment. That is a Conda environment that will strongly conflict with the UFS environment. If you want to do visualization and analysis with the ncdfutil environment, just first do

module purge

module ncdfutil


I installed a binary ncl so you can test the output while still using the the UFS (Intel 2018) environment. In that case, you do not have to module purge or module unload anything.

module load ncl


When I follow their instructions, I get correct PNG plots, but they are written as PNG files, they do not open a window. The files are written to the current working directory.

module load ncl

wget https://raw.githubusercontent.com/wiki/ufs-community/ufs-weather-model/tools/plot_ufs_phyf.ncl

ncl plot_ufs_phyf.ncl


Files created are:

plot_ufs_phyf_tmp2m.png

plot_ufs_phyf_tprcp.png


If you logged in with -X or used MobaXterm, you can open the files by doing:

display plot_ufs_phyf_tmp2m.png

display plot_ufs_phyf_tprcp.png


Here are screenshots of my PNGs: