Process point output. More...
Functions/Subroutines | |
| subroutine | w3iopp (NPT, XPT, YPT, PNAMES, IMOD) |
| Preprocessing of point output. More... | |
| subroutine | w3iope (A) |
| Extract point output data and store in output COMMONs. More... | |
| integer function | nf90_err_check (errcode, ILINE) |
| Handle netCDF return code. More... | |
| subroutine | w3iopon_read (IOTST, IMOD_IN, filename, ncerr) |
| Read point output in netCDF format. More... | |
| subroutine | w3iopon_write (timestep_only, filename, ncerr) |
| Write point output in netCDF format. More... | |
| subroutine | w3iopon (INXOUT, NDSOP, IOTST, IMOD) |
| Read or write the netCDF point output file, depending on the value of the first parameter. More... | |
| subroutine | w3iopo (INXOUT, NDSOP, IOTST, IMOD ifdef W3_ASCII |
| Read or write point output. More... | |
Process point output.
Allocation of allocatable arrays takes place at different places throughout the code, in W3IOPP on write, and in W3IOPO on read.
| integer function w3iopomd::nf90_err_check | ( | integer, intent(in) | errcode, |
| integer, intent(in) | ILINE | ||
| ) |
Handle netCDF return code.
| errcode | NetCDF error code. 0 for no error. |
Definition at line 1126 of file w3iopomd.F90.
References w3odatmd::ndse.
| subroutine w3iopomd::w3iope | ( | real, dimension(nth,nk,0:nseal), intent(in) | A | ) |
Extract point output data and store in output COMMONs.
This action is taken from an earlier version of W3IOPO so that the point output postprocessor does not need the full sea-point grid to be able to run. Note that the output spectrum is F(f,theta). Interpolation is performed for this spectrum.
| [in] | A | Action spectra on storage grid. |
Definition at line 697 of file w3iopomd.F90.
References w3gdatmd::angld, w3adatmd::as, w3odatmd::aso, w3adatmd::cg, w3adatmd::cx, w3adatmd::cy, constants::dera, w3odatmd::dpo, w3adatmd::dw, w3servmd::extcde(), w3gdatmd::flagunr, w3wdatmd::ice, w3wdatmd::icef, w3wdatmd::iceh, w3odatmd::ii, w3odatmd::il, include(), w3odatmd::iptint, w3odatmd::irqpo2, w3odatmd::iw, constants::lpdlib, w3gdatmd::mapfs, w3gdatmd::mapsta, w3odatmd::naproc, w3odatmd::ndst, w3gdatmd::nk, w3odatmd::nopts, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nspec, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, w3arrymd::prt2ds(), w3odatmd::ptifac, constants::rade, w3wdatmd::rhoair, w3gdatmd::sig, w3adatmd::sppnt, w3servmd::strace(), w3adatmd::taua, w3adatmd::tauadir, constants::tpi, w3adatmd::ua, w3adatmd::ud, w3servmd::w3acturn(), w3odatmd::wao, w3odatmd::wdo, w3odatmd::zet_seto, and w3wdatmd::zeta_setup.
Referenced by w3wavemd::w3wave(), and wmwavemd::wmwave().
| subroutine w3iopomd::w3iopo | ( | character, dimension(*), intent(in) | INXOUT, |
| integer, intent(in) | NDSOP, | ||
| integer, intent(out) | IOTST, | ||
| integer, intent(in), optional | IMOD, | ||
| ifdef, | |||
| W3_ASCII | |||
| ) |
Read or write point output.
This subroutine can either read or write the point output file, depending on the value of the first parameter.
When reading, the entire file is read with one call to this subroutine.
When writing, this subroutine can either write one timestep or the whole model run. This is an option in the input file. If the entire model run is to be written, then OFILES(2) is 0. If only one timestep is to be written, then OFILES(2) is 1.
If OFILES(2) is 0, the output file is names out_pnt.ww3. If OFILES(2) is 1, the output file is named TIMETAG.out_pnt.ww3.
The format of the point output file is:
| Size (bytes) | Type | Variable | Meaning |
|---|---|---|---|
| 40 | character*40 | IDTST | ID string |
| 4 | integer | VERTST | Model definition file version number |
| 4 | integer | NK | Number of discrete wavenumbers |
| 4 | integer | NTH | Number of discrete directions. |
| 4 | integer | NOPTS | Number of output points. |
| 8*NOPTS | real(2,NOPTS) | PTLOC | Point locations |
| 7*NOPTS | character*7 | PTNME | Point names |
| 8 | integer(2) | TIME | Valid time |
| reclen*NOPTS | * | * | records |
Each record contains:
| Size (bytes) | Type | Variable | Meaning |
|---|---|---|---|
| 4 | integer | IW | Number of water points in interpolation box for output point. |
| 4 | integer | II | Number of ice points in interpolation box for output point. |
| 4 | integer | IL | Number of land points in interpolation box for output point. |
| 4 | real | DPO | Interpolated depths. |
| 4 | real | WAO | Interpolated wind speeds. |
| 4 | real | WDO | Interpolated wind directions. |
| 4 | real | TAUAO | (W3_FLX5 only) Interpolated atmospheric stresses. |
| 4 | real | TAUDO | (W3_FLX5 only) Interpolated atmospheric stress directions. |
| 4 | real | DAIRO | (W3_FLX5 only) Interpolated rho atmosphere. |
| 4 | real | ZET_SETO | (W3_SETUP only) Used for wave setup. |
| 4 | real | ASO | Interpolated air-sea temperature difference |
| 4 | real | CAO | Interpolated current speeds. |
| 4 | real | CDO | Interpolated current directions. |
| 4 | real | ICEO | Interpolated ice concentration. |
| 4 | real | ICEHO | Interpolated ice thickness. |
| 4 | real | ICEFO | Interpolated ice floe. |
| 13 | char | GRDID | Originating grid ID |
| 4 | real | SPCO(J,I),J=1,NSPEC | Output spectra |
In the event of error, EXTCDE() will be called with the following exit codes:
| [in] | INXOUT | String indicating read/write. Must be 'READ' or 'WRITE'. |
| [in] | NDSOP | This is set by this subroutine to the netCDF file ID (ncid) of the opened file. User does not have to initialize this value, and should not change it. |
| [out] | IOTST | Error code:
|
| [in] | IMOD | Model number for W3GDAT etc. |
| [in] | NDSOA | File unit number for ASCII output. |
Definition at line 1907 of file w3iopomd.F90.
References w3odatmd::aso, w3odatmd::dpo, w3servmd::extcde(), file(), constants::file_endian, w3gdatmd::filext, w3odatmd::fnmpre, w3odatmd::grdid, w3odatmd::ii, w3odatmd::il, w3odatmd::ipass2, w3odatmd::iptint, w3odatmd::iw, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3odatmd::nopts, w3gdatmd::nspec, w3gdatmd::nth, w3odatmd::o2init, w3odatmd::ofiles, w3odatmd::ptifac, w3odatmd::ptloc, w3odatmd::ptnme, w3servmd::strace(), w3wdatmd::time, w3odatmd::w3dmo2(), w3gdatmd::w3setg(), w3odatmd::w3seto(), w3wdatmd::w3setw(), w3odatmd::wao, w3odatmd::wdo, and w3odatmd::zet_seto.
Referenced by gxoutp(), w3ounp(), w3outp(), w3wavemd::w3wave(), and wmiopomd::wmiopo().
| subroutine w3iopomd::w3iopon | ( | character, dimension(*), intent(in) | INXOUT, |
| integer, intent(in) | NDSOP, | ||
| integer, intent(out) | IOTST, | ||
| integer, intent(in), optional | IMOD | ||
| ) |
Read or write the netCDF point output file, depending on the value of the first parameter.
When reading, the entire file is read with one call to this subroutine.
When writing, this subroutine can either write one timestep or the whole model run. This is an option in the input file. If the entire model run is to be written, then OFILES(2) is 0. If only one timestep is to be written, then OFILES(2) is 1.
If OFILES(2) is 0, the output file is names out_pnt.ww3. If OFILES(2) is 1, the output file is named TIMETAG.out_pnt.ww3.
| [in] | INXOUT | String indicating read/write. Must be 'READ' or 'WRITE'. |
| [in] | NDSOP | File unit number. |
| [out] | IOTST | Error code:
|
| [in] | IMOD | Model number for W3GDAT etc. |
Definition at line 1747 of file w3iopomd.F90.
References w3servmd::extcde(), w3gdatmd::filext, w3odatmd::fnmpre, w3odatmd::ipass2, w3odatmd::ndse, w3odatmd::ndst, w3odatmd::ofiles, w3servmd::strace(), w3wdatmd::time, w3iopon_read(), w3iopon_write(), w3gdatmd::w3setg(), w3odatmd::w3seto(), and w3wdatmd::w3setw().
Referenced by gxoutp(), w3ounp(), w3outp(), w3wavemd::w3wave(), and wmiopomd::wmiopo().
| subroutine w3iopomd::w3iopon_read | ( | integer, intent(out) | IOTST, |
| integer, intent(in), optional | IMOD_IN, | ||
| character(*), intent(in) | filename, | ||
| integer, intent(inout) | ncerr | ||
| ) |
Read point output in netCDF format.
| [out] | IOTST | Test indictor for reading. |
| [in] | IMOD_IN | Model number for W3GDAT etc. |
| [in] | filename | Name of file to read. |
| [in,out] | ncerr | Error code, 0 for success, netCDF error code otherwise. |
Definition at line 1152 of file w3iopomd.F90.
References w3odatmd::aso, w3odatmd::dpo, w3servmd::extcde(), w3gdatmd::filext, w3odatmd::fnmpre, w3odatmd::grdid, w3odatmd::ii, w3odatmd::il, w3odatmd::ipass2, w3odatmd::iptint, w3odatmd::iw, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3odatmd::nopts, w3gdatmd::nspec, w3gdatmd::nth, w3odatmd::o2init, w3odatmd::ptifac, w3odatmd::ptloc, w3odatmd::ptnme, w3wdatmd::time, w3odatmd::w3dmo2(), w3odatmd::wao, w3odatmd::wdo, and w3odatmd::zet_seto.
| subroutine w3iopomd::w3iopon_write | ( | integer, intent(in) | timestep_only, |
| character(*), intent(in) | filename, | ||
| integer, intent(inout) | ncerr | ||
| ) |
Write point output in netCDF format.
| [in] | filename | Name of file to write. |
| [in] | timestep_only | Will be 0 if whole model run should be written, 1 if only one timestep should be written. |
| [in,out] | ncerr | Error code, 0 for success, netCDF error code otherwise. |
Definition at line 1427 of file w3iopomd.F90.
References w3odatmd::aso, w3timemd::caltype, w3odatmd::dpo, w3odatmd::fnmpre, w3odatmd::grdid, w3odatmd::ipass2, w3odatmd::iptint, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3odatmd::nopts, w3gdatmd::nspec, w3gdatmd::nth, w3odatmd::o2init, w3odatmd::ptifac, w3odatmd::ptloc, w3odatmd::ptnme, w3timemd::t2d(), w3wdatmd::time, w3timemd::tsub(), w3timemd::u2d(), w3odatmd::wao, w3odatmd::wdo, and w3odatmd::zet_seto.
| subroutine w3iopomd::w3iopp | ( | integer, intent(in) | NPT, |
| real, dimension(npt), intent(inout) | XPT, | ||
| real, dimension(npt), intent(inout) | YPT, | ||
| character(len=40), dimension(npt), intent(in) | PNAMES, | ||
| integer, intent(in) | IMOD | ||
| ) |
Preprocessing of point output.
Check location of points in grid and calculate interpolation factors.
| [in] | NPT | Number of output points in input. |
| [in,out] | XPT | X (longitude) coordinates of output points. |
| [in,out] | YPT | Y (latitude) coordinates of output points. |
| [in] | PNAMES | Names of output points. |
| [in] | IMOD | Grid ID number. |
Definition at line 230 of file w3iopomd.F90.
References w3gdatmd::clgtype, w3gdatmd::dxymax, w3gdatmd::filext, w3gdatmd::flagll, w3gdatmd::flagunr, w3odatmd::grdid, w3gdatmd::gsu, w3gdatmd::gtype, w3odatmd::iaproc, w3gdatmd::iclose, w3gdatmd::iclose_none, w3gdatmd::iclose_smpl, w3gdatmd::iclose_trpl, w3odatmd::iptint, w3triamd::is_in_ungrid(), w3gdatmd::mapfs, w3gdatmd::mapsta, w3gdatmd::maxx, w3gdatmd::maxy, w3odatmd::naperr, w3odatmd::napout, w3odatmd::ndse, w3odatmd::ndst, w3gdatmd::nk, w3odatmd::nopts, w3gdatmd::nspec, w3gdatmd::nth, w3gdatmd::nx, w3gdatmd::ny, w3gdatmd::polat, w3gdatmd::polon, w3odatmd::ptifac, w3odatmd::ptloc, w3odatmd::ptnme, w3gdatmd::rlgtype, w3odatmd::screen, w3servmd::strace(), w3gdatmd::sx, w3gdatmd::trigp, w3gdatmd::trnx, w3gdatmd::trny, w3gdatmd::ungtype, w3odatmd::w3dmo2(), w3servmd::w3lltoeq(), w3gdatmd::x0, w3gdatmd::y0, and w3gdatmd::zb.
Referenced by w3initmd::w3init(), and wmiopomd::wmiopp().