Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Bug in add_a2c_v function

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

Tim Raupach

New member
Hi WRF team,

Looking at the functions that sum unstaggered and staggered tendency fields (add_a2c_u and add_a2c_v in module_physics_addtendc.F), I noticed that in add_a2c_v:

1. The loop over k is from kts to kte and not kts to ktf as in add_a2c_u, and

2. The if statements that reset the indices if the staggered dimension is periodic are testing the x dimension, not the y dimension. I.e. the lines

Code:
IF ( config_flags%periodic_x ) i_start = its
IF ( config_flags%periodic_x ) i_end = MIN( ite, ide-1 )

should probably read

Code:
IF ( config_flags%periodic_y ) j_start = jts
IF ( config_flags%periodic_y ) j_end = jte

I think this would only cause an issue if WRF was configured to be both nested/specified AND periodic.

Are these bugs that need a fix? If so I am happy to submit a pull request.

Thanks & cheers,
Tim
 
Top