bug in check_massflux in nesting.F

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
jpringle
Posts: 108
Joined: Sun Jul 27, 2003 6:49 pm
Location: UNH, USA

bug in check_massflux in nesting.F

#1 Unread post by jpringle »

In check_massflux in nesting.F, the variable ng in

Code: Select all

# ifdef NESTING_DEBUG
          IF (DOMAIN(ng)%SouthWest_Test(tile)) THEN
            IF (Master) THEN
              WRITE (300,10) 'Western Boundary Mass Fluxes: ',          &
     &                       cr, dg, rg, iif(rg), iic(rg), INT(time(rg))
            END IF
          END IF
!
# endif
should be "ngf". "ng" is not defined in this subroutine. Likewise for the sections Eastern, Northern and Southern boundary.

As a secondary question -- are the values in BRY_CONTACT()%Mflux() ever used in the model calculation, or are they just diagnostic? It appears they are set in check_massflux() and put_refine2d(), but are only used to print diagnostics. It appears that the boundary fluxes are set directly in put_refine2d() by changing OCEAN(ng)%ubar directly. Is this true?

I am still struggling to get nesting to work on a large spherical grid with considerable latitudinal extent. Has this been done? Details once I am more sure it is not a silly mistake on my part.

Cheers,
Jamie

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: bug in check_massflux in nesting.F

#2 Unread post by arango »

Yes, I did moved this code after I tested. Thank you for report this. I updated the repository.

Nope, the values of BOUNDARY_CONTACT(:,:)%Mflux(:) are only used during debugging and testing to write several diagnostics to Fortran fort.100, fort.200, and fort.300 output files. Yes, they are loaded in the BOUNDARY_CONTACT(:,:)%Mflux(:) in routine put_refine2d because they are computed there but they are never used in the nested algorithms. I hope that this point is very clear. It is done like this because of parallelization. This mass flux is a correction to ubar and vbar to impose mass conservation from coarse to fine grids. This is important so we created this structure as a diagnostic tool to make sure that this is the case.

Nesting is complex and setting the nested grid in the correct place is extremely important. Perhaps, you can show us your nested grid configuration with the bathymetry to see if we have any recommendations.

jpringle
Posts: 108
Joined: Sun Jul 27, 2003 6:49 pm
Location: UNH, USA

Re: bug in check_massflux in nesting.F

#3 Unread post by jpringle »

Hernan -- I have posted the information you want in viewtopic.php?f=17&t=3957 ; I did not put it as a bug yet since I have not isolated the exact cause.

Jamie

Post Reply