How to link an external library (CFIO) to ROMS

Facts, news, and guidance about ROMS software

Moderators: arango, robertson

Post Reply
Posts: 1
Joined: Wed Sep 30, 2020 1:15 pm
Location: Indian Institute of Science

How to link an external library (CFIO) to ROMS

#1 Post by roopesh7 »

Hello all,

I'm a beginner on ROMS and currently I'm trying to run the ROMS model on a Cray XC40 machine to improve the I/O performance. We are trying to implement Asynchronous I/O, where there is an overlap of I/O phase with the computing phase.
I'm trying to use an existing library called CFIO(Climate Fast I/O):, to link to ROMS to perform the same.
Any suggestion on how to go about the same? How to link this external library on ROMS to use it?

Thank you,

User avatar
Posts: 3939
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to link an external library (CFIO) to ROMS

#2 Post by kate »

Simply linking to it may not be enough, but adding a library to link to is done in the Compilers file for your system. Just add to the LIBS macro - there are plenty of examples where it gets added to with a "+=".

To get ROMS to call your library is another story unless the library has routines with the same names as the netcdf library routines we usually call. Look at mod_netcdf.F. This contains the calls to the netcdf library, in which the routines have names like nf90_xxx. You can make a copy of mod_netcdf.F which calls your library instead - just make sure only one copy of mod_netcdf.F is visible to the linker.

Post Reply