Bug fix: Version 3.3 bug in nested runs

This page describes a fix of a serious run time bug in the MPP code on all platforms when nesting is employed. This appears as a discontinuity in difference plots comparing single processor and multi-processor runs:

This occurs when the nested grid is smaller than the parent domain, and unfortunately, it also feeds back into the solution on subsequent timesteps after model output because the PSA field is corrupted.

The bug is new to V3.3; earlier releases of MM5v3 are not affected.

The non-MPP code is not affected.

The recommended fix involves installing a patch to the FLIC preprocessor and reinstalling the model. An alternate method involves changing several lines of the routine domain/io/outtap.F.

Recommended fix

1. Download the file

http://www2.mmm.ucar.edu/mm5/mpp/helpdesk/handle_executable.c

and replace MPP/FLIC/FLIC/handle_executable.c directory with this new file.
You may need to use the right mouse button and select "save link as" on
your browser.

2. Type 'make' in the MPP/FLIC/FLIC directory.

3. Type 'touch domain/io/outtap.F' in the top-level directory.

4. Type 'make mpp'.

Alternate fix

Edit the file domain/io/outtap.F and change the lines:
  DO I=1,ILX                                          OUTTAP.675
      PSA(I,JL)=PSA(I,JL-1)                           OUTTAP.676
  ENDDO                                               OUTTAP.677
  DO J=1,JL                                           OUTTAP.678
      PSA(IL,J)=PSA(IL-1,J)                           OUTTAP.679
  ENDDO                                               OUTTAP.680
to read instead:
  DO J=JL,JL
  DO I=1,ILX
      PSA(I,J)=PSA(I,J-1)
  ENDDO                
  ENDDO
  DO I=IL,IL
  DO J=1,JL
      PSA(I,J)=PSA(I-1,J)
  ENDDO                 
  ENDDO                
Please report any problems to mesouser@ucar.edu .

Detailed description of problem

Several lines were added in release 3.3 to extend the values of cross point values out to the extra row and column of the dot grid to eliminate the problem of garbage data in these fields on output. The MPP version and FLIC treat the accesses and assignments to loop invariant indicies of PSA as global to local index conversions. Unfortunately, the automatically generated local indices occur before the call to MP_DOMAINSTAT and MP_INITDOMAIN, so that information for a different domain than the one being output may be used for the global to local conversion.

The recommended fix in this memorandum modfies FLIC to generate the global-to-local index conversions as late as possible in the routine so that the initial calls to MP_INITDOMAIN and MP_DOMAINSTAT will have occurred already.

The alternate fix eliminates the need for a global-to-local conversion by eliminating the loop invariant indices into PSA.

Thanks

Al Bourgeois (NCAR/MMM) and Daran Rife (NCAR/RAP).
-Rotang, January 26, 2000