From dbb54dcf40216bebd0ec95fc9bf8ccfc09dd1f96 Mon Sep 17 00:00:00 2001 From: Hang-Lei-NOAA <44901908+Hang-Lei-NOAA@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:03:38 -0500 Subject: [PATCH 01/12] Create LICENSE.md --- LICENSE.md | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..0927556b --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,157 @@ +### GNU LESSER GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the +terms and conditions of version 3 of the GNU General Public License, +supplemented by the additional permissions listed below. + +#### 0. Additional Definitions. + +As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the +GNU General Public License. + +"The Library" refers to a covered work governed by this License, other +than an Application or a Combined Work as defined below. + +An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + +The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + +#### 1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + +#### 2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + +- a) under this License, provided that you make a good faith effort + to ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or +- b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + +#### 3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a +header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + +- a) Give prominent notice with each copy of the object code that + the Library is used in it and that the Library and its use are + covered by this License. +- b) Accompany the object code with a copy of the GNU GPL and this + license document. + +#### 4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken +together, effectively do not restrict modification of the portions of +the Library contained in the Combined Work and reverse engineering for +debugging such modifications, if you also do each of the following: + +- a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. +- b) Accompany the Combined Work with a copy of the GNU GPL and this + license document. +- c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. +- d) Do one of the following: + - 0) Convey the Minimal Corresponding Source under the terms of + this License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + - 1) Use a suitable shared library mechanism for linking with + the Library. A suitable mechanism is one that (a) uses at run + time a copy of the Library already present on the user's + computer system, and (b) will operate properly with a modified + version of the Library that is interface-compatible with the + Linked Version. +- e) Provide Installation Information, but only if you would + otherwise be required to provide such information under section 6 + of the GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the Application + with a modified version of the Linked Version. (If you use option + 4d0, the Installation Information must accompany the Minimal + Corresponding Source and Corresponding Application Code. If you + use option 4d1, you must provide the Installation Information in + the manner specified by section 6 of the GNU GPL for conveying + Corresponding Source.) + +#### 5. Combined Libraries. + +You may place library facilities that are a work based on the Library +side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + +- a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities, conveyed under the terms of this License. +- b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + +#### 6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +as you received it specifies that a certain numbered version of the +GNU Lesser General Public License "or any later version" applies to +it, you have the option of following the terms and conditions either +of that published version or of any later version published by the +Free Software Foundation. If the Library as you received it does not +specify a version number of the GNU Lesser General Public License, you +may choose any version of the GNU Lesser General Public License ever +published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. From c78eda45e57209249ab895828fe254a690bb62dd Mon Sep 17 00:00:00 2001 From: Hang-Lei-NOAA <44901908+Hang-Lei-NOAA@users.noreply.github.com> Date: Tue, 3 Mar 2020 19:49:46 -0500 Subject: [PATCH 02/12] Update LICENSE.md --- LICENSE.md | 158 ++--------------------------------------------------- 1 file changed, 5 insertions(+), 153 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 0927556b..ad970582 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,157 +1,9 @@ -### GNU LESSER GENERAL PUBLIC LICENSE +Copyright 2020 National Oceanic and Atmospheric Administration (by assignment from I. M. Systems Group) -Version 3, 29 June 2007 +The [NCEPLIBS-ip] code incorporated in the Unified Forecast System (UFS) was jointly developed by the National Oceanic and Atmospheric Administration and the I. M. Systems Group. The gold standard copy of the Code will be maintained by NOAA at [https://github.com/NOAA-EMC/NCEPLIBS-ip]. -Copyright (C) 2007 Free Software Foundation, Inc. - +The National Oceanic and Atmospheric Administration is releasing this code under the GNU Lesser General Public License v3.0 (the "License"); you may not use this code except in compliance with the License. -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. +You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html -This version of the GNU Lesser General Public License incorporates the -terms and conditions of version 3 of the GNU General Public License, -supplemented by the additional permissions listed below. - -#### 0. Additional Definitions. - -As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the -GNU General Public License. - -"The Library" refers to a covered work governed by this License, other -than an Application or a Combined Work as defined below. - -An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - -A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - -The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - -The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - -#### 1. Exception to Section 3 of the GNU GPL. - -You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - -#### 2. Conveying Modified Versions. - -If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - -- a) under this License, provided that you make a good faith effort - to ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or -- b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - -#### 3. Object Code Incorporating Material from Library Header Files. - -The object code form of an Application may incorporate material from a -header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - -- a) Give prominent notice with each copy of the object code that - the Library is used in it and that the Library and its use are - covered by this License. -- b) Accompany the object code with a copy of the GNU GPL and this - license document. - -#### 4. Combined Works. - -You may convey a Combined Work under terms of your choice that, taken -together, effectively do not restrict modification of the portions of -the Library contained in the Combined Work and reverse engineering for -debugging such modifications, if you also do each of the following: - -- a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. -- b) Accompany the Combined Work with a copy of the GNU GPL and this - license document. -- c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. -- d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of - this License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with - the Library. A suitable mechanism is one that (a) uses at run - time a copy of the Library already present on the user's - computer system, and (b) will operate properly with a modified - version of the Library that is interface-compatible with the - Linked Version. -- e) Provide Installation Information, but only if you would - otherwise be required to provide such information under section 6 - of the GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the Application - with a modified version of the Linked Version. (If you use option - 4d0, the Installation Information must accompany the Minimal - Corresponding Source and Corresponding Application Code. If you - use option 4d1, you must provide the Installation Information in - the manner specified by section 6 of the GNU GPL for conveying - Corresponding Source.) - -#### 5. Combined Libraries. - -You may place library facilities that are a work based on the Library -side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - -- a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities, conveyed under the terms of this License. -- b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - -#### 6. Revised Versions of the GNU Lesser General Public License. - -The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -as you received it specifies that a certain numbered version of the -GNU Lesser General Public License "or any later version" applies to -it, you have the option of following the terms and conditions either -of that published version or of any later version published by the -Free Software Foundation. If the Library as you received it does not -specify a version number of the GNU Lesser General Public License, you -may choose any version of the GNU Lesser General Public License ever -published by the Free Software Foundation. - -If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License From 4149ffa2985546b702cf786e99f11db7ed51074d Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Tue, 16 Jun 2020 10:03:00 -0400 Subject: [PATCH 03/12] Test, CMake, CI (#10) * Merge release/public-v1 into develop * CMake, tests, and CI --- .github/workflows/main.yml | 69 ++++ .gitignore | 8 + CMakeLists.txt | 95 ++---- README.md | 39 +++ VERSION | 1 + cmake/PackageConfig.cmake.in | 17 + src/CMakeLists.txt | 78 +++++ src/list_of_files.cmake | 33 ++ tests/CMakeLists.txt | 10 + tests/README | 204 ++++++++++++ .../scalar/4_byte_bin/grid127.opt2.bin_4 | Bin .../scalar/4_byte_bin/grid203.opt3.bin_4 | Bin .../scalar/4_byte_bin/grid205.opt4.bin_4 | Bin .../scalar/4_byte_bin/grid212.opt6.bin_4 | Bin .../scalar/4_byte_bin/grid218.opt0.bin_4 | Bin .../scalar/4_byte_bin/grid3.opt0.bin_4 | Bin .../scalar/4_byte_bin/grid8.opt1.bin_4 | Bin .../scalar/8_byte_bin/grid127.opt2.bin_8 | Bin .../scalar/8_byte_bin/grid203.opt3.bin_8 | Bin .../scalar/8_byte_bin/grid205.opt4.bin_8 | Bin .../scalar/8_byte_bin/grid212.opt6.bin_8 | Bin .../scalar/8_byte_bin/grid218.opt0.bin_8 | Bin .../scalar/8_byte_bin/grid3.opt0.bin_8 | Bin .../scalar/8_byte_bin/grid8.opt1.bin_8 | Bin .../baseline_data/scalar/grads/grid003.ctl | 0 .../baseline_data/scalar/grads/grid008.ctl | 0 .../baseline_data/scalar/grads/grid127.ctl | 0 .../baseline_data/scalar/grads/grid203.ctl | 0 .../baseline_data/scalar/grads/grid205.ctl | 0 .../baseline_data/scalar/grads/grid212.ctl | 0 .../baseline_data/scalar/grads/grid218.ctl | 0 .../vector/4_byte_bin/grid127.opt2.bin_4 | Bin .../vector/4_byte_bin/grid203.opt3.bin_4 | Bin .../vector/4_byte_bin/grid205.opt4.bin_4 | Bin .../vector/4_byte_bin/grid212.opt6.bin_4 | Bin .../vector/4_byte_bin/grid218.opt0.bin_4 | Bin .../vector/4_byte_bin/grid3.opt0.bin_4 | Bin .../vector/4_byte_bin/grid8.opt1.bin_4 | Bin .../vector/8_byte_bin/grid127.opt2.bin_8 | Bin .../vector/8_byte_bin/grid203.opt3.bin_8 | Bin .../vector/8_byte_bin/grid205.opt4.bin_8 | Bin .../vector/8_byte_bin/grid212.opt6.bin_8 | Bin .../vector/8_byte_bin/grid218.opt0.bin_8 | Bin .../vector/8_byte_bin/grid3.opt0.bin_8 | Bin .../vector/8_byte_bin/grid8.opt1.bin_8 | Bin .../baseline_data/vector/grads/grid003.ctl | 0 .../baseline_data/vector/grads/grid008.ctl | 0 .../baseline_data/vector/grads/grid127.ctl | 0 .../baseline_data/vector/grads/grid203.ctl | 0 .../baseline_data/vector/grads/grid205.ctl | 0 .../baseline_data/vector/grads/grid212.ctl | 0 .../baseline_data/vector/grads/grid218.ctl | 0 .../data}/input_data/scalar/global_snoalb.bin | Bin .../input_data/vector/global_uv_wind.bin | Bin tests/test_mod.pf | 307 ++++++++++++++++++ {unit_test => tests/unit_test}/README | 0 .../unit_test}/scripts/run_theia.ksh | 0 .../unit_test}/scripts/run_unit_test.ksh | 0 .../unit_test}/scripts/run_wcoss-cray.ksh | 0 .../unit_test}/scripts/run_wcoss-cray.lsf | 0 .../unit_test}/scripts/run_wcoss-dell.sh | 0 .../unit_test}/scripts/run_wcoss.ksh | 0 .../unit_test}/scripts/run_wcoss.lsf | 0 .../unit_test}/sorc/.gitignore | 0 .../unit_test}/sorc/Makefile.in | 0 {unit_test => tests/unit_test}/sorc/configure | 0 .../unit_test}/sorc/configure.ac | 0 .../unit_test}/sorc/make_unit_test.ksh | 0 .../sorc/make_unit_test_wcoss-cray.ksh | 0 .../unit_test}/sorc/scalar/Makefile.in | 0 .../unit_test}/sorc/scalar/driver.f90 | 0 .../unit_test}/sorc/scalar/get_input_data.f90 | 0 .../unit_test}/sorc/scalar/interp.f90 | 0 .../unit_test}/sorc/scalar/make.dependencies | 0 .../unit_test}/sorc/scalar/make.filelist | 0 .../unit_test}/sorc/scalar/make.rules | 0 .../unit_test}/sorc/vector/Makefile.in | 0 .../unit_test}/sorc/vector/driver.f90 | 0 .../unit_test}/sorc/vector/get_input_data.f90 | 0 .../unit_test}/sorc/vector/interp.f90 | 0 .../unit_test}/sorc/vector/make.dependencies | 0 .../unit_test}/sorc/vector/make.filelist | 0 .../unit_test}/sorc/vector/make.rules | 0 .../unit_test_for_c}/README | 0 .../unit_test_for_c}/scripts/run_theia.ksh | 0 .../scripts/run_unit_test.ksh | 0 .../scripts/run_wcoss-cray.ksh | 0 .../scripts/run_wcoss-cray.lsf | 0 .../scripts/run_wcoss-dell.sh | 0 .../unit_test_for_c}/scripts/run_wcoss.ksh | 0 .../unit_test_for_c}/scripts/run_wcoss.lsf | 0 .../unit_test_for_c}/sorc/make_unit_test.ksh | 0 .../unit_test_for_c}/sorc/test_gdswzd_4.c | 0 .../unit_test_for_c}/sorc/test_gdswzd_8.c | 0 .../unit_test_for_c}/sorc/test_gdswzd_d.c | 0 unit_test/lib/incmod_4 | 1 - unit_test/lib/incmod_8 | 1 - unit_test/lib/incmod_d | 1 - unit_test/lib/libip_4.a | 1 - unit_test/lib/libip_8.a | 1 - unit_test/lib/libip_d.a | 1 - unit_test_for_c/lib/incmod_4 | 1 - unit_test_for_c/lib/incmod_8 | 1 - unit_test_for_c/lib/incmod_d | 1 - unit_test_for_c/lib/libip_4.a | 1 - unit_test_for_c/lib/libip_8.a | 1 - unit_test_for_c/lib/libip_d.a | 1 - 107 files changed, 792 insertions(+), 81 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 VERSION create mode 100644 cmake/PackageConfig.cmake.in create mode 100644 src/CMakeLists.txt create mode 100644 src/list_of_files.cmake create mode 100644 tests/CMakeLists.txt create mode 100644 tests/README rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid127.opt2.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid203.opt3.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid205.opt4.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid212.opt6.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid218.opt0.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid3.opt0.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/4_byte_bin/grid8.opt1.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid127.opt2.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid203.opt3.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid205.opt4.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid212.opt6.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid218.opt0.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid3.opt0.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/8_byte_bin/grid8.opt1.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid003.ctl (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid008.ctl (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid127.ctl (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid203.ctl (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid205.ctl (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid212.ctl (100%) rename {unit_test => tests/data}/baseline_data/scalar/grads/grid218.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid127.opt2.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid203.opt3.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid205.opt4.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid212.opt6.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid218.opt0.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid3.opt0.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/4_byte_bin/grid8.opt1.bin_4 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid127.opt2.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid203.opt3.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid205.opt4.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid212.opt6.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid218.opt0.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid3.opt0.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/8_byte_bin/grid8.opt1.bin_8 (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid003.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid008.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid127.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid203.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid205.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid212.ctl (100%) rename {unit_test => tests/data}/baseline_data/vector/grads/grid218.ctl (100%) rename {unit_test => tests/data}/input_data/scalar/global_snoalb.bin (100%) rename {unit_test => tests/data}/input_data/vector/global_uv_wind.bin (100%) create mode 100644 tests/test_mod.pf rename {unit_test => tests/unit_test}/README (100%) rename {unit_test => tests/unit_test}/scripts/run_theia.ksh (100%) rename {unit_test => tests/unit_test}/scripts/run_unit_test.ksh (100%) rename {unit_test => tests/unit_test}/scripts/run_wcoss-cray.ksh (100%) rename {unit_test => tests/unit_test}/scripts/run_wcoss-cray.lsf (100%) rename {unit_test => tests/unit_test}/scripts/run_wcoss-dell.sh (100%) rename {unit_test => tests/unit_test}/scripts/run_wcoss.ksh (100%) rename {unit_test => tests/unit_test}/scripts/run_wcoss.lsf (100%) rename {unit_test => tests/unit_test}/sorc/.gitignore (100%) rename {unit_test => tests/unit_test}/sorc/Makefile.in (100%) rename {unit_test => tests/unit_test}/sorc/configure (100%) rename {unit_test => tests/unit_test}/sorc/configure.ac (100%) rename {unit_test => tests/unit_test}/sorc/make_unit_test.ksh (100%) rename {unit_test => tests/unit_test}/sorc/make_unit_test_wcoss-cray.ksh (100%) rename {unit_test => tests/unit_test}/sorc/scalar/Makefile.in (100%) rename {unit_test => tests/unit_test}/sorc/scalar/driver.f90 (100%) rename {unit_test => tests/unit_test}/sorc/scalar/get_input_data.f90 (100%) rename {unit_test => tests/unit_test}/sorc/scalar/interp.f90 (100%) rename {unit_test => tests/unit_test}/sorc/scalar/make.dependencies (100%) rename {unit_test => tests/unit_test}/sorc/scalar/make.filelist (100%) rename {unit_test => tests/unit_test}/sorc/scalar/make.rules (100%) rename {unit_test => tests/unit_test}/sorc/vector/Makefile.in (100%) rename {unit_test => tests/unit_test}/sorc/vector/driver.f90 (100%) rename {unit_test => tests/unit_test}/sorc/vector/get_input_data.f90 (100%) rename {unit_test => tests/unit_test}/sorc/vector/interp.f90 (100%) rename {unit_test => tests/unit_test}/sorc/vector/make.dependencies (100%) rename {unit_test => tests/unit_test}/sorc/vector/make.filelist (100%) rename {unit_test => tests/unit_test}/sorc/vector/make.rules (100%) rename {unit_test_for_c => tests/unit_test_for_c}/README (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_theia.ksh (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_unit_test.ksh (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_wcoss-cray.ksh (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_wcoss-cray.lsf (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_wcoss-dell.sh (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_wcoss.ksh (100%) rename {unit_test_for_c => tests/unit_test_for_c}/scripts/run_wcoss.lsf (100%) rename {unit_test_for_c => tests/unit_test_for_c}/sorc/make_unit_test.ksh (100%) rename {unit_test_for_c => tests/unit_test_for_c}/sorc/test_gdswzd_4.c (100%) rename {unit_test_for_c => tests/unit_test_for_c}/sorc/test_gdswzd_8.c (100%) rename {unit_test_for_c => tests/unit_test_for_c}/sorc/test_gdswzd_d.c (100%) delete mode 120000 unit_test/lib/incmod_4 delete mode 120000 unit_test/lib/incmod_8 delete mode 120000 unit_test/lib/incmod_d delete mode 120000 unit_test/lib/libip_4.a delete mode 120000 unit_test/lib/libip_8.a delete mode 120000 unit_test/lib/libip_d.a delete mode 120000 unit_test_for_c/lib/incmod_4 delete mode 120000 unit_test_for_c/lib/incmod_8 delete mode 120000 unit_test_for_c/lib/incmod_d delete mode 120000 unit_test_for_c/lib/libip_4.a delete mode 120000 unit_test_for_c/lib/libip_8.a delete mode 120000 unit_test_for_c/lib/libip_d.a diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d4ba9648 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,69 @@ +name: Build and Test +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-20.04 + env: + FC: gfortran-9 + CC: gcc-9 + + steps: + + - name: checkout-pfunit + uses: actions/checkout@v2 + with: + repository: Goddard-Fortran-Ecosystem/pFUnit + path: pfunit + + - name: cache-pfunit + id: cache-pfunit + uses: actions/cache@v2 + with: + path: ~/pfunit + key: pfunit-${{ runner.os }}-${{ hashFiles('pfunit/VERSION') }} + + - name: build-pfunit + if: steps.cache-pfunit.outputs.cache-hit != 'true' + run: | + cd pfunit + mkdir build + cd build + cmake .. -DSKIP_MPI=YES -DSKIP_ESMF=YES -DSKIP_FHAMCREST=YES -DCMAKE_INSTALL_PREFIX=~/pfunit + make -j2 + make install + + - name: checkout-sp + uses: actions/checkout@v2 + with: + repository: NOAA-EMC/NCEPLIBS-sp + path: sp + ref: develop + + - name: build-sp + run: | + cd sp + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=~/sp + make -j2 + make install + + - name: checkout + uses: actions/checkout@v2 + with: + path: ip + submodules: true + + - name: build + run: | + cd ip + mkdir build + cd build + cmake .. -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="~/pfunit;~/" + make -j2 + + - name: test + run: | + cd $GITHUB_WORKSPACE/ip/build + make test diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f50dddf1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +build/ +install/ + +*.[ao] +*.mod +*.so + +*.swp diff --git a/CMakeLists.txt b/CMakeLists.txt index baf4c194..894df83b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,79 +1,36 @@ cmake_minimum_required(VERSION 3.15) -project(ip VERSION 3.0.0) -set(${PROJECT_NAME}_VERSION ${PROJECT_VERSION} CACHE INTERNAL "${PROJECT_NAME} version number") -enable_language (Fortran) -if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE RELEASE CACHE STRING - "Choose the type of build, options are: PRODUCTION Debug Release." - FORCE) -endif() +file(STRINGS "VERSION" pVersion) -if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - set(IntelComp true ) -elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU*" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang*") - set(GNUComp true ) -elseif(CMAKE_CXX_COMPILER_ID MATCHES "pgc*") - set(PGIComp true ) -endif() +project( + ip + VERSION ${pVersion} + LANGUAGES Fortran) -STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "RelWithDebInfo" BUILD_RELEASE) -if(NOT BUILD_RELEASE ) - STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "RELEASE" BUILD_RELEASE) -endif() -STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "PRODUCTION" BUILD_PRODUCTION) -STRING(COMPARE EQUAL ${CMAKE_BUILD_TYPE} "DEBUG" BUILD_DEBUG) +option(OPENMP "use OpenMP threading" OFF) -if( (BUILD_RELEASE) OR (BUILD_PRODUCTION) ) - if(IntelComp) - set(shared_fortran_flags "-auto" "-qopenmp" "-convert" "big_endian" "-assume" "byterecl" - "-fp-model" "strict" "-fpp") - set(fortran_4_flags "-i4") - set(fortran_d_flags "-i4" "-r8") - set(fortran_8_flags "-i8" "-r8") - elseif(GNUComp) - set(shared_fortran_flags "-fconvert=big-endian" "-cpp") - set(fortran_4_flags) - set(fortran_d_flags "-fdefault-real-8") - set(fortran_8_flags "-fdefault-integer-8" "-fdefault-real-8") - else() - message("unknown compiler!") - exit() - endif() +if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$") + message(STATUS "Setting build type to 'Release' as none was specified.") + set(CMAKE_BUILD_TYPE + "Release" + CACHE STRING "Choose the type of build." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" + "MinSizeRel" "RelWithDebInfo") endif() -file(GLOB fortran_src ${CMAKE_CURRENT_SOURCE_DIR}/src/*.f90 ${CMAKE_CURRENT_SOURCE_DIR}/src/*.F) - -set(kinds "4" "8" "d") -foreach(kind ${kinds}) - set(lib_name ${PROJECT_NAME}_${kind}) - set(versioned_lib_name ${PROJECT_NAME}_v${PROJECT_VERSION}_${kind}) - add_library(${lib_name} STATIC ${fortran_src}) - - set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME "${versioned_lib_name}") - - # Compiled with preprocessor definition LSIZE=D, not d - string(TOUPPER ${kind} kind_definition) - target_compile_definitions(${lib_name} PRIVATE "LSIZE=${kind_definition}") - - set(flags ${shared_fortran_flags} ${fortran_${kind}_flags}) - - target_compile_options(${lib_name} PRIVATE ${flags}) - - set(module_dir "${CMAKE_CURRENT_BINARY_DIR}/include_${kind}") - set_target_properties(${lib_name} PROPERTIES Fortran_MODULE_DIRECTORY "${module_dir}") - - target_include_directories(${lib_name} PUBLIC - $ - $) +if(NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|GNU|Clang|AppleClang)$") + message( + WARNING "Compiler not officially supported: ${CMAKE_Fortran_COMPILER_ID}") +endif() - install(TARGETS ${lib_name} - EXPORT ${PROJECT_NAME}-config - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - install(DIRECTORY ${module_dir} DESTINATION ${CMAKE_INSTALL_PREFIX}) -endforeach() +if(OPENMP) + find_package(OpenMP REQUIRED COMPONENTS Fortran) +endif() -install(EXPORT ${PROJECT_NAME}-config DESTINATION ${CMAKE_INSTALL_PREFIX}) +add_subdirectory(src) +if (ENABLE_TESTS) + find_package(PFUNIT REQUIRED) + enable_testing() + add_subdirectory(tests) +endif() diff --git a/README.md b/README.md new file mode 100644 index 00000000..e16be2e2 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# Interpolation Library + +The NCEP general interpolation library (iplib) contains Fortran 90 subprograms +to be used for interpolating between nearly all (rectilinear) grids used at NCEP. +For more detailed documentation see [README.iplib](README.iplib). + +### Prerequisites + +Compilers: GNU | Intel | Clang | AppleClang | PGI + + +### Installing + +``` +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=/path/to/install /path/to/NCEPLIBS-ip +make -j2 +make install +``` + +# Testing + +Testing requires + +[pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit). + + +cmake .. -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="/path/to/pfunit;/path/to/NCEPLIBS" +make -j2 +make test + +### Version +3.0.0 + + +### Authors + +* **[NCEP/EMC](NCEP.List.EMC.nceplibs.Developers@noaa.gov)** diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..4a36342f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +3.0.0 diff --git a/cmake/PackageConfig.cmake.in b/cmake/PackageConfig.cmake.in new file mode 100644 index 00000000..f7420632 --- /dev/null +++ b/cmake/PackageConfig.cmake.in @@ -0,0 +1,17 @@ +@PACKAGE_INIT@ + +# * @PROJECT_NAME@::@PROJECT_NAME@_4 - real32 library target +# * @PROJECT_NAME@::@PROJECT_NAME@_8 - real64 library target +# * @PROJECT_NAME@::@PROJECT_NAME@_d - mixed precision library target + +# Include targets file. This will create IMPORTED target @PROJECT_NAME@ +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") + +if(@OpenMP_Fortran_FOUND@) + find_dependency(OpenMP) +endif() + +get_target_property(@PROJECT_NAME@_BUILD_TYPES @PROJECT_NAME@::@PROJECT_NAME@_4 IMPORTED_CONFIGURATIONS) + + +check_required_components("@PROJECT_NAME@") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..51857227 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,78 @@ +include("list_of_files.cmake") + +if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") + set(CMAKE_Fortran_FLAGS + "-g -auto -convert big_endian -assume byterecl -fp-model strict -fpp" + ) + set(fortran_d_flags "-i4 -r8") + set(fortran_8_flags "-i8 -r8") +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") + set(CMAKE_Fortran_FLAGS "-g -fconvert=big-endian -cpp") + set(CMAKE_Fortran_FLAGS_DEBUG "-ggdb -Wall") + set(fortran_d_flags "-fdefault-real-8") + set(fortran_8_flags "-fdefault-integer-8 -fdefault-real-8") +endif() + +set(kinds "4" "8" "d") +foreach(kind ${kinds}) + set(lib_name ${PROJECT_NAME}_${kind}) + set(module_dir "${CMAKE_CURRENT_BINARY_DIR}/include_${kind}") + + # Compiled with preprocessor definition LSIZE=D, not d + string(TOUPPER ${kind} kind_definition) + + set(BUILD_FLAGS "${fortran_${kind}_flags}") + + add_library(${lib_name} STATIC ${fortran_src}) + add_library(${PROJECT_NAME}::${lib_name} ALIAS ${lib_name}) + + if(OpenMP_Fortran_FOUND) + target_link_libraries(${lib_name} OpenMP::OpenMP_Fortran) + endif() + + target_compile_definitions(${lib_name} PRIVATE "LSIZE=${kind_definition}") + set_target_properties(${lib_name} PROPERTIES COMPILE_FLAGS "${BUILD_FLAGS}") + set_target_properties(${lib_name} PROPERTIES Fortran_MODULE_DIRECTORY "${module_dir}") + set_target_properties(${lib_name} PROPERTIES INTERFACE_LINK_LIBRARIES ${lib_name}) + target_include_directories(${lib_name} + PUBLIC $ + $) + + list(APPEND LIB_TARGETS ${lib_name}) + + install(DIRECTORY ${module_dir} DESTINATION ${CMAKE_INSTALL_PREFIX}) +endforeach() + +install( + TARGETS ${LIB_TARGETS} + EXPORT ${PROJECT_NAME}Exports + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +### Package config +include(CMakePackageConfigHelpers) +set(CONFIG_INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}) + +export(EXPORT ${PROJECT_NAME}Exports + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-targets.cmake) + +configure_package_config_file( + ${CMAKE_SOURCE_DIR}/cmake/PackageConfig.cmake.in ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config.cmake + INSTALL_DESTINATION ${CONFIG_INSTALL_DESTINATION}) +install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config.cmake + DESTINATION ${CONFIG_INSTALL_DESTINATION}) + +write_basic_package_version_file( + ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion) +install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake + DESTINATION ${CONFIG_INSTALL_DESTINATION}) + +install(EXPORT ${PROJECT_NAME}Exports + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-targets.cmake + DESTINATION ${CONFIG_INSTALL_DESTINATION}) + diff --git a/src/list_of_files.cmake b/src/list_of_files.cmake new file mode 100644 index 00000000..91c442da --- /dev/null +++ b/src/list_of_files.cmake @@ -0,0 +1,33 @@ +set(fortran_src + gausslat.f90 + gdswzd00_mod.f90 + gdswzd01_mod.f90 + gdswzd03_mod.f90 + gdswzd04_mod.f90 + gdswzd05_mod.f90 + gdswzd_mod.f90 + gdswzdcb_mod.f90 + gdswzdcd_mod.f90 + ijkgds0.f90 + ijkgds1.f90 + ipolates.f90 + ipolatev.f90 + ipxwafs.f90 + ipxwafs2.f90 + ipxwafs3.f90 + makgds.f90 + movect.f90 + polates0.f90 + polates1.f90 + polates2.f90 + polates3.f90 + polates4.f90 + polates6.f90 + polatev0.f90 + polatev1.f90 + polatev2.f90 + polatev3.f90 + polatev4.f90 + polatev6.f90 + polfixs.f90 + polfixv.f90) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..d579d994 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,10 @@ +#list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") + +file(COPY data/ DESTINATION data) + +find_package(sp REQUIRED) + +add_pfunit_ctest (interp_test + TEST_SOURCES test_mod.pf + LINK_LIBRARIES ip::ip_4 sp::sp_4 +) diff --git a/tests/README b/tests/README new file mode 100644 index 00000000..ba3300bb --- /dev/null +++ b/tests/README @@ -0,0 +1,204 @@ + +Unit test for the NCEP IPOLATES library (IPLIB). + +Please refer to README.md in the main directory for how to run tests using PFUnit. + +This file is kept temporarily for historical purposes until all unit tests are converted to use pfunit. + +ABSTRACT: +--------- + +This test invokes IPOLATES to interpolate scalar and +vector data to several grids of various map projections +using all IPOLATES interpolation options. The output +is compared to baseline data and a summary of differences is +sent to standard output. + + +HOW THE TEST WORKS: +------------------- + +There are two separate programs to test the scalar and vector interpolation. +The scalar program calls routine 'ipolates' to interpolate a global field +of snow albedo to several grids of various map projections and +using all IPOLATES interpolation options. Likewise, the vector program +calls routine 'ipolatev' to interpolate a global field of 500mb u/w wind. +The specific tests are: + + - grid 3 (global one-deg lat/lon) using bilinear (IP option "0") + - grid 8 (mercator) using bicubic (IP option "1") + - grid 127 (gaussian lat/lon) using neighbor (IP option "2") + - grid 203 (rotated lat/lon "E") using budget (IP option "3") + - grid 205 (rotated lat/lon "B") using spectral (IP option "4") + - grid 212 (polar stereographic) using neighbor-budget (IP option "6") + - grid 218 (lambert conformal) using bilinear (IP option "0") + +Some grid numbers refer to an NCEP grib 1 standard grid. Others +refer to the grib 1 data representation type. + +The output from each call to ipolates and ipolatev is compared to its +baseline counterpart in the ./baseline data directory. This baseline +data was created using the Intel Fortran compiler. Differences from +the baseline data are computed and sent to standard output. For this +unit test to pass the differences should be "small". + + +DIRECTORY LAYOUT: +----------------- + +./sorc - Contains the files and scripts needed to build the + unit test programs. And the programs themselves. + +./sorc/scalar - + Contains a Fortran program to call routine 'ipolates' + to interpolate a global field of albedo data to + several grids and using all interpolation options. + +./sorc/vector - + Contains a Fortran program to call routine 'ipolatev' + to interpolate a global field of u/v wind data to + several grids and using all interpolation options. + +./exec - Contains the unit test executables. There is one executable + for the single ("4"), double ("8") and mixed ("d") precision + versions of the IPOLATES library: + + scalar_4.exe scalar_8.exe scalar_d.exe + vector_4.exe vector_8.exe vector_d.exe + +./work - The working directory for program execution. + +./lib - The location of the IPOLATES libraries and module files as + expected by the unit test programs. + +./scripts - Contains scripts to run this unit test. + +./input_data - Contains the input scalar and vector data. The + data are in binary little endian format: + + ./scalar/global_snoalb.bin (global snow albedo) + ./vector/global_uv_wind.bin (global 500mb u/v wind) + +./baseline_data - Contains the baseline set of scalar and vector data + interpolated to each target grid. Binary, little endian + format. Output from each call to routine ipolates and + ipolatev is compared to its baseline counterpart. There + are sub-directories for the scalar and vector data. + And under these sub-directories, there are sub-directories + for the single (4_byte_bin) and mixed/double (8_byte_bin) + versions of the IPOLATES library. The file names + contain the grid number and IPOLATES interpolation + option (defined below); i.e.: + + grid${gridnum}.opt${ip_option}.bin_4/8 + + Grads control files to view each file are located in the + ./grads subdirectory. These files do not account + for map projection. Rather, they display the data + as a 2-D field with no interpolation. So when + viewing, do a "set mproj off" during your grads session. + + + +HOW TO RUN THE TEST: +-------------------- + +1) Build the IPOLATES library. Go to $root and read the +README.build file for details. + + +2) Ensure the ./lib directory contains (or links to) the IPOLATES libraries and +its module files. The ./lib directory already contains links that point to the +libraries and module files as they would exist when using the "nco" install +option from step (1). I.e: + + module file directories: + incmod_4 -> $root/ip/vX.Y.Z/include/ip_vX.Y.Z_4 (single precision) + incmod_d -> $root/ip/vX.Y.Z/include/ip_vX.Y.Z_d (mixed precision) + incmod_8 -> $root/ip/vX.Y.Z/include/ip_vX.Y.Z_8 (double precistion) + + libraries: + libip_4.a -> $root/ip/vX.Y.Z/libip_vX.Y.Z_4.a (single precision) + libip_d.a -> $root/ip/vX.Y.Z/libip_vX.Y.Z_d.a (mixed precision) + libip_8.a -> $root/ip/vX.Y.Z/libip_vX.Y.Z_8.a (double precistion) + +So if that is how IPOLATES was built in step (1), there is +nothing more to do. + +However, if you want to build with another version of the library, +or if you built them in step (1) using the "gnu" or "nco_cray" install option, +you will need to adjust these links. Example: Suppose you want to +test with the OPS version of IPOLATES on WCOSS Phase 2. You would set the +links as follows: + + incmod_4 -> /nwprod2/lib/ip/vX.Y.Z/include/ip_vX.Y.Z_4 + incmod_d -> /nwprod2/lib/ip/vX.Y.Z/include/ip_vX.Y.Z_d + incmod_8 -> /nwprod2/lib/ip/vX.Y.Z/include/ip_vX.Y.Z_8 + + libip_4.a -> /nwprod2/lib/ip/vX.Y.Z/libip_vX.Y.Z_4.a + libip_d.a -> /nwprod2/lib/ip/vX.Y.Z/libip_vX.Y.Z_d.a + libip_8.a -> /nwprod2/lib/ip/vX.Y.Z/libip_vX.Y.Z_8.a + + +3) Build the "scalar" and "vector" unit test programs +by running the "make_unit_test.ksh" build script. (Use the +"make_unit_test_wcoss-cray.ksh" build script on WCOSS-Cray.) + +The IPOLATES library is dependant on the NCEP SP +(spectral) library (SPLIB). Intel compiled versions of SPLIB +exist on Theia and WCOSS Phase 1/2. When running "make_unit_test.ksh" +on these machines, these SP libraries are automatically located +by module loads and stored in these environment variables: + + SP_LIB4 (single precision) + SP_LIBd (mixed precision) + SP_LIB8 (double precistion) + +On WCOSS-Cray, Intel and Cray compiled versions of SPLIB exist. +And the "make_unit_test_wcoss-cray.ksh" script will locate +them by module loads. + +If you are testing on a machine other than WCOSS or Theia, +or you have compiled IPOLATES with a compiler other than Intel or Cray, +you will need to locate (or build) SPLIB and set these environment +varibles by editing the build script, or by exporting these +variables on the command line before invoking it. +Example (when using bash): + + $ export SP_LIB4=$directory/libsp_4.a + +Once the SP libraries have been located, run "make_unit_test.ksh" +(or make_unit_test_wcoss-cray.ksh) from the command line. The script +takes one argument: the "config-setup" file that was used to compile +IPOLATES. So, if you built IPOLATES with the Intel-optimized option, +you would invoke as follows: + + $ make_unit_test.ksh ifort.setup + +On WCOSS-Cray, you would do the following: + + $ make_unit_test_wcoss-cray.ksh ifort.setup + + +4) Run the unit test. Go to ./scripts. To run interactively, type: + + $ run_unit_test.ksh + +You may want to pipe the output to a log fle. Check output for any +"large" differences between the computed and baseline data. + +To run "run_unit_test.ksh" on the WCOSS or Theia compute nodes, +invoke these driver scripts as follows: + + $ run_wcoss.ksh (WCOSS Phase 1/2) + $ run_wcoss-cray.ksh (WCOSS-Cray) + $ run_wcoss-dell.ksh (WCOSS-Phase 3/Dell) + $ sbatch run_theia.ksh (Theia) + +In this case, output is sent to "unit_test.log". + + +QUESTIONS: +---------- + +Contact: george.gayno@noaa.gov diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid127.opt2.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid127.opt2.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid127.opt2.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid127.opt2.bin_4 diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid203.opt3.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid203.opt3.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid203.opt3.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid203.opt3.bin_4 diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid205.opt4.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid205.opt4.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid205.opt4.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid205.opt4.bin_4 diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid212.opt6.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid212.opt6.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid212.opt6.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid212.opt6.bin_4 diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid218.opt0.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid218.opt0.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid218.opt0.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid218.opt0.bin_4 diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid3.opt0.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid3.opt0.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid3.opt0.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid3.opt0.bin_4 diff --git a/unit_test/baseline_data/scalar/4_byte_bin/grid8.opt1.bin_4 b/tests/data/baseline_data/scalar/4_byte_bin/grid8.opt1.bin_4 similarity index 100% rename from unit_test/baseline_data/scalar/4_byte_bin/grid8.opt1.bin_4 rename to tests/data/baseline_data/scalar/4_byte_bin/grid8.opt1.bin_4 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid127.opt2.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid127.opt2.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid127.opt2.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid127.opt2.bin_8 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid203.opt3.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid203.opt3.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid203.opt3.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid203.opt3.bin_8 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid205.opt4.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid205.opt4.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid205.opt4.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid205.opt4.bin_8 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid212.opt6.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid212.opt6.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid212.opt6.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid212.opt6.bin_8 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid218.opt0.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid218.opt0.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid218.opt0.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid218.opt0.bin_8 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid3.opt0.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid3.opt0.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid3.opt0.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid3.opt0.bin_8 diff --git a/unit_test/baseline_data/scalar/8_byte_bin/grid8.opt1.bin_8 b/tests/data/baseline_data/scalar/8_byte_bin/grid8.opt1.bin_8 similarity index 100% rename from unit_test/baseline_data/scalar/8_byte_bin/grid8.opt1.bin_8 rename to tests/data/baseline_data/scalar/8_byte_bin/grid8.opt1.bin_8 diff --git a/unit_test/baseline_data/scalar/grads/grid003.ctl b/tests/data/baseline_data/scalar/grads/grid003.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid003.ctl rename to tests/data/baseline_data/scalar/grads/grid003.ctl diff --git a/unit_test/baseline_data/scalar/grads/grid008.ctl b/tests/data/baseline_data/scalar/grads/grid008.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid008.ctl rename to tests/data/baseline_data/scalar/grads/grid008.ctl diff --git a/unit_test/baseline_data/scalar/grads/grid127.ctl b/tests/data/baseline_data/scalar/grads/grid127.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid127.ctl rename to tests/data/baseline_data/scalar/grads/grid127.ctl diff --git a/unit_test/baseline_data/scalar/grads/grid203.ctl b/tests/data/baseline_data/scalar/grads/grid203.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid203.ctl rename to tests/data/baseline_data/scalar/grads/grid203.ctl diff --git a/unit_test/baseline_data/scalar/grads/grid205.ctl b/tests/data/baseline_data/scalar/grads/grid205.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid205.ctl rename to tests/data/baseline_data/scalar/grads/grid205.ctl diff --git a/unit_test/baseline_data/scalar/grads/grid212.ctl b/tests/data/baseline_data/scalar/grads/grid212.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid212.ctl rename to tests/data/baseline_data/scalar/grads/grid212.ctl diff --git a/unit_test/baseline_data/scalar/grads/grid218.ctl b/tests/data/baseline_data/scalar/grads/grid218.ctl similarity index 100% rename from unit_test/baseline_data/scalar/grads/grid218.ctl rename to tests/data/baseline_data/scalar/grads/grid218.ctl diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid127.opt2.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid127.opt2.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid127.opt2.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid127.opt2.bin_4 diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid203.opt3.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid203.opt3.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid203.opt3.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid203.opt3.bin_4 diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid205.opt4.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid205.opt4.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid205.opt4.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid205.opt4.bin_4 diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid212.opt6.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid212.opt6.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid212.opt6.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid212.opt6.bin_4 diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid218.opt0.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid218.opt0.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid218.opt0.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid218.opt0.bin_4 diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid3.opt0.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid3.opt0.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid3.opt0.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid3.opt0.bin_4 diff --git a/unit_test/baseline_data/vector/4_byte_bin/grid8.opt1.bin_4 b/tests/data/baseline_data/vector/4_byte_bin/grid8.opt1.bin_4 similarity index 100% rename from unit_test/baseline_data/vector/4_byte_bin/grid8.opt1.bin_4 rename to tests/data/baseline_data/vector/4_byte_bin/grid8.opt1.bin_4 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid127.opt2.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid127.opt2.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid127.opt2.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid127.opt2.bin_8 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid203.opt3.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid203.opt3.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid203.opt3.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid203.opt3.bin_8 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid205.opt4.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid205.opt4.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid205.opt4.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid205.opt4.bin_8 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid212.opt6.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid212.opt6.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid212.opt6.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid212.opt6.bin_8 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid218.opt0.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid218.opt0.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid218.opt0.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid218.opt0.bin_8 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid3.opt0.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid3.opt0.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid3.opt0.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid3.opt0.bin_8 diff --git a/unit_test/baseline_data/vector/8_byte_bin/grid8.opt1.bin_8 b/tests/data/baseline_data/vector/8_byte_bin/grid8.opt1.bin_8 similarity index 100% rename from unit_test/baseline_data/vector/8_byte_bin/grid8.opt1.bin_8 rename to tests/data/baseline_data/vector/8_byte_bin/grid8.opt1.bin_8 diff --git a/unit_test/baseline_data/vector/grads/grid003.ctl b/tests/data/baseline_data/vector/grads/grid003.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid003.ctl rename to tests/data/baseline_data/vector/grads/grid003.ctl diff --git a/unit_test/baseline_data/vector/grads/grid008.ctl b/tests/data/baseline_data/vector/grads/grid008.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid008.ctl rename to tests/data/baseline_data/vector/grads/grid008.ctl diff --git a/unit_test/baseline_data/vector/grads/grid127.ctl b/tests/data/baseline_data/vector/grads/grid127.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid127.ctl rename to tests/data/baseline_data/vector/grads/grid127.ctl diff --git a/unit_test/baseline_data/vector/grads/grid203.ctl b/tests/data/baseline_data/vector/grads/grid203.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid203.ctl rename to tests/data/baseline_data/vector/grads/grid203.ctl diff --git a/unit_test/baseline_data/vector/grads/grid205.ctl b/tests/data/baseline_data/vector/grads/grid205.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid205.ctl rename to tests/data/baseline_data/vector/grads/grid205.ctl diff --git a/unit_test/baseline_data/vector/grads/grid212.ctl b/tests/data/baseline_data/vector/grads/grid212.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid212.ctl rename to tests/data/baseline_data/vector/grads/grid212.ctl diff --git a/unit_test/baseline_data/vector/grads/grid218.ctl b/tests/data/baseline_data/vector/grads/grid218.ctl similarity index 100% rename from unit_test/baseline_data/vector/grads/grid218.ctl rename to tests/data/baseline_data/vector/grads/grid218.ctl diff --git a/unit_test/input_data/scalar/global_snoalb.bin b/tests/data/input_data/scalar/global_snoalb.bin similarity index 100% rename from unit_test/input_data/scalar/global_snoalb.bin rename to tests/data/input_data/scalar/global_snoalb.bin diff --git a/unit_test/input_data/vector/global_uv_wind.bin b/tests/data/input_data/vector/global_uv_wind.bin similarity index 100% rename from unit_test/input_data/vector/global_uv_wind.bin rename to tests/data/input_data/vector/global_uv_wind.bin diff --git a/tests/test_mod.pf b/tests/test_mod.pf new file mode 100644 index 00000000..7fe57660 --- /dev/null +++ b/tests/test_mod.pf @@ -0,0 +1,307 @@ +module test_mod + use funit + use iso_fortran_env, only: real32, real64 + implicit none + + + integer, public :: input_kgds(200) + + integer, parameter, public :: i_input = 360 + integer, parameter, public :: j_input = 180 + + logical*1, public :: input_bitmap(i_input,j_input) + + real, public :: input_data(i_input,j_input) + + data input_kgds /0, 360, 180, -89500, -180000, 128, & + 89500, 179000, 1000, 1000, 64, 0, & + 6*-1, 0, 255, 180*-1/ + +contains + + @test + subroutine test_scalar() + + integer, parameter :: N = 1 + integer, parameter :: grids(N) = [3]!, 8, 127, 203, 205, 212, 218] + integer, parameter :: interp_opts(N) = [0]! 1, 2, 3, 4, 6, 0] + + integer :: i, j, k + real(real32), allocatable :: baseline_data(:,:), output_data(:,:), output_data4 + real(real64) :: avg_diff, maxDiff, diff + integer :: num_pts_diff + + + call read_input_data("data/input_data/scalar/global_snoalb.bin") + + do k = 1, N + call interp(interp_opt = interp_opts(k), grid = grids(k), & + baseline_data = baseline_data, output_data = output_data) + + avg_diff = 0d0 + maxdiff=0.0 + num_pts_diff=0 + + do j = 1, size(output_data, 2) + do i = 1, size(output_data, 1) + output_data4 = real(output_data(i,j),4) + if (abs(output_data4 - baseline_data(i,j)) > 0.0001) then + avg_diff = avg_diff + abs(output_data4 - baseline_data(i,j)) + num_pts_diff = num_pts_diff + 1 + if (abs(output_data4-baseline_data(i,j)) > abs(maxdiff))then + maxdiff = abs(output_data4 - baseline_data(i,j)) + endif + endif + enddo + enddo + + + avg_diff = avg_diff / size(output_data) + ! I just picked a number. This really isn't a unit test, but a regression test + @assertLessThan(avg_diff, 1d0, "Avg Diff greater than 1") + + ! print*,'- MAX/MIN OF DATA: ', maxval(output_data),minval(output_data) + ! print*,'- NUMBER OF PTS DIFFERENT: ',num_pts_diff + ! print*,'- PERCENT OF TOTAL: ',(float(num_pts_diff)/float(size(output_data))) * 100.0 + ! print*,'- MAX DIFFERENCE: ', maxdiff + ! if (num_pts_diff > 0) then + ! avgdiff = avgdiff / float(num_pts_diff) + ! endif + ! print*,'- AVG DIFFERENCE: ', avgdiff + end do + + + end subroutine test_scalar + + + subroutine interp(interp_opt, grid, baseline_data, output_data) + + !------------------------------------------------------------------------- + ! Call the scalar polates routines to interpolate the input data + ! using all available interpolation methods (neighbor, bilinear, etc.) + ! several output grids of various map projections are tested. + ! + ! The routine reads in two arguments from stnd input. The first is + ! the grid to which you want to interpolate the data. + ! The valid choices are: + ! + ! 3 - one-degree global lat/lon (ncep grid 3) + ! 8 - mercator (ncep grid 8) + ! 127 - t254 gaussian (ncep grid 127) + ! 203 - rotated lat/lon e-staggered (number refers to gds octet 6) + ! 205 - rotated lat/lon b-staggered (number refers to gds octet 6) + ! 212 - nh polar stereographic, spherical earth (number meaningless) + ! 218 - lambert conformal (ncep grid 218) + ! + ! The second argument is the interpolation option. The valid choices: + ! + ! 0 - bilinear + ! 1 - bicubic + ! 2 - neighbor + ! 3 - budget + ! 4 - spectral + ! 6 - budget-neighbor + ! + ! The interpolated data is compared against a baseline binary + ! file. Any differences are written to standard output. + !------------------------------------------------------------------------- + + implicit none + + integer, intent(in) :: interp_opt + integer, intent(in) :: grid + character*100 :: output_file + + integer(kind=4) :: i1 + integer :: ip, ipopt(20), output_kgds(200) + integer :: km, ibi, mi, iret, i, j + integer :: i_output, j_output, mo, no, ibo + integer :: num_pts_diff + + logical*1, allocatable :: output_bitmap(:,:) + + real, allocatable :: output_rlat(:,:), output_rlon(:,:) + real, allocatable, intent(out) :: output_data(:,:) + real(kind=4), allocatable, intent(out) :: baseline_data(:,:) + real :: avgdiff, maxdiff + real(kind=4) :: output_data4 + + integer :: grd3(200) ! global one-degree lat/lon + integer :: grd8(200) ! mercator + integer :: grd127(200) ! gaussian (t254) + integer :: grd203(200) ! nam 12km e-grid + integer :: grd205(200) ! nam 12km b-grid + integer :: grd212(200) ! afwa nh polar, spherical earth + integer :: grd218(200) ! lambert conformal (ncep grid 218) + + character(len=3) :: grid_name + character :: opt_name + character(len=512) :: file_name + + grd3 = 0d0 + grd8 = 0d0 + grd127 = 0d0 + grd203 = 0d0 + grd205 = 0d0 + grd212 = 0d0 + grd218 = 0d0 + + ! array(2:3) is the output resolution + grd3(1:20) = [0, 360, 181, 90000, 0, 128, -90000, -1000, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255] + grd8(1:20) = [1, 116, 44, -48670, 3104, 128, 61050, 0, 22500, 0, 64, 318830, 318830, 0, 0, 0, 0, 0, 0, 255] + grd127(1:20) = [4, 768, 384, 89642, 0, 128, -89642, -469, 469, 192, 0, 0, 255, 0, 0, 0, 0, 0, 0, 255] + grd203(1:20) = [203, 669, 1165, -7450, -144140, 136, 54000, -106000, 90, 77, 64, 0, 0, 0, 0, 0, 0, 0, 0, 255] + grd205(1:20) = [205, 954, 835, -7491, -144134, 136, 54000, -106000, 126, 90, 64, 44540, 14800, 0, 0, 0, 0, 0, 0, 255] + grd212(1:20) = [5, 512, 512, -20826,145000,8,-80000, 47625, 47625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255] + grd218(1:20) = [3, 614, 428, 12190, -133459, 8, -95000, 12191, 12191, 0, 64, 25000, 25000, 0, 0, 0, 0, 0, 0, 255] + + select case (grid) + case (3) + output_kgds = grd3 + i_output = output_kgds(2) + j_output = output_kgds(3) + case (8) + output_kgds = grd8 + i_output = output_kgds(2) + j_output = output_kgds(3) + case (127) + output_kgds = grd127 + i_output = output_kgds(2) + j_output = output_kgds(3) + case (203) + output_kgds = grd203 + i_output = output_kgds(2) + j_output = output_kgds(3) + case (205) + output_kgds = grd205 + i_output = output_kgds(2) + j_output = output_kgds(3) + case (212) + output_kgds = grd212 + i_output = output_kgds(2) + j_output = output_kgds(3) + case (218) + output_kgds = grd218 + i_output = output_kgds(2) + j_output = output_kgds(3) + case default + stop 55 + end select + + select case (interp_opt) + ! bi-linear + case (0) + ip = 0 + ipopt = 0 + ibi = 0 ! no bitmap + ! bi-cubic + case (1) + ip = 1 + ipopt = 0 + ibi = 0 ! no bitmap + ! neighbor + case (2) + ip = 2 + ipopt = 0 + ibi = 0 ! no bitmap + ! budget + case (3) + ip = 3 + ipopt = -1 + ibi = 0 ! no bitmap + ! spectral + case (4) + ip = 4 + ipopt(1) = 0 ! triangular + ipopt(2) = -1 ! code chooses wave number + ipopt(3:20)=0 + ibi = 0 ! can't use bitmap with spectral + ! neighbor-budget + case (6) + ip = 6 + ipopt = -1 + ibi = 0 ! no bitmap + case default + print*,"ERROR: ENTER VALID INTERP OPTION." + stop 56 + end select + + km = 1 ! number of fields to interpolate + mi = i_input * j_input ! dimension of input grids + + mo = i_output * j_output + + allocate (output_rlat(i_output,j_output)) + allocate (output_rlon(i_output,j_output)) + allocate (output_data(i_output,j_output)) + allocate (output_bitmap(i_output,j_output)) + + call ipolates(ip, ipopt, input_kgds, output_kgds, mi, mo,& + km, ibi, input_bitmap, input_data, & + no, output_rlat, output_rlon, ibo, output_bitmap, output_data, iret) + + if (iret /= 0) then + print*,'- BAD STATUS FROM IPOLATES: ', iret + stop 6 + end if + + if (no /= mo) then + print*,'- ERROR: WRONG # OF POINTS RETURNED FROM IPOLATES' + stop 7 + end if + + do j = 1, j_output + do i = 1, i_output + if (.not. output_bitmap(i,j)) then + output_data(i,j) = -9. + endif + enddo + enddo + + allocate(baseline_data(i_output,j_output)) + + write(file_name, '(A,I0,A,I0,A)') "data/baseline_data/scalar/4_byte_bin/grid", grid, & + ".opt", interp_opt, ".bin_4" + + open (12, file = file_name, access="direct", recl=mo*4) + read (12, rec=1) baseline_data + close (12) + + end subroutine interp + + subroutine read_input_data(input_file) + + implicit none + + character(*) :: input_file + + integer :: iret + integer, parameter :: iunit=9 + + real(kind=4) :: dummy(i_input,j_input) + + open(iunit, file=input_file, access='direct', recl=i_input*j_input*4, & + iostat=iret) + + if (iret /= 0) then + print*,'- BAD OPEN OF FILE, IRET IS ', iret + stop 2 + end if + + read(iunit, rec=1, iostat=iret) dummy + input_data=dummy + + if (iret /= 0) then + print*,"- BAD READ OF DATA. IRET IS ", iret + stop 4 + end if + + close (iunit) + + input_bitmap=.true. + + return + + end subroutine read_input_data + +end module test_mod diff --git a/unit_test/README b/tests/unit_test/README similarity index 100% rename from unit_test/README rename to tests/unit_test/README diff --git a/unit_test/scripts/run_theia.ksh b/tests/unit_test/scripts/run_theia.ksh similarity index 100% rename from unit_test/scripts/run_theia.ksh rename to tests/unit_test/scripts/run_theia.ksh diff --git a/unit_test/scripts/run_unit_test.ksh b/tests/unit_test/scripts/run_unit_test.ksh similarity index 100% rename from unit_test/scripts/run_unit_test.ksh rename to tests/unit_test/scripts/run_unit_test.ksh diff --git a/unit_test/scripts/run_wcoss-cray.ksh b/tests/unit_test/scripts/run_wcoss-cray.ksh similarity index 100% rename from unit_test/scripts/run_wcoss-cray.ksh rename to tests/unit_test/scripts/run_wcoss-cray.ksh diff --git a/unit_test/scripts/run_wcoss-cray.lsf b/tests/unit_test/scripts/run_wcoss-cray.lsf similarity index 100% rename from unit_test/scripts/run_wcoss-cray.lsf rename to tests/unit_test/scripts/run_wcoss-cray.lsf diff --git a/unit_test/scripts/run_wcoss-dell.sh b/tests/unit_test/scripts/run_wcoss-dell.sh similarity index 100% rename from unit_test/scripts/run_wcoss-dell.sh rename to tests/unit_test/scripts/run_wcoss-dell.sh diff --git a/unit_test/scripts/run_wcoss.ksh b/tests/unit_test/scripts/run_wcoss.ksh similarity index 100% rename from unit_test/scripts/run_wcoss.ksh rename to tests/unit_test/scripts/run_wcoss.ksh diff --git a/unit_test/scripts/run_wcoss.lsf b/tests/unit_test/scripts/run_wcoss.lsf similarity index 100% rename from unit_test/scripts/run_wcoss.lsf rename to tests/unit_test/scripts/run_wcoss.lsf diff --git a/unit_test/sorc/.gitignore b/tests/unit_test/sorc/.gitignore similarity index 100% rename from unit_test/sorc/.gitignore rename to tests/unit_test/sorc/.gitignore diff --git a/unit_test/sorc/Makefile.in b/tests/unit_test/sorc/Makefile.in similarity index 100% rename from unit_test/sorc/Makefile.in rename to tests/unit_test/sorc/Makefile.in diff --git a/unit_test/sorc/configure b/tests/unit_test/sorc/configure similarity index 100% rename from unit_test/sorc/configure rename to tests/unit_test/sorc/configure diff --git a/unit_test/sorc/configure.ac b/tests/unit_test/sorc/configure.ac similarity index 100% rename from unit_test/sorc/configure.ac rename to tests/unit_test/sorc/configure.ac diff --git a/unit_test/sorc/make_unit_test.ksh b/tests/unit_test/sorc/make_unit_test.ksh similarity index 100% rename from unit_test/sorc/make_unit_test.ksh rename to tests/unit_test/sorc/make_unit_test.ksh diff --git a/unit_test/sorc/make_unit_test_wcoss-cray.ksh b/tests/unit_test/sorc/make_unit_test_wcoss-cray.ksh similarity index 100% rename from unit_test/sorc/make_unit_test_wcoss-cray.ksh rename to tests/unit_test/sorc/make_unit_test_wcoss-cray.ksh diff --git a/unit_test/sorc/scalar/Makefile.in b/tests/unit_test/sorc/scalar/Makefile.in similarity index 100% rename from unit_test/sorc/scalar/Makefile.in rename to tests/unit_test/sorc/scalar/Makefile.in diff --git a/unit_test/sorc/scalar/driver.f90 b/tests/unit_test/sorc/scalar/driver.f90 similarity index 100% rename from unit_test/sorc/scalar/driver.f90 rename to tests/unit_test/sorc/scalar/driver.f90 diff --git a/unit_test/sorc/scalar/get_input_data.f90 b/tests/unit_test/sorc/scalar/get_input_data.f90 similarity index 100% rename from unit_test/sorc/scalar/get_input_data.f90 rename to tests/unit_test/sorc/scalar/get_input_data.f90 diff --git a/unit_test/sorc/scalar/interp.f90 b/tests/unit_test/sorc/scalar/interp.f90 similarity index 100% rename from unit_test/sorc/scalar/interp.f90 rename to tests/unit_test/sorc/scalar/interp.f90 diff --git a/unit_test/sorc/scalar/make.dependencies b/tests/unit_test/sorc/scalar/make.dependencies similarity index 100% rename from unit_test/sorc/scalar/make.dependencies rename to tests/unit_test/sorc/scalar/make.dependencies diff --git a/unit_test/sorc/scalar/make.filelist b/tests/unit_test/sorc/scalar/make.filelist similarity index 100% rename from unit_test/sorc/scalar/make.filelist rename to tests/unit_test/sorc/scalar/make.filelist diff --git a/unit_test/sorc/scalar/make.rules b/tests/unit_test/sorc/scalar/make.rules similarity index 100% rename from unit_test/sorc/scalar/make.rules rename to tests/unit_test/sorc/scalar/make.rules diff --git a/unit_test/sorc/vector/Makefile.in b/tests/unit_test/sorc/vector/Makefile.in similarity index 100% rename from unit_test/sorc/vector/Makefile.in rename to tests/unit_test/sorc/vector/Makefile.in diff --git a/unit_test/sorc/vector/driver.f90 b/tests/unit_test/sorc/vector/driver.f90 similarity index 100% rename from unit_test/sorc/vector/driver.f90 rename to tests/unit_test/sorc/vector/driver.f90 diff --git a/unit_test/sorc/vector/get_input_data.f90 b/tests/unit_test/sorc/vector/get_input_data.f90 similarity index 100% rename from unit_test/sorc/vector/get_input_data.f90 rename to tests/unit_test/sorc/vector/get_input_data.f90 diff --git a/unit_test/sorc/vector/interp.f90 b/tests/unit_test/sorc/vector/interp.f90 similarity index 100% rename from unit_test/sorc/vector/interp.f90 rename to tests/unit_test/sorc/vector/interp.f90 diff --git a/unit_test/sorc/vector/make.dependencies b/tests/unit_test/sorc/vector/make.dependencies similarity index 100% rename from unit_test/sorc/vector/make.dependencies rename to tests/unit_test/sorc/vector/make.dependencies diff --git a/unit_test/sorc/vector/make.filelist b/tests/unit_test/sorc/vector/make.filelist similarity index 100% rename from unit_test/sorc/vector/make.filelist rename to tests/unit_test/sorc/vector/make.filelist diff --git a/unit_test/sorc/vector/make.rules b/tests/unit_test/sorc/vector/make.rules similarity index 100% rename from unit_test/sorc/vector/make.rules rename to tests/unit_test/sorc/vector/make.rules diff --git a/unit_test_for_c/README b/tests/unit_test_for_c/README similarity index 100% rename from unit_test_for_c/README rename to tests/unit_test_for_c/README diff --git a/unit_test_for_c/scripts/run_theia.ksh b/tests/unit_test_for_c/scripts/run_theia.ksh similarity index 100% rename from unit_test_for_c/scripts/run_theia.ksh rename to tests/unit_test_for_c/scripts/run_theia.ksh diff --git a/unit_test_for_c/scripts/run_unit_test.ksh b/tests/unit_test_for_c/scripts/run_unit_test.ksh similarity index 100% rename from unit_test_for_c/scripts/run_unit_test.ksh rename to tests/unit_test_for_c/scripts/run_unit_test.ksh diff --git a/unit_test_for_c/scripts/run_wcoss-cray.ksh b/tests/unit_test_for_c/scripts/run_wcoss-cray.ksh similarity index 100% rename from unit_test_for_c/scripts/run_wcoss-cray.ksh rename to tests/unit_test_for_c/scripts/run_wcoss-cray.ksh diff --git a/unit_test_for_c/scripts/run_wcoss-cray.lsf b/tests/unit_test_for_c/scripts/run_wcoss-cray.lsf similarity index 100% rename from unit_test_for_c/scripts/run_wcoss-cray.lsf rename to tests/unit_test_for_c/scripts/run_wcoss-cray.lsf diff --git a/unit_test_for_c/scripts/run_wcoss-dell.sh b/tests/unit_test_for_c/scripts/run_wcoss-dell.sh similarity index 100% rename from unit_test_for_c/scripts/run_wcoss-dell.sh rename to tests/unit_test_for_c/scripts/run_wcoss-dell.sh diff --git a/unit_test_for_c/scripts/run_wcoss.ksh b/tests/unit_test_for_c/scripts/run_wcoss.ksh similarity index 100% rename from unit_test_for_c/scripts/run_wcoss.ksh rename to tests/unit_test_for_c/scripts/run_wcoss.ksh diff --git a/unit_test_for_c/scripts/run_wcoss.lsf b/tests/unit_test_for_c/scripts/run_wcoss.lsf similarity index 100% rename from unit_test_for_c/scripts/run_wcoss.lsf rename to tests/unit_test_for_c/scripts/run_wcoss.lsf diff --git a/unit_test_for_c/sorc/make_unit_test.ksh b/tests/unit_test_for_c/sorc/make_unit_test.ksh similarity index 100% rename from unit_test_for_c/sorc/make_unit_test.ksh rename to tests/unit_test_for_c/sorc/make_unit_test.ksh diff --git a/unit_test_for_c/sorc/test_gdswzd_4.c b/tests/unit_test_for_c/sorc/test_gdswzd_4.c similarity index 100% rename from unit_test_for_c/sorc/test_gdswzd_4.c rename to tests/unit_test_for_c/sorc/test_gdswzd_4.c diff --git a/unit_test_for_c/sorc/test_gdswzd_8.c b/tests/unit_test_for_c/sorc/test_gdswzd_8.c similarity index 100% rename from unit_test_for_c/sorc/test_gdswzd_8.c rename to tests/unit_test_for_c/sorc/test_gdswzd_8.c diff --git a/unit_test_for_c/sorc/test_gdswzd_d.c b/tests/unit_test_for_c/sorc/test_gdswzd_d.c similarity index 100% rename from unit_test_for_c/sorc/test_gdswzd_d.c rename to tests/unit_test_for_c/sorc/test_gdswzd_d.c diff --git a/unit_test/lib/incmod_4 b/unit_test/lib/incmod_4 deleted file mode 120000 index c363feb4..00000000 --- a/unit_test/lib/incmod_4 +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/include/ip_v3.0.1_4 \ No newline at end of file diff --git a/unit_test/lib/incmod_8 b/unit_test/lib/incmod_8 deleted file mode 120000 index 147f7048..00000000 --- a/unit_test/lib/incmod_8 +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/include/ip_v3.0.1_8 \ No newline at end of file diff --git a/unit_test/lib/incmod_d b/unit_test/lib/incmod_d deleted file mode 120000 index f699d6a6..00000000 --- a/unit_test/lib/incmod_d +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/include/ip_v3.0.1_d \ No newline at end of file diff --git a/unit_test/lib/libip_4.a b/unit_test/lib/libip_4.a deleted file mode 120000 index b5ca0902..00000000 --- a/unit_test/lib/libip_4.a +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/libip_v3.0.1_4.a \ No newline at end of file diff --git a/unit_test/lib/libip_8.a b/unit_test/lib/libip_8.a deleted file mode 120000 index 09e2c4af..00000000 --- a/unit_test/lib/libip_8.a +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/libip_v3.0.1_8.a \ No newline at end of file diff --git a/unit_test/lib/libip_d.a b/unit_test/lib/libip_d.a deleted file mode 120000 index f8bebcc2..00000000 --- a/unit_test/lib/libip_d.a +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/libip_v3.0.1_d.a \ No newline at end of file diff --git a/unit_test_for_c/lib/incmod_4 b/unit_test_for_c/lib/incmod_4 deleted file mode 120000 index c363feb4..00000000 --- a/unit_test_for_c/lib/incmod_4 +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/include/ip_v3.0.1_4 \ No newline at end of file diff --git a/unit_test_for_c/lib/incmod_8 b/unit_test_for_c/lib/incmod_8 deleted file mode 120000 index 147f7048..00000000 --- a/unit_test_for_c/lib/incmod_8 +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/include/ip_v3.0.1_8 \ No newline at end of file diff --git a/unit_test_for_c/lib/incmod_d b/unit_test_for_c/lib/incmod_d deleted file mode 120000 index f699d6a6..00000000 --- a/unit_test_for_c/lib/incmod_d +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/include/ip_v3.0.1_d \ No newline at end of file diff --git a/unit_test_for_c/lib/libip_4.a b/unit_test_for_c/lib/libip_4.a deleted file mode 120000 index b5ca0902..00000000 --- a/unit_test_for_c/lib/libip_4.a +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/libip_v3.0.1_4.a \ No newline at end of file diff --git a/unit_test_for_c/lib/libip_8.a b/unit_test_for_c/lib/libip_8.a deleted file mode 120000 index 09e2c4af..00000000 --- a/unit_test_for_c/lib/libip_8.a +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/libip_v3.0.1_8.a \ No newline at end of file diff --git a/unit_test_for_c/lib/libip_d.a b/unit_test_for_c/lib/libip_d.a deleted file mode 120000 index f8bebcc2..00000000 --- a/unit_test_for_c/lib/libip_d.a +++ /dev/null @@ -1 +0,0 @@ -../../ip/v3.0.1/libip_v3.0.1_d.a \ No newline at end of file From 94dcbd73e6e9cddd03dc98dbe2a19b5364ba976c Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 16 Jun 2020 10:09:31 -0400 Subject: [PATCH 04/12] bugfix on PackageConfig.cmake --- cmake/PackageConfig.cmake.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/PackageConfig.cmake.in b/cmake/PackageConfig.cmake.in index f7420632..3be288b3 100644 --- a/cmake/PackageConfig.cmake.in +++ b/cmake/PackageConfig.cmake.in @@ -7,7 +7,8 @@ # Include targets file. This will create IMPORTED target @PROJECT_NAME@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") -if(@OpenMP_Fortran_FOUND@) +# ON/OFF implies ip was compiled with/without OPENMP +if(@OPENMP@) find_dependency(OpenMP) endif() From 8eca659d7b8573445057b40834df9d31ba06769d Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 16 Jun 2020 13:26:42 -0400 Subject: [PATCH 05/12] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e16be2e2..a1bac32d 100644 --- a/README.md +++ b/README.md @@ -21,17 +21,16 @@ make install # Testing -Testing requires - -[pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit). - +Testing requires[pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit). +``` cmake .. -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="/path/to/pfunit;/path/to/NCEPLIBS" make -j2 make test +``` ### Version -3.0.0 +3.1.0 ### Authors From 73c09b452ac1430c7a359c6ad80b558a818b8d4d Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 16 Jun 2020 13:36:11 -0400 Subject: [PATCH 06/12] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1bac32d..f739fb4e 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,12 @@ make -j2 make install ``` -# Testing +### Testing -Testing requires[pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit). +Testing requires [pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit). ``` -cmake .. -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="/path/to/pfunit;/path/to/NCEPLIBS" +cmake -DENABLE_TESTS=ON -DCMAKE_PREFIX_PATH="/path/to/pfunit;/path/to/NCEPLIBS" /path/to/NCEPLIBS-ip make -j2 make test ``` From efad225afd2b47e56a97fbc5543187c59dc46a8e Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Mon, 22 Jun 2020 13:10:12 -0400 Subject: [PATCH 07/12] Add message to PackageConfig when library is found --- cmake/PackageConfig.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/PackageConfig.cmake.in b/cmake/PackageConfig.cmake.in index 3be288b3..874cd7e6 100644 --- a/cmake/PackageConfig.cmake.in +++ b/cmake/PackageConfig.cmake.in @@ -14,5 +14,7 @@ endif() get_target_property(@PROJECT_NAME@_BUILD_TYPES @PROJECT_NAME@::@PROJECT_NAME@_4 IMPORTED_CONFIGURATIONS) - check_required_components("@PROJECT_NAME@") + +get_target_property(location @PROJECT_NAME@::@PROJECT_NAME@_4 LOCATION) +message(STATUS "Found @PROJECT_NAME@: ${location} (found version @PROJECT_VERSION@)") From d52afea7e6ce1999c71b53973a158d5fd852222c Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Tue, 23 Jun 2020 12:33:43 -0400 Subject: [PATCH 08/12] Add quotes to version --- cmake/PackageConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/PackageConfig.cmake.in b/cmake/PackageConfig.cmake.in index 874cd7e6..5484c04e 100644 --- a/cmake/PackageConfig.cmake.in +++ b/cmake/PackageConfig.cmake.in @@ -17,4 +17,4 @@ get_target_property(@PROJECT_NAME@_BUILD_TYPES @PROJECT_NAME@::@PROJECT_NAME@_4 check_required_components("@PROJECT_NAME@") get_target_property(location @PROJECT_NAME@::@PROJECT_NAME@_4 LOCATION) -message(STATUS "Found @PROJECT_NAME@: ${location} (found version @PROJECT_VERSION@)") +message(STATUS "Found @PROJECT_NAME@: ${location} (found version \"@PROJECT_VERSION@\")") From bb4ef59084e7163201ba3116ef2b33e8d7293b1d Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Tue, 23 Jun 2020 13:56:41 -0400 Subject: [PATCH 09/12] Make install relocatable --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 51857227..66cd9f01 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,7 +36,7 @@ foreach(kind ${kinds}) set_target_properties(${lib_name} PROPERTIES INTERFACE_LINK_LIBRARIES ${lib_name}) target_include_directories(${lib_name} PUBLIC $ - $) + $) list(APPEND LIB_TARGETS ${lib_name}) From 297d397b02613f330a056e28cd9b9d63081f8d57 Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Thu, 25 Jun 2020 11:34:12 -0400 Subject: [PATCH 10/12] Add option ton enable tests --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 894df83b..a8ee300b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ project( LANGUAGES Fortran) option(OPENMP "use OpenMP threading" OFF) +option(ENABLE_TESTS "Build pfunit tests?" OFF) if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)$") message(STATUS "Setting build type to 'Release' as none was specified.") From c0a1b91a61f9928101a859f1eaac8e5515028b15 Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Thu, 25 Jun 2020 22:47:08 -0400 Subject: [PATCH 11/12] Update VERSION to 3.2.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4a36342f..944880fa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.0 +3.2.0 From 47cb10e1b18c6e1350ae199ee5888000230494fa Mon Sep 17 00:00:00 2001 From: kgerheiser Date: Fri, 26 Jun 2020 11:20:28 -0400 Subject: [PATCH 12/12] Update version in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f739fb4e..a672ac03 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ make test ``` ### Version -3.1.0 +3.2.0 ### Authors