intro story D-Flow FM

 

D-Flow Flexible Mesh

D-Flow Flexible Mesh (D-Flow FM) is the new software engine for hydrodynamical simulations on unstructured grids in 1D-2D-3D. Together with the familiar curvilinear meshes from Delft3D 4, the unstructured grid can consist of triangles, pentagons (etc.) and 1D channel networks, all in one single mesh. It combines proven technology from the hydrodynamic engines of Delft3D 4 and SOBEK 2 and adds flexible administration, resulting in:

  • Easier 1D-2D-3D model coupling, intuitive setup of boundary conditions and meteorological forcings (amongst others).
  • More flexible 2D gridding in delta regions, river junctions, harbours, intertidal flats and more.
  • High performance by smart use of multicore architectures, and grid computing clusters.
An overview of the current developments can be found here.
 
The D-Flow FM - team would be delighted if you would participate in discussions on the generation of meshes, the specification of boundary conditions, the running of computations, and all kinds of other relevant topics. Feel free to share your smart questions and/or brilliant solutions! 

 

=======================================================
We have launched a new website (still under construction so expect continuous improvements) and a new forum dedicated to Delft3D Flexible Mesh.

Please follow this link to the new forum: 
/web/delft3dfm/forum

Post your questions, issues, suggestions, difficulties related to our Delft3D Flexible Mesh Suite on the new forum.

=======================================================

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 


Message Boards

io_netcdf_api.F90 compilation error in Ubuntu 16.10

Sebastian Krieger, modified 3 Years ago.

io_netcdf_api.F90 compilation error in Ubuntu 16.10

Youngling Posts: 4 Join Date: 9/28/12 Recent Posts
Dear colleagues. I am trying to compile Delft3D on a clean Lubuntu 16.10 system. In the past I have struggled to compile Delft3D but in the end I've always managed to compile a running code. But this time I am stuck.

I am using GNU compilers `gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12)`. As suggested I have also compiled MPICH, NetCDF and their dependencies from source based on the `build_ubuntu1604.sh` script several times. I am at Delft3D revision 6908.

From the error message below, I think there is an issue in the `io_netcdf_api.F90` file. I appreciate any suggestions on how to handle this error.

make[6]: Entering directory '/home/sebastian/dev/deltares/delft3d/src/utils_lgpl/io_netcdf/packages/io_netcdf/src'
../../../../../scripts_lgpl/linux/update_version.sh \
./io_netcdf_version.F90 . ./../include/version_number.ini /home/sebastian/dev/deltares/delft3d/src
Generating version number in the ./io_netcdf_version.F90
Done, new version number is: 6908
/bin/bash ../../../../../libtool  --tag=FC   --mode=compile mpif90 -DHAVE_CONFIG_H -I. -I../../../../..     -I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src -I/include -DWITH_DELFTONLINE  -I/usr/local/include -O2 -ffree-line-length-none -cpp -c -o io_netcdf_version.lo io_netcdf_version.F90
libtool: compile:  mpif90 -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src -I/include -DWITH_DELFTONLINE -I/usr/local/include -O2 -ffree-line-length-none -cpp -c io_netcdf_version.F90  -fPIC -o .libs/io_netcdf_version.o
libtool: compile:  mpif90 -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src -I/include -DWITH_DELFTONLINE -I/usr/local/include -O2 -ffree-line-length-none -cpp -c io_netcdf_version.F90 -o io_netcdf_version.o >/dev/null 2>&1
/bin/bash ../../../../../libtool  --tag=FC   --mode=compile mpif90 -DHAVE_CONFIG_H -I. -I../../../../..     -I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src -I/include -DWITH_DELFTONLINE  -I/usr/local/include -O2 -ffree-line-length-none -cpp -c -o io_netcdf_api.lo io_netcdf_api.F90
libtool: compile:  mpif90 -DHAVE_CONFIG_H -I. -I../../../../.. -I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src -I/include -DWITH_DELFTONLINE -I/usr/local/include -O2 -ffree-line-length-none -cpp -c io_netcdf_api.F90  -fPIC -o .libs/io_netcdf_api.o
io_netcdf_api.F90:472:17:

    character(len=length), intent(in) :: string
                 1
Error: Scalar INTEGER expression expected at (1)
io_netcdf_api.F90:477:31:

        char_array(i) = string(i:i)
                               1
Error: Syntax error in argument list at (1)
io_netcdf_api.F90:471:36:

function string_to_char_array(string, length) result(char_array)
                                    1
Error: Symbol ‘string’ at (1) has no IMPLICIT type
io_netcdf_api.F90:155:15:

    c_meshname= string_to_char_array(meshname,len_trim(meshname))
               1
Error: Type mismatch in argument ‘string’ at (1); passed CHARACTER(1) to UNKNOWN
Makefile:535: recipe for target 'io_netcdf_api.lo' failed
make[6]: *** [io_netcdf_api.lo] Error 1


Kind regards,
Sebastian
Adri Mourits, modified 3 Years ago.

RE: io_netcdf_api.F90 compilation error in Ubuntu 16.10

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Sebastian,

Currently, we use gcc version 4.9.1, which does not run into this problem.

Can you try the following:
What happens if you reverse the order of the arguments of the related function, so replace, in file "...\src\utils_lgpl\io_netcdf\packages\io_netcdf\src\io_netcdf_api.F90" line number 471:
function string_to_char_array(string, length) result(char_array)

by:
function string_to_char_array(length, string) result(char_array)


This function is yet only being used inside "io_netcdf_api.F90", so you might have to remove/disable the call at line 155. io_netcdf_api is currently not used yet in the open source code, so if you change this locally, nothing will be broken.

If it doesn't solve your problem, you can try removing this function completely.

Please report your findings here.

Thanks.

Regards,

Adri
VV
VIMAL VINAYAN, modified 3 Years ago.

RE: io_netcdf_api.F90 compilation error in Ubuntu 16.10

Youngling Posts: 1 Join Date: 2/12/17 Recent Posts
Hi Adri, Sebastian,

I wanted to follow up on this error message with a solution. I faced the same error and the way I could it to get compile correctly was by making the following change

In the io_netcdf_api.f90 file, line 471, the first three lines should be in the following order


function string_to_char_array(string, length) result(char_array)
  integer, intent(in) :: length
  character(len=length), intent(in) :: string


instead of

function string_to_char_array(string, length) result(char_array)
  character(len=length), intent(in) :: string
  integer, intent(in) :: length


Hope this helps.

Thanks,

Vimal
Giordano Lipari, modified 3 Years ago.

RE: io_netcdf_api.F90 compilation error in Ubuntu 16.10

Youngling Posts: 12 Join Date: 3/23/11 Recent Posts
Adri Mourits:

Currently, we use gcc version 4.9.1, which does not run into this problem.


Only to report that I managed to use gcc 5.4.0 for compiling several versions of Delft3D from tag 2103 to 6906 (the current head) and with vanilla settings. This lends some credit to the idea that the compiler version should not be crucial for this error, unless gcc 6+ has special requirements...
Adri Mourits, modified 3 Years ago.

RE: io_netcdf_api.F90 compilation error in Ubuntu 16.10

Yoda Posts: 1224 Join Date: 1/3/11 Recent Posts
Hi Giordano and Vimal,

This is corrected in the trunk in revision 6944 (January 22, 2017).

Regards,

Adri