Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

MADIS2LITTLEr converter compilation issue

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

tesfamichaelb

New member
Hello everyone,
This might not be the right place, but I thought it is closest as data assimilation work goes. … Anyways, I am working on FDDA observational nudging and trying to compile the converter from MADIS data format to Little_r format. The result is used as input into WRF model for Obs nudging. However, I encountered the incompatibility issue. My computer platform is "x86_64 GNU/Linux | x86_64-redhat-linux". To compile the "MADIS2Little_r" executable file, I tried both the 32bit and 64bit without any success or helpful debug info. All it gives me is the following:
==
Compiling MADIS2LITTLER with gfortran

/usr/bin/ld: skipping incompatible /home/tes/madis-4.3/lib/libmadis.a when searching for -lmadis
/usr/bin/ld: cannot find -lmadis
collect2: error: ld returned 1 exit status
Error: madis_to_little_r.exe not created
==
Your help is highly appreciated.
Tes
 
Hi,
The issue was resolved after I had to compile the required MADIS library from the source code, first. I formerly tried to use the binary file prepared for Linux platforms, provided on the MADIS webpage for Madis2Little_r script compilation.
Thanks,
-T
 
Hi Tes,

I am also trying to use MADIS data. The README file shows that "The required libraries MUST be compiled with the same Fortran compiler you plan to use for MADIS2LITTLER".
The prepared binary in MADIS API package may compiled using g77, so did you use g77 instead of gfortran to compile MADIS2LITTLER?
Could you use gfortran to compile MADIS API easily and without error?

Thank you.

Lily
 
Hi Lily,
Referring to my first posted notes, I compiled the Madis library from the source code. Yes, consistency is important. Our platform uses gFortran in compiling scripts. Here is the library set up I used in my Linux platform with gFortran compiler to compile the 'madis library'
---- This is for static version (Note that I am not sure if netcd-4.1.3 was unsuccessful - but it is the reason I switched to v4.0.1 -----
NETCDF_INC=/src/libs/netcdf-4.0.1/local/include
NETCDF_LIB=/src/libs/netcdf-4.0.1/local/lib/libnetcdf.a
# Linux compiler
FC=gfortran
FFLAGS= -ffixed-form -freal-8-real-4
-----------------------------------------
---- Once, your madis library has successfully compiled, the MIDAIS2LITTLER converter is compiled (you may need to try also the stable netcdf3.6.x), as:
gfortran -o da_advance_time.exe da_advance_time.f90
gfortran -c -ffree-form module_output.F
gfortran -c -L/usr/lib64 -lgfortran -lc -lm madis_to_little_r.f90
gfortran -o madis_to_little_r.exe madis_to_little_r.o module_output.o -L. -lmadis -L${NETCDF_LIB} -lnetcdf
-----------------------//--------------------
Good luck,
Tes
 
Hi Tes,

Thank you very much for your speedy reply.
Very useful information!
I installed netcdf 3.6.3 and compiled MADIS API and MADIS2LITTLER successfully now.
I think new version like netcdf 4.1.3 divides libnetcdf.a into libnetcdf.a and libnetcdff.a, but MADIS API only used libnetcdf.a, so cannot compile correctly.
Anyway, thanks again! I can move forward to use MADIS.

When I install netcdf 3.6.3, when make, has an error:
error: identifier "strncpy" is undefined
Solution: add #include <cstring> into the header of ..../netcdf-3.6.1/src/cxx/ncvalues.cpp

Best,

Lily
 
Top