Skip to content

Commit

Permalink
Merge pull request #3203 from GEOS-ESM/hotfix/bmauer/fixes-#3201
Browse files Browse the repository at this point in the history
fixes #3201
  • Loading branch information
bena-nasa authored Dec 3, 2024
2 parents 306ca39 + 398c9b3 commit 7eb7786
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions pfio/NetCDF4_FileFormatter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7eb7786

Please sign in to comment.