FORCES merge requestshttps://git.ufz.de/chs/forces/-/merge_requests2021-11-22T12:46:36+01:00https://git.ufz.de/chs/forces/-/merge_requests/32Pfunit tests Part I2021-11-22T12:46:36+01:00Sebastian MüllerPfunit tests Part I# Update Summary for FORCES pFUnit tests Part 1
### Unit-tests:
1. **test_mo_anneal, converted**
1. Only changed to pFUnit assertion.
2. Print outs of initialization and annealing results still kept.
2. **test_mo_append, conver...# Update Summary for FORCES pFUnit tests Part 1
### Unit-tests:
1. **test_mo_anneal, converted**
1. Only changed to pFUnit assertion.
2. Print outs of initialization and annealing results still kept.
2. **test_mo_append, converted**
1. Added tests for additional data types: i8, sp, dp, logical.
2. Added test for:
1. Appending non-allocated vector with scalars.
2. Appending non-allocated matrix with a matrix.
3. Appending matrices with larger/smaller columns with filler values. *Note: Exception outcome w/o filler values cannot be tested.*
4. Appending 3d matrix; non-allocated and matrix with equal size in 2nd and 3rd component. For dp, along a component of choice idim.
5. Pasting matrix by scalar and vector; non-allocated, different row size, and nodata.
6. Pasting 3d matrix; non-allocated and nodata.
7. Pasting 4d matrix; non-allocated and nodata. For dp, along a component of choice idim.
3. **test_mo_append, converted**
1. Added function append_i4_3d for the append() interface.
2. Added tests for additional data types: i8, sp, dp, logical.
3. Added test for:
1. Appending non-allocated vector with scalars.
2. Appending non-allocated matrix with a matrix.
3. Appending matrices with larger/smaller columns with filler values. *Note: Exception outcome w/o filler values cannot be tested.*
4. Appending 3d matrix; non-allocated and matrix with equal size in 2nd and 3rd component. For dp, along a component of choice idim.
5. Pasting matrix by scalar and vector; non-allocated, different row size, and nodata.
6. Pasting 3d matrix; non-allocated and nodata.
7. Pasting 4d matrix; non-allocated and nodata. For dp, along a component of choice idim.
4. **test_mo_boxcox, converted**
1. Added test for masked data and small exponent power for boxcox transform.
5. **test_mo_corr, converted**
1. Added test for masked data.
6. **test_mo_dds, converted**
1. Only changed to pFUnit assertion.
2. Print outs of initialization and DDS algorithm results still kept.
7. **test_mo_errormeasures, converted**
1. Added tests for error measures KGEnocorr, wNSE.
2. Added tests for masked/unmasked data.
8. **test_mo_finish, removed**
1. Removed as module is deemed redundant.
9. **test_mo_julian, converted**
1. Only changed to pFUnit assertion.
10. **test_mo_linfit, converted**
1. Only changed to pFUnit assertion.
11. **test_mo_mcmc, converted**
1. Only changed to pFUnit assertion.
12. **test_mo_moment, converted**
1. Only changed to pFUnit assertion.
13. **test_mo_ncread, converted**
1. Only changed to pFUnit assertion.
14. **test_mo_netcdf, converted**
1. Only changed to pFUnit assertion.
15. **test_mo_nml, converted**
1. Only changed to pFUnit assertion.
16. **test_mo_orderpack, converted**
1. Only changed to pFUnit assertion.
17. **test_mo_percentile, converted**
1. Added tests for odd numbers of data points.
2. Added tests for masked data percentile, n_element, median, and qmedian.
3. Added tests for 0d data for all functions.
4. Added tests for different modes in sp data type.
18. **test_mo_poly, converted**
1. Added test for the evaluation of point at the vertex.
19. **test_mo_sce, converted**
1. Added SCE test for griewank function.
20. **test_mo_spatialsimilarity, converted**
1. Only changed to pFUnit assertion.
21. **test_mo_standard_score, converted**
1. Added test for masked data with classified standard score.
22. **test_mo_string_utils, converted**
1. Only changed to pFUnit assertion.
23. **test_mo_temporal_aggregation, created**
1. Monthly average calculation for daily data.
2. Hourly average calculation for hourly data.
3. Optional input for missing value substitute untested.
24. **test_mo_timer, converted**
1. Removed timer printout.
2. Perform simple time sanity check.
25. **test_mo_utils, converted**
1. Only changed to pFUnit assertion.
2. Since mo_utils has many functionality as logical operators, most assertion used are simple logical, i.e. assertTrue() and assertFalse()
26. **test_mo_xor4096, converted**
1. Only changed to pFUnit assertion.
### Modules:
1. **mo_append, modified**
1. Added function append_i4_3d for the append() interface.
2. **mo_percentile, modified**
1. Fixed a typo in the module function n_elements() so that masking works properly.
3. **mo_xor4096, modified**
1. Implemented a fix by Mathias Cuntz to solve overflow on RNG.
### Data files:
1. **namelist.txt, moved**
1. Moved to pf_tests/files for use in test_mo_nml.
2. **field.dat, moved**
1. Moved to pf_tests/files for use in test_mo_errormeasures.
3. **field_maskf90.dat, moved**
1. Moved to pf_tests/files for use in test_mo_errormeasures.
4. **period10day.dat, created**
1. 10 day hourly data from date 01.01.2021 for use in test_mo_temporal_aggregation.
5. **year.dat, created**
1. daily data from 01.01.2021 to 31.12.2021 for use in test_mo_temporal_aggregation.
6. **year_leap.dat, created**
1. daily data from 01.01.2020 to 31.12.2020 for use in test_mo_temporal_aggregation.v0.2Arya PrasetyaArya Prasetyahttps://git.ufz.de/chs/forces/-/merge_requests/31FPP/CPP: rename files to be pre-processed to *.F90, so pre-processing is done...2021-07-16T14:44:18+02:00Sebastian MüllerFPP/CPP: rename files to be pre-processed to *.F90, so pre-processing is done automaticallycloses #20
This is best practice and simplifies compiling. In addition doxygen is able to correctly parse files that include pre-processor directives.closes #20
This is best practice and simplifies compiling. In addition doxygen is able to correctly parse files that include pre-processor directives.v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/30mo_cli: an argument parser to create command line interfaces2021-05-28T14:01:25+02:00Sebastian Müllermo_cli: an argument parser to create command line interfacesThis module provides a class `cli_parser` to create a command line argument parser for a fortran executable. One can define options with a name (--name) and a short name (-n) and set them to have a value or not (-n <value>).
Also default...This module provides a class `cli_parser` to create a command line argument parser for a fortran executable. One can define options with a name (--name) and a short name (-n) and set them to have a value or not (-n <value>).
Also default values can be passed and options can be set to "required".
A single "blank" option can bedefined, that is not indicated by a hyphenated switch.
See the following example:
```fortran
program main
use mo_cli, only: cli_parser
implicit none
type(cli_parser) :: parser
parser = cli_parser( &
description="This program has a CLI.", &
add_version_option=.true., &
version="1.3")
call parser%add_option( &
name="cwd", &
blank=.true., &
help="The working directory.")
call parser%add_option( &
name="file", &
s_name="f", &
has_value=.true., &
value_name="path", &
default="nope", &
help="Your file path.")
call parser%add_option( &
name="file2", &
has_value=.true., &
value_name="path", &
required=.true., &
help="Your 2nd file path.")
call parser%add_option("opt", help="A switch")
call parser%parse()
print*, "file: ", parser%option_value("file")
print*, "dir: ", parser%option_value("cwd")
print*, "opt: ", parser%option_was_read("opt")
end program main
```
This can be called like:
```
$ ./prog --file2 f2 -f f1 --opt a/path
file: f1
dir: a/path
opt: T
```
Or to display the auto generated help:
```bash
$ ./prog -h
This program has a CLI.
Usage: PROJ [options] <cwd>
Options:
<cwd>
Description: The working directory.
--file2 <path>
Description: Your 2nd file path.
(required)
--help / -h
Description: Print this help message.
--version / -v
Description: Print the version of the program.
--file / -f <path>
Description: Your file path.
Default: nope
--opt
Description: A switch
```v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/29Update Documentation Style2021-05-21T16:49:28+02:00Sebastian MüllerUpdate Documentation StyleThis updates the Doxygen generated HTML documentation in order to use https://github.com/jothepro/doxygen-awesome-cssThis updates the Doxygen generated HTML documentation in order to use https://github.com/jothepro/doxygen-awesome-cssv1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/28Ci coverage2021-05-21T15:04:14+02:00Sebastian MüllerCi coverageEnable coverage calculation and add coverage report to generated pages.Enable coverage calculation and add coverage report to generated pages.v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/27Release v0.1.02021-05-11T17:25:19+02:00Sebastian MüllerRelease v0.1.0First release of FORCES.First release of FORCES.v0.1https://git.ufz.de/chs/forces/-/merge_requests/26PreProcessor: remove ABSOFT, PGI and GFORTRAN41 directives2021-05-11T12:12:19+02:00Sebastian MüllerPreProcessor: remove ABSOFT, PGI and GFORTRAN41 directivesCloses #12
- remove ABSOFT, PGI and GFORTRAN41 directives
- remove trailing whitespacesCloses #12
- remove ABSOFT, PGI and GFORTRAN41 directives
- remove trailing whitespacesSebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/25Update Cmake structure2021-05-11T01:04:23+02:00Sebastian MüllerUpdate Cmake structure- better find NetCDF
- only support NAG, GNU and Intel compiler
- skip coverage for the time being
- cleanup Cmake scripts
Thanks to @ottor for working on this.- better find NetCDF
- only support NAG, GNU and Intel compiler
- skip coverage for the time being
- cleanup Cmake scripts
Thanks to @ottor for working on this.v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/24Repository refactortoring2021-05-11T01:05:26+02:00Sebastian MüllerRepository refactortoringRefactor Repository
- add README.md
- link jams_fortran
- add logo
- update LICENSE
- add docRefactor Repository
- add README.md
- link jams_fortran
- add logo
- update LICENSE
- add docv1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/23Add SubRepos: Cmake and HPC-module-loads2021-03-31T11:44:50+02:00Sebastian MüllerAdd SubRepos: Cmake and HPC-module-loadsThis Merge-Request adds two subrepos:
- `cmake`: https://git.ufz.de/chs/cmake-fortran-scripts
- `hpc-module-loads`: https://git.ufz.de/chs/HPC-Fortran-module-loads
In order to have these scripts in one place for easier maintenance.This Merge-Request adds two subrepos:
- `cmake`: https://git.ufz.de/chs/cmake-fortran-scripts
- `hpc-module-loads`: https://git.ufz.de/chs/HPC-Fortran-module-loads
In order to have these scripts in one place for easier maintenance.v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/22Mhm compat2021-05-10T17:44:52+02:00Robert SchweppeMhm compatthis merge request adresses changes needed to use FORCES in mHM. This entitles merging the latest edits in mHM's lib folder to FORCES. Also, the CMake scripts are further adjustedthis merge request adresses changes needed to use FORCES in mHM. This entitles merging the latest edits in mHM's lib folder to FORCES. Also, the CMake scripts are further adjustedv1.0Robert SchweppeRobert Schweppehttps://git.ufz.de/chs/forces/-/merge_requests/21Resolve "Create CI workflow"2021-03-29T09:19:29+02:00Sebastian MüllerResolve "Create CI workflow"Closes #4
Add CI workflow to developCloses #4
Add CI workflow to developv1.0Robert SchweppeRobert Schweppehttps://git.ufz.de/chs/forces/-/merge_requests/19bugfix in mo_os2021-05-28T14:07:59+02:00Nicola Nadine Döringbugfix in mo_osAdd the changes in mo_os that was done in mHM.Add the changes in mo_os that was done in mHM.https://git.ufz.de/chs/forces/-/merge_requests/18Adding `mo_os` for operation system actions2021-05-28T14:07:59+02:00Nicola Nadine DöringAdding `mo_os` for operation system actionsAdding `mo_os`. Provided routines:
- `path_exists` - check if given path exists
- `path_isfile` - check if given path is a file
- `path_isdir` - check if given path is a directory
- `path_splitext` - split path into basename and extensio...Adding `mo_os`. Provided routines:
- `path_exists` - check if given path exists
- `path_isfile` - check if given path is a file
- `path_isdir` - check if given path is a directory
- `path_splitext` - split path into basename and extension
- `path_split` - split path into head (root dir) and tail (file)v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/16Resolve "Create CI workflow"2021-03-26T14:50:34+01:00Robert SchweppeResolve "Create CI workflow"@muellese
I created a CI setup for MPR (https://git.ufz.de/chs/MPR/-/tree/64-implement-ci-and-documentation-building) and this also runs the tests for all dependencies: also the fortran-lightweight-lib.
There I realized, that GFortran8....@muellese
I created a CI setup for MPR (https://git.ufz.de/chs/MPR/-/tree/64-implement-ci-and-documentation-building) and this also runs the tests for all dependencies: also the fortran-lightweight-lib.
There I realized, that GFortran8.3 in release mode fails with a SegFault in `test_mo_xor4096`. Also Intel18 in Debug mode hangs with `test_mo_mcmc`. I was wondering if you can a have a look into that?
In order to test this, I also setup a (preliminary?) CI setup for this repo with a runner for my namespace on Eve's frontend2.
Closes #4v1.0Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/14- addon to prior merge request2020-05-24T23:13:13+02:00Robert Schweppe- addon to prior merge requestRobert SchweppeRobert Schweppehttps://git.ufz.de/chs/forces/-/merge_requests/13Mo netcdf cf conventions2020-05-24T23:10:11+02:00Robert SchweppeMo netcdf cf conventionsAddressed issue #6. The templates are there, CMake integration is there, the functionality for *reading* the CF attributes is there. What is still missing is support for `add_offset` and `scale_factor` and the complete setting of these a...Addressed issue #6. The templates are there, CMake integration is there, the functionality for *reading* the CF attributes is there. What is still missing is support for `add_offset` and `scale_factor` and the complete setting of these attributes through `setData`.Robert SchweppeRobert Schweppehttps://git.ufz.de/chs/forces/-/merge_requests/12add support for 1D numerical attributes in mo_netcdf and others2021-03-29T09:30:14+02:00Robert Schweppeadd support for 1D numerical attributes in mo_netcdf and othersThis is needed to be able to read some attributes like `valid_range` from a netCDF file corresponding to [CF conventions](http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#missing-data), as also set in t...This is needed to be able to read some attributes like `valid_range` from a netCDF file corresponding to [CF conventions](http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#missing-data), as also set in the [netcdff docs](https://www.unidata.ucar.edu/software/netcdf/docs-fortran/f90-attributes.html).
I also updated the `CMakeLists.txt` file with some updated file for detecting netCDF-C and netCDF-Fortran ([here](https://github.com/WRF-CMake/wrf/blob/wrf-cmake/cmake/FindNetCDF.cmake). It requires an environment variable pointing to the netcdf installation though, if it is not found by `find_library`.
I fixed some bugs in `mo_sce.f90` raised by the NAGfor compiler.Sebastian MüllerSebastian Müllerhttps://git.ufz.de/chs/forces/-/merge_requests/11Addition: error_message2019-12-19T13:17:15+01:00Sebastian MüllerAddition: error_messageA new kind of message: ``error_message``.
Calling this will stop the program with exit-code 1 (non-zero).
The tests are using this error_message now, so if they fail, the cmake test runs will notice it.A new kind of message: ``error_message``.
Calling this will stop the program with exit-code 1 (non-zero).
The tests are using this error_message now, so if they fail, the cmake test runs will notice it.Robert SchweppeRobert Schweppehttps://git.ufz.de/chs/forces/-/merge_requests/10Remove Numerical recipes; add mo_corr and mo_boxcox (NR free); correct test c...2019-12-16T11:13:48+01:00Sebastian MüllerRemove Numerical recipes; add mo_corr and mo_boxcox (NR free); correct test cmakelistscheck.
Please squash, there was a lot going on...check.
Please squash, there was a lot going on...Robert SchweppeRobert Schweppe