Skip to content

Commit

Permalink
prepare version 0.8.0 (#57)
Browse files Browse the repository at this point in the history
* add TS1 and TSMLT configuration to examples

* add new data sets for WACCM

* fix memory leak in tests

* add updated CFC cross section datasets

* run example test in sub folders

* copy data into example test folders

* reorganize temperature based cross section

* draft taylor series temperature parameterization

* add taylor series param test

* adjust grid merging logic

* finish BRONO2 config and tests

* fix MPI code

* draft burkholder parameterization and tests

* add range override to quantum yields

* finish HO2NO2 config and tests

* update TSMLT config example

* fix example configurations

* fix ch4 example config

* add ch3cl data set and configuration

* add SO2 data set

* Updates and tests for O2 photolysis (#38)

* stub test of LUT LA-SRB calcs

* update lasrb test conditions

* add od and xs calcs to LUT LA-SRB test

* fix memory issues in tests

* finish LA-SRB LUT comparison test

* Add H2SO4 and NO datasets, configurations, and algorithms for WACCM (#41)

* draft h2so4 quantum yield and test

* add h2so4 qy test

* add data and config for H2SO4 and NO

* Add N2O5 algorithms and data sets for WACCM/TSMLT (#43)

* fix bad jo2 config in ts1 example

* add N2O5 algorithms and datasets for WACCM

* fix pack/unpack for temperature based cross section

* add acetone calcs for WACCM (#45)

* add acetone calcs for WACCM

* fix uninitialized variable and air density in tests

* add branch options to acetone quantum yields

* Add YAML option for configuration files (#48)

* add YAML config option

* add yaml to json run comparison tests

* update to new musica-core release

* Add ability to calculate heating rates for photolysis reactions (#50)

* draft heating rates class and tests

* finish heating rate tests

* add heating rate output to driver, and include in TS example

* Remove musica-core dependency (#51)

* merge in musica-core dependencies

* don't run tests in parallel

* remove unneeded utility modules

* remove io functions from string_t

* remove debug output from tests to reduce log file size

* update valgrind suppressions for MPI

* update valgrind suppressions

* fix valgrind suppression format error

* remove wildcards from valgrind supresssion error types

* add valgrind suppression

* compile for gcc-13 (#53)

* compile for gcc-13

* excluding oldtuv when using gcc 13.2

* removing cmake debug message

* trying to add a gcc action

* syntax error

* isntalling netcdff

* trying to test multiple gcc versions

* installing numpy

* scipy

* using better thing

* separating build into docker and gcc (#54)

* separating build into docker and gcc

* fixing pages build

* run tests in serial

* not running tests in parallel for focker

* making sure memcheck happens

* adding ctiation file (#55)

* adding ctiation file

* only adding software citation

* syntax

* more syntax

* maybe now?

* correcting authors

* ...

* or now

* duplicate key

* *marge noise*

* trying to update url

* Fix bug in map test with OpenMP (#56)

* fix openmp bug in map test

* fix map test for non-openmp builds

* prepare for 0.8.0 release

---------

Co-authored-by: Kyle Shores <[email protected]>
  • Loading branch information
mattldawson and K20shores authored Mar 20, 2024
1 parent a8bb45b commit 1792110
Show file tree
Hide file tree
Showing 308 changed files with 28,890 additions and 2,691 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# include things to copy
!src/
!include/
!etc/
!data/
!cmake/
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Docker

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
docker-build-and-test:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Build and Test - ${{ matrix.dockerfile }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
dockerfile:
- Dockerfile
- Dockerfile.coverage
- Dockerfile.memcheck
- Dockerfile.mpi
- Dockerfile.mpi.memcheck
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build Docker image
run: docker build -t tuvx -f docker/${{ matrix.dockerfile }} .

- name: Run tests in container
if: matrix.dockerfile != 'Dockerfile.coverage'
run: docker run --name test-container -t tuvx bash -c 'make test ARGS="--rerun-failed --output-on-failure"'

- name: Run coverage tests in container
if: matrix.dockerfile == 'Dockerfile.coverage'
run: docker run --name test-container -t tuvx bash -c 'make coverage ARGS="--rerun-failed --output-on-failure"'

- name: Copy coverage from container
if: matrix.dockerfile == 'Dockerfile.coverage'
run: docker cp test-container:build/coverage.info .

- name: Upload coverage report
if: matrix.dockerfile == 'Dockerfile.coverage'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.info
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# create two copies of the documentaiton
# 1. the frozen version, represented as vX.X in the version switcher
docker build -t tuvx -f Dockerfile.docs .
docker build -t tuvx -f docker/Dockerfile.docs .
id=$(docker create tuvx)
docker cp $id:/build/docs/sphinx tmpdocs
docker rm -v $id
Expand All @@ -63,7 +63,7 @@ jobs:
# 2. stable, represented as vX.X (stable) in the version switcher
# edit conf.py to produce a version string that looks like vX.X (stable)
docker build -t tuvx -f Dockerfile.docs --build-arg SUFFIX=" (stable)" .
docker build -t tuvx -f docker/Dockerfile.docs --build-arg SUFFIX=" (stable)" .
id=$(docker create tuvx)
docker cp $id:/build/docs/sphinx tmpdocs
docker rm -v $id
Expand All @@ -84,7 +84,7 @@ jobs:
!contains(github.ref, env.DEFAULT_BRANCH)
run: |
set -x
docker build -t tuvx -f Dockerfile.docs .
docker build -t tuvx -f docker/Dockerfile.docs .
id=$(docker create tuvx)
docker cp $id:/build/docs/sphinx tmpdocs
docker rm -v $id
Expand Down
59 changes: 0 additions & 59 deletions .github/workflows/test.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Ubuntu

on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
gcc:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
gcc_version: [11, 12, 13]
env:
FC: gfortran-${{ matrix.gcc_version }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libnetcdf-dev netcdf-bin libnetcdff-dev
- name: Install python dependencies
run: pip install numpy scipy
- name: Run Cmake
run: cmake -S . -B build
- name: Build
run: cmake --build build --parallel
- name: Run tests
run: |
cd build
ctest --rerun-failed --output-on-failure . --verbose
15 changes: 15 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Dawson
given-names: Matt
- family-names: Shores
given-names: Kyle
- family-names: Walters
given-names: Stacy
title: "NCAR/tuv-x: Version 0.8.0"
version: 0.8.0
doi: 10.5281/zenodo.7126039
url: "https://github.com/NCAR/tuv-x"
year: 2024
publisher: Zenodo
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set(CMAKE_USER_MAKE_RULES_OVERRIDE "cmake/set_defaults.cmake")

project(
tuv-x
VERSION 0.7.0
LANGUAGES Fortran
VERSION 0.8.0
LANGUAGES Fortran CXX C
)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
Expand All @@ -31,7 +31,7 @@ option(ENABLE_MPI "Enable MPI parallel support" OFF)
cmake_dependent_option(ENABLE_OPENMP "Enable OpenMP support" OFF "ENABLE_MPI" OFF)
option(ENABLE_TESTS "Build tests" ON)
option(ENABLE_COVERAGE "Enable code coverage output" OFF)
option(ENABLE_MEMCHECK "Enable memory checking in tests" ON)
option(ENABLE_MEMCHECK "Enable memory checking in tests" OFF)
option(ENABLE_NC_CONFIG "Use nc-config to determine NetCDF libraries" OFF)
option(BUILD_DOCS "Build the documentation" OFF)

Expand Down Expand Up @@ -78,11 +78,16 @@ add_executable(tuv-x src/tuvx.F90 version.F90)
target_link_libraries(tuv-x
PUBLIC
musica::tuvx
musica::musicacore
yaml-cpp::yaml-cpp
${BLAS_LIBRARIES}
${LAPACK_LIBRARIES}
)

target_include_directories(tuv-x
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>)

if(ENABLE_OPENMP)
target_link_libraries(tuv-x PUBLIC OpenMP::OpenMP_Fortran)
endif()
Expand Down
51 changes: 0 additions & 51 deletions Dockerfile

This file was deleted.

19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
Tropospheric ultraviolet-extended (TUV-x): A photolysis rate calculator

[![License](https://img.shields.io/github/license/NCAR/tuv-x.svg)](https://github.com/NCAR/tuv-x/blob/main/LICENSE)
[![CI Status](https://github.com/NCAR/tuv-x/actions/workflows/test.yml/badge.svg)](https://github.com/NCAR/tuv-x/actions/workflows/test.yml)
[![Ubuntu](https://github.com/NCAR/tuv-x/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/NCAR/tuv-x/actions/workflows/ubuntu.yml)
[![Docker](https://github.com/NCAR/tuv-x/actions/workflows/docker.yml/badge.svg)](https://github.com/NCAR/tuv-x/actions/workflows/docker.yml)
[![codecov](https://codecov.io/gh/NCAR/tuv-x/branch/main/graph/badge.svg?token=H46AAEAQF9)](https://codecov.io/gh/NCAR/tuv-x)
[![DOI](https://zenodo.org/badge/396946468.svg)](https://zenodo.org/badge/latestdoi/396946468)
[![](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/NCAR/tuv-x)

Copyright (C) 2020 National Center for Atmospheric Research
Copyright (C) 2020-4 National Center for Atmospheric Research

# Try it out!

Expand All @@ -22,7 +23,7 @@ a tutorial on how to use TUV-x.
# Building and installing
To build and install TUV-x locally, you must have the following libraries installed:

- [json-fortran](https://github.com/jacobwilliams/json-fortran)
- [yaml-cpp](https://github.com/jbeder/yaml-cpp/)
- [NetCDF](https://www.unidata.ucar.edu/software/netcdf/) (both C and Fortran libraries)

You must also have CMake installed on your machine.
Expand Down Expand Up @@ -143,13 +144,13 @@ The TUV-x software can be cited with
author = {Matt Dawson and
Kyle Shores and
Stacy Walters},
title = {NCAR/tuv-x: Version 0.2.0},
month = sep,
year = 2022,
title = {NCAR/tuv-x: Version 0.5.0},
month = dec,
year = 2023,
publisher = {Zenodo},
version = {v0.2.0},
doi = {10.5281/zenodo.7126040},
url = {https://doi.org/10.5281/zenodo.7126040}
doi = {10.5281/zenodo.8110063},
url = {https://doi.org/10.5281/zenodo.8110063}
}
```

Expand Down Expand Up @@ -185,4 +186,4 @@ installation and usage instructions.
# License

- [Apache 2.0](/LICENSE)
- Copyright (C) 2022 National Center for Atmospheric Research
- Copyright (C) 2020-4 National Center for Atmospheric Research
Loading

0 comments on commit 1792110

Please sign in to comment.