Skip to content
Merged
97 changes: 97 additions & 0 deletions model/src/w3adatmd.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
!> @file
!> @brief Define data structures to set up wave model auxiliary data
!> for several models simultaneously.
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>

#include "w3macros.h"
!/ ------------------------------------------------------------------- /
!>
!> @brief Define data structures to set up wave model auxiliary data
!> for several models simultaneously.
!>
!> @details The number of grids is taken from W3GDATMD, and needs to be
!> set first with W3DIMG.
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>
!> @copyright Copyright 2009-2022 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.
!>
MODULE W3ADATMD
#ifdef W3_MEMCHECK
USE MallocInfo_m
Expand Down Expand Up @@ -665,6 +688,17 @@ MODULE W3ADATMD
!/
CONTAINS
!/ ------------------------------------------------------------------- /
!>
!> @brief Set up the number of grids to be used.
!>
!> @details Use data stored in NGRIDS in W3GDATMD.
!>
!> @param[in] NDSE Error output unit number.
!> @param[in] NDST Test output unit number.
!>
!> @author H. L. Tolman
!> @date 10-Dec-2014
!>
SUBROUTINE W3NAUX ( NDSE, NDST )
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -797,6 +831,20 @@ SUBROUTINE W3NAUX ( NDSE, NDST )
!/
END SUBROUTINE W3NAUX
!/ ------------------------------------------------------------------- /
!>
!> @brief Initialize an individual data grid at the proper dimensions.
!>
!> @details Allocate directly into the structure array. Note that
!> this cannot be done through the pointer alias!
!>
!> @param[in] IMOD Model number to point to.
!> @param[in] NDSE Error output unit number.
!> @param[in] NDST Test output unit number.
!> @param[in] D_ONLY Flag for initializing data arrays only.
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>
SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -1523,6 +1571,17 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
!/
END SUBROUTINE W3DIMA
!/ ------------------------------------------------------------------- /
!>
!> @brief Version of W3DIMX for extended ouput arrays only.
!>
!> @param[in] IMOD Model number to point to.
!> @param[in] NDSE Error output unit number.
!> @param[in] NDST Test output unit number.
!> @param[in] OUTFLAGS
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>
SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -2395,6 +2454,21 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
!/
END SUBROUTINE W3XDMA
!/ ------------------------------------------------------------------- /
!>
!> @brief Initialize an individual data grid at the proper dimensions (DIA).
!>
!> @details Allocate directly into the structure array. Note that
!> this cannot be done through the pointer alias!
!>
!> @param[in] IMOD Model number to point to.
!> @param[in] NDSE Error output unit number.
!> @param[in] NDST Test output unit number.
!> @param[in] NSP Array dimensions.
!> @param[in] NSPX Array dimensions.
!>
!> @author H. L. Tolman
!> @date 10-Dec-2014
!>
SUBROUTINE W3DMNL ( IMOD, NDSE, NDST, NSP, NSPX )
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -2603,6 +2677,19 @@ SUBROUTINE W3DMNL ( IMOD, NDSE, NDST, NSP, NSPX )
!/
END SUBROUTINE W3DMNL
!/ ------------------------------------------------------------------- /
!>
!> @brief Select one of the WAVEWATCH III grids / models.
!>
!> @details Point pointers to the proper variables in the proper element
!> of the GRIDS array.
!>
!> @param[in] IMOD Model number to point to.
!> @param[in] NDSE Error output unit number.
!> @param[in] NDST Test output unit number.
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>
SUBROUTINE W3SETA ( IMOD, NDSE, NDST )
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -3069,6 +3156,16 @@ SUBROUTINE W3SETA ( IMOD, NDSE, NDST )
!/
END SUBROUTINE W3SETA
!/ ------------------------------------------------------------------- /
!>
!> @brief Reduced version of W3SETA to point to expended output arrays.
!>
!> @param[in] IMOD Model number to point to.
!> @param[in] NDSE Error output unit number.
!> @param[in] NDST Test output unit number.
!>
!> @author H. L. Tolman
!> @date 22-Mar-2021
!>
SUBROUTINE W3XETA ( IMOD, NDSE, NDST )
!/
!/ +-----------------------------------+
Expand Down
40 changes: 40 additions & 0 deletions model/src/w3agcmmd.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
!> @file
!> @brief Contains module used for coupling applications between atmospheric model
!> and WW3 with OASIS3-MCT.
!>
!> @author J. Pianezze
!> @date Mar-2021
!>

#include "w3macros.h"
!/ ------------------------------------------------------------------- /
!>
!> @brief Module used for coupling applications between atmospheric model
!> and WW3 with OASIS3-MCT.
!>
!> @author J. Pianezze
!> @date Mar-2021
!>
!> @copyright Copyright 2009-2022 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.
!>
MODULE W3AGCMMD
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -59,6 +79,13 @@ MODULE W3AGCMMD
!
CONTAINS
!/ ------------------------------------------------------------------- /

!>
!> @brief Send coupling fields to atmospheric model.
!>
!> @author J. Pianezze
!> @date Apr-2016
!>
SUBROUTINE SND_FIELDS_TO_ATMOS()
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -192,6 +219,19 @@ SUBROUTINE SND_FIELDS_TO_ATMOS()
!
!/ ------------------------------------------------------------------- /
END SUBROUTINE SND_FIELDS_TO_ATMOS

!>
!> @brief Receive coupling fields from atmospheric model.
!>
!> @param[in] ID_LCOMM MPI communicator.
!> @param[in] IDFLD Name of the exchange fields.
!> @param[inout] FXN First exchange field.
!> @param[inout] FYN Second exchange field.
!> @param[inout] FAN Third exchange field.
!>
!> @author J. Pianezze
!> @date Mar-2021
!>
!/ ------------------------------------------------------------------- /
SUBROUTINE RCV_FIELDS_FROM_ATMOS(ID_LCOMM, IDFLD, FXN, FYN, FAN)
!/
Expand Down
44 changes: 44 additions & 0 deletions model/src/w3bullmd.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
!> @file
!> @brief Contains module W3BULLMD.
!>
!> @author J. H. Alves
!> @author H. L. Tolman
!> @date 26-Dec-2012
!>

#include "w3macros.h"
!/ ------------------------------------------------------------------- /
!>
!> @brief Module W3BULLMD.
!>
!> @author J. H. Alves
!> @author H. L. Tolman
!> @date 26-Dec-2012
!>
!> @copyright Copyright 2009-2022 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.
!>
MODULE W3BULLMD
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -42,6 +62,30 @@ MODULE W3BULLMD
!/
CONTAINS
!/ ------------------------------------------------------------------- /
!>
!> @brief Read a WAVEWATCH-III version 1.17 point output data file and
!> produces a table of mean parameters for all individual wave
!> systems.
!>
!> @details Partitioning is made using the built-in module w3partmd.
!> Partitions are ranked and organized into coherent sequences that
!> are then written as tables to output files. Input options for generating
!> tables are defined in ww3_outp.inp. This module sorts the table
!> data, output to file is controlled by WW3_OUTP.
!>
!> @param[in] NPART
!> @param[in] XPART
!> @param[in] DIMXP
!> @param[in] UABS
!> @param[in] UD
!> @param IPNT
!> @param[in] IOUT
!> @param[inout] TIMEV
!>
!> @author J. H. Alves
!> @author H. L. Tolman
!> @date 11-Mar-2013
!>
SUBROUTINE W3BULL &
( NPART, XPART, DIMXP, UABS, UD, IPNT, IOUT, TIMEV )
!/
Expand Down
43 changes: 43 additions & 0 deletions model/src/w3cspcmd.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
!> @file
!> @brief Convert spectra to new discrete spectral grid.
!>
!> @author H. L. Tolman
!> @date 01-Nov-2012
!>

#include "w3macros.h"
!/ ------------------------------------------------------------------- /
!>
!> @brief Convert spectra to new discrete spectral grid.
!>
!> @author H. L. Tolman
!> @date 01-Nov-2012
!>
!> @copyright Copyright 2009-2022 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.
!>
MODULE W3CSPCMD
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -97,6 +115,31 @@ MODULE W3CSPCMD
!/
CONTAINS
!/ ------------------------------------------------------------------- /
!>
!> @brief Convert a set of spectra to a new spectral grid.
!>
!> @details Conservative distribution of input energies over new grid.
!>
!> @param[in] SP1 Input spectra.
!> @param[in] NFR1 Input number of frequencies.
!> @param[in] NTH1 Input number of directions.
!> @param[in] XF1 Input frequency increment factor.
!> @param[in] FR1 First input frequency.
!> @param[in] TH1 First input direction.
!> @param[out] SP2 Output spectra.
!> @param[in] NFR2 Output number of frequencies.
!> @param[in] NTH2 Output number of directions.
!> @param[in] XF2 Output frequency increment factor.
!> @param[in] FR2 First output frequency.
!> @param[in] TH2 First output direction.
!> @param[in] NSP Number of spectra.
!> @param[in] NDST Unit number for test output.
!> @param[in] NDSE Unit number for error output.
!> @param[in] FTL Factor for tail description = XF2**N.
!>
!> @author H. L. Tolman
!> @date 01-Nov-2012
!>
SUBROUTINE W3CSPC ( SP1, NFR1, NTH1, XF1, FR1, TH1, &
SP2, NFR2, NTH2, XF2, FR2, TH2, &
NSP, NDST, NDSE, FTL )
Expand Down
32 changes: 32 additions & 0 deletions model/src/w3flx1md.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
!> @file
!> @brief Flux/stress computations according to Wu (1980).
!>
!> @author H. L. Tolman
!> @date 29-May-2009
!>

#include "w3macros.h"
!/ ------------------------------------------------------------------- /
!>
!> @brief Flux/stress computations according to Wu (1980).
!>
!> @author H. L. Tolman
!> @date 29-May-2009
!>
!> @copyright Copyright 2009-2022 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.
!>
MODULE W3FLX1MD
!/
!/ +-----------------------------------+
Expand Down Expand Up @@ -53,6 +71,20 @@ MODULE W3FLX1MD
!/
CONTAINS
!/ ------------------------------------------------------------------- /
!>
!> @brief FLux/stress computations according to Wu (1980).
!>
!> @param[inout] ZWND Wind height.
!> @param[inout] U10 Wind speed.
!> @param[inout] U10D Wind direction.
!> @param[inout] UST Friction velocity.
!> @param[inout] USTD Direction of friction velocity.
!> @param[inout] Z0 Z0 in profile law.
!> @param[inout] CD Drag coefficient.
!>
!> @author H. L. Tolman
!> @date 03-Jul-2006
!>
SUBROUTINE W3FLX1 ( ZWND, U10, U10D, UST, USTD, Z0, CD )
!/
!/ +-----------------------------------+
Expand Down
Loading