htcp

Properties of water suspended in clouds
git clone git://git.meso-star.fr/htcp.git
Log | Files | Refs | README | LICENSE

commit e676a6fb2ace575c9b3c13ee26cea692a8bbb964
parent d14c236670e0bea2f34bde13094c220b534ef749
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  2 Jul 2021 16:01:01 +0200

Merge branch 'release_0.0.3'

Diffstat:
MREADME.md | 20+++++++++++++-------
Mcmake/CMakeLists.txt | 4++--
Mcmake/doc/CMakeLists.txt | 2+-
Mcmake/htcp/CMakeLists.txt | 6+++---
Mcmake/les2htcp/CMakeLists.txt | 4++--
Mdoc/les2htcp.1.txt | 2+-
Msrc/htcp.c | 5+++--
Msrc/htcp.h | 2+-
Msrc/les2htcp.c | 4++--
Msrc/test_htcp.c | 2+-
Msrc/test_htcp_load.c | 2+-
Msrc/test_htcp_load_from_file.c | 2+-
Msrc/test_htcp_utils.h | 2+-
13 files changed, 32 insertions(+), 25 deletions(-)

diff --git a/README.md b/README.md @@ -17,6 +17,9 @@ They rely on the [CMake](http://www.cmake.org) and the on the [RSys](https://gitlab.com/vaplv/rsys/) library. Furthermore, the `les2htcp` tool depends on the [NetCDF](https://www.unidata.ucar.edu/software/netcdf/) C library. +Both eventually depend on the [AsciiDoc](https://asciidoc.org/) suite of +tools; if available, the man pages for the reference documentation will be +generated. To build them, first ensure that CMake is installed on your system. Then install the RCMake package as well as the aforementioned prerequisites. Finally @@ -26,11 +29,14 @@ resulting project can be edited, built, tested and installed as any CMake project. Refer to the [CMake](https://cmake.org/documentation) for further informations on CMake. -## Licenses +## Copyright notice -The `les2htcp` tool and the `htcp` library are free software copyright (C) 2018 -Centre National de la Recherche Scientifique CNRS, -[|Meso|Star](http://www.meso-star.com) <contact@meso-star.com>, Université Paul -Sabatier <contact-edstar@laplace.univ-tlse.fr>. They are released under the GPL -v3+ license: GNU GPL version 3 or later. You are welcome to redistribute them -under certain conditions; refer to the COPYING file for details. +Copyright (C) 2018, 2020, 2021 |Meso|Star> (<contact@meso-star.com>). +Copyright (C) 2018 Centre National de la Recherche Scientifique (CNRS). +Copyright (C) 2018 Université Paul Sabatier (<contact-edstar@laplace.univ-tlse.fr>) + +## License + +`htcp` and `les2htcp` are free software released under the GPL v3+ license: GNU +GPL version 3 or later. You are welcome to redistribute it under certain +conditions; refer to the COPYING file for details. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) # Copyright (C) 2018 CNRS, Université Paul Sabatier # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.1) project(htcp) enable_testing() diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) # Copyright (C) 2018 CNRS, Université Paul Sabatier # # This program is free software: you can redistribute it and/or modify diff --git a/cmake/htcp/CMakeLists.txt b/cmake/htcp/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) # Copyright (C) 2018 CNRS, Université Paul Sabatier # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.1) project(htcp-library C) ################################################################################ @@ -22,7 +22,7 @@ project(htcp-library C) ################################################################################ set(VERSION_MAJOR 0) set(VERSION_MINOR 0) -set(VERSION_PATCH 2) +set(VERSION_PATCH 3) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set(HTCP_FILES_SRC htcp.c) diff --git a/cmake/les2htcp/CMakeLists.txt b/cmake/les2htcp/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) # Copyright (C) 2018 CNRS, Université Paul Sabatier # # This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.1) project(les2htcp C) # Required by netcdf.h header that some versions contains C99 comments diff --git a/doc/les2htcp.1.txt b/doc/les2htcp.1.txt @@ -50,7 +50,7 @@ file [1]. Expected variables in the submitted NetCDF file are: * _RVT_: water vapor mixing ratio in each grid cell; in kg of water per kg of dry air. -* _RCT_: liquid vapor (in suspension) mixing ratio in each grid cell; in kg of +* _RCT_: liquid water (in suspension) mixing ratio in each grid cell; in kg of water per kg of dry air. * _PABST_: pressure in each grid cell in Pascal. diff --git a/src/htcp.c b/src/htcp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify @@ -89,6 +89,7 @@ log_err(const struct htcp* htcp, const char* msg, ...) static void reset_htcp(struct htcp* htcp) { + ASSERT(htcp); htcp->pagesize = 0; htcp->irregular_z = 0; htcp->definition[0] = 0; @@ -125,7 +126,7 @@ load_stream(struct htcp* htcp, FILE* stream, const char* stream_name) #define READ(Var, N, Name) { \ if(fread((Var), sizeof(*(Var)), (N), stream) != (N)) { \ - fprintf(stderr, "%s: could not read the %s\n", stream_name, Name); \ + log_err(htcp, "%s: could not read the %s\n", stream_name, Name); \ res = RES_IO_ERR; \ goto error; \ } \ diff --git a/src/htcp.h b/src/htcp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify diff --git a/src/les2htcp.c b/src/les2htcp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify @@ -81,7 +81,7 @@ print_help(const char* cmd) " -v display version information and exit.\n"); printf("\n"); printf( -"Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com).\n" +"Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com).\n" "Copyright (C) 2018 CNRS, Université Paul Sabatier. les2htcp is free software\n" "released under the GNU GPL license, version 3 or later. You are free to\n" "change or redistribute it under certain conditions\n" diff --git a/src/test_htcp.c b/src/test_htcp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify diff --git a/src/test_htcp_load.c b/src/test_htcp_load.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify diff --git a/src/test_htcp_load_from_file.c b/src/test_htcp_load_from_file.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify diff --git a/src/test_htcp_utils.h b/src/test_htcp_utils.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018, 2020 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018, 2020, 2021 |Meso|Star> (contact@meso-star.com) * Copyright (C) CNRS, Université Paul Sabatier * * This program is free software: you can redistribute it and/or modify