diff --git a/.circleci/config.yml b/.circleci/config.yml index 0de92fb286bb..de9f64bfa511 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ parameters: # Anchors to prevent forgetting to update a version os_version: &os_version ubuntu20 -baselibs_version: &baselibs_version v7.25.0 +baselibs_version: &baselibs_version v7.27.0 bcs_version: &bcs_version v11.6.0 tag_build_arg_name: &tag_build_arg_name maplversion @@ -161,7 +161,8 @@ workflows: fixture_branch: feature/mathomp4/mapldevelop checkout_mapl_branch: true mepodevelop: false - rebuild_procs: 1 + rebuild_procs: 4 + build_type: Release build-and-publish-docker: when: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d6c9d61fbf4d..967d7aa53f0b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,7 +35,7 @@ jobs: name: Build and Test MAPL GNU runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env-mkl:v7.25.0-openmpi_5.0.2-gcc_13.2.0 + image: gmao/ubuntu20-geos-env-mkl:v7.27.0-openmpi_5.0.5-gcc_14.2.0 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests @@ -86,7 +86,7 @@ jobs: name: Build and Test MAPL Intel runs-on: ubuntu-latest container: - image: gmao/ubuntu20-geos-env:v7.25.0-intelmpi_2021.13-ifort_2021.13 + image: gmao/ubuntu20-geos-env:v7.27.0-intelmpi_2021.13-ifort_2021.13 # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 # It seems like we might not need secrets on GitHub Actions which is good for forked # pull requests diff --git a/CHANGELOG.md b/CHANGELOG.md index 3669b343278b..16bea1129ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [2.50.3] - 2024-12-02 + +### Fixed + +- Fixed bug where c null character is not removed from end of string when reading netcdf attribute in NetCDF4\_FileFormatter.F90 + ## [2.50.2] - 2024-10-30 ### Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index c8c6ebf7a5bc..e39c76bf75cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ endif () project ( MAPL - VERSION 2.50.2 + VERSION 2.50.3 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF # Set the possible values of build type for cmake-gui diff --git a/pfio/NetCDF4_FileFormatter.F90 b/pfio/NetCDF4_FileFormatter.F90 index 1527d8eb5524..ca06cf590a1c 100644 --- a/pfio/NetCDF4_FileFormatter.F90 +++ b/pfio/NetCDF4_FileFormatter.F90 @@ -20,6 +20,7 @@ module pFIO_NetCDF4_FileFormatterMod use pfio_NetCDF_Supplement use netcdf use mpi + use, intrinsic :: iso_c_binding, only: C_NULL_CHAR implicit none private @@ -992,6 +993,9 @@ subroutine inq_attributes(this, cf, varid, unusable, rc) status = nf90_get_att(this%ncid, varid, trim(attr_name), str) !$omp end critical _VERIFY(status) + if (len > 0) then + if (str(len:len) == C_NULL_CHAR) str = str(1:len-1) + end if call cf%add_attribute(trim(attr_name), str) deallocate(str) case (NF90_STRING) @@ -1088,6 +1092,9 @@ subroutine inq_var_attributes(this, var, varid, unusable, rc) status = nf90_get_att(this%ncid, varid, trim(attr_name), str) !$omp end critical _VERIFY(status) + if (len > 0) then + if (str(len:len) == C_NULL_CHAR) str = str(1:len-1) + end if call var%add_attribute(trim(attr_name), str) deallocate(str) case (NF90_STRING)