Fix bug in ESMF_CFIOUtils.F90#64
Merged
Merged
Conversation
Contributor
|
Thank you @bena-nasa for resolving it! |
Member
|
@bena-nasa I think you can delete |
amolod
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mike Mehari found that ExtData was not correctly reading the JRA55 files that have data every 3 hours. It was only updating the fields once per day.
I ultimately traced this down to a bug in the
ESMF_CFIOUtils.F90file. That had a routine that returns the time information from the file as a start date, a start time, and a 64 bit integer vector of the deltas from the that time. However, depending on type (real32, real64 etc...) this was not being done correctly as it was not converting the time variable to int64 seconds correctly due to usingINTon a real number and losing information. For example it would return 1.2 days, 1.4 days etc all as 86400 seconds.This fixes that routine. Note that the helper procedures I needed to fix this properly were generated with chatGSFC for expediency.
In addition I am getting frustrated with not having an easy way to run ExtData by itself. Modern MAPL has a utility to do this that is not back portable to this codebase. I have created a very simple grid comp and driver I can use to run ExtData should any more problems be found that I would need to debug. I have put that in a folder in the Apps directory.
If any code was relying on the wrong results that the routine in
ESMF_CFIOUtils.F90this would be non-zero diff but that was flat out bug in that routine.