[ Please help me how to install HYCOM ]

372 views
Skip to first unread message

Nhat Truong

unread,
Mar 6, 2024, 7:59:57 AM3/6/24
to HYCOM.org Forum
Dear Hycom expert,
I am a newbie HYCOM model. Now, I am following the document "Quickstart Guide
or HYCOM for Dummies".
Currently, I am confusing how to download  hycom_ALL.tar.gz and hycom_2.2.tar.gz.
I have checked some folders in Git Hub: https://github.com/HYCOM.
I failed to know where are hycom_ALL.tar.gz and hycom_2.2.tar.gz stored in the Git Hub.

Could you please give me more info to download and install HYCOM?

Best regards,
Thanks in advance

Alan Wallcraft

unread,
Mar 6, 2024, 9:13:26 AM3/6/24
to HYCOM.org Forum, Nhat Truong
See the wiki pages for HYCOM-src, HYCOM-tools (replaces ALL) and HYCOM-examples.  


Alan.

Nhat Truong

unread,
Mar 6, 2024, 9:57:09 AM3/6/24
to Alan Wallcraft, HYCOM.org Forum
Thank you very much, Alan. I have one question: How can we install and compile the HYCOM code on WSL2 in Windows 10?

Best regards

Alan Wallcraft

unread,
Mar 6, 2024, 10:23:53 AM3/6/24
to HYCOM.org Forum, Nhat Truong, HYCOM.org Forum, Alan Wallcraft
I have not heard of anyone doing this, but if WSL2 provides a complete Ubuntu (say) environment, then all you need is the dev version of GNU Fortran (gfortran),  the netCDF library and perhaps a  MPI library.  You could skip MPI by building HYCOM for one processor or for multiple threads with OpenMP.

Alan.
Message has been deleted

Nhat Truong

unread,
Mar 7, 2024, 11:28:52 AM3/7/24
to HYCOM.org Forum, Alan Wallcraft
Dear Alan,

I have downloaded src_2.3.01_mpi successfully. Now, I am following the compilation step on Github.
It presents that "The Makefile sources ./config/$(ARCH)_$(TYPE) where ARCH defines exactly what machine architecture to target and TYPE is the parallelization strategy and precision (one, omp, mpi, ompi).

The make process is automated by the script Make.csh, which should be used instead of directly invoking the make command. It keys on the source code directory name which should end with _${TYPE}, where ${TYPE} is the parallelization type (one, omp,mpi, ompi). The script Make.csh should be edited to define ${ARCH} appropriately for the machine, several options are provided as examples. In order for this to work, the file ./config/${ARCH}_${TYPE} must exist and must contain the machine-specific parts of Makefile (see the Compilations (config) wiki page)."


I failed to know how to modify or add the directory of ${ARCH} and ${ARCH} in Mash.csh correctly. If we change something inside the Mash.csh file, do we need to change another thing in another file (CPP.csh)? Do you need to move Makefile to the config folder? where can do execute the code? How can we check whether the HYCOM model can compile well?


Could you give me an example to compile and run a simple case? Some of the information in the Git hub is not enough to understand.


Best regards.





On Thursday, March 7, 2024 at 12:47:56 AM UTC+8 Nhat Truong wrote:
I see.
Last time, I tried to install FUNWAVE, OpenFoam, and TRUCHAS on Ubuntu with the 22.04 version. These models can work well.
I will try to install HYCOM on WSL2 and let you know later.

Thanks!

Alan Wallcraft

unread,
Mar 8, 2024, 8:24:23 AM3/8/24
to HYCOM.org Forum, Nhat Truong, Alan Wallcraft
To compile for a single processor: 

a) Rename the source directory to src_2.3.01_one

b) In Make.csh: comment out the HPE SGI lines and add Generic gfortran:

#setenv ARCH hpe-intel-relo
#
# --- Generic gfortran
setenv ARCH xc40-gnu-relo
#
setenv TYPE `echo $cwd | awk -F"_" '{print $NF}'`

c) Run Make.csh:  ./Make.csh >& Make.log

If you want to compile for OpenMP replae "_one" with "_omp" in (a).

It isn't obvious that ARCH=xc40-gnu works on a workstation as well s a Cray XC40, and so I'll add Generic Fortran to Make.csh on GitHub.

Note that for MPI xc40-gnu-relo won't work "as is" because the XC40 uses ftn as its name for Fortran with MPI.  This would typically be replaced by mpif90, but the details depend on the MPI library used.

Alan.

Alan Wallcraft

unread,
Mar 8, 2024, 8:51:46 AM3/8/24
to HYCOM.org Forum, Alan Wallcraft, Nhat Truong
For MPI, the best current example is config/intelGF-impi-sm-relo_mpi

This is configured for Intel MPI (i.e. mpif90 is assumed to be associated with Intel MPI) but several other MPI libraries work the same way.  Using mpif90 automatically links in the MPI libraries.

Alan.

Nhat Truong

unread,
Mar 9, 2024, 3:59:48 AM3/9/24
to Alan Wallcraft, HYCOM.org Forum
Dear Mr. Alan,
Thanks for your help.
Now, I am following you step by step:

1. Download src from Git hub
2. Change "src_2.3.01" name to another name "HYCOM_SRC_NEW"
3. Modify 2 command lines in Mask.csh 
figure_01.PNG

4. Compile src "./Make.csh >& Make.log" 
figure_02.PNG

Could you please teach me how to check whether the HYCOM source is working or not?

Could you send me a simple case to run it, please? 
Because I have followed the "Dummies HYCOM", It is very different from the current source code. 

Thank you once again.
Best regards,
Nhat


Alan Wallcraft

unread,
Mar 11, 2024, 12:50:03 PM3/11/24
to HYCOM.org Forum, Nhat Truong, HYCOM.org Forum, Alan Wallcraft
Look in Make.log to see if the compile and link worked.

There are examples in HYCOM-examples.  They are not really designed to run on a workstation but they should work if you have enough physical memory.

Your best bet is probably GOMb0.08 with pre-built files (see the wiki for where to download them).

Alan.
Message has been deleted

Nhat Truong

unread,
Mar 16, 2024, 9:23:34 AM3/16/24
to HYCOM.org Forum, Alan Wallcraft, Nhat Truong, HYCOM.org Forum
Dear Mr.Alan,

I have followed the instructions on GitHub https://github.com/HYCOM/HYCOM-examples/wiki/GOMb0.08 to generate a grid and bathymetry files.
"To create the GOMb0.08 grid, use the regional.grid.csh script in GOMb0.08/topo. Edit the dataset path (DS) and the HYCOM-tools path (TOOLS) then run the script."

I have modified the directory of DS and TOOLS in regional.grid.csh script.
"setenv DS /mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-examples/GOMb0.08/datasets/topo/
setenv TOOLS /mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-tools
cd ${DS}/ "

However, I failed to get data. The message error is shown below. When I checked the folder of HYCOM-tools/topo/src, I could not find the grid_mercator folder. I was confused that I  downloaded HYCOM tools directly from Github. Why does the folder of grid_mercator disappear?
Could you please help me solve this problem?

Many thanks!


"setenv DS /mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-examples/GOMb0.08/datasets/topo/
setenv TOOLS /mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-tools
cd /mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-examples/GOMb0.08/datasets/topo//
touch fort.61
/bin/rm -f fort.61
cat
echo regional.grid.b
regional.grid.b
setenv FOR061 fort.61
setenv FOR061A fort.61A
/mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-tools/topo/src/grid_mercator
/mnt/c/Users/MinhNhat/Desktop/HYCOM_installation/HYCOM-tools/topo/src/grid_mercator: Command not found.
mv fort.61 regional.grid.b
mv: cannot stat 'fort.61': No such file or directory
mv fort.61A regional.grid.a
mv: cannot stat 'fort.61A': No such file or directory
cat regional.grid.b
  263   'idm   ' = longitudinal array size
  193   'jdm   ' = latitudinal  array size"

Nhat Truong

unread,
Mar 16, 2024, 9:53:51 AM3/16/24
to HYCOM.org Forum, Alan Wallcraft
Dear Mr. Alan,
I just recognized that most of the information on Github is not corrected to the current version.
For the first example, the website wrote that "b) Interpolate the coarse enclosing bathymetry to the nested region using TOOLS/subregion/src/isub_topog. The script is GLBb0.08/subregion/depth_GOMb0.08_09m11s.csh, and it produces GOMb0.08/datasets/topo/depth_GOMb0.08_09m11s.[ab]." While the folder of isub_topog and depth_GOMb0.08_09m11s.csh don't exist.

The second example is to merge the two bathymetries (04,09m11) using TOOLS/topo/src/topo_merge, which selects the coarse depths and coastline in the buffer zone, a combination "near" the buffer zone, and the fine depths and coastline everywhere else. Unfortunately, I checked the TOOLS/topo/src/topo_merge that doesn't exist.

Could you please help me to solve this problem?

Best regards,



Alan Wallcraft

unread,
Mar 18, 2024, 9:26:39 AM3/18/24
to HYCOM.org Forum, Nhat Truong, Alan Wallcraft
You don't need to regenerate and input files to run the example.  From the wiki:

Where to find the input data for GOMb0.08?
All the files needed for this configuration can be downloaded from the HYCOM server, see the ~/HYCOM_examples/GOMb0.08/datasets/get_datasets.csh.

If you do want to build the input files yourself, they are based on programs from HYCOM-tools which you will need to download and compile for your computer.

Alan.
Reply all
Reply to author
Forward
0 new messages