Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Ocean loop over tracers #4

Closed
douglasjacobsen opened this issue Apr 24, 2013 · 2 comments · Fixed by #19
Closed

Ocean loop over tracers #4

douglasjacobsen opened this issue Apr 24, 2013 · 2 comments · Fixed by #19
Labels

Comments

@douglasjacobsen
Copy link
Member

I don't know if there are more instances of this. But on line 832 of mpas_ocn_time_integration_split.F, the loop that is

do 1 = 1, 2

Is intended to be over temperature, and salinity. This should be modified to use the start and end indices of the array_group (dynamics) to be more robust.

It doesn't affect the current model in a negative way, but in the future if the order of tracers are modified at all in Registry.xml, then the answer will likely be wrong.

@mark-petersen
Copy link
Contributor

That is a tracer update on T&S only because it is within a
split-explicit iteration. Only T&S are needed to update density and
then pressure.

After the last split explicit iteration, we have:

         !  If large iteration complete, compute all variables at 

time n+1

                  ! This is Phi at n+1
                  do i=1,block % state % time_levs(1) % state % 

num_tracers

so it was intentional, but poorly documented. As long as T&S are always
tracers 1&2, it is OK. A safer method is to use index_temperature and
index_salinity within the loop instead. Should I add that to our todo list?

Mark

On 04/24/13 10:57, Doug Jacobsen wrote:

I don't know if there are more instances of this. But on line 832 of
mpas_ocn_time_integration_split.F, the loop that is

do 1 = 1, 2

Is intended to be over temperature, and salinity. This should be
modified to use the start and end indices of the array_group
(dynamics) to be more robust.

It doesn't affect the current model in a negative way, but in the
future if the order of tracers are modified at all in Registry.xml,
then the answer will likely be wrong.


Reply to this email directly or view it on GitHub
#4.

@douglasjacobsen
Copy link
Member Author

I think this should be added to our todo list.

I think instead of using index_temperature and index_salinity, we should use block % state % time_levs(:) % state % dynamics_start and ... % dynamics_end though.

That way, it can still be a do loop, and it will iterate over the proper "dynamics" tracers.

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

Successfully merging a pull request may close this issue.

2 participants