Skip to content
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

unnecessary/unused line should be removed #94

Open
StevePny opened this issue Nov 20, 2023 · 3 comments
Open

unnecessary/unused line should be removed #94

StevePny opened this issue Nov 20, 2023 · 3 comments
Assignees

Comments

@StevePny
Copy link

This line appears unnecessary, and the returned contents of "date" are unused:

call fms_time_manager_get_date (Time_atmos, date(1), date(2), date(3),  &
                                 date(4), date(5), date(6))

https://github.com/NOAA-GFDL/FMScoupler/blob/77618869f48507c8629f28457cb701e25e1ea4fc/SHiELD/coupler_main.F90#L447C12-L447C37

Note that in FMS, get_date takes the first argument Time_atmos as an input argument:
https://github.com/NOAA-GFDL/FMS/blob/be1856c45accfe2fb15953c5f51e0d58a8816882/time_manager/time_manager.F90#L1145

The date() object is not used after being returned by the get_date routine, so this line is unnecessary and adds confusion here. (e.g. I originally assumed based on the context that "Time_atmos" was being returned and used below for subsequent checks, but instead it is defined at a higher scope.)

@bensonr
Copy link
Contributor

bensonr commented Nov 21, 2023

@StevePny - Thanks for pointing this out. It's an artifact of the lineage of this file and the introduction of intermediate restart capability from the full coupler.

@thomas-robinson
Copy link
Member

@StevePny do you have a fix? Can you put in a PR and link this issue?

@StevePny
Copy link
Author

@thomas-robinson yes you should be able to just delete the line (447-448 in main):

call fms_time_manager_get_date (Time_atmos, date(1), date(2), date(3), &
date(4), date(5), date(6))

I don't have permissions to add a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants