Welcome, Guest
Username: Password: Remember me

TOPIC: Reading data from netcdf's

Reading data from netcdf's 12 years 6 months ago #4505

  • fay
  • fay's Avatar
Hi

I have reprogrammed the limwac.f subroutine to read data from a netcdf but it currently doesn't work. I know why but not how to implement the answer: I presume TOMAWAC currently compiles the limwac.f file something like

ifort limwac.f

however because I am using netcdf library's I need tomawac to link to the netcdf library's. For example, to compile a stand alone fortran file, I would type:

ifort filename.f -L/export/apps/netcdf4/lib/ -lnetcdf -lnetcdff

is it possible for me to add some code so that when tomawac compiles limwac.f it links to these libraries? If so, which subroutine(s) do I need to modify?

Thanks

Fay
The administrator has disabled public write access.

Re: Reading data from netcdf's 12 years 6 months ago #4507

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello,

I am not a specialist of netcdf, but I can suggest an idea. To add special libraries, you can do like in the example of file systel-all.ini in the config directory (see svn repository) for MED or HDF5. See the lines
#IF MED AND HDF5
#MED LK_OPT_NORMAL=" -lf2c -lz -lstdc++ -v "
#MED LK_LIB_SPECIAL="-L/home/systel/LIBRARY/MED/med_2.3.4_intel_64_10/lib -lmed -L/home/systel/LIBRARY/HDF5/hdf5_1.6.4_intel_64_10/lib -lhdf5 "

Maybe with the variable LK_LIB_SPECIAL="-L/export/apps/netcdf4/lib/ -lnetcdf -lnetcdff" you can reach your goal. Please try it and tell me. Do not forget after changing your "systel.ini" file to type cfgmak in the same directory to update the file cfgmak.mak so that your makefiles are coherents with your options to compile.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

Re: Reading data from netcdf's 12 years 6 months ago #4509

  • fay
  • fay's Avatar
Yes thanks it does work, I added the -L/path -l/path to the LK_LIB_NORMAL string in the systel.ini file.
The administrator has disabled public write access.
Moderators: tfouquet

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.