Skip to content

Commit 7eb7786

Browse files
authored
Merge pull request #3203 from GEOS-ESM/hotfix/bmauer/fixes-#3201
fixes #3201
2 parents 306ca39 + 398c9b3 commit 7eb7786

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

.circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parameters:
1616

1717
# Anchors to prevent forgetting to update a version
1818
os_version: &os_version ubuntu20
19-
baselibs_version: &baselibs_version v7.25.0
19+
baselibs_version: &baselibs_version v7.27.0
2020
bcs_version: &bcs_version v11.6.0
2121
tag_build_arg_name: &tag_build_arg_name maplversion
2222

@@ -161,7 +161,8 @@ workflows:
161161
fixture_branch: feature/mathomp4/mapldevelop
162162
checkout_mapl_branch: true
163163
mepodevelop: false
164-
rebuild_procs: 1
164+
rebuild_procs: 4
165+
build_type: Release
165166

166167
build-and-publish-docker:
167168
when:

.github/workflows/workflow.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
name: Build and Test MAPL GNU
3636
runs-on: ubuntu-latest
3737
container:
38-
image: gmao/ubuntu20-geos-env-mkl:v7.25.0-openmpi_5.0.2-gcc_13.2.0
38+
image: gmao/ubuntu20-geos-env-mkl:v7.27.0-openmpi_5.0.5-gcc_14.2.0
3939
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
4040
# It seems like we might not need secrets on GitHub Actions which is good for forked
4141
# pull requests
@@ -86,7 +86,7 @@ jobs:
8686
name: Build and Test MAPL Intel
8787
runs-on: ubuntu-latest
8888
container:
89-
image: gmao/ubuntu20-geos-env:v7.25.0-intelmpi_2021.13-ifort_2021.13
89+
image: gmao/ubuntu20-geos-env:v7.27.0-intelmpi_2021.13-ifort_2021.13
9090
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
9191
# It seems like we might not need secrets on GitHub Actions which is good for forked
9292
# pull requests

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Deprecated
1919

20+
## [2.50.3] - 2024-12-02
21+
22+
### Fixed
23+
24+
- Fixed bug where c null character is not removed from end of string when reading netcdf attribute in NetCDF4\_FileFormatter.F90
25+
2026
## [2.50.2] - 2024-10-30
2127

2228
### Fixed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endif ()
88

99
project (
1010
MAPL
11-
VERSION 2.50.2
11+
VERSION 2.50.3
1212
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF
1313

1414
# Set the possible values of build type for cmake-gui

pfio/NetCDF4_FileFormatter.F90

+7
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module pFIO_NetCDF4_FileFormatterMod
2020
use pfio_NetCDF_Supplement
2121
use netcdf
2222
use mpi
23+
use, intrinsic :: iso_c_binding, only: C_NULL_CHAR
2324
implicit none
2425
private
2526

@@ -992,6 +993,9 @@ subroutine inq_attributes(this, cf, varid, unusable, rc)
992993
status = nf90_get_att(this%ncid, varid, trim(attr_name), str)
993994
!$omp end critical
994995
_VERIFY(status)
996+
if (len > 0) then
997+
if (str(len:len) == C_NULL_CHAR) str = str(1:len-1)
998+
end if
995999
call cf%add_attribute(trim(attr_name), str)
9961000
deallocate(str)
9971001
case (NF90_STRING)
@@ -1088,6 +1092,9 @@ subroutine inq_var_attributes(this, var, varid, unusable, rc)
10881092
status = nf90_get_att(this%ncid, varid, trim(attr_name), str)
10891093
!$omp end critical
10901094
_VERIFY(status)
1095+
if (len > 0) then
1096+
if (str(len:len) == C_NULL_CHAR) str = str(1:len-1)
1097+
end if
10911098
call var%add_attribute(trim(attr_name), str)
10921099
deallocate(str)
10931100
case (NF90_STRING)

0 commit comments

Comments
 (0)