diff --git a/CHANGELOG.md b/CHANGELOG.md index c77efa706ed0..3c55472112fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,12 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated - -## [2.18.3] - 2022-03-14 +## [2.18.3] - 2022-03-15 ### Fixed - Fixed bug in 2.18.2 release when computing lats in degrees lat-lon grid factory +- Fixed GNU bug when defining file metadata in lat-lon grid factory ## [2.18.2] - 2022-03-11 diff --git a/base/MAPL_LatLonGridFactory.F90 b/base/MAPL_LatLonGridFactory.F90 index 37071162648e..9cf017f3784c 100644 --- a/base/MAPL_LatLonGridFactory.F90 +++ b/base/MAPL_LatLonGridFactory.F90 @@ -1825,6 +1825,7 @@ subroutine append_metadata(this, metadata) type (FileMetadata), intent(inout) :: metadata type (Variable) :: v + real(kind=REAL64), allocatable :: temp_coords(:) ! Horizontal grid dimensions call metadata%add_dimension('lon', this%im_world) @@ -1834,13 +1835,16 @@ subroutine append_metadata(this, metadata) v = Variable(type=PFIO_REAL64, dimensions='lon') call v%add_attribute('long_name', 'longitude') call v%add_attribute('units', 'degrees_east') - call v%add_const_value(UnlimitedEntity(this%get_longitudes_degrees())) + temp_coords = this%get_longitudes_degrees() + call v%add_const_value(UnlimitedEntity(temp_coords)) call metadata%add_variable('lon', v) + deallocate(temp_coords) v = Variable(type=PFIO_REAL64, dimensions='lat') call v%add_attribute('long_name', 'latitude') call v%add_attribute('units', 'degrees_north') - call v%add_const_value(UnlimitedEntity(this%get_latitudes_degrees())) + temp_coords=this%get_latitudes_degrees() + call v%add_const_value(UnlimitedEntity(temp_coords)) call metadata%add_variable('lat', v) end subroutine append_metadata