diff --git a/CHANGELOG.md b/CHANGELOG.md index c48ef20b3d58..c1b3669db898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed + +- Added ability to read the attribute with explicit type "string" of a netcdf variable. - Start implementing changes for vertical regridding in ExtData - Add ability to connect export of the MAPL hierachy to ExtData via CAP.rc file - Added new driver, CapDriver.x, to excerise the MAPL_Cap with the configuratable component also used by ExtDataDriver.x diff --git a/pfio/NetCDF4_FileFormatter.F90 b/pfio/NetCDF4_FileFormatter.F90 index 26b894e39b44..7ffc315bbbba 100644 --- a/pfio/NetCDF4_FileFormatter.F90 +++ b/pfio/NetCDF4_FileFormatter.F90 @@ -600,7 +600,6 @@ subroutine put_var_attributes(this, var, varid, unusable, rc) iter = attributes%begin() do while (iter /= attributes%end()) attr_name => iter%key() - p_attribute => iter%value() shp = p_attribute%get_shape() if (size(shp) == 0) then ! scalar @@ -1079,9 +1078,12 @@ subroutine inq_var_attributes(this, var, varid, unusable, rc) call var%add_attribute(trim(attr_name), str) deallocate(str) case (NF90_STRING) - !W.Y. Note: pfio does not support variable's string attribute - ! It only supports global 1-d string attribute - cycle + !$omp critical + status = pfio_get_att_string(this%ncid, varid, trim(attr_name), str) + !$omp end critical + _VERIFY(status) + call var%add_attribute(trim(attr_name), str) + deallocate(str) case default _RETURN(_FAILURE) end select