From 667984e133881a20d998e85746456166528edb7a Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Fri, 24 Nov 2023 19:11:50 -0700 Subject: [PATCH 1/3] added documentation --- model/src/w3iopomd.F90 | 78 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 7 deletions(-) diff --git a/model/src/w3iopomd.F90 b/model/src/w3iopomd.F90 index d573879ce..c78136140 100644 --- a/model/src/w3iopomd.F90 +++ b/model/src/w3iopomd.F90 @@ -1023,17 +1023,81 @@ SUBROUTINE W3IOPE ( A ) !/ End of W3IOPE ----------------------------------------------------- / !/ END SUBROUTINE W3IOPE - !/ ------------------------------------------------------------------- / + + !> Read or write point output. !> - !> @brief Read/write point output. + !> This subroutine can either read or write the point output file, + !> depending on the value of the first parameter. !> - !> @param[in] INXOUT Test string for read/write. - !> @param[in] NDSOP File unit number. - !> @param[out] IOTST Test indictor for reading. - !> @param[in] IMOD Model number for W3GDAT etc. + !> When reading, the entire file is read with one call to this + !> subroutine. !> - !> @author H. L. Tolman @date 25-Jul-2006 + !> 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 | version of test? + !> 4 | integer | NK | Dimension of frequency + !> 4 | integer | MTH | Directionality of the frequency + !> 4 | integer | NOPTS | Number of output points. + !> 8*NOPTS | integer(2,NOPTS) | PTLOC | Point locations + !> 7*NOPTS | character*7 | PTNME | Point names + !> 8 | integer(2) | TIME | 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) ??? + !> 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: + !> - 1 INXOUT must be 'READ' or 'WRITE'. + !> - 2 Changed from WRITE to READ in subsequent call??? + !> - 10 Unexpected IDSTR ??? + !> - 11 Unexpected VEROPT ??? + !> - 12 Unexpected MK or MTH ??? + !> - 20 Error opening file. + !> - 21 Unexpected end of file during read ???. + !> - 22 Error reading file. + !> - 23 Unexpected end of file during read ???. + !> + !> @param[in] INXOUT String indicating read/write. Must be 'READ' or + !> 'WRITE'. + !> @param[in] NDSOP File unit number. + !> @param[out] IOTST Error code: + !> - 0 No error. + !> - -1 Unexpected end of file when reading. + !> @param[in] IMOD Model number for W3GDAT etc. +#ifdef W3_ASCII + !> @param[in] NDSOA File unit number for ASCII output. +#endif + !> + !> @author H. L. Tolman @date 25-Jul-2006 SUBROUTINE W3IOPO ( INXOUT, NDSOP, IOTST, IMOD & #ifdef W3_ASCII ,NDSOA & From ea3b87387b804b46caa07c5831e6e2d6e7e3def4 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Fri, 24 Nov 2023 19:36:26 -0700 Subject: [PATCH 2/3] added documentation --- model/src/w3iopomd.F90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/model/src/w3iopomd.F90 b/model/src/w3iopomd.F90 index c78136140..088f36ed4 100644 --- a/model/src/w3iopomd.F90 +++ b/model/src/w3iopomd.F90 @@ -1077,14 +1077,14 @@ END SUBROUTINE W3IOPE !> !> In the event of error, EXTCDE() will be called with the following exit codes: !> - 1 INXOUT must be 'READ' or 'WRITE'. - !> - 2 Changed from WRITE to READ in subsequent call??? - !> - 10 Unexpected IDSTR ??? - !> - 11 Unexpected VEROPT ??? - !> - 12 Unexpected MK or MTH ??? + !> - 2 Unexpectedly changed from WRITE to READ in subsequent call. + !> - 10 Unexpected IDSTR + !> - 11 Unexpected VEROPT + !> - 12 Unexpected MK or MTH !> - 20 Error opening file. - !> - 21 Unexpected end of file during read ???. + !> - 21 Unexpected end of file during read. !> - 22 Error reading file. - !> - 23 Unexpected end of file during read ???. + !> - 23 Unexpected end of file during read. !> !> @param[in] INXOUT String indicating read/write. Must be 'READ' or !> 'WRITE'. From dfb6627a39847437b92e115a4b6267f36f031ab6 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Thu, 30 Nov 2023 07:09:10 -0700 Subject: [PATCH 3/3] fixed in response to review comments --- model/src/w3iopomd.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/src/w3iopomd.F90 b/model/src/w3iopomd.F90 index 088f36ed4..0c15ea8c6 100644 --- a/model/src/w3iopomd.F90 +++ b/model/src/w3iopomd.F90 @@ -1044,7 +1044,7 @@ END SUBROUTINE W3IOPE !> Size (bytes) | Type | Variable | Meaning !> -------------|------|----------|-------- !> 40 | character*40 | IDTST | ID string - !> 4 | integer | VERTST | version of test? + !> 4 | integer | VERTST | Model definition file version number !> 4 | integer | NK | Dimension of frequency !> 4 | integer | MTH | Directionality of the frequency !> 4 | integer | NOPTS | Number of output points. @@ -1065,7 +1065,7 @@ END SUBROUTINE W3IOPE !> 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) ??? + !> 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.