-
Notifications
You must be signed in to change notification settings - Fork 143
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
implementation of forcing multifile feature #1214
implementation of forcing multifile feature #1214
Conversation
2c22035
to
9ac594f
Compare
9ac594f
to
a7c9cdf
Compare
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.
Please add documentation to the code and rename any variables that are named with Fortran keywords (ie. data
)
@@ -1009,6 +1016,271 @@ subroutine time_interp_external_0d(index, time, data, verbose) | |||
|
|||
end subroutine time_interp_external_0d | |||
|
|||
|
|||
subroutine time_interp_external_bridge_2d(index1, index2, time, data_in, interp, verbose,horz_interp, mask_out, & |
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.
The new routines all need to be documented with doxygen comments describing what they are for and what they do.
subroutine time_interp_external_bridge_2d(index1, index2, time, data_in, interp, verbose,horz_interp, mask_out, & | ||
is_in, ie_in, js_in, je_in, window_id) | ||
|
||
integer, intent(in) :: index1, index2 |
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.
All of the new variables need to be documented with doxygen comments describing what they are
|
||
integer, intent(in) :: index1, index2 | ||
type(time_type), intent(in) :: time | ||
real, dimension(:,:), intent(inout) :: data_in |
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 module will be updated to support both r4 and r8 in the near future (it's already in the process), so these real variables will need to be done in that style.
@mlee03 can you provide guidence on this to @raphaeldussin
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.
If this PR is going to be approved and merged into main soon, we can put in the mixed-precision updates. Else, we've already changed time_interp to include mixed precision capabilities and perhaps it would be easier to start off from the time_interp_external2.inc file in the mixedmode branch. If possible, most of the mixed-precision updates (including data_override) will be merged in to the main branch by end of August and it would be simpler to wait until that merge before the changes here are included. One thing to note is the file structures have been reorganized significantly with the mixed-precision updates and this PR will require more work to be compatible with main then. What do you think?
|
||
integer, intent(in) :: index1, index2 | ||
type(time_type), intent(in) :: time | ||
real, dimension(:,:,:), intent(inout) :: data |
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 variable needs to be renamed
real , dimension(size(data_in,1), size(data_in,2), 1) :: data_out | ||
logical, dimension(size(data_in,1), size(data_in,2), 1) :: mask3d | ||
|
||
data_out(:,:,1) = data_in(:,:) ! fill initial values for the portions of array that are not touched by 3d routine |
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.
Is the input data always contiguous? If yes, can this be done using pointer rank remapping instead of making a copy?
call time_interp_external_bridge_3d(index1, index2, time, data_out, interp, verbose, horz_interp, mask3d, & | ||
is_in=is_in,ie_in=ie_in,js_in=js_in,je_in=je_in,window_id=window_id) | ||
data_in(:,:) = data_out(:,:,1) | ||
if (PRESENT(mask_out)) mask_out(:,:) = mask3d(:,:,1) |
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 could also be remapped and you wouldn't need to do this (I think)
- Raphael Dussin implementation of bridge/multifile feature for data_override - This commit is basically Raphs branch raphaeldussin:feature_data_override_multifile merged with the main branch of FMS in PR NOAA-GFDL#1214 - Due to restructure of time_interp and data_override dirs in FMS2023.03 I could not (did not know how to) do this merge via git and had to extract the mods from that PR and apply them to the main branch. - Does not change answers.
Replaced by #1408 . Closing. |
Description
This implements a new feature allowing to optionally use 3 consecutive forcing files, specified in data_table
hence making the padding of forcing files (adding last record of previous year and first record of following year)
unnecessary in interannual ice/ocean forced runs. Co-authored by @MJHarrison-GFDL
How Has This Been Tested?
Tested on c5 against a reference JRA run using the padded forcing files. After a one year common
spin-up, the run with padded files and the run with the new multifile feature reproduce bitwise.
This shows that the "bridging" from the previous year and following year worked as expected.
Checklist:
make distcheck
passes