Skip to content

Commit

Permalink
Merge pull request #2001 from GEOS-ESM/hotfix/bmauer/fixes-#1991
Browse files Browse the repository at this point in the history
fixes #1991
  • Loading branch information
mathomp4 authored Mar 6, 2023
2 parents 7da78c3 + e158974 commit f5237a3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.35.2] - 2023-03-03

### Changed

- Updated ExtData test case2 to handle a wider range of test times for more robust testing

### Fixed

- Fixed bug in climatology hanlding of data in ExtDataV2 that occurred depending on the start date of the application relative to the length of the application run time

### Removed

- Removed test case 2 for ExtDataV1 as there as an apparent bug in climatologies that has been fixed for ExtDataV2 but there appears to be a different but in ExtDataV1 that causes the extended case 2 to fail

## [2.35.1] - 2023-03-01

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
MAPL
VERSION 2.35.1
VERSION 2.35.2
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the default build type to release
Expand Down
2 changes: 2 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case2/CAP2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ HEARTBEAT_DT: 3600

#RUN_EXTDATA: .false.
RUN_TIMES::
20071025 210000
20071125 210000
20071126 210000
20080226 210000
::

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
case1
case2
case3
case4
case5
Expand Down
22 changes: 19 additions & 3 deletions gridcomps/ExtData2G/ExtDataFileStream.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,25 @@ function new_ExtDataFileStream(config,current_time,unusable,rc) result(data_set)
allocate(data_set%valid_range(2))
data_set%valid_range(1)=string_to_esmf_time(range_str(:idx-1))
data_set%valid_range(2)=string_to_esmf_time(range_str(idx+1:))
call ESMF_TimeGet(data_set%reff_time,yy=iyy,mm=imm,dd=idd,h=ihh,m=imn,_RC)
call ESMF_TimeGet(data_set%valid_range(1),yy=iyy,_RC)
call ESMF_TimeSet(data_set%reff_time,yy=iyy,mm=imm,dd=idd,h=ihh,m=imn,_RC)

last_token = index(data_set%file_template,'%',back=.true.)
if (last_token.gt.0) then
call ESMF_TimeGet(data_set%valid_range(1), yy=iyy, mm=imm, dd=idd,h=ihh, m=imn, s=isc ,_RC)
token = data_set%file_template(last_token+1:last_token+2)
select case(token)
case("y4")
call ESMF_TimeSet(data_set%reff_time,yy=iyy,mm=1,dd=1,h=0,m=0,s=0,_RC)
case("m2")
call ESMF_TimeSet(data_set%reff_time,yy=iyy,mm=imm,dd=1,h=0,m=0,s=0,_RC)
case("d2")
call ESMF_TimeSet(data_set%reff_time,yy=iyy,mm=imm,dd=idd,h=0,m=0,s=0,_RC)
case("h2")
call ESMF_TimeSet(data_set%reff_time,yy=iyy,mm=imm,dd=idd,h=ihh,m=0,s=0,_RC)
case("n2")
call ESMF_TimeSet(data_set%reff_time,yy=iyy,mm=imm,dd=idd,h=ihh,m=imn,s=0,_RC)
end select
end if

end if
data_set%collection_id = MAPL_DataAddCollection(data_set%file_template)

Expand Down

0 comments on commit f5237a3

Please sign in to comment.