Skip to content

Commit

Permalink
fixes #1433
Browse files Browse the repository at this point in the history
  • Loading branch information
bena-nasa committed Mar 15, 2022
1 parent ab72024 commit ede13ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed GNU bug when defining file metadata in lat-lon grid factory

### Added

### Changed
Expand Down
8 changes: 6 additions & 2 deletions base/MAPL_LatLonGridFactory.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit ede13ee

Please sign in to comment.