how get the result as netcdf file

256 views
Skip to first unread message

arash

unread,
May 16, 2011, 12:47:49 AM5/16/11
to XBeach
Hi everyone,

I wonder how I can get the netcdf result.
I set the output as outputformat=netcdf and also export
PKG_CONFIG_PATH=/home/aei15/netcdf-4.1.1

but I got an error as:
You have asked for netcdf output (outputformat=netcdf) but this
executable is built without
netcdf support. Use a netcdf enabled executable or
outputformat=fortran

Do I export the above variable first and then install xbeach?

Can any one advise me how to address this problem?

Thank you.
Regards,
Arash

D.Roe...@unesco-ihe.org

unread,
May 16, 2011, 5:04:56 AM5/16/11
to xbe...@googlegroups.com
Hi Arash,
 
You have to build the executable using the right configuration; you need to choose netcdf_Release; if you;re using VS2008 then you find it under build - configuration manager.
 
Good luck,
 
Dano


-----xbe...@googlegroups.com wrote: -----

To: XBeach <xbe...@googlegroups.com>
From: arash <aras...@gmail.com>
Sent by: xbe...@googlegroups.com
Date: 05/16/2011 06:47AM
Subject: how get the result as netcdf file

--
You received this message because you are subscribed to the Google Groups "XBeach" group.
To post to this group, send email to xbe...@googlegroups.com.
To unsubscribe from this group, send email to xbeach+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xbeach?hl=en.


Fedor Baart

unread,
May 16, 2011, 5:20:36 AM5/16/11
to xbe...@googlegroups.com
Hi Arash,

For the linux version, you need to have netcdf build and installed (./configure & make & make install, see the netcdf manual and readme files for that). You can also install using apt-get or yum on most systems. Don't forget to check if it's at least version 4.1 and don't forget to install the header files (netcdf-dev/netcdf-devel).

NetCDF uses the pkg-config system to inform other programs on how they should link against netcdf. 

Building and installing netcdf should result in a netcdf.pc file. This file is usually (if you build it yourself) in /usr/local/lib/pkgconfig/netcdf.pc. This  /usr/local/lib/pkgconfig should be in your PKG_CONFIG_PATH, so you can type: 
export  PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

I think it can alternatively find the settings using the nc-config program, which is also automatically build and installed if you install netcdf. This could be in your /usr/local/bin, which should be in your PATH. If it isn't you can type: 
export  PATH=$PATH:/usr/local/bin

If you don't want to, or cannot install executables in /usr/local (the default on linux), you can configure netcdf with a prefix:
./configure --enable-shared --enable-fortran --prefix=/home/aei15/local & make & make install

HTH,

Fedor




On May 16, 2011, at 11:04 AM, D.Roe...@unesco-ihe.org wrote:

Hi Arash,
 
You have to build the executable using the right configuration; you need to choose netcdf_Release; if you;re using VS2008 then you find it under build - configuration manager.
 
Good luck,
 
Dano

Fedor Baart

unread,
May 16, 2011, 8:42:08 AM5/16/11
to Arash eisazadeh moghaddam, xbe...@googlegroups.com
Hi Arash,

The netcdf library is found during "configure" time. Before you build xbeach you need to configure it with netcdf. 

./configure --with-netcdf

This should result in something like: looking for netcdf ........ yes.. If it says "no" you should look the config.log file, which contains details about what's happening. 

Make sure you do "make clean" before you reconfigure and after the configure you should do:

make

This should give you an xbeach executable. You can check if it links to netcdf using the command:

ldd ./xbeach 

This should list the netcdf library (if it says it's missing, you need to check your LD_LIBRARY_PATH). 


HTH, Cheers,

Fedor



On May 16, 2011, at 12:27 PM, Arash eisazadeh moghaddam wrote:

Hi Fedor,

Thank you for your email. So it doesn't matter how I installed the xbeach? I run the model on our department's twister in where the netcdf has been installed, but we have an account on it with limited access; that is, we can just build in our path.
As I found, after installing xbeach on my path, I just need to export  PKG_CONFIG_PATH=$PKG_
CONFIG_PATH:/usr/local/lib/pkgconfig and also set the netcdf in paramx.txt and then run ./xbeach. Am I right or I need to do something more?

Cheers,
Arash
--
Arash E.Moghaddam
PhD Candidate
Coastal Research
Department of Geography, 3rd floor
University of Canterbury
Private Bag 4800
Christchurch 8140, New Zealand

Reply all
Reply to author
Forward
0 new messages