Environmental Modeling Center Environmental Modeling Center Environmental Modeling Center United States Department of Commerce
 

WAVEWATCH III v. 2.22 errata, problems and fixes

The content provided on this page supports model development. These are not official NWS products and should not be relied upon for operational purposes. This web site is not subject to 24/7 support, and thus may be unavailable during system outages.

Operationally generated graphics of the wave fields (no spectra or source terms) are available from Model Analyses and Guidance.

Bulletin files are available from the Production FTP/HTTPS server. Look for gfs.YYYYMMDD/CC/wave/station/bulls.tCCz/gfswave.stationID.bull


This page presents errata to the WAVEWATCH III version 2.22 manuals, and a list of identified problems and fixes. It will be updated as needed. Please let us know if you find any errors or problems so that we can add them to this page.

Errata

  • Page 54: Reference to Eqs. (2.63) throught (2.65) should point to Eqs. (2.72) throught (2.75)
  • Page 76, first line of section 4.4.9: "ww3_outf" should be "ww3_grib".

Problems and Fixes


comp, link and ad3 scripts :

The link and ad3 scripts check the switch file for switches indicating the use of OpenMP or MPI. Thi is done by defining and exporting the shell script variable mpi_mod and omp_mod in the following way

  if [ -n "`grep MPI $main_dir/bin/switch`" ]
then
export mpi_mod='yes'
else
export mpi_mod='no'
fi

if [ -n "`grep OMP $main_dir/bin/switch`" ]
then
export omp_mod='yes'
else
export omp_mod='no'
fi
Some implementations of /bin/sh do not allow for the simultaneous assignment and export of these variables, and will give run time errors. This can be avoided by replacing the above with
  if [ -n "`grep MPI $main_dir/bin/switch`" ]
then
mpi_mod='yes'
else
mpi_mod='no'
fi
export mpi_mod

if [ -n "`grep OMP $main_dir/bin/switch`" ]
then
omp_mod='yes'
else
omp_mod='no'
fi
export omp_mod
Futhermore, in the documentation of the comp script for section 2., $m_path should be $path_m
 
September 23 2002.
Back to index or top

U* at active boundary points :

For the Tolman and Chalikov source term option, friction velocities at active boundary points become large negative values, instead of being undefined. This is corrected by replacing line 849 and following in file w3iogomd.ftn in the subroutine W3IOGO

                      IF ( MAPSTA(IY,IX) .GT. 0 ) THEN
AUX1(ISEA) = UST(ISEA) * ASF(ISEA)
ELSE
AUX1(ISEA) = UNDEF
END IF
with
!/ST1                      IF ( MAPSTA(IY,IX) .GT. 0 ) THEN
!/ST2 IF ( MAPSTA(IY,IX) .EQ. 1 ) THEN

AUX1(ISEA) = UST(ISEA) * ASF(ISEA)
ELSE
AUX1(ISEA) = UNDEF
END IF
 
October 16, 2002
Back to index or top

Statistical output for ww3_outf in partially undefined fields :

When the statical output is selected in ww3_outf, undefined values are erroneously included in the statistics in some cases. To avoid this, replace lines 827 and following in the file ww3_outf.ftn in subroutine W3EXGO

                    IF ( MAPSTA(IY,IX) .GT. 0 ) THEN
NINGRD = NINGRD + 1
XMIN = MIN ( XMIN , X1(IX,IY) )
XMAX = MAX ( XMAX , X1(IX,IY) )
XDS = XDS + DBLE(X1(IX,IY))
XDSQ = XDSQ + DBLE(X1(IX,IY))**2
END IF
with
                    IF ( MAPSTA(IY,IX) .GT. 0 .AND.                   &
X1(IX,IY) .NE. UNDEF ) THEN
NINGRD = NINGRD + 1
XMIN = MIN ( XMIN , X1(IX,IY) )
XMAX = MAX ( XMAX , X1(IX,IY) )
XDS = XDS + DBLE(X1(IX,IY))
XDSQ = XDSQ + DBLE(X1(IX,IY))**2
END IF
 
October 16, 2002
Back to index or top

Parameter list inconsistency in W3QCK3 :

In the parameter list of the subroutine W3QCK3 in w3uqckmd.ftn, the parameter trans is marked as INTENT(INOUT). This is inconsistent with the way the routine is called by the spatial propagation routines W3XYP2 in file w3pro2md.ftn. Most compilers do not care about this, but this results in an error with the Compaq compiler on an alpha chip. This problem can be avoided by replacing lines 777 and following in routine W3QCK3 in file w3uqckmd.ftn

      REAL, INTENT(INOUT)     :: CFLL(MY*(MX+1)), TRANS(MY*MX,-1:1),  &
Q(1-MY:MY*(MX+2))

with
      REAL, INTENT(IN)        :: TRANS(MY*MX,-1:1)
REAL, INTENT(INOUT) :: CFLL(MY*(MX+1)), Q(1-MY:MY*(MX+2))

Full consistency would then also require to change ATRNX and ATRNY from INTENT(INOUT) to INTENT(IN) in the subroutines W3XYP3 in w3pro3md.ftn and W3XYP4 in w3pro4md.ftn.
 
October 16, 2002, identified by Erick Rogers.
Back to index or top

Interface to exact nonlinear routines (W3SNL2) :

When compiling the code with the option for the exact nonlinear interaction using the portable code of G. Van Vledder, some compilers cannot deal with variables that are defined differently in the interface and in the actual interaction package. To get teh code to compile proerly in such conditions, replace line 146 in the routine W3SNL2 in the file w3snl2md.ftn

      USE m_xnldata
with
      USE m_xnldata, ONLY: xnl_main
 
November 11, 2002, identified by Rique Alves
Back to index or top

Error in make_makefile.sh :

In make_makefile.sh, a test is made to assure that the exact interaction routines cannot be used in cobination with the OpenMP directives. There is an error in the test, making it impossible to compile with the OMP switches. Lines 291 through 297 in make_makefle.sh

  if [ "$nr_thr" != '0' ] && [ "$s_nl" != 'NL2' ]
then
echo ' '
echo " *** The present version of the WRT interactions"
echo " cannot be run under OpenMP (OMP0, OMP1). Use"
echo " SHRD or MPI options instead. ***"
echo ' ' ; exit 8
fi
should be
  if [ "$nr_thr" != '0' ] && [ "$s_nl" = 'NL2' ]
then
echo ' '
echo " *** The present version of the WRT interactions"
echo " cannot be run under OpenMP (OMP0, OMP1). Use"
echo " SHRD or MPI options instead. ***"
echo ' ' ; exit 8
fi
 
November 19, 2002, identified by several
Back to index or top

Saved allocatable arrays :

Some compilers do not accept the SAVE attribute in the declaration of an ALLOCATABLE array. In such a case, lines 545 through 552 in the file w3wavemd.ftn (routine W3WAVE)

      REAL, ALLOCATABLE, SAVE :: DW(:), WLV(:), UA(:), UD(:), U10(:), &
U10D(:), AS(:), UST(:), ASF(:), &
FPIS(:), CX(:), CY(:), EMN(:), &
FMN(:), WNM(:), AMX(:), CDS(:), &
Z0S(:), HS(:), WLM(:), TMN(:), &
THM(:), THS(:), FP0(:), THP0(:), &
FP1(:), THP1(:), DTDYN(:), FCUT(:), &
ICE(:)
should be changed to
      REAL, ALLOCATABLE ::       DW(:), WLV(:), UA(:), UD(:), U10(:), &
U10D(:), AS(:), UST(:), ASF(:), &
FPIS(:), CX(:), CY(:), EMN(:), &
FMN(:), WNM(:), AMX(:), CDS(:), &
Z0S(:), HS(:), WLM(:), TMN(:), &
THM(:), THS(:), FP0(:), THP0(:), &
FP1(:), THP1(:), DTDYN(:), FCUT(:), &
ICE(:)
 
July 17, 2003, identified by Vihang Bhatti
Back to index or top

Assimilation data processing in ww3_prep :

If for a given time step, no assimilation data is presented to ww3_prep, an inconsistency is generated in the data file that crashes ww3_shel. For the moment the solution will be to filtered input to ww3_prep properly. This problem will be remedied in the next release of WAVEWATCH III.

July 23, 2003 , identified by H.S. Chen.
Back to index or top

Declarations in W3FLDH :

In the parameter list of the subroutine W3FLDH in the file w3fldsmd.ftn some arrays are wrongly declared. Lines 1785 through 1789

      INTEGER, INTENT(INOUT)  :: NH, THO(2,3,NHM), TF0(2), TFN(2)
INTEGER, INTENT(OUT) :: IERR
REAL, INTENT(INOUT) :: HA(NHM,3), HD(NHM,3), HS(NHM,3), &
FX0(MX,MY), FY0(MX,MY), FS0(MX,MY), &
FXN(MX,MY), FYN(MX,MY), FSN(MX,MY)
should be changed to
      INTEGER, INTENT(INOUT)  :: NH, THO(2,4,NHM), TF0(2), TFN(2)
INTEGER, INTENT(OUT) :: IERR
REAL, INTENT(INOUT) :: HA(NHM,4), HD(NHM,4), HS(NHM,4), &
FX0(MX,MY), FY0(MX,MY), FS0(MX,MY), &
FXN(MX,MY), FYN(MX,MY), FSN(MX,MY)
September 5, 2003
Back to index or top

Model integration with exact interactions :

In experiments with integrating the model with version 4 of the exact interaction routines of Van Vledder, it was found that the interactions tend to be noisy at the transition to the parametric tail, and sometimes also at low frequencies. This was attributed to several small bugs in this package and this behavior is no longer present with the experimental version 5 of this package as is presently being tested. An upgrade package will be made available on the ftp site after testing by the author has been completed.

October 7, 2003 .
Back to index or top

Test for number of homogeneous fields :

If homogeneous input fields are used to drive the model, the parameter NHMAX sets how many fields can be defined. On line 638 of the program W3SHEL in the file ww3_shel.ftn, this parameter is incorrectly checked. Replace this line

                  IF ( NH(1) .GT. NHMAX ) GOTO 2006
with
                  IF ( NH(J) .GT. NHMAX ) GOTO 2006
October 7, 2003 .
Back to index or top

Compiling and running on DEC Alpha :

Compiling and running on a DEC Alpha with the ST1 switch gives a floating point exception in W3UWND due to a non-initialized array ST0. Replace lines 451 through 453 of the routine W3UWND in w3updtmd.ftn

            UAI(ISEA) = UAI(ISEA) - UA0(ISEA)
AS0(ISEA) = ST0(IX,IY)
ASI(ISEA) = STN(IX,IY) - ST0(IX,IY)
with
            UAI(ISEA) = UAI(ISEA) - UA0(ISEA)
!/ST1 ST0 = 0.
AS0(ISEA) = ST0(IX,IY)
ASI(ISEA) = STN(IX,IY) - ST0(IX,IY)
Augus 11, 2004, identified by Denis  Pithon.
Back to index or top

Soft boundaries and nesting :

If the third order scheme is used in a nested model, the soft boundary treatment option will interfere with the proper handling of boundaries. Therefore, the soft boundary option should not be used models with active boundary points.


October 14, 2004, identified by Nick Graham.
Back to index or top

MAPSTA in W3XYP3 :

The array MAPSTA in the routine W3PXYP3 in w3pro3md.ftn goes out of bounda in section 3.a.2. To fix this, add the declaration of JXY on lines 692 and 693

      INTEGER                 :: IY, IXC, IYC, IIXY1(NY), IIXY2(NY),  &
                                 IIXY3(NY), IIXY4(NY), JXY 

Furthermore, section 3.a.2, lines 882 through 995 requires nine changes. Green below identifies an added line, red identifies modified lines.
!
! 3.a.2 Near-coast points
!
        DO IP=NCENT+1, NSEA
          ISEA    = MAPCXY(IP)
          IXY     = MAPSF(ISEA,3)
          JXY     = IXY - 1 + NY*NX 
          IY      = MAPSF(ISEA,2)
          RD1     = RDI1(IY)
          RD3     = RDI3(IY)
          IF ( MAPTRN(IXY) ) THEN
              VQ(IXY) = AQ(IXY)
            ELSE
              RD2     = MIN ( 1. , RDI2(IY) * CG(IK,ISEA) )
              RD4     = MIN ( 1. , RDI4(IY) * CG(IK,ISEA) )
              VQ(IXY          ) = VQ(IXY          )                   &
                                   + AQ(IXY) * (3.-RD2-RD4)/3.
              IF ( MAPSTA(1+MOD(JXY+IIXY1(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY+IIXY1(IY)) = VQ(IXY+IIXY1(IY))          &
                                            + AQ(IXY) * RD2*RD1/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                        + AQ(IXY) * RD2*RD1/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY+IIXY2(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY+IIXY2(IY)) = VQ(IXY+IIXY2(IY))          &
                                            + AQ(IXY) * (1.-RD1)*RD2/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * (1.-RD1)*RD2/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY+IIXY3(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY+IIXY3(IY)) = VQ(IXY+IIXY3(IY))          &
                                            + AQ(IXY) * RD4*RD3/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * RD4*RD3/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY+IIXY4(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY+IIXY4(IY)) = VQ(IXY+IIXY4(IY))          &
                                            + AQ(IXY) * (1.-RD3)*RD4/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * (1.-RD3)*RD4/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY-IIXY1(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY-IIXY1(IY)) = VQ(IXY-IIXY1(IY))          &
                                            + AQ(IXY) * RD2*RD1/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * RD2*RD1/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY-IIXY2(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY-IIXY2(IY)) = VQ(IXY-IIXY2(IY))          &
                                            + AQ(IXY) * (1.-RD1)*RD2/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * (1.-RD1)*RD2/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY-IIXY3(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY-IIXY3(IY)) = VQ(IXY-IIXY3(IY))          &
                                            + AQ(IXY) * RD4*RD3/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * RD4*RD3/6.
                END IF
              IF ( MAPSTA(1+MOD(JXY-IIXY4(IY),NX*NY)) .EQ. 1 ) THEN 
                       VQ(IXY-IIXY4(IY)) = VQ(IXY-IIXY4(IY))          &
                                            + AQ(IXY) * (1.-RD3)*RD4/6.
                ELSE
                       VQ(IXY          ) = VQ(IXY          )          &
                                            + AQ(IXY) * (1.-RD3)*RD4/6.
                END IF
            END IF
          END DO 

August 2, 2005, identified by Sander Hulst.
Back to index or top