Possible bug in nesting.F for 2D apps with wetting/drying

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
stef
Posts: 175
Joined: Tue Mar 13, 2007 6:38 pm
Location: Independent researcher
Contact:

Possible bug in nesting.F for 2D apps with wetting/drying

#1 Unread post by stef »

Hi,

This is unrelated to the incorrect netcdf header reproduced in the wiki (as reported earlier in viewtopic.php?f=17&t=5425 ), but it's related to nesting in general.

In 2-d applications with wetting/drying, the u/vmasks supplied to fine2coarse2d() are in their multi-valued form (-1,1,0,2 depending on whether the cell itself and its neighbour are dry). Then u/vbar are multiplied by MIN(1,mask), which can be -1. If I understand the code correctly, the masks applied in this routine should generally be in a binary form (0 or 1).

I think this applies to both Rutgers and COAWST. I can see a difference between Rutgers and COAWST in nesting.F regarding the rmasks (rmask vs rmask_full), but I'm not sure how that relates to the problem with the u/vmasks.

I think that in 3d applications, the multi-valued form of the u/v wetmasks is converted to binary form after the fast time-stepping.

I wonder if in 2d applications, the multi-valued mask can just be converted to a binary mask like so:

0 if the multi-valued mask is 0
1 if the multi-valued mask is -1,1 or 2

The rationale is that at all locations where the flux delimiter was applied in the previous step2d, u/vbar should have been set to 0 already. So there is no need to do this again in nesting.F. Not sure if this makes sense physically? What do you think?

Thanks for your help!

Regards, Stefan
Last edited by stef on Wed Jan 29, 2020 8:56 am, edited 1 time in total.

stef
Posts: 175
Joined: Tue Mar 13, 2007 6:38 pm
Location: Independent researcher
Contact:

Re: Possible bug in nesting.F for 2D apps with wetting/drying

#2 Unread post by stef »

I wonder if in 2d applications, the multi-valued mask can just be converted to a binary mask like so
I mean only in fine2coarse2d(), not elsewhere....

Post Reply