Calculation of the second order correction to the surface gravity wave spectrum. More...
Functions/Subroutines | |
| subroutine | w3add2ndorder (E, DEPTH, WN, CG, IACTION) |
| Adds second order spectrum on top of first order spectrum. More... | |
| subroutine | cal_sec_order_spec (F1, F3, NFRE, NANG, FR, DFIM, TH, DELTH, DPTH, SIGM, NFREH, NANGH) |
| Determines second order spectrum. More... | |
| subroutine | tables_2nd (NFRE, NANG, NDEPTH, DEPTHA, OMSTART, FRAC, XMR, DFDTH, OMEGA, TH) |
| Computes tables for second order spectrum in frequency space. More... | |
| subroutine | secspom (F1, F3, NFRE, NANG, NMAX, NDEPTH, DEPTHA, DEPTHD, OMSTART, FRAC, MR, DFDTH, OMEGA, DEPTH, AKMEAN, TA, TB, TC_QL, TT_4M, TT_4P, IM_P, IM_M, COUNTER) |
| Computes second order spectrum in frequency space. More... | |
| real function | a (XI, XJ, THI, THJ) |
| Gives nonlinear transfer coefficient for three wave interactions interactions of gravity waves in the ideal case of no current. More... | |
| real function | b (XI, XJ, THI, THJ) |
| Gives nonlinear transfer coefficient for three wave interactions interactions of gravity waves in the ideal case of no current. More... | |
| real function | c_ql (XK0, XK1, TH0, TH1) |
| Determine contribution by quasi-linear terms. More... | |
| real function | vplus (XI, XJ, XK, THI, THJ, THK) |
| Determines the second-order transfer coefficient for three wave interactions of gravity waves. More... | |
| real function | vmin (XI, XJ, XK, THI, THJ, THK) |
| Determines the second-order transfer coefficient for three wave interactions of gravity waves. More... | |
| real function | u (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Determines the third-order transfer coefficient for four wave interactions of gravity waves. More... | |
| real function | w2 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Determines the contribution of the direct four-wave interactions of gravity waves of the type A_2^*A_3A_4. More... | |
| real function | v2 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Determines the contribution of the virtual four-wave interactions of gravity waves. More... | |
| real function | w1 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Determines the nonlinear transfer coefficient for four wave interactions of gravity waves of the type A_2A_3A_4. More... | |
| real function | w4 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Determines the nonlinear transfer coefficient for four wave interactions of gravity waves of the type A_^*A_3^*A_4^*. More... | |
| real function | b3 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Weights of the A_2^*A_3^*A_4 part of the canonical transformation. More... | |
| real function | b4 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Weights of the A_2^*A_3^*A_4^* part of the canonical transformation. More... | |
| real function | b1 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Weights of the A_2A_3A_4 part of the canonical transformation. More... | |
| real function | b2 (XI, XJ, XK, XL, THI, THJ, THK, THL) |
| Weights of the A_2^*A_3A_4 part of the canonical transformation. More... | |
| real function | a1 (XI, XJ, XK, THI, THJ, THK) |
| Auxiliary second-order coefficient. More... | |
| real function | a2 (XI, XJ, XK, THI, THJ, THK) |
| Auxiliary second-order function. More... | |
| real function | a3 (XI, XJ, XK, THI, THJ, THK) |
| Auxiliary second-order function. More... | |
| real function | omeg (X) |
| Determines the dispersion relation for gravity waves. More... | |
| real function | vg (X) |
| Determines the group velocity for gravity- waves. More... | |
| real function | aki (OM, BETA) |
| Gives the wavenumber. More... | |
| real function | vabs (XI, XJ, THI, THJ) |
| NA. More... | |
| real function | vdir (XI, XJ, THI, THJ) |
| NA. More... | |
Variables | |
| real | g |
| real | pi |
| real | zpi |
| real | rad |
| real | deg |
| integer | ndepth |
| real | deptha |
Calculation of the second order correction to the surface gravity wave spectrum.
| real function w3canomd::a | ( | real | XI, |
| real | XJ, | ||
| real | THI, | ||
| real | THJ | ||
| ) |
Gives nonlinear transfer coefficient for three wave interactions interactions of gravity waves in the ideal case of no current.
Determines the minus interaction coefficients.
| XI | wave number |
| XJ | wave number |
| THI | |
| THJ |
Definition at line 1152 of file w3canomd.F90.
References a1(), a3(), g, omeg(), pi, vabs(), and vdir().
Referenced by tables_2nd().
| real function w3canomd::a1 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK | ||
| ) |
Auxiliary second-order coefficient.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| THI | |
| THJ | |
| THK |
Definition at line 2492 of file w3canomd.F90.
| real function w3canomd::a2 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK | ||
| ) |
Auxiliary second-order function.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| THI | |
| THJ | |
| THK |
Definition at line 2566 of file w3canomd.F90.
References a1().
Referenced by b().
| real function w3canomd::a3 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK | ||
| ) |
Auxiliary second-order function.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| THI | |
| THJ | |
| THK |
Definition at line 2624 of file w3canomd.F90.
| real function w3canomd::aki | ( | real | OM, |
| real | BETA | ||
| ) |
Gives the wavenumber.
| OM | |
| BETA |
Definition at line 2806 of file w3canomd.F90.
References g.
Referenced by cal_sec_order_spec(), and tables_2nd().
| real function w3canomd::b | ( | real | XI, |
| real | XJ, | ||
| real | THI, | ||
| real | THJ | ||
| ) |
Gives nonlinear transfer coefficient for three wave interactions interactions of gravity waves in the ideal case of no current.
Determines the plus interaction coefficients.
| XI | wave number |
| XJ | wave number |
| THI | |
| THJ |
Definition at line 1229 of file w3canomd.F90.
References a2(), g, omeg(), pi, vabs(), and vdir().
Referenced by tables_2nd().
| real function w3canomd::b1 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
| real function w3canomd::b2 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
| real function w3canomd::b3 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
Weights of the A_2^*A_3^*A_4 part of the canonical transformation.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| XL | Wave number |
| THI | |
| THJ | |
| THK | |
| THL |
Definition at line 2016 of file w3canomd.F90.
References a1(), a3(), omeg(), pi, vabs(), vdir(), vmin(), vplus(), and w1().
Referenced by c_ql().
| real function w3canomd::b4 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
| real function w3canomd::c_ql | ( | real | XK0, |
| real | XK1, | ||
| real | TH0, | ||
| real | TH1 | ||
| ) |
Determine contribution by quasi-linear terms.
| XK0 | |
| XK1 | |
| TH0 | |
| TH1 |
Definition at line 1301 of file w3canomd.F90.
References b2(), b3(), g, omeg(), and pi.
Referenced by tables_2nd().
| subroutine w3canomd::cal_sec_order_spec | ( | real, dimension(nang,nfre), intent(in) | F1, |
| real, dimension(nang,nfre), intent(out) | F3, | ||
| integer, intent(in) | NFRE, | ||
| integer, intent(in) | NANG, | ||
| real, dimension(nfre), intent(in) | FR, | ||
| real, dimension(nfre), intent(in) | DFIM, | ||
| real, dimension(nang), intent(in) | TH, | ||
| real, intent(in) | DELTH, | ||
| real, intent(in) | DPTH, | ||
| real, intent(in) | SIGM, | ||
| integer, intent(in) | NFREH, | ||
| integer, intent(in) | NANGH | ||
| ) |
Determines second order spectrum.
| [in] | F1 | 2-D free wave spectrum |
| [out] | F3 | 2-D spectrum including 2nd-order correction |
| [in] | NFRE | number of frequencies |
| [in] | NANG | number of directions |
| [in] | FR | frequencies |
| [in] | DFIM | frequency increment |
| [in] | TH | directional array |
| [in] | DELTH | directional increment |
| [in] | DPTH | depth array |
| [in] | SIGM | mapping indicator |
| [in] | NFREH | |
| [in] | NANGH |
Definition at line 369 of file w3canomd.F90.
References aki(), deptha, ndepth, secspom(), tables_2nd(), and zpi.
Referenced by w3add2ndorder().
| real function w3canomd::omeg | ( | real | X | ) |
| subroutine w3canomd::secspom | ( | real, dimension(nang,nfre) | F1, |
| real, dimension(nang,nfre) | F3, | ||
| integer | NFRE, | ||
| integer | NANG, | ||
| integer | NMAX, | ||
| integer | NDEPTH, | ||
| real | DEPTHA, | ||
| real | DEPTHD, | ||
| real | OMSTART, | ||
| real | FRAC, | ||
| integer | MR, | ||
| real, dimension(nfre) | DFDTH, | ||
| real, dimension(nfre) | OMEGA, | ||
| real | DEPTH, | ||
| real | AKMEAN, | ||
| real, dimension(nang,nfre,nfre,ndepth) | TA, | ||
| real, dimension(nang,nfre,nfre,ndepth) | TB, | ||
| real, dimension(nang,nfre,nfre,ndepth) | TC_QL, | ||
| real, dimension(nang,nfre,nfre,ndepth) | TT_4M, | ||
| real, dimension(nang,nfre,nfre,ndepth) | TT_4P, | ||
| integer, dimension(nfre,nfre) | IM_P, | ||
| integer, dimension(nfre,nfre) | IM_M, | ||
| integer | COUNTER | ||
| ) |
Computes second order spectrum in frequency space.
| F1 | 2D free wave spectrum (input) |
| F3 | bound waves spectrum (output) |
| NFRE | number of frequencies |
| NANG | number of directions |
| NMAX | maximum index corresponds to twice the cut-off frequency |
| NDEPTH | number of entries in depth table |
| DEPTHA | start value depth array |
| DEPTHD | increment depth array |
| OMSTART | start value angular frequency array |
| FRAC | fractional increase in frequency space |
| MR | thinning factor in frequency space |
| OMEGA | angular frequency array |
| DEPTH | depth array |
| AKMEAN | mean wavenumber array |
| TA | table for minus interactions |
| TB | table for plus interactions |
| TC_QL | table for quasi-linear interactions |
| TT_4M | table for stokes frequency correction |
| TT_4P | table for stokes frequency correction |
| IM_P | table for wavenumber m2 plus |
| IM_M | table for wavenumber m2 min |
Definition at line 925 of file w3canomd.F90.
References w3gdatmd::igpars.
Referenced by cal_sec_order_spec().
| subroutine w3canomd::tables_2nd | ( | integer | NFRE, |
| integer | NANG, | ||
| integer | NDEPTH, | ||
| real | DEPTHA, | ||
| real | OMSTART, | ||
| real | FRAC, | ||
| real | XMR, | ||
| real, dimension(nfre) | DFDTH, | ||
| real, dimension(nfre) | OMEGA, | ||
| real, dimension(nang) | TH | ||
| ) |
Computes tables for second order spectrum in frequency space.
| NFRE | number of frequencies |
| NANG | number of directions |
| NDEPTH | number of entries in the depth table |
| DEPTHA | |
| OMSTART | start frequency |
| FRAC | fractional increase in frequency space |
| XMR | inverse of thinning factor in frequency space |
| DFDTH | product of increment in frequency and direction |
| OMEGA | angular frequency array |
| TH | direction array |
Definition at line 722 of file w3canomd.F90.
References a(), aki(), b(), c_ql(), g, v2(), and w2().
Referenced by cal_sec_order_spec().
| real function w3canomd::u | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
Determines the third-order transfer coefficient for four wave interactions of gravity waves.
| XI | wave number |
| XJ | wave number |
| XK | wave number |
| XL | wave number |
| THI | |
| THJ | |
| THK | |
| THL |
Definition at line 1552 of file w3canomd.F90.
| real function w3canomd::v2 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
Determines the contribution of the virtual four-wave interactions of gravity waves.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| XL | Wave number |
| THI | |
| THJ | |
| THK | |
| THL |
Definition at line 1712 of file w3canomd.F90.
References omeg(), pi, vabs(), vdir(), vmin(), and vplus().
Referenced by tables_2nd().
| real function w3canomd::vabs | ( | real | XI, |
| real | XJ, | ||
| real | THI, | ||
| real | THJ | ||
| ) |
| real function w3canomd::vdir | ( | real | XI, |
| real | XJ, | ||
| real | THI, | ||
| real | THJ | ||
| ) |
| real function w3canomd::vg | ( | real | X | ) |
Determines the group velocity for gravity- waves.
| X | Wave number |
Definition at line 2749 of file w3canomd.F90.
References g.
| real function w3canomd::vmin | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK | ||
| ) |
Determines the second-order transfer coefficient for three wave interactions of gravity waves.
| XI | wave number |
| XJ | wave number |
| XK | wave number |
| THI | wave direction |
| THJ | wave direction |
| THK | wave direction |
Definition at line 1459 of file w3canomd.F90.
| real function w3canomd::vplus | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK | ||
| ) |
Determines the second-order transfer coefficient for three wave interactions of gravity waves.
| XI | wave numbers |
| XJ | wave numbers |
| XK | wave numbers |
| THI | wave direction |
| THJ | wave direction |
| THK | wave direction |
Definition at line 1368 of file w3canomd.F90.
| real function w3canomd::w1 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
Determines the nonlinear transfer coefficient for four wave interactions of gravity waves of the type A_2A_3A_4.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| XL | Wave number |
| THI | |
| THJ | |
| THK | |
| THL |
Definition at line 1863 of file w3canomd.F90.
| real function w3canomd::w2 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
Determines the contribution of the direct four-wave interactions of gravity waves of the type A_2^*A_3A_4.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| XL | Wave number |
| THI | |
| THJ | |
| THK | |
| THL |
Definition at line 1643 of file w3canomd.F90.
Referenced by tables_2nd().
| subroutine w3canomd::w3add2ndorder | ( | real, dimension(nspec), intent(inout) | E, |
| real, intent(in) | DEPTH, | ||
| real, dimension(nk), intent(in) | WN, | ||
| real, dimension(nk), intent(in) | CG, | ||
| integer, intent(in) | IACTION | ||
| ) |
Adds second order spectrum on top of first order spectrum.
| [in,out] | E | Energy density spectrum (1-D), f-theta. |
| [in] | DEPTH | Mean water depth. |
| [in] | WN | Wavenumbers. |
| [in] | CG | Group velocities. |
| [in] | IACTION | Action density spectrum (1-D). |
Definition at line 153 of file w3canomd.F90.
References cal_sec_order_spec(), deg, deptha, w3gdatmd::dth, g, constants::grav, w3gdatmd::igpars, ndepth, w3gdatmd::nk, w3gdatmd::nspec, w3gdatmd::nth, pi, rad, w3gdatmd::sig, w3servmd::strace(), w3gdatmd::th, and zpi.
Referenced by w3exnc(), w3outp(), and w3ref1md::w3sref().
| real function w3canomd::w4 | ( | real | XI, |
| real | XJ, | ||
| real | XK, | ||
| real | XL, | ||
| real | THI, | ||
| real | THJ, | ||
| real | THK, | ||
| real | THL | ||
| ) |
Determines the nonlinear transfer coefficient for four wave interactions of gravity waves of the type A_^*A_3^*A_4^*.
| XI | Wave number |
| XJ | Wave number |
| XK | Wave number |
| XL | Wave number |
| THI | |
| THJ | |
| THK | |
| THL |
Definition at line 1939 of file w3canomd.F90.
References u().
Referenced by b4().
| real w3canomd::deg |
Definition at line 112 of file w3canomd.F90.
Referenced by w3add2ndorder().
| real w3canomd::deptha |
Definition at line 114 of file w3canomd.F90.
Referenced by cal_sec_order_spec(), and w3add2ndorder().
| real w3canomd::g |
Definition at line 112 of file w3canomd.F90.
Referenced by a(), aki(), b(), c_ql(), omeg(), tables_2nd(), u(), vg(), vmin(), vplus(), and w3add2ndorder().
| integer w3canomd::ndepth |
Definition at line 113 of file w3canomd.F90.
Referenced by cal_sec_order_spec(), and w3add2ndorder().
| real w3canomd::pi |
| real w3canomd::rad |
Definition at line 112 of file w3canomd.F90.
Referenced by w3add2ndorder().
| real w3canomd::zpi |
Definition at line 112 of file w3canomd.F90.
Referenced by cal_sec_order_spec(), and w3add2ndorder().