From 2ce8f12e42b2191ff6948116870cfe29cfc35c8f Mon Sep 17 00:00:00 2001 From: Federico Guerra Date: Wed, 31 Jan 2024 20:58:24 +0100 Subject: [PATCH] [Add] WOSS Release 1.12.6 --- CHANGELOG | 5 ++ INSTALL | 32 ++++----- README | 2 +- configure.ac | 2 +- doxy/Mainpage.dox | 94 +++++++++++++++------------ samples/test_aloha_with_dbs.tcl | 3 +- woss/bellhop-woss.cpp | 25 +++---- woss/woss_def/altimetry-definitions.h | 24 ++++--- 8 files changed, 101 insertions(+), 86 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 363c16a..df36926 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -151,3 +151,8 @@ v1.12.4 - Added support for GEBCO 2022 - Refactored usage of streams' precision throughout the whole framework v1.12.5 - Minor fixes to ns-Miracle classes + +v1.12.6 - fixed gcc-13 warnings + - TCL examples updated to GEBCO 2023 + - removed warning in woss::BellhopWoss + - changed URL of main WOSS website diff --git a/INSTALL b/INSTALL index ec5680b..ac85f84 100644 --- a/INSTALL +++ b/INSTALL @@ -1,15 +1,11 @@ PLEASE NOTE : no super-user credentials are needed for any of these installations. The current WOSS version has the following compatibilities: - - Acoustic Toolbox: June 2020 - - HDF5 library: v1.8.13 - - NetCDF C library: v4.7.3 - - NetCDF4 C++ library: v4.3.1 - - GEBCO databases: 1D and 2D, 2008, 2014, 2019 and 2020 + - https://woss.dei.unipd.it/#libraries Requirements - - Download the recommended Acoustic Toolbox library from http://telecom.dei.unipd.it/ns/woss/files/at.zip + - Download the recommended Acoustic Toolbox library from https://woss.dei.unipd.it/#libraries and follow installation instructions. The directory path that contains the binaries should be in the $PATH environment. - woss::BellhopArrSyntax::BELLHOP_CREATOR_ARR_FILE_SYNTAX_1 is compliant with Bellhop arr file @@ -19,10 +15,7 @@ Requirements This is the new factory value. - WOSS is now requiring NetCDF4 with HDF5 support in order to be able to read the latest GEBCO 2019 dataset. - IF you wish to compile NetCDF4 software features, download the recommended HDF5, NetCDF library for C and - the C++4 from - - http://telecom.dei.unipd.it/ns/woss/files/hdf5-1.8.13.tar.gz - - http://telecom.dei.unipd.it/ns/woss/files/netcdf-c-4.7.3.tar.gz - - http://telecom.dei.unipd.it/ns/woss/files/netcdf-cxx4-4.3.1.tar.gz + the C++4 from https://woss.dei.unipd.it/#libraries HDF5 and NetCDF4 have to be built with support for dynamic libraries. Please refer to NetCDF documentation for comprehensive set of installation instructions. Please note that the option --prefix is strongly suggested. @@ -43,11 +36,10 @@ Requirements - make check - make install (should any test fail, based on test failure severity you could still give the install command) - IF you want to compile NS-Miracle features download the latest version of NS2 allinone and of NS-Miracle - from the official git repository as instructed here: - http://telecom.dei.unipd.it/pages/read/58/ + from the official git repository https://github.com/signetlabdei/nsmiracle: Read documentation provided in the above link for installation instructions. - If you want to use WOSS with world data, download and extract the provided databases. - Download the GEBCO 2020 2D Fifteen seconds zip archive from https://www.bodc.ac.uk/data/open_download/gebco/gebco_2020/zip/ + Download the GEBCO 2020 2D Fifteen seconds zip archive from https://woss.dei.unipd.it/#libraries or any of the previous datasets from https://www.gebco.net/data_and_products/historical_data_sets and put them in the same directory. @@ -58,8 +50,8 @@ How to install WOSS library 2) open a terminal and cd into that directory; 3) run './autogen.sh' 4) run './configure' with the following options: - --with-ns-allinone= (optional) - --with-nsmiracle= (optional) + --with-ns-allinone= (optional) see examples below in order to avoid gcc-13 compilation error. + --with-nsmiracle= (optional) see examples below in order to avoid gcc-13 compilation error. --with-netcdf4= (optional, the same mentioned in the Requirements section, if NetCDF4 was installed with no --prefix, the default path SHOULD be /usr/local) @@ -70,3 +62,13 @@ How to install WOSS library 5) run 'make' 6) run 'make check' in order to run WOSS tests 6) run 'make install' + +Examples + +The following line would install WOSS with pthread, and NetCDF4, but with no NS2/NS-Miracle support (stand-alone library). + +./configure --with-netcdf4= --with-pthread --prefix= + +The next line would install WOSS with NetCDF4, NS2 and NS-Miracle support and it removes the gcc-13 overloaded-virtual warning + +CXXFLAGS="$CXXFLAGS -Wno-overloaded-virtual" ./configure --with-netcdf4= --with-ns-allinone= --with-nsmiracle= --with-pthread --prefix= diff --git a/README b/README index 2e11fb6..6dc8464 100644 --- a/README +++ b/README @@ -14,4 +14,4 @@ your system, and launch the following: doxygen doc-woss.cfg further info and documentation can be found at -http://telecom.dei.unipd.it/ns/woss/ +https://woss.dei.unipd.it diff --git a/configure.ac b/configure.ac index 93aabfa..ff243b8 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ # whose support is gratefully acknowledged. -AC_INIT([WOSS], [1.12.5], [woss@guerra-tlc.com]) +AC_INIT([WOSS], [1.12.6], [woss@guerra-tlc.com]) AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_MSG_NOTICE([WOSS AC_PACKAGE_VERSION]) diff --git a/doxy/Mainpage.dox b/doxy/Mainpage.dox index b2a768f..d0c6c00 100644 --- a/doxy/Mainpage.dox +++ b/doxy/Mainpage.dox @@ -3,7 +3,7 @@ * * @author Federico Guerra - federico@guerra-tlc.com * - * @version 1.12.5 + * @version 1.12.6 * * This document provides a short techical description of the World Ocean Simulation System (WOSS) library * and of its integration into Multi InteRfAce Cross Layer Extension (NS-Miracle).

@@ -1007,17 +1007,17 @@ * * The current WOSS version has the following compatibilities: *

    - *
  • Acoustic Toolbox: June 2020 - *
  • HDF5 library: v1.8.13 - *
  • NetCDF C library: v4.7.3 + *
  • Acoustic Toolbox: May 2023 + *
  • HDF5 library: v1.14.2 + *
  • NetCDF C library: v4.9.2 *
  • NetCDF4 C++ library: v4.3.1 - *
  • GEBCO databases: 1D and 2D, 2008, 2014, 2019, 2020 + *
  • GEBCO databases: 1D and 2D, 2008, 2014, 2019, 2020, 2022, 2023 *
* \section WOSS-req Requirements * *
    - *
  • Download the recommended Acoustic Toolbox Library + *
  • Download the recommended Acoustic Toolbox Library * and follow installation instructions. The directory path that contains * the binaries should be in the $PATH environment. *
  • woss::BellhopArrSyntax::BELLHOP_CREATOR_ARR_FILE_SYNTAX_1 is compliant with Bellhop arr file @@ -1026,42 +1026,46 @@ * syntax of the acoustic toolbox library >= 31 March 2019 version. * This is the new factory value. * @see woss::BellhopCreator::setBellhopArrSyntax or tcl binded value bellhop_arr_syntax. - *
  • In order to use the latest GEBCO 2019 and 2020 15 seconds of arc databases, NetCDF4 + HDF5 support had to be added to the framework. - * If you wish to use NetCDF classes and databases, download the recommended HDF5 library - * NetCDF C library - * and NetCDF C++ library ; \n + *
  • In order to use the latest GEBCO 15 seconds of arc databases, NetCDF4 + HDF5 support had to be added to the framework. + * If you wish to use NetCDF classes and databases, download the recommended HDF5 library + * NetCDF C library + * and NetCDF C++ library ; \n * All libraries have to be built with support for dynamic libraries and with NetCDF4 support. \n * Please refer to NetCDF documentation for comprehensive set of installation instructions of the C and C++ libraries. - * Please note that the --prefix=\ option is strongly suggested, and should be the same for HDF5, NetCDF-C and NetCDF-C++4. \n - * The previous NetCDF legacy installation instrucions are still supported by are obsolete and not recommended. \n + * Please note that the `--prefix=` option is strongly suggested, and should be the same for HDF5, NetCDF-C and NetCDF-C++4. \n + * The previous NetCDF legacy installation instructions are still supported by are obsolete and not recommended. \n * A simple installation script is given here as example: *
      *
    • install the recommended HDF5 library with these exact steps: *
        - *
      • ./configure --enable-shared --prefix=\ - *
      • make - *
      • make check - *
      • should any test fail, based on the test severity you could still try to continue with the installation by issuing make install + *
      • `./configure --enable-shared --prefix=` + *
      • `make` + *
      • `make check` + *
      • should any test fail, based on the test severity you could still try to continue with the installation by issuing `make install` *
      *
    • install the recommended NETCDF4 C library by passing the common installation path in both CPPFLAGS and LDFLAGS: *
        - *
      • ./configure --prefix=\ --enable-netcdf-4 --enable-shared --disable-dap CPPFLAGS="$CPPFLAGS -I/include" LDFLAGS="$LDFLAGS -L/lib - *
      • make - *
      • make check - *
      • should any test fail, based on the test severity you could still try to continue with the installation by issuing make install + *
      • `./configure --prefix= --enable-netcdf-4 --enable-shared ` + * `--disable-dap --disable-byterange CPPFLAGS="$CPPFLAGS -I/include" ` + * `LDFLAGS="$LDFLAGS -L/lib" ` + *
      • `make` + *
      • `make check` + *
      • should any test fail, based on the test severity you could still try to continue with the installation by issuing `make install` *
      *
    • install the recommended NETCDF4 C++ library by passing the common installation path in both CPPFLAGS and LDFLAGS: *
        - *
      • ./configure --prefix=\ --enable-shared CPPFLAGS="$CPPFLAGS -I/include" LDFLAGS="$LDFLAGS -L/lib" - *
      • make - *
      • make check - *
      • make install + *
      • `./configure --prefix= ` + * `--enable-shared CPPFLAGS="$CPPFLAGS -I/include" ` + * `LDFLAGS="$LDFLAGS -L/lib" ` + *
      • `make` + *
      • `make check` + *
      • `make install` *
      *
    - *
  • If you wish to add NS-Miracle support, download the latest version of NS-Miracle from the official git repository as instructed here: \n + *
  • If you wish to add NS-Miracle support, download the latest version of NS-Miracle from the official git repository: \n * Read documentation provided in the above link for installation instructions. - *
  • If you wish to use WOSS with world data, download and extract the provided databases. - * Download the GEBCO 2022 2D Fifteen seconds zip archive + *
  • If you wish to use WOSS with world environmental data, download and extract the latest WOSS databases. + * Download the GEBCO 2023 2D Fifteen seconds zip archive * or any of the previous data sets * and put them in the same directory. *
@@ -1070,37 +1074,37 @@ * *
    *
  1. extract the compressed file in a directory of your choice and cd into that directory; - *
  2. run ./autogen.sh - *
  3. run ./configure with the following options: + *
  4. run `./autogen.sh` + *
  5. run `./configure` with the following options: *
      - *
    • --with-ns-allinone=\<ns2-allinone_path\> optional, needed if you want to compile the library for NS2 and NSMIRACLE. - *
    • --with-nsmiracle=\<ns-miracle_path\> optional, needed if you want to compile the library for NS2 and NSMIRACLE. - *
    • --with-netcdf4=\<NetCDF4_install_path\> optional, needed if you want to use NetCDF4 + HDF5 databases. + *
    • `--with-ns-allinone=` optional, needed if you want to compile the library for NS2 and NSMIRACLE. @see \ref ex_inst to avoid gcc-13 error compilation. + *
    • `--with-nsmiracle=` optional, needed if you want to compile the library for NS2 and NSMIRACLE. @see \ref ex_inst to avoid gcc-13 error compilation. + *
    • `--with-netcdf4=` optional, needed if you want to use NetCDF4 + HDF5 databases. * (The path is the same mentioned in the Requirements section, if NetCDF4 * was installed with no --prefix, the default path SHOULD be * /usr/local) - *
    • --with-pthread optional but recommended - *
    • --prefix=\<path_where_libraries_will_be_installed\> + *
    • `--with-pthread` optional but recommended + *
    • `--prefix=` * \n this path is optional and should be the same one used with NS-Miracle installation. * If used, this path should be added to the environmental variable LD_LIBRARY_PATH. * Please refer to NS-Miracle documentation for more info *
    - *
  6. run make - *
  7. run make check to optionally perform any framework test - *
  8. should any test fail, please enable its debug, rerun the test, collect the debug output file written woss/tests/ directory and send a mail to WOSS@guerra-tlc.com - *
  9. run make install + *
  10. run `make` + *
  11. run `make check` to optionally perform any framework test + *
  12. should any test fail, please enable its debug, rerun the test, collect the debug output file written `woss/tests/` directory and send a mail to WOSS@guerra-tlc.com + *
  13. run `make install` *
* * \section ex_inst Examples * * The following line would install WOSS with pthread, and NetCDF4, but with no NS2/NS-Miracle support (stand-alone library). * - * ./configure --with-netcdf4=\<NetCDF4_install_path\> --with-pthread --prefix=\<path_where_libraries_will_be_installed\> + * `./configure --with-netcdf4= --with-pthread --prefix=` * - * The next line would install WOSS with NetCDF4, NS2 and NS-Miracle support + * The next line would install WOSS with NetCDF4, NS2 and NS-Miracle support and it removes the gcc-13 overloaded-virtual warning * - * ./configure --with-netcdf4=\<NetCDF4_install_path\> --with-ns-allinone=\<ns2-allinone_path\> - * --with-nsmiracle=\<ns-miracle_path\> --with-pthread --prefix=\<path_where_libraries_will_be_installed\> + * `CXXFLAGS="$CXXFLAGS -Wno-overloaded-virtual" ./configure --with-netcdf4= --with-ns-allinone= + * --with-nsmiracle= --with-pthread --prefix=` **/ @@ -1310,6 +1314,12 @@ *
  • v.1.12.5
      *
    • minor fixes to ns-Miracle classes *
    +*
  • v.1.12.6
      +*
    • fixed gcc-13 warnings +*
    • TCL examples updated to GEBCO 2023 +*
    • removed warning in woss::BellhopWoss +*
    • changed URL of main WOSS website +
    * **/ diff --git a/samples/test_aloha_with_dbs.tcl b/samples/test_aloha_with_dbs.tcl index db30e74..94f34f1 100644 --- a/samples/test_aloha_with_dbs.tcl +++ b/samples/test_aloha_with_dbs.tcl @@ -186,7 +186,8 @@ set db_bathy [new "WOSS/Creator/Database/NetCDF/Bathymetry/GEBCO"] #$db_bathy setDbPathName "${opt(db_path_gebco)}/bathymetry/GEBCO_2019.nc" #$db_bathy setDbPathName "${opt(db_path_gebco)}/bathymetry/GEBCO_2020.nc" #$db_bathy setDbPathName "${opt(db_path_gebco)}/bathymetry/GEBCO_2021.nc" -$db_bathy setDbPathName "${opt(db_path_gebco)}/bathymetry/GEBCO_2022.nc" +#$db_bathy setDbPathName "${opt(db_path_gebco)}/bathymetry/GEBCO_2022.nc" +$db_bathy setDbPathName "${opt(db_path_gebco)}/bathymetry/GEBCO_2023.nc" #$db_bathy useOneMinutePrecision diff --git a/woss/bellhop-woss.cpp b/woss/bellhop-woss.cpp index ad194e6..b4752a6 100644 --- a/woss/bellhop-woss.cpp +++ b/woss/bellhop-woss.cpp @@ -456,29 +456,23 @@ void BellhopWoss::checkDepthOffsets(const CoordZ& coordinates, double& min_depth if ( total_depth_offset >= total_depth ) total_depth_offset = total_depth - total_depth/50.0; - bool printout = false; - if ( (coordinates.getDepth() + min_depth_offset) <= min_depth_value ) { min_depth_offset = min_depth_value + min_depth_value/50.0 - coordinates.getDepth(); - printout = true; } if ( (coordinates.getDepth() + max_depth_offset) <= min_depth_value ) { max_depth_offset = (min_depth_value + min_depth_value/50.0 + total_depth_offset) - coordinates.getDepth(); - printout = true; } if ( (coordinates.getDepth() + min_depth_offset) >= max_depth_value ) { min_depth_offset = max_depth_value - max_depth_value/50.0 - total_depth_offset - coordinates.getDepth(); - printout = true; } if ( (coordinates.getDepth() + max_depth_offset) >= max_depth_value ) { max_depth_offset = max_depth_value - max_depth_value/50.0 - coordinates.getDepth(); - printout = true; } - if (printout) ::std::cerr << "BellhopWoss(" << woss_id << ")::checkDepthOffsets() WARNING, latitude = " + if (debug) ::std::cerr << "BellhopWoss(" << woss_id << ")::checkDepthOffsets() WARNING, latitude = " << coordinates.getLatitude() << "; longitude = " << coordinates.getLongitude() << "; depth = " << (coordinates.getDepth()) << "; min depth value = " << min_depth_value << "; max depth value = " << max_depth_value @@ -499,7 +493,6 @@ void BellhopWoss::checkDepthOffsets() { void BellhopWoss::checkRangeOffsets() { - bool printout = false; double total_range_offset = abs( rx_max_range_offset - rx_min_range_offset ); if ( total_range_offset >= 1.1*total_great_circle_distance ) total_range_offset = 1.1*total_great_circle_distance - total_great_circle_distance/50.0; @@ -507,28 +500,24 @@ void BellhopWoss::checkRangeOffsets() { if ( rx_min_range_offset <= -total_great_circle_distance ) { double new_value = -total_great_circle_distance; rx_min_range_offset = new_value - new_value/1000.0; - printout = true; } if ( rx_max_range_offset <= -total_great_circle_distance ) { double new_value = (-total_great_circle_distance + total_range_offset); rx_max_range_offset = new_value - new_value/1000.0; - printout = true; } if ( rx_min_range_offset >= 0.1*total_great_circle_distance ) { double new_value = (1.1*total_great_circle_distance - total_range_offset); rx_min_range_offset = new_value - new_value/1000.0; - printout = true; } if ( rx_max_range_offset >= 0.1*total_great_circle_distance ) { double new_value = 0.1*total_great_circle_distance; rx_max_range_offset = new_value - new_value/1000.0; - printout = true; } - if (printout) ::std::cerr << "BellhopWoss(" << woss_id << ")::checkRangeOffsets() WARNING, tx latitude = " + if (debug) ::std::cerr << "BellhopWoss(" << woss_id << ")::checkRangeOffsets() WARNING, tx latitude = " << tx_coordz.getLatitude() << "; tx longitude = " << tx_coordz.getLongitude() << "; rx latitude = " << rx_coordz.getLatitude() << "; rx longitude = " << rx_coordz.getLongitude() << "; total range offset = " << total_range_offset << "; total great circle distance = " << total_great_circle_distance @@ -540,13 +529,15 @@ void BellhopWoss::checkRangeOffsets() { void BellhopWoss::checkAngles() { if ( total_great_circle_distance == 0.0 && total_distance != 0.0 ) { - - ::std::cerr << "BellhopWoss(" << woss_id << ")::checkAngles() vertical channel: old angles = " << min_angle << "; " << max_angle << ::std::endl; + + if (debug) + ::std::cout << "BellhopWoss(" << woss_id << ")::checkAngles() vertical channel: old angles = " << min_angle << "; " << max_angle << ::std::endl; max_angle = ::std::max( ::std::abs( min_angle ), ::std::abs( max_angle ) ); min_angle = -max_angle; - - ::std::cerr << "BellhopWoss(" << woss_id << ")::checkAngles() vertical channel: new angles = " << min_angle << "; " << max_angle << ::std::endl; + + if (debug) + ::std::cout << "BellhopWoss(" << woss_id << ")::checkAngles() vertical channel: new angles = " << min_angle << "; " << max_angle << ::std::endl; } } diff --git a/woss/woss_def/altimetry-definitions.h b/woss/woss_def/altimetry-definitions.h index 64d3b53..ea3281f 100644 --- a/woss/woss_def/altimetry-definitions.h +++ b/woss/woss_def/altimetry-definitions.h @@ -135,14 +135,7 @@ namespace woss { * @return a heap-created copy of this instance **/ virtual Altimetry* clone() const { return new Altimetry(*this); } - - /** - * Altimetry virtual factory method - * @param array_size size of array - * @return a heap-created array of size array_size - **/ -// virtual Altimetry* createArray( unsigned int array_size ) const { return new Altimetry[array_size]; } - + /** * Creates an instance not valid * @return a new instance not valid ( e.g. range 0.0 = +inf ) @@ -645,7 +638,20 @@ namespace woss { **/ virtual AltimBretschneider* create( const AltimBretschneider& copy ) const { return new AltimBretschneider( copy ); } - + + /** + * AltimBretschneider virtual factory method + * @param copy AltimBretschneider to be copied + * @return a heap-created AltimBretschneider object + **/ + virtual AltimBretschneider* create( const Altimetry& copy ) const { + AltimBretschneider const* dyn_ptr = dynamic_cast(©); + if (dyn_ptr) { + return new AltimBretschneider( *dyn_ptr ); + } + return create(); + } + /** * AltimBretschneider virtual factory method * @param ch_height characteristic wave height [m]