-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for annual data in interpolator_mod #1389
Conversation
clim_type%time_slice(n) = set_date_julian (yr, mo, dy, & | ||
hr, mn, sc) | ||
else if ( (model_calendar == JULIAN .and. trim(adjustl(lowercase(file_calendar))) == 'noleap')) then | ||
Noleap_time = set_time( INT((time_in(n)-real(INT(time_in(n)),r8_kind))*SECONDS_PER_DAY), & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to also take into account fractional number of days (converted to seconds) when setting time for greater accuracy. The same is done for the case where the model calendar and the file calendar are the same (see above).
@@ -708,18 +711,14 @@ subroutine interpolator_end(clim_type) | |||
deallocate(clim_type%r8_type%nmon_pyear) | |||
end if | |||
endif | |||
if (allocated(clim_type%indexm)) deallocate(clim_type%indexm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This set of deallocation was specified twice in interpolator_end. Removed it to make FMS more perfect.
interpolator/interpolator.F90
Outdated
|
||
clim_type%r4_type%is_allocated=.false. | ||
clim_type%r8_type%is_allocated=.false. | ||
|
||
!! RSH mod | ||
if( .not. (clim_type%TIME_FLAG .eq. LINEAR .and. & | ||
if( .not.(clim_type%TIME_FLAG .eq. LINEAR .and. read_all_on_init) .and. & | ||
(clim_type%TIME_FLAG.ne.NOTIME) ) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extended the if statement to include clim_type%TIME_FLAG.ne.NOTIME
. For the case where clim_type%TIME_FLAG=NOTIME, close_file is called in interpolator_init. There is no file to close here
@mlee03 Could you push a commit to get the CI running? Either merging with main or pushing an empty commit should work. It ran too long ago for me to restart it manually but I think the issue was probably unrelated. |
Description
In this PR,
r8_kind
precisionannual
data has been added. The original code works with the number of days passed since base_time. Thus, the number of years passed since the base_time is converted to number of days passed since the base_time.Fixes #1343
How Has This Been Tested?
The unit tests pass on the AMDBox with Intel and GCC
Checklist:
make distcheck
passes