Spherical Multiple-Cell (SMC) grid routines. More...
Functions/Subroutines | |
| subroutine | w3psmc (ISP, DTG, VQ) |
| Propagation in phyiscal space for a given spectral component. More... | |
| subroutine | w3krtn (ISEA, FACTH, FACK, CTHG0, CG, WN, DEPTH, DDDX, DDDY, ALFLMT, CX, CY, DCXDX, DCXDY, DCYDX, DCYDY, DCDX, DCDY, VA) |
| Refraction and great-circle turning by spectral rotation. More... | |
| subroutine | smcxuno2 (NUA, NUB, CF, UC, UFLX, AKDif, FU, FX, FTS) |
| Calculate mid-flux values for x dimension. More... | |
| subroutine | smcyuno2 (NVA, NVB, CF, VC, VFLY, AKDif, FV, FY, FTS) |
| Calculate mid-flux values for y dimension. More... | |
| subroutine | smcxuno2r (NUA, NUB, CF, UC, UFLX, AKDif, FU, FX) |
| Calculate mid-flux values for x dimension. More... | |
| subroutine | smcyuno2r (NVA, NVB, CF, VC, VFLY, AKDif, FV, FY) |
| Calculate mid-flux values for y dimension. More... | |
| subroutine | smcxuno3 (NUA, NUB, CF, UC, UFLX, AKDif, FU, FX, FTS) |
| Calculate mid-flux values for x dimension with UNO3 scheme. More... | |
| subroutine | smcyuno3 (NVA, NVB, CF, VC, VFLY, AKDif, FV, FY, FTS) |
| Calculate mid-flux values for y dimension with UNO3 scheme. More... | |
| subroutine | smcxuno3r (NUA, NUB, CF, UC, UFLX, AKDif, FU, FX) |
| Calculate mid-flux values for x dimension with UNO3. More... | |
| subroutine | smcyuno3r (NVA, NVB, CF, VC, VFLY, AKDif, FV, FY) |
| Calculate mid-flux values for y dimension with UNO3. More... | |
| subroutine | smcgradn (CVQ, GrdX, GrdY, L0r1) |
| Evaluate local gradient for sea points. More... | |
| subroutine | smcaverg (CVQ) |
| Average sea point values with a 1-2-1 scheme. More... | |
| subroutine | smcgtcrfr (CoRfr, SpeTHK) |
| Calculate great circle turning (GCT) and refraction. More... | |
| subroutine | smckuno2 (CoRfr, SpeTHK, DKC, DKS) |
| Calculates refraction induced shift in k-space. More... | |
| subroutine | smcdhxy |
| Calculates water-depth gradient for refraction. More... | |
| subroutine | smcdcxy |
| Calculates current velocity gradient for refraction. More... | |
| subroutine | w3gathsmc (ISPEC, FIELD) |
| SMC version of W3GATH. More... | |
| subroutine | w3scatsmc (ISPEC, MAPSTA, FIELD) |
| SMC version of W3GATH. More... | |
| subroutine | w3smcell (IMOD, NC, IDCl, XLon, YLat) |
| Calculate cell centre lat-lon for given ids. More... | |
| subroutine | w3smcgmp (IMOD, NC, XLon, YLat, IDCl) |
| Map lat-lon points to SMC grid cells. More... | |
Spherical Multiple-Cell (SMC) grid routines.
Bundles routines for SMC advection (UNO2) and diffusion schemes in single module, including great circile turning and refraction rotation schemes.
| subroutine w3psmcmd::smcaverg | ( | real, dimension(-9:nsea), intent(inout) | CVQ | ) |
Average sea point values with a 1-2-1 scheme.
| [in,out] | CVQ | Input field. |
Definition at line 2543 of file w3psmcmd.F90.
References w3gdatmd::arctc, w3gdatmd::ijkcel, w3gdatmd::ijkufc, w3gdatmd::ijkufc5, w3gdatmd::ijkufc6, w3gdatmd::ijkvfc, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nufc, and w3gdatmd::nvfc.
Referenced by w3psmc().
| subroutine w3psmcmd::smcdcxy |
Calculates current velocity gradient for refraction.
For consistency with the lat-lon grid, full grid DCXDXY, DCYDXY are assigned here. They are rotated to map-east system in the Arctic part.
Definition at line 3042 of file w3psmcmd.F90.
References w3gdatmd::angarc, w3gdatmd::arctc, w3adatmd::cx, w3adatmd::cy, w3adatmd::dcxdx, w3adatmd::dcxdy, w3adatmd::dcydx, w3adatmd::dcydy, constants::dera, w3gdatmd::ijkcel, w3gdatmd::mapfs, w3gdatmd::mapsta, w3gdatmd::mrfct, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nglo, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, and smcgradn().
Referenced by w3wavemd::w3wave().
| subroutine w3psmcmd::smcdhxy |
Calculates water-depth gradient for refraction.
For consistency with the lat-lon grid, full grid DDDX, DDDY are also assigned here. DHDX, DHDY are used for refraction at present. It has to be rotated to map-east system in the Arctic part.
Definition at line 2897 of file w3psmcmd.F90.
References w3gdatmd::angarc, w3gdatmd::arctc, w3gdatmd::clats, w3adatmd::dddx, w3adatmd::dddy, constants::dera, w3adatmd::dhdx, w3adatmd::dhdy, w3adatmd::dhlmt, w3gdatmd::dmin, w3gdatmd::dth, w3adatmd::dw, w3gdatmd::ecos, w3gdatmd::esin, w3gdatmd::ijkcel, w3gdatmd::mapfs, w3gdatmd::mapsta, w3gdatmd::mrfct, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nglo, w3gdatmd::nsea, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, constants::pi, w3gdatmd::refran, and smcgradn().
Referenced by w3wavemd::w3wave().
| subroutine w3psmcmd::smcgradn | ( | real, dimension(nsea), intent(in) | CVQ, |
| real, dimension(nsea), intent(out) | GrdX, | ||
| real, dimension(nsea), intent(out) | GrdY, | ||
| integer, intent(in) | L0r1 | ||
| ) |
Evaluate local gradient for sea points.
Calculate cell centre gradient for any input variable. Nemerical average is applied to size-changing faces and the gradients are along the lat-lon local east-north directions.
| [in] | CVQ | Input cell values. |
| [out] | GrdX | Gradient along x-axis. |
| [out] | GrdY | Gradient along y-axis. |
| [in] | L0r1 | Zero or 1st-order boundary condiiton. |
Definition at line 2335 of file w3psmcmd.F90.
References w3gdatmd::arctc, w3gdatmd::clats, constants::dera, w3gdatmd::ijkcel, w3gdatmd::ijkufc, w3gdatmd::ijkvfc, w3gdatmd::mrfct, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nufc, w3gdatmd::nvfc, constants::radius, w3gdatmd::sx, and w3gdatmd::sy.
Referenced by smcdcxy(), smcdhxy(), and w3smcomd::w3s2xy_smcnn_int().
| subroutine w3psmcmd::smcgtcrfr | ( | real, dimension(nth, nk), intent(in) | CoRfr, |
| real, dimension(nth, nk), intent(inout) | SpeTHK | ||
| ) |
Calculate great circle turning (GCT) and refraction.
The refraction and GCT terms are equivalent to a single rotation by each element and does not need to be calculated as advection. A simple rotation scheme similar to the 1st order upstream scheme but without any restriction on the rotation angle or the CFL limit by an Eulerian advection scheme.
| [in] | CoRfr | Courant number for refraction and GCT rotation. |
| [in] | SpeTHK | Wave spectrum to be rotated and output. |
Definition at line 2711 of file w3psmcmd.F90.
References w3gdatmd::ctmax, w3gdatmd::dth, w3gdatmd::nk, and w3gdatmd::nth.
Referenced by w3krtn().
| subroutine w3psmcmd::smckuno2 | ( | real, dimension(nth, 0:nk), intent(in) | CoRfr, |
| real, dimension(nth, nk), intent(inout) | SpeTHK, | ||
| real, dimension(0:nk+1), intent(in) | DKC, | ||
| real, dimension(-1:nk+1), intent(in) | DKS | ||
| ) |
Calculates refraction induced shift in k-space.
The term is equivalent to advection on an irregular k-space grid. The UNO2 scheme on irregular grid is used for this term.
Cell and side indices for k-dimension are arranged as:
Cell: | -1 | 0 | 1 | 2 | ... | NK | NK+1 | NK+2 |
Side: -1 0 1 2 ... NK NK+1The wave action in k-space is extended at the high-wavenumber (frequency) end by the (m+2)th negative power of frequency for boundary conditions. Outside low-wavenumber (frequncy) end, wave action is assumed to be zero.
| [in] | CoRfr | Courant number for refraction k-shift. |
| [in,out] | SpeTHK | Spectrum to be shifted and output. |
| [in] | DKC | Wave number increment at k-bin centre. |
| [in] | DKS | Wave number increment at k-bin edges. |
Definition at line 2815 of file w3psmcmd.F90.
References w3gdatmd::ctmax, w3gdatmd::dth, w3gdatmd::nk, w3gdatmd::nk2, w3gdatmd::nth, and w3gdatmd::xfr.
Referenced by w3krtn().
| subroutine w3psmcmd::smcxuno2 | ( | integer, intent(in) | NUA, |
| integer, intent(in) | NUB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | UC, | ||
| real, dimension(nufc), intent(out) | UFLX, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nufc), intent(out) | FU, | ||
| real, dimension(nufc), intent(out) | FX, | ||
| real, intent(in) | FTS | ||
| ) |
Calculate mid-flux values for x dimension.
| [in] | NUA | Start number of U-face list. |
| [in] | NUB | End number of U-face list. |
| [in] | CF | Transported variable. |
| [in] | UC | Veclocity U-component at cell centre. |
| [out] | UFLX | Mid-flux U-component on U-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FU | Advection Mid-flux on U-face. |
| [out] | FX | Diffusion Mid-flux on U-face. |
| [in] | FTS | Timestep fraction for sub-timestep. |
Definition at line 1291 of file w3psmcmd.F90.
References w3gdatmd::clats, w3gdatmd::ijkcel, w3gdatmd::ijkcel3, w3gdatmd::ijkcel4, w3gdatmd::ijkufc, w3gdatmd::mrfct, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, and w3gdatmd::nufc.
Referenced by w3psmc().
| subroutine w3psmcmd::smcxuno2r | ( | integer, intent(in) | NUA, |
| integer, intent(in) | NUB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | UC, | ||
| real, dimension(nufc), intent(out) | UFLX, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nufc), intent(out) | FU, | ||
| real, dimension(nufc), intent(out) | FX | ||
| ) |
Calculate mid-flux values for x dimension.
| [in] | NUA | Start number of U-face list. |
| [in] | NUB | End number of U-face list. |
| [in] | CF | Transported variable. |
| [in] | UC | Veclocity U-component at cell centre. |
| [out] | UFLX | Mid-flux U-component on U-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FU | Advection Mid-flux on U-face. |
| [out] | FX | Diffusion Mid-flux on U-face. |
Definition at line 1545 of file w3psmcmd.F90.
References w3gdatmd::clats, w3gdatmd::ijkcel, w3gdatmd::ijkcel3, w3gdatmd::ijkufc, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nufc, and w3gdatmd::ny.
Referenced by w3psmc().
| subroutine w3psmcmd::smcxuno3 | ( | integer, intent(in) | NUA, |
| integer, intent(in) | NUB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | UC, | ||
| real, dimension(nufc), intent(out) | UFLX, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nufc), intent(out) | FU, | ||
| real, dimension(nufc), intent(out) | FX, | ||
| real, intent(in) | FTS | ||
| ) |
Calculate mid-flux values for x dimension with UNO3 scheme.
| [in] | NUA | Start number of U-face list. |
| [in] | NUB | End number of U-face list. |
| [in] | CF | Transported variable. |
| [in] | UC | Veclocity U-component at cell centre. |
| [out] | UFLX | Mid-flux U-component on U-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FU | Advection Mid-flux on U-face. |
| [out] | FX | Diffusion Mid-flux on U-face. |
| [in] | FTS | Timestep fraction for sub-timestep. |
Definition at line 1758 of file w3psmcmd.F90.
References w3gdatmd::clats, w3gdatmd::ijkcel, w3gdatmd::ijkcel3, w3gdatmd::ijkufc, w3gdatmd::mrfct, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, and w3gdatmd::nufc.
Referenced by w3psmc().
| subroutine w3psmcmd::smcxuno3r | ( | integer, intent(in) | NUA, |
| integer, intent(in) | NUB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | UC, | ||
| real, dimension(nufc), intent(out) | UFLX, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nufc), intent(out) | FU, | ||
| real, dimension(nufc), intent(out) | FX | ||
| ) |
Calculate mid-flux values for x dimension with UNO3.
| [in] | NUA | Start number of U-face list. |
| [in] | NUB | End number of U-face list. |
| [in] | CF | Transported variable. |
| [in] | UC | Veclocity U-component at cell centre. |
| [out] | UFLX | Mid-flux U-component on U-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FU | Advection Mid-flux on U-face. |
| [out] | FX | Diffusion Mid-flux on U-face. |
Definition at line 2074 of file w3psmcmd.F90.
References w3gdatmd::clats, w3gdatmd::ijkcel, w3gdatmd::ijkcel3, w3gdatmd::ijkufc, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nufc, and w3gdatmd::ny.
Referenced by w3psmc().
| subroutine w3psmcmd::smcyuno2 | ( | integer, intent(in) | NVA, |
| integer, intent(in) | NVB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | VC, | ||
| real, dimension(nvfc), intent(out) | VFLY, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nvfc), intent(out) | FV, | ||
| real, dimension(nvfc), intent(out) | FY, | ||
| real, intent(in) | FTS | ||
| ) |
Calculate mid-flux values for y dimension.
| [in] | NVA | Start number of V-face list. |
| [in] | NVB | End number of V-face list. |
| [in] | CF | Transported variable. |
| [in] | VC | Veclocity V-component at cell centre. |
| [out] | VFLY | Mid-flux V-component on V-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FV | Advection Mid-flux on V-face. |
| [out] | FY | Diffusion Mid-flux on V-face. |
| [in] | FTS | Timestep fraction for sub-timestep. |
Definition at line 1418 of file w3psmcmd.F90.
References w3gdatmd::clatf, w3gdatmd::ijkcel, w3gdatmd::ijkcel4, w3gdatmd::ijkvfc, w3gdatmd::mrfct, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, and w3gdatmd::nvfc.
Referenced by w3psmc().
| subroutine w3psmcmd::smcyuno2r | ( | integer, intent(in) | NVA, |
| integer, intent(in) | NVB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | VC, | ||
| real, dimension(nvfc), intent(out) | VFLY, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nvfc), intent(out) | FV, | ||
| real, dimension(nvfc), intent(out) | FY | ||
| ) |
Calculate mid-flux values for y dimension.
| [in] | NVA | Start number of V-face list. |
| [in] | NVB | End number of V-face list. |
| [in] | CF | Transported variable. |
| [in] | VC | Veclocity V-component at cell centre. |
| [out] | VFLY | Mid-flux V-component on V-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FV | Advection Mid-flux on V-face. |
| [out] | FY | Diffusion Mid-flux on V-face. |
Definition at line 1655 of file w3psmcmd.F90.
References w3gdatmd::clatf, w3gdatmd::ijkcel, w3gdatmd::ijkvfc, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nvfc, and w3gdatmd::ny.
Referenced by w3psmc().
| subroutine w3psmcmd::smcyuno3 | ( | integer, intent(in) | NVA, |
| integer, intent(in) | NVB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | VC, | ||
| real, dimension(nvfc), intent(out) | VFLY, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nvfc), intent(out) | FV, | ||
| real, dimension(nvfc), intent(out) | FY, | ||
| real, intent(in) | FTS | ||
| ) |
Calculate mid-flux values for y dimension with UNO3 scheme.
| [in] | NVA | Start number of V-face list. |
| [in] | NVB | End number of V-face list. |
| [in] | CF | Transported variable. |
| [in] | VC | Veclocity V-component at cell centre. |
| [out] | VFLY | Mid-flux V-component on V-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FV | Advection Mid-flux on V-face. |
| [out] | FY | Diffusion Mid-flux on V-face. |
| [in] | FTS | Timestep fraction for sub-timestep. |
Definition at line 1913 of file w3psmcmd.F90.
References w3gdatmd::clatf, w3gdatmd::ijkcel, w3gdatmd::ijkcel4, w3gdatmd::ijkvfc, w3gdatmd::mrfct, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, and w3gdatmd::nvfc.
Referenced by w3psmc().
| subroutine w3psmcmd::smcyuno3r | ( | integer, intent(in) | NVA, |
| integer, intent(in) | NVB, | ||
| real, dimension(-9:ncel), intent(in) | CF, | ||
| real, dimension(-9:ncel), intent(in) | VC, | ||
| real, dimension(nvfc), intent(out) | VFLY, | ||
| real, intent(in) | AKDif, | ||
| real, dimension(nvfc), intent(out) | FV, | ||
| real, dimension(nvfc), intent(out) | FY | ||
| ) |
Calculate mid-flux values for y dimension with UNO3.
| [in] | NVA | Start number of V-face list. |
| [in] | NVB | End number of V-face list. |
| [in] | CF | Transported variable. |
| [in] | VC | Veclocity V-component at cell centre. |
| [out] | VFLY | Mid-flux V-component on V-face. |
| [in] | AKDif | Diffusion coefficient. |
| [out] | FV | Advection Mid-flux on V-face. |
| [out] | FY | Diffusion Mid-flux on V-face. |
Definition at line 2205 of file w3psmcmd.F90.
References w3gdatmd::clatf, w3gdatmd::ijkcel, w3gdatmd::ijkvfc, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nsea, w3gdatmd::nvfc, and w3gdatmd::ny.
Referenced by w3psmc().
| subroutine w3psmcmd::w3gathsmc | ( | integer, intent(in) | ISPEC, |
| real, dimension(ncel), intent(out) | FIELD | ||
| ) |
SMC version of W3GATH.
Gather spectral bin information into a propagation field array. Direct copy or communication calls (MPP version).
| [in] | ISPEC | Spectral bin considered |
| [out] | FIELD | Full field to be propagated |
Definition at line 3185 of file w3psmcmd.F90.
References w3adatmd::bispl, w3adatmd::bstat, w3adatmd::gstore, w3odatmd::iaproc, w3adatmd::ibfloc, include(), w3adatmd::irqsg2, w3adatmd::isploc, w3gdatmd::mapsf, w3adatmd::mpibuf, w3odatmd::naproc, w3gdatmd::ncel, w3odatmd::ndst, w3adatmd::nrqsg2, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nspec, w3adatmd::nsploc, w3gdatmd::nx, w3gdatmd::ny, w3servmd::strace(), and w3wdatmd::va.
Referenced by w3wavemd::w3wave().
| subroutine w3psmcmd::w3krtn | ( | integer, intent(in) | ISEA, |
| real, intent(in) | FACTH, | ||
| real, intent(in) | FACK, | ||
| real, intent(in) | CTHG0, | ||
| real, dimension(0:nk+1), intent(in) | CG, | ||
| real, dimension(0:nk+1), intent(in) | WN, | ||
| real, intent(in) | DEPTH, | ||
| real, intent(in) | DDDX, | ||
| real, intent(in) | DDDY, | ||
| real, dimension(nth), intent(in) | ALFLMT, | ||
| real, intent(in) | CX, | ||
| real, intent(in) | CY, | ||
| real, intent(in) | DCXDX, | ||
| real, intent(in) | DCXDY, | ||
| real, intent(in) | DCYDX, | ||
| real, intent(in) | DCYDY, | ||
| real, dimension(0:nk+1), intent(in) | DCDX, | ||
| real, dimension(0:nk+1), intent(in) | DCDY, | ||
| real, dimension(nspec), intent(inout) | VA | ||
| ) |
Refraction and great-circle turning by spectral rotation.
Linear interpolation equivalent to 1st order upstream scheme but without restriction on rotation angle. However, refraction is limited towards the depth gradient direction (< 90 degree). Refraction induced spectral shift in the k-space will remain to be advected using the UNO2 scheme.
| [in] | ISEA | Number of sea point |
| [in] | FACTH | Factor in propagation velocity (th) |
| [in] | FACK | Factor in propagation velocity (k) |
| [in] | CTHG0 | Factor in great circle refraction term |
| [in] | CG | Local group velocities |
| [in] | WN | Local wavenumbers |
| [in] | DEPTH | Depth |
| [in] | DDDX | Depth x-gradient |
| [in] | DDDY | Depth y-gradient |
| [in] | ALFLMT | Refraction limiter |
| [in] | CX | Current x-component |
| [in] | CY | Current y-component |
| [in] | DCXDX | Current gradient (dCX/dX) |
| [in] | DCXDY | Current gradient (dCX/dY) |
| [in] | DCYDX | Current gradient (dCY/dX) |
| [in] | DCYDY | Current gradient (dCY/dY) |
| [in] | DCDX | Phase speed x-gradient |
| [in] | DCDY | Phase speed y-gradient |
| [in,out] | VA | Spectrum |
Definition at line 969 of file w3psmcmd.F90.
References w3gdatmd::ctmax, w3gdatmd::dsip, w3gdatmd::dth, w3gdatmd::ec2, w3gdatmd::ecos, w3gdatmd::es2, w3gdatmd::esc, w3gdatmd::esin, w3gdatmd::flck, w3gdatmd::flcth, w3idatmd::flcur, w3adatmd::itime, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3gdatmd::nspec, w3gdatmd::nth, w3gdatmd::sig, smcgtcrfr(), smckuno2(), and w3servmd::strace().
Referenced by w3wavemd::w3wave().
| subroutine w3psmcmd::w3psmc | ( | integer, intent(in) | ISP, |
| real, intent(in) | DTG, | ||
| real, dimension(nsea), intent(inout) | VQ | ||
| ) |
Propagation in phyiscal space for a given spectral component.
Unstructured SMC grid, point-oriented face and cell loops. UNO2 advection scheme and isotropic FTCS diffusion scheme
| [in] | ISP | Number of spectral bin (IK-1)*NTH+ITH |
| [in] | DTG | Total time step. |
| [in,out] | VQ | Field to propagate. |
Definition at line 137 of file w3psmcmd.F90.
References w3gdatmd::angarc, w3gdatmd::arctc, w3adatmd::atrnx, w3adatmd::atrny, w3odatmd::bbpi0, w3odatmd::bbpin, w3adatmd::cg, w3gdatmd::clats, w3gdatmd::ctrnx, w3gdatmd::ctrny, w3adatmd::cx, w3adatmd::cy, constants::dera, w3timemd::dsec21(), w3gdatmd::dtcfl, w3gdatmd::dth, w3gdatmd::dtms, w3gdatmd::ecos, w3gdatmd::esin, w3odatmd::flbpi, w3idatmd::flcur, w3gdatmd::funo3, w3gdatmd::fverg, constants::grav, w3gdatmd::ijkcel, w3gdatmd::ijkcel3, w3gdatmd::ijkcel4, w3gdatmd::ijkufc, w3gdatmd::ijkufc5, w3gdatmd::ijkufc6, w3gdatmd::ijkvfc, w3gdatmd::ijkvfc5, w3gdatmd::ijkvfc6, w3odatmd::isbpi, w3adatmd::itime, w3gdatmd::mapsf, w3gdatmd::mrfct, w3odatmd::nbi, w3gdatmd::ncel, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nglo, w3gdatmd::nk, w3gdatmd::nlvcel, w3gdatmd::nlvufc, w3gdatmd::nlvvfc, w3gdatmd::nrlv, w3gdatmd::nsea, w3gdatmd::nth, w3gdatmd::nufc, w3gdatmd::nvfc, w3gdatmd::nx, w3gdatmd::ny, constants::pi, constants::radius, w3gdatmd::sig, smcaverg(), smcxuno2(), smcxuno2r(), smcxuno3(), smcxuno3r(), smcyuno2(), smcyuno2r(), smcyuno3(), smcyuno3r(), w3servmd::strace(), w3gdatmd::sx, w3gdatmd::sy, w3odatmd::tbpi0, w3odatmd::tbpin, w3wdatmd::time, w3adatmd::u10, w3adatmd::wn, and w3gdatmd::xfr.
Referenced by w3wavemd::w3wave().
| subroutine w3psmcmd::w3scatsmc | ( | integer, intent(in) | ISPEC, |
| integer, dimension(ny*nx), intent(in) | MAPSTA, | ||
| real, dimension(ncel), intent(in) | FIELD | ||
| ) |
SMC version of W3GATH.
'Scatter' data back to spectral storage after propagation. Direct copy or communication calls (MPP version). See also W3GATH.
| [in] | ISPEC | Spectral bin considered |
| [in] | MAPSTA | Status map for spatial grid |
| [in] | FIELD | SMC grid field to be propagated |
Definition at line 3420 of file w3psmcmd.F90.
References w3adatmd::bispl, w3adatmd::bstat, w3odatmd::iaproc, w3adatmd::ibfloc, include(), w3adatmd::irqsg2, w3adatmd::isploc, w3gdatmd::mapsf, w3adatmd::mpibuf, w3odatmd::naproc, w3gdatmd::ncel, w3odatmd::ndst, w3adatmd::nrqsg2, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nspec, w3adatmd::nsploc, w3gdatmd::nx, w3gdatmd::ny, w3adatmd::sstore, w3servmd::strace(), and w3wdatmd::va.
Referenced by w3wavemd::w3wave().
| subroutine w3psmcmd::w3smcell | ( | integer, intent(in) | IMOD, |
| integer, intent(in) | NC, | ||
| integer, dimension(nc), intent(in) | IDCl, | ||
| real, dimension(nc), intent(out) | XLon, | ||
| real, dimension(nc), intent(out) | YLat | ||
| ) |
Calculate cell centre lat-lon for given ids.
Calculate the cell centre longitude and latitude in degree for a given list of cell identity or sequential numbers in the IMOD sub-grid.
Regular grid SX, SY, X0, Y0 and SMC grid MRFct and IJKCel arrays in W3GDATMD are used to work out SMC grid origin and increments. Then given cell centre coordinates are calculated. Longitude is wrapped into [0, 360) range, latitude in in (-90, 90) range. The polar cell centre is off the N-Pole to avoid singularity but its centre values are not used for propagation schemes.
| [in] | IMOD | Model number to point to |
| [in] | NC | Numcer of cells to be calculated |
| [in] | IDCl | List of cell id or sequential numbers |
| [out] | XLon | X-Longitude in degree of listed cells |
| [out] | YLat | Y-Latitude in degree of listed cells |
Definition at line 3660 of file w3psmcmd.F90.
References w3servmd::extcde(), w3gdatmd::grids, w3odatmd::ndse, w3odatmd::ndst, and w3servmd::strace().
Referenced by wmgridmd::wmsmceql().
| subroutine w3psmcmd::w3smcgmp | ( | integer, intent(in) | IMOD, |
| integer, intent(in) | NC, | ||
| real, dimension(nc), intent(in) | XLon, | ||
| real, dimension(nc), intent(in) | YLat, | ||
| integer, dimension(nc), intent(out) | IDCl | ||
| ) |
Map lat-lon points to SMC grid cells.
Determine whether a list of points are inside the IMOD SMC sub-grid and return the IMOD sub-grid cell indexes, if any.
Convert point XLon and YLat values into cell indices i, j. Match with cell ranges (i,i+di) and (j,j+dj) to see i,j in which cell. Return the matched cell number. Otherwise, return an index of 0, or no matching cell found.
| [in] | IMOD | Model number to point to |
| [in] | XLon | X-Longitude in degree of search points |
| [in] | YLat | Y-Latitude in degree of search points |
| [in] | NC | Number of points to be searched |
| [out] | IDCl | Model number to point to |
Definition at line 3804 of file w3psmcmd.F90.
References w3servmd::extcde(), w3gdatmd::grids, w3odatmd::ndse, w3odatmd::ndst, and w3servmd::strace().
Referenced by w3iobcmd::w3iobc(), and wmgridmd::wmsmceql().