#include "w3macros.h"
!/ ------------------------------------------------------------------- /
      PROGRAM WW3GRID
!/
!/                  +-----------------------------------+
!/                  | WAVEWATCH III           NOAA/NCEP |
!/                  |                                   |
!/                  |                        FORTRAN 90 |
!/                  | Last update :         27-May-2021 |
!/                  +-----------------------------------+
!/    27-May-2021 : Seperated subroutine to w3grid   ( version 7.XX )
!/
!/    Copyright 2009-2013 National Weather Service (NWS),
!/       National Oceanic and Atmospheric Administration.  All rights
!/       reserved.  WAVEWATCH III is a trademark of the NWS. 
!/       No unauthorized use without permission.
!/
!  1. Purpose :
!
!     "Grid" preprocessing program, which writes a model definition
!     file containing the model parameter settigs and grid data.
!
!  2. Method :
!
!     Information is read from the file ww3_grid.inp/nml. 
!     A model definition file mod_def.ww3 is then produced by W3IOGR. 
!     Note that the name of the model definition file is set in W3IOGR.
!     This is now all done in the subroutine W3GRID
!
!  3. Parameters :
!     
!     Parameter list 
!     ----------------------------------------------------------------
!     MDS       I.A.   I   Array with dataset numbers
!                           1:
!                           2:
!                           3:
!                           4:
!                           5:
!
!  4. Subroutines used :
!
!      Name      Type  Module   Description
!     ----------------------------------------------------------------
!      W3GRID    Subr. W3GRIDMD creates mod_def file 
!
!  5. Called by :
!
!     None, stand-alone program.
!
!  6. Error messages :
!
!  7. Remarks :
!        See w3gridmd.ftn for details 
!
!  8. Structure :
!        Call subroutine W3GRID
!
!  9. Switches :
!        none
! 10. Source code :
!
!/ ------------------------------------------------------------------- /

      USE W3GRIDMD, ONLY: W3GRID
      IMPLICIT NONE
      INTEGER :: MDS(5)

      ! Set file unit numbers
      MDS(1) = 10    ! NDSI
      MDS(2) = 99    ! NDSS
      MDS(3) = 20    ! NDSM
      MDS(4) = 6     ! NDSTRC
      MDS(5) = 10    ! NTRACE

      CALL W3GRID(MDS)

      END PROGRAM WW3GRID
