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

Why do we accumulate coupler fields even in standalone? #56

Open
xylar opened this issue Jul 5, 2023 · 0 comments
Open

Why do we accumulate coupler fields even in standalone? #56

xylar opened this issue Jul 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@xylar
Copy link
Collaborator

xylar commented Jul 5, 2023

It seems we call ocn_time_average_coupled_accumulate() even in standalone runs:
https://github.com/E3SM-Project/E3SM/blob/master/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split.F#L2665
https://github.com/E3SM-Project/E3SM/blob/master/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_si.F#L3132
https://github.com/E3SM-Project/E3SM/blob/master/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_si.F#L3132

I also don't see any evidence that there is any mechanism to bypass the computations when coupling is not enabled:
https://github.com/E3SM-Project/E3SM/blob/master/components/mpas-ocean/src/shared/mpas_ocn_time_average_coupled.F

The various avg* fields are allocated for all forward runs, e.g.:
https://github.com/E3SM-Project/E3SM/blob/master/components/mpas-ocean/src/Registry.xml#L3627-L3634

However, I could not find any evidence that ocn_time_average_coupled_init() is called in standalone runs:

mpas-ocean]$ grep -r ocn_time_average_coupled_init
driver/ocn_comp_mct.F:          call ocn_time_average_coupled_init(forcingPool)
driver/ocn_comp_mct.F:          call ocn_time_average_coupled_init(forcingPool)
driver/ocn_comp_mct.F:         call ocn_time_average_coupled_init(forcingPool)
src/shared/mpas_ocn_time_average_coupled.F:!  routine ocn_time_average_coupled_init
src/shared/mpas_ocn_time_average_coupled.F:    subroutine ocn_time_average_coupled_init(forcingPool)!{{{
src/shared/mpas_ocn_time_average_coupled.F:    end subroutine ocn_time_average_coupled_init!}}}

suggesting that the values will be garbage (and in any case will never be used).

I'm not sure this has any real consequences but it does seem kind of sloppy.

@xylar xylar added the bug Something isn't working label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant