[ncl-install] problems linking ncl with other libraries

Mary Haley haley at ucar.edu
Tue Jul 12 14:58:42 MDT 2011


Hi Rafael,

Version 4.2.2 is about 10 years old, so it doesn't surprise me that the common blocks changed during that time. There was a major upgrade of the mapping software around 2007, and it required making major changes to the software.

Can you give me a list of the common blocks that you are referencing from your software, and I'll give you what the new versions of these common blocks should look like.

Thanks,

--Mary
 
On Jul 12, 2011, at 9:59 AM, Rafael Pacheco wrote:

> Hello, 
> 
> I am having problems linking ncar version 6 with some plotting package for 
> ROMS, the old version of ncar seemed to be able to run (4.2.2) but now when 
> I 
> re-installed this version I had problems linking with ncar. Please see 
> message 
> below that was sent to me by the ROMS staff. I would appreciate giving me 
> access to 4.2.2 or guide me to solving this problem. Thank you, 
> -- Rafael 
>  ---------------------------------------- 
>  Department of Mathematics and Statistics 
>  Arizona State University   
>  Tempe, Arizona  85287-1804     
>  Email: rpacheco at asu.edu 
>  http://math.la.asu.edu/~rpacheco 
>  ---------------------------------------- 
> 
> Here is my email: 
> Hello everybody, 
> I have results from my ROMS simulation and generated netcdf files 
> ocean_avg.nc, 
> ocean_his.nc, ocean_rst.nc, etc. 
> 
> I would like to plot the results and I tried the roms_gui but did not load 
> properly, not even the nc files from the default sample problem upstream. 
> Anyway, I am trying now the roms tools that I downloaded from svn checkout 
> https://www.myroms.org/svn/src/plot 
> 
> I installed the ncl version 6 and seems to work. But when I try the makefile 
> in the plot tools I got the following error: 
> 
> I would be grateful if someone can guide me to solve this problem and/or 
> telling me of another plotting tool that I can use to view my results. 
> 
> Thanks! 
> Rafael 
> 
> 
> /usr/bin/gfortran -frepack-arrays -g -fbounds-check \ 
> cnt.o cpmpxy2d.o mapeod.o stumsl.o stumxy.o vvumxy.o -o 
> /home/rpacheco/PLOTROMS/bin/cntG \ 
> libUTIL.a -L/usr/local/lib -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib64 
> -lX11 -L/opt/gfortransoft/s_netcdf4/lib -lnetcdf 
> -L/opt/gfortransoft/s_hdf5/lib -lhdf5_hl -lhdf5 -lz 
> /usr/bin/ld: Warning: size of symbol `mapcm1_' changed from 28 in 
> libUTIL.a(hbackground.o) to 40 in /usr/local/lib/libncarg.a(mapbd.o) 
> /usr/bin/ld: Warning: size of symbol `mapcm2_' changed from 60 in 
> libUTIL.a(cnt_frame.o) to 128 in /usr/local/lib/libncarg.a(mapbd.o) 
> /usr/bin/ld: Warning: size of symbol `mapcm4_' changed from 128 in 
> libUTIL.a(hbackground.o) to 224 in /usr/local/lib/libncarg.a(mapbd.o) 
> /usr/bin/ld: skipping incompatible /usr/local/lib/libhdf5_hl.a when 
> searching 
> for -lhdf5_hl 
> /usr/bin/ld: skipping incompatible /usr/local/lib/libhdf5.a when searching 
> for 
> -lhdf5 
> /usr/bin/ld: skipping incompatible /usr/local/lib/libz.so when searching 
> for -lz 
> /usr/bin/ld: skipping incompatible /usr/local/lib/libz.a when searching for -
> lz 
> libUTIL.a(crash.o): In function `crash': 
> /home/rpacheco/PLOTROMS/src/crash.f90:1562: undefined reference to 
> `nf_close_' 
> /home/rpacheco/PLOTROMS/src/crash.f90:1563: undefined reference to 
> `nf_close_' 
> /home/rpacheco/PLOTROMS/src/crash.f90:1575: undefined reference to 
> `nf_strerror_' 
> libUTIL.a(get_nc2dat.o): In function `get_nc2dat': 
> 
> 
> AND HERE IS THEIR REPLY: 
> 
> Pay attention to this: 
> Quote: 
> 
> /usr/bin/ld: Warning: size of symbol `mapcm1_' changed from 28 in 
> libUTIL.a(hbackground.o) to 40 in /usr/local/lib/libncarg.a(mapbd.o) 
> /usr/bin/ld: Warning: size of symbol `mapcm2_' changed from 60 in 
> libUTIL.a(cnt_frame.o) to 128 in /usr/local/lib/libncarg.a(mapbd.o) 
> /usr/bin/ld: Warning: size of symbol `mapcm4_' changed from 128 in 
> libUTIL.a(hbackground.o) to 224 in /usr/local/lib/libncarg.a(mapbd.o) 
> 
> this means that your used code (i.e., Hernan's plotting package) attempts to 
> access common blocks 
> of NCL/NCARG libraries. It is a standard practice when using NCAR graphics 
> in 
> a fairly advanced 
> mode. Unfortunately sometimes NCAR graphics people change these common 
> blocks 
> internally by adding 
> more variables. When your code is designed to work with a certain version of 
> NCAR graphics 
> library may not be consistent with a newer version. It did happened 
> before.mapcm4_ 
> 
> The only way to fix this is to find declarations of common blocks "mapcm1", 
> "mapcm2", and "mapcm4" 
> inside the source code of NCAR graphics libraries (I guess, these are 
> somewhere within areas package 
> inside ncarg2d and them modify parts of your own code to bring sequence of 
> variables in the common 
> block be exactly the same as inside NCAR graphics libraries. It is tedious, 
> but there is no way around. 
> 
> 
> 
> 
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install



More information about the ncl-install mailing list