National Unified Prediction Capability (NUOPC) based Earth System Modeling Framework (ESMF) interface module for multi-grid wave model. More...
Functions/Subroutines | |
| subroutine, public | setservices (gcomp, rc) |
| Wave model ESMF set services. More... | |
| subroutine | setexport (gcomp, rc) |
| Set export fields from internal data structures. More... | |
| subroutine | createexpmesh (gcomp, rc) |
| Create ESMF mesh (unstructured) for export fields. More... | |
| subroutine | setupimpbmsk (bmskField, impField, missingVal, rc) |
| Setup background blending mask field for an import field. More... | |
| integer function | fieldindex (fnameList, fname, rc) |
| Return index associated with field name. More... | |
| subroutine | calcstokes3d (a, usxField, usyField, rc) |
| Calculate 3D Stokes drift current for export. More... | |
| subroutine | readfromfile (idfld, fldwx, fldwy, time0, timen, rc) |
| Read input file to fill unmapped point for regional applications. More... | |
National Unified Prediction Capability (NUOPC) based Earth System Modeling Framework (ESMF) interface module for multi-grid wave model.
All module variables and types are scoped private by default. The private module variables and types are not listed in this section.
| subroutine wmesmfmd::calcstokes3d | ( | real, dimension(nth,nk,0:nseal) | a, |
| type(esmf_field) | usxField, | ||
| type(esmf_field) | usyField, | ||
| integer | rc | ||
| ) |
Calculate 3D Stokes drift current for export.
| a | Input spectra (in par list to change shape) |
| usxField | 3D SDC eastward-component export field |
| usyField | 3D SDC northward-component export field |
| rc | Return code |
Definition at line 7232 of file wmesmfmd.F90.
References w3iogomd::calc_u3stokes(), w3adatmd::cg, w3gdatmd::dden, w3gdatmd::dmin, w3gdatmd::dsii, w3adatmd::dw, w3gdatmd::ecos, w3gdatmd::esin, w3odatmd::iaproc, w3odatmd::naproc, w3gdatmd::sig, constants::tpiinv, w3adatmd::us3d, w3gdatmd::us3df, w3adatmd::ussp, and w3adatmd::wn.
| subroutine wmesmfmd::createexpmesh | ( | type(esmf_gridcomp) | gcomp, |
| integer, intent(out) | rc | ||
| ) |
Create ESMF mesh (unstructured) for export fields.
Create an ESMF Mesh for export using the unstructured mesh description in W3GDATMD. At present, this export mesh is not domain decomposed, but instead is defined on PET 0 only. (In future, when the unstructured mesh will run on domain decomposition, we will use that decomposition.)
Since the internal parallel data is currently stored accross grid points in a "card deck" fashion, we will define an intermediate native grid, as is done for regular/curvilinear grids, and perform an ESMF regrid to the export mesh. This code segment is taken from T. J. Campbell, and modified to 1D, because the internal data structure for unstructred meshes is an array with dimensions [NX,NY=1].
| gcomp | Gridded component | |
| [out] | rc | Return code |
Definition at line 4554 of file wmesmfmd.F90.
References w3odatmd::iaproc, yowelementpool::ielg, yowelementpool::ine, w3adatmd::ipass, yownodepool::iplg, constants::lpdlib, w3gdatmd::mapsf, wmmdatmd::mdse, wmmdatmd::mdst, w3odatmd::naproc, yowelementpool::ne, yownodepool::nodes_global, yownodepool::npa, w3gdatmd::nseal, w3gdatmd::ntri, w3gdatmd::nx, w3gdatmd::ny, w3gdatmd::trigp, w3adatmd::w3seta(), w3gdatmd::w3setg(), w3idatmd::w3seti(), w3odatmd::w3seto(), w3wdatmd::w3setw(), wmmdatmd::wmsetm(), w3gdatmd::xgrd, and w3gdatmd::ygrd.
| integer function wmesmfmd::fieldindex | ( | character (len=*), dimension(:) | fnameList, |
| character (len=*) | fname, | ||
| integer | rc | ||
| ) |
Return index associated with field name.
| fnameList | Array of field names |
| fname | Field name |
| rc | Return code |
Definition at line 5857 of file wmesmfmd.F90.
References w3adatmd::aba, w3adatmd::cg, w3adatmd::charn, check(), w3gdatmd::clgtype, w3gdatmd::dden, w3gdatmd::dmin, w3adatmd::dw, constants::dwat, w3gdatmd::ec2, w3gdatmd::ecos, w3gdatmd::es2, w3gdatmd::esc, w3gdatmd::esin, file(), w3gdatmd::fte, constants::grav, w3gdatmd::gtype, w3odatmd::iaproc, yownodepool::iplg, constants::lpdlib, w3gdatmd::mapsf, w3gdatmd::mapsta, w3odatmd::naproc, w3gdatmd::nk, yownodepool::np, w3gdatmd::nseal, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, w3gdatmd::rlgtype, w3gdatmd::sig, w3gdatmd::sig2, w3adatmd::sxx, w3adatmd::sxy, w3adatmd::syy, constants::tpi, w3adatmd::u10, w3adatmd::u10d, w3adatmd::uba, w3adatmd::ubd, w3gdatmd::ungtype, w3wdatmd::ust, w3wdatmd::va, w3src3md::w3spr3(), w3src4md::w3spr4(), w3adatmd::wn, and w3adatmd::wnmean.
| subroutine wmesmfmd::readfromfile | ( | character(len=3), intent(inout) | idfld, |
| type(esmf_field), intent(inout) | fldwx, | ||
| type(esmf_field), intent(inout) | fldwy, | ||
| integer, dimension(2), intent(in) | time0, | ||
| integer, dimension(2), intent(in) | timen, | ||
| integer, intent(inout), optional | rc | ||
| ) |
Read input file to fill unmapped point for regional applications.
| [in,out] | idfld | Field name |
| [in,out] | fldwx | 2D eastward-component of field |
| [in,out] | fldwy | 2D northward-component of field |
| [in] | time0 | Time stamp for current time |
| [in] | timen | Time stamp for end time |
| [in,out] | rc | Return code |
Definition at line 7709 of file wmesmfmd.F90.
References w3gdatmd::gtype, w3fldsmd::w3fldg(), w3fldsmd::w3fldo(), wmunitmd::wmuget(), and wmunitmd::wmuset().
| subroutine wmesmfmd::setexport | ( | type(esmf_gridcomp) | gcomp, |
| integer, intent(out) | rc | ||
| ) |
Set export fields from internal data structures.
| gcomp | Gridded component | |
| [out] | rc | Return code |
Definition at line 2821 of file wmesmfmd.F90.
References file(), constants::lpdlib, w3odatmd::naproc, wmmdatmd::nmproc, w3gdatmd::ntri, w3gdatmd::nx, w3gdatmd::ny, and w3gdatmd::trigp.
| subroutine, public wmesmfmd::setservices | ( | type(esmf_gridcomp) | gcomp, |
| integer, intent(out) | rc | ||
| ) |
Wave model ESMF set services.
| gcomp | Gridded component. | |
| [out] | rc | Return code. |
Definition at line 352 of file wmesmfmd.F90.
References wmmdatmd::etime, w3gdatmd::grids, wmmdatmd::improc, constants::is_esmf_component, wmmdatmd::nmproc, wmmdatmd::nmpscr, wmmdatmd::stime, w3wdatmd::time, w3adatmd::us3d, and w3iogomd::w3outg().
| subroutine wmesmfmd::setupimpbmsk | ( | type(esmf_field) | bmskField, |
| type(esmf_field) | impField, | ||
| real(esmf_kind_rx) | missingVal, | ||
| integer, optional | rc | ||
| ) |
Setup background blending mask field for an import field.
| bmskField | Blending mask field |
| impField | Import field |
| missingVal | Missing value |
| rc | Return code |
Definition at line 5074 of file wmesmfmd.F90.
References w3gdatmd::clgtype, w3gdatmd::gtype, yownodepool::iplg, constants::lpdlib, yownodepool::np, yowrankmodule::rank, w3gdatmd::rlgtype, and w3gdatmd::ungtype.