diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 80a53e1..74dea2f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -12,12 +12,12 @@ repos: - id: check-yaml exclude: conda/meta.yaml - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v14.0.6 + rev: v18.1.6 hooks: - id: clang-format args: ["--style", "Mozilla"] - repo: https://github.com/codespell-project/codespell - rev: "v2.1.0" + rev: "v2.3.0" hooks: - id: codespell - repo: https://github.com/cheshirekow/cmake-format-precommit @@ -39,12 +39,12 @@ repos: - id: isort name: isort (python) - repo: https://github.com/asottile/pyupgrade - rev: "v2.37.3" + rev: "v3.15.2" hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/pycqa/flake8 - rev: 5.0.4 + rev: 7.0.0 hooks: - id: flake8 exclude: tests diff --git a/data/fes2022/eastward_velocity.ini b/data/fes2022/eastward_velocity.ini index 689d2f0..c164ada 100644 --- a/data/fes2022/eastward_velocity.ini +++ b/data/fes2022/eastward_velocity.ini @@ -200,4 +200,4 @@ TIDE_T2_FILE = ./eastward_velocity/t2_fes2022.nc TIDE_T2_LATITUDE = lat TIDE_T2_LONGITUDE = lon TIDE_T2_AMPLITUDE = Ua -TIDE_T2_PHASE = Ug \ No newline at end of file +TIDE_T2_PHASE = Ug diff --git a/data/fes2022/fes2022.ini b/data/fes2022/fes2022.ini index c07ffc8..bca5e71 100644 --- a/data/fes2022/fes2022.ini +++ b/data/fes2022/fes2022.ini @@ -406,4 +406,4 @@ TIDE_T2_FILE = ./ocean_tide_extrapolated/t2_fes2022.nc TIDE_T2_LATITUDE = lat TIDE_T2_LONGITUDE = lon TIDE_T2_AMPLITUDE = amplitude -TIDE_T2_PHASE = phase \ No newline at end of file +TIDE_T2_PHASE = phase diff --git a/data/fes2022/load_tide.ini b/data/fes2022/load_tide.ini index 3c9ed8f..57dec9c 100644 --- a/data/fes2022/load_tide.ini +++ b/data/fes2022/load_tide.ini @@ -200,4 +200,4 @@ RADIAL_T2_FILE = ./load_tide/t2_fes2022.nc RADIAL_T2_LATITUDE = lat RADIAL_T2_LONGITUDE = lon RADIAL_T2_AMPLITUDE = amplitude -RADIAL_T2_PHASE = phase \ No newline at end of file +RADIAL_T2_PHASE = phase diff --git a/data/fes2022/northward_velocity.ini b/data/fes2022/northward_velocity.ini index 9deb118..8fa389b 100644 --- a/data/fes2022/northward_velocity.ini +++ b/data/fes2022/northward_velocity.ini @@ -200,4 +200,4 @@ TIDE_T2_FILE = ./northward_velocity/t2_fes2022.nc TIDE_T2_LATITUDE = lat TIDE_T2_LONGITUDE = lon TIDE_T2_AMPLITUDE = Va -TIDE_T2_PHASE = Vg \ No newline at end of file +TIDE_T2_PHASE = Vg diff --git a/data/fes2022/ocean_tide.ini b/data/fes2022/ocean_tide.ini index 8bf593f..07c9384 100644 --- a/data/fes2022/ocean_tide.ini +++ b/data/fes2022/ocean_tide.ini @@ -200,4 +200,4 @@ TIDE_T2_FILE = ./ocean_tide/t2_fes2022.nc TIDE_T2_LATITUDE = lat TIDE_T2_LONGITUDE = lon TIDE_T2_AMPLITUDE = amplitude -TIDE_T2_PHASE = phase \ No newline at end of file +TIDE_T2_PHASE = phase diff --git a/data/fes2022/ocean_tide_extrapolated.ini b/data/fes2022/ocean_tide_extrapolated.ini index 7a57fd5..b5b92f8 100644 --- a/data/fes2022/ocean_tide_extrapolated.ini +++ b/data/fes2022/ocean_tide_extrapolated.ini @@ -200,4 +200,4 @@ TIDE_T2_FILE = ./ocean_tide_extrapolated/t2_fes2022.nc TIDE_T2_LATITUDE = lat TIDE_T2_LONGITUDE = lon TIDE_T2_AMPLITUDE = amplitude -TIDE_T2_PHASE = phase \ No newline at end of file +TIDE_T2_PHASE = phase diff --git a/examples/fes_slev_2022.txt b/examples/fes_slev_2022.txt index bef56b3..35f30b7 100644 --- a/examples/fes_slev_2022.txt +++ b/examples/fes_slev_2022.txt @@ -1,26 +1,26 @@ -JulDay Hour Latitude Longitude Short_tid LP_tid Pure_Tide Geo_Tide Rad_Tide -12053.00000 0 59.195 -7.688 -92.616 1.036 -91.580 -88.801 2.779 -12053.04167 1 59.195 -7.688 -130.907 1.009 -129.898 -126.507 3.391 -12053.08333 2 59.195 -7.688 -135.702 0.982 -134.720 -131.627 3.094 -12053.12500 3 59.195 -7.688 -105.707 0.954 -104.752 -102.796 1.957 -12053.16667 4 59.195 -7.688 -47.604 0.926 -46.678 -46.426 0.252 -12053.20833 5 59.195 -7.688 25.111 0.896 26.007 24.409 -1.598 -12053.25000 6 59.195 -7.688 94.452 0.867 95.319 92.204 -3.115 -12053.29167 7 59.195 -7.688 142.568 0.837 143.404 139.511 -3.893 -12053.33333 8 59.195 -7.688 156.890 0.806 157.696 153.978 -3.717 -12053.37500 9 59.195 -7.688 133.676 0.775 134.451 131.825 -2.626 -12053.41667 10 59.195 -7.688 78.861 0.743 79.604 78.714 -0.890 -12053.45833 11 59.195 -7.688 5.998 0.711 6.709 7.779 1.070 -12053.50000 12 59.195 -7.688 -67.253 0.678 -66.575 -63.787 2.788 -12053.54167 13 59.195 -7.688 -123.175 0.645 -122.530 -118.673 3.857 -12053.58333 14 59.195 -7.688 -148.689 0.612 -148.078 -144.050 4.027 -12053.62500 15 59.195 -7.688 -138.719 0.578 -138.141 -134.870 3.271 -12053.66667 16 59.195 -7.688 -96.456 0.544 -95.912 -94.131 1.781 -12053.70833 17 59.195 -7.688 -32.314 0.509 -31.805 -31.884 -0.078 -12053.75000 18 59.195 -7.688 37.593 0.474 38.067 36.226 -1.841 -12053.79167 19 59.195 -7.688 95.094 0.439 95.533 92.477 -3.056 -12053.83333 20 59.195 -7.688 125.167 0.404 125.570 122.152 -3.418 -12053.87500 21 59.195 -7.688 120.289 0.368 120.657 117.802 -2.855 -12053.91667 22 59.195 -7.688 82.459 0.332 82.791 81.251 -1.540 -12053.95833 23 59.195 -7.688 22.204 0.296 22.500 22.665 0.165 -12054.00000 24 59.195 -7.688 -44.586 0.260 -44.326 -42.508 1.818 +JulDay Hour Latitude Longitude Short_tid LP_tid Pure_Tide Geo_Tide Rad_Tide +12053.00000 0 59.195 -7.688 -92.616 1.036 -91.580 -88.801 2.779 +12053.04167 1 59.195 -7.688 -130.907 1.009 -129.898 -126.507 3.391 +12053.08333 2 59.195 -7.688 -135.702 0.982 -134.720 -131.627 3.094 +12053.12500 3 59.195 -7.688 -105.707 0.954 -104.752 -102.796 1.957 +12053.16667 4 59.195 -7.688 -47.604 0.926 -46.678 -46.426 0.252 +12053.20833 5 59.195 -7.688 25.111 0.896 26.007 24.409 -1.598 +12053.25000 6 59.195 -7.688 94.452 0.867 95.319 92.204 -3.115 +12053.29167 7 59.195 -7.688 142.568 0.837 143.404 139.511 -3.893 +12053.33333 8 59.195 -7.688 156.890 0.806 157.696 153.978 -3.717 +12053.37500 9 59.195 -7.688 133.676 0.775 134.451 131.825 -2.626 +12053.41667 10 59.195 -7.688 78.861 0.743 79.604 78.714 -0.890 +12053.45833 11 59.195 -7.688 5.998 0.711 6.709 7.779 1.070 +12053.50000 12 59.195 -7.688 -67.253 0.678 -66.575 -63.787 2.788 +12053.54167 13 59.195 -7.688 -123.175 0.645 -122.530 -118.673 3.857 +12053.58333 14 59.195 -7.688 -148.689 0.612 -148.078 -144.050 4.027 +12053.62500 15 59.195 -7.688 -138.719 0.578 -138.141 -134.870 3.271 +12053.66667 16 59.195 -7.688 -96.456 0.544 -95.912 -94.131 1.781 +12053.70833 17 59.195 -7.688 -32.314 0.509 -31.805 -31.884 -0.078 +12053.75000 18 59.195 -7.688 37.593 0.474 38.067 36.226 -1.841 +12053.79167 19 59.195 -7.688 95.094 0.439 95.533 92.477 -3.056 +12053.83333 20 59.195 -7.688 125.167 0.404 125.570 122.152 -3.418 +12053.87500 21 59.195 -7.688 120.289 0.368 120.657 117.802 -2.855 +12053.91667 22 59.195 -7.688 82.459 0.332 82.791 81.251 -1.540 +12053.95833 23 59.195 -7.688 22.204 0.296 22.500 22.665 0.165 +12054.00000 24 59.195 -7.688 -44.586 0.260 -44.326 -42.508 1.818 diff --git a/src/compat.h b/src/compat.h index 119d447..a0eaa12 100644 --- a/src/compat.h +++ b/src/compat.h @@ -80,7 +80,7 @@ dirname(const char* path); */ #define STRNCPY(dst, src, size) \ strncpy((dst), (src), (size)); \ - (dst)[(size)-1] = '\0' + (dst)[(size) - 1] = '\0' /** * Duplicates string diff --git a/src/prediction.c b/src/prediction.c index afedcc9..6ec8771 100644 --- a/src/prediction.c +++ b/src/prediction.c @@ -885,7 +885,7 @@ lpe_minus_n_waves(const float w2nd[][N_COEFS], tmp = sin(lat * RAD); - /* FES14C: mass conservation for LP equil */ + /* FES14C: mass conservation for LP equilibrium */ /* subtraction of the mean of c20 and c30 on ocean, for mass conservation */ /* mean_c20 = -0.014432247 */ /* mean_c30 = 0.012469818 */ @@ -1637,8 +1637,8 @@ set_waves(fes_wave* const w) "MSF", 0, 0, 2, -2, 0, 0, 0, 0, 2, -2, 0, 0, SP_TIDE, _f_m2, &w[MSF]); /* FES14C: add new LP waves hereafter */ - /* these are LP equil waves, but an atlas (equilibrium or not) can be given as - * input */ + /* these are LP equilibrium waves, but an atlas (equilibrium or not) can be + * given as input */ /* * MSf_LP = 2nd order LP equi in atlas FES2014c * WARNING: Same frequency as MSf Non Linear wave : 2s -2h