diff --git a/.github/workflows/regtest_gnu.yml b/.github/workflows/regtest_gnu.yml
new file mode 100644
index 000000000..d5b71673c
--- /dev/null
+++ b/.github/workflows/regtest_gnu.yml
@@ -0,0 +1,130 @@
+name: regtest_gnu
+on: [push, pull_request, workflow_dispatch]
+
+# Cancel in-progress workflows when pushing to a branch
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+env:
+ cache_key: gnu11-1
+ CC: gcc-10
+ FC: gfortran-10
+ CXX: g++-10
+
+
+# Split into a steup step, and a WW3 build step which
+# builds multiple switches in a matrix. The setup is run once and
+# the environment is cached so each build of WW3 can share the dependencies.
+
+jobs:
+ setup:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: checkout-ww3
+ if: steps.cache-env.outputs.cache-hit != 'true'
+ uses: actions/checkout@v3
+ with:
+ path: ww3
+ # Cache spack, OASIS, and compiler
+ # No way to flush Action cache, so key may have # appended
+ - name: cache-env
+ id: cache-env
+ uses: actions/cache@v3
+ with:
+ path: |
+ spack
+ ~/.spack
+ work_oasis3-mct
+ key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_gnu.yaml') }}
+
+ # Build WW3 spack environment
+ - name: install-dependencies-with-spack
+ if: steps.cache-env.outputs.cache-hit != 'true'
+ run: |
+ # Install NetCDF, ESMF, g2, etc using Spack
+ sudo apt install cmake
+ git clone -c feature.manyFiles=true https://github.com/JCSDA/spack.git
+ source spack/share/spack/setup-env.sh
+ spack env create ww3-gnu ww3/model/ci/spack_gnu.yaml
+ spack env activate ww3-gnu
+ spack compiler find
+ spack external find cmake
+ spack add mpich@3.4.2
+ spack concretize
+ spack install --dirty -v
+
+ - name: build-oasis
+ if: steps.cache-env.outputs.cache-hit != 'true'
+ run: |
+ source spack/share/spack/setup-env.sh
+ spack env activate ww3-gnu
+ export WWATCH3_DIR=${GITHUB_WORKSPACE}/ww3/model
+ export OASIS_INPUT_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/oasis3-mct
+ export OASIS_WORK_PATH=${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct
+ cd ww3/regtests/ww3_tp2.14/input/oasis3-mct/util/make_dir
+ cmake .
+ make VERBOSE=1
+ cp -r ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.14/input/work_oasis3-mct ${GITHUB_WORKSPACE}
+
+ regtest_gnu:
+ needs: setup
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: install-dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install doxygen gcovr valgrind
+
+ - name: checkout-ww3
+ uses: actions/checkout@v3
+ with:
+ path: ww3
+
+ - name: cache-env
+ id: cache-env
+ uses: actions/cache@v3
+ with:
+ path: |
+ spack
+ ~/.spack
+ work_oasis3-mct
+ key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_gnu.yaml') }}
+
+ - name: build-ww3
+ run: |
+ source spack/share/spack/setup-env.sh
+ spack env activate ww3-gnu
+ set -x
+ cd ww3
+ export CC=mpicc
+ export FC=mpif90
+ export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct
+ # mkdir build && cd build
+ export LD_LIBRARY_PATH="/home/runner/work/WW3/WW3/spack/var/spack/environments/ww3-gnu/.spack-env/view/:$LD_LIBRARY_PATH"
+ # cmake -DSWITCH=${GITHUB_WORKSPACE}/ww3/regtests/unittests/data/switch.io -DCMAKE_BUILD_TYPE=Debug ..
+ # make -j2 VERBOSE=1
+ cd ${GITHUB_WORKSPACE}/ww3
+ ls -l
+ ${GITHUB_WORKSPACE}/ww3/model/bin/ww3_from_ftp.sh -k
+ cd regtests
+ ./bin/run_cmake_test -o all -S -T -s PR1_MPI -w work_PR1_MPI -f -p mpirun -n 24 ../model ww3_tp2.5
+ cd ww3_tp2.5
+ ls -l
+ cd work_PR1_MPI
+ pwd
+ ls -l
+ # ncdump -h out_pnt.ww3.nc > ncdump_out.txt
+ # cat ncdump_out.txt
+ # pwd
+ # cat ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt
+ # cmp ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt ncdump_out.txt
+
+ - name: cache-data
+ id: cache-data
+ uses: actions/cache@v3
+ with:
+ path: ww3/ww3_from_ftp.v7.14.1.tar.gz
+ key: ww3_from_ftp.v7.14.1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5436f9cb1..5070e3aa5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ project(
get_directory_property(hasParent PARENT_DIRECTORY)
if(hasParent)
- # Unset flags that come from Parent (ie UFS or other coupled build)
+ # Unset flags that come from Parent (ie UFS or other coupled build)
# for potential (-r8/-r4) conflict
set(CMAKE_Fortran_FLAGS "")
set(CMAKE_C_FLAGS "")
@@ -22,8 +22,9 @@ endif()
set(MULTI_ESMF OFF CACHE BOOL "Build ww3_multi_esmf library")
set(NETCDF ON CACHE BOOL "Build NetCDF programs (requires NetCDF)")
-set(ENDIAN "BIG" CACHE STRING "Endianness of unformatted output files. Valid values are 'BIG', 'LITTLE', 'NATIVE'.")
+set(ENDIAN "BIG" CACHE STRING "Endianness of unformatted output files. Valid values are 'BIG', 'LITTLE', 'NATIVE'.")
set(EXCLUDE_FIND "" CACHE STRING "Don't try and search for these libraries (assumd to be handled by the compiler/wrapper)")
+set(ENABLE_DOCS OFF CACHE BOOL "Enable building of doxygen generated documentation")
# make sure all "exclude_find" entries are lower case
list(TRANSFORM EXCLUDE_FIND TOLOWER)
@@ -59,8 +60,15 @@ endif()
add_subdirectory(model)
-# Turn on unit testing.
-include(CTest)
-if(BUILD_TESTING)
- add_subdirectory(regtests/unittests)
+# Turn on doxygen documentation
+if (ENABLE_DOCS)
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/docs/cmake")
+ include(EnableDoxygen)
+ add_subdirectory(docs)
endif()
+
+# Turn on unit testing.
+#include(CTest)
+#if(BUILD_TESTING)
+# add_subdirectory(regtests/unittests)
+#endif()
diff --git a/README.md b/README.md
index fa2c1df63..42ac91178 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,25 @@
# The WAVEWATCH III Framework
-WAVEWATCH III® is a community wave modeling framework that includes the
+WAVEWATCH III® is a community wave modeling framework that includes the
latest scientific advancements in the field of wind-wave modeling and dynamics.
## General Features
-WAVEWATCH III® solves the random phase spectral action density
-balance equation for wavenumber-direction spectra. The model includes options
-for shallow-water (surf zone) applications, as well as wetting and drying of
-grid points. Propagation of a wave spectrum can be solved using regular
-(rectilinear or curvilinear) and unstructured (triangular) grids. See
-[About WW3](https://github.com/NOAA-EMC/WW3/wiki/About-WW3) for a
-detailed description of WAVEWATCH III® .
+WAVEWATCH III® solves the random phase spectral action density
+balance equation for wavenumber-direction spectra. The model includes options
+for shallow-water (surf zone) applications, as well as wetting and drying of
+grid points. Propagation of a wave spectrum can be solved using regular
+(rectilinear or curvilinear) and unstructured (triangular) grids. See
+[About WW3](https://github.com/NOAA-EMC/WW3/wiki/About-WW3) for a
+detailed description of WAVEWATCH III®. For a web-based
+view of the WAVEWATCH III® source code
+refer to the [WW3 doxygen documentation](https://noaa-emc.github.io/WW3).
## Installation
-The WAVEWATCH III® framework package has two parts that need to be combined so
-all runs smoothly: the GitHub repo itself, and a binary data file bundle that
-needs to be obtained from our ftp site. Steps to successfully acquire and install
+The WAVEWATCH III® framework package has two parts that need to be combined so
+all runs smoothly: the GitHub repo itself, and a binary data file bundle that
+needs to be obtained from our ftp site. Steps to successfully acquire and install
the framework are outlined in our [Quick Start](https://github.com/NOAA-EMC/WW3/wiki/Quick-Start)
guide.
@@ -35,4 +37,3 @@ endorsement, recommendation or favoring by the Department of Commerce. The
Department of Commerce seal and logo, or the seal and logo of a DOC bureau,
shall not be used in any manner to imply endorsement of any commercial product
or activity by DOC or the United States Government.
-
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
new file mode 100644
index 000000000..7aa89edeb
--- /dev/null
+++ b/docs/CMakeLists.txt
@@ -0,0 +1 @@
+EnableDoxygen(docs)
diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in
index 23349c8da..93a26c5a2 100644
--- a/docs/Doxyfile.in
+++ b/docs/Doxyfile.in
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = docs
+OUTPUT_DIRECTORY = @doc_output@
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -829,7 +829,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = model/src
+INPUT = @src_input@
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2285,7 +2285,7 @@ CLASS_DIAGRAMS = NO
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
# If left empty dia is assumed to be found in the default search path.
-DIA_PATH =
+DIA_PATH =
# If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class.
diff --git a/docs/cmake/EnableDoxygen.cmake b/docs/cmake/EnableDoxygen.cmake
new file mode 100644
index 000000000..20af91e59
--- /dev/null
+++ b/docs/cmake/EnableDoxygen.cmake
@@ -0,0 +1,27 @@
+# Doxygen documentation- Matt Masarik 24-Jul-2024.
+function(EnableDoxygen outdir)
+ find_package(Doxygen REQUIRED)
+ if (NOT DOXYGEN_FOUND)
+ add_custom_target(enable_docs
+ COMMAND false
+ COMMENT "Doxygen not found")
+ return()
+ endif()
+
+ set(src_input "${CMAKE_SOURCE_DIR}/model/src")
+ set(doc_output "${CMAKE_BINARY_DIR}/${outdir}")
+ file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${outdir}/html)
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in
+ ${CMAKE_BINARY_DIR}/${outdir}/Doxyfile @ONLY)
+ set(DOXYGEN_GENERATE_HTML YES)
+ set(DOXYGEN_QUIET YES)
+ add_custom_target(enable_docs
+ COMMAND
+ ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/${outdir}/Doxyfile
+ WORKING_DIRECTORY
+ ${CMAKE_BINARY_DIR}/${outdir}
+ COMMENT
+ "Generate Doxygen HTML documentation")
+ message("-- Doxygen HTML index page: "
+ ${CMAKE_BINARY_DIR}/${outdir}/html/index.html)
+endfunction()
diff --git a/manual/eqs/output.tex b/manual/eqs/output.tex
index bfa7e0b5a..8deb484e1 100644
--- a/manual/eqs/output.tex
+++ b/manual/eqs/output.tex
@@ -310,6 +310,10 @@ \subsection{~Output parameters} \label{sub:outpars}
\begin{equation} Q_{kk} = \frac{1}{E^2} \int_0^{f_{NK}} \int_0^{2\pi}
0.5 \left[ A(k,\theta)+ A(k,\theta+\pi)\right]^2 \frac{\sigma^2}{k C_g} \:\rd \theta \: \rd \sigma \: \label{eq:qkk}
\end{equation}
+\item \textbf{SKW} Skewness of surface elevation sampled at zero slope. This is the $\lambda_1$ parameter defined in \cite{Barrick&Lipa1985} or $\lambda_{3,0,0}$ in \cite{Srokosz1986}. It is computed from the second order correction to the surface elevation, using ECWAM code by P. Janssen.
+\item \textbf{EMB} this is $-\gamma/8 = -(\lambda_{1,2,0}+\lambda_{1,0,2}-2 \lambda{0,1,1} \lambda{1,1,1})/8 (1-\lambda_{0,1,1]^2)$, such that the mean sea level of points with zero slope
+is EMB$\times H_s$.
+\item \textbf{EMC} this is hte additional tracker bias coefficient equal to $-\lambda_{3,0,0}/24$, which is specific to the choice of retracker, see the $J_z$ function in \cite{DeCarlo&Ardhuin2024}.
\end{list}
\item{Numerical diagnostics }
diff --git a/manual/manual.bib b/manual/manual.bib
index 3da650ea2..33e0a9fdd 100644
--- a/manual/manual.bib
+++ b/manual/manual.bib
@@ -3760,3 +3760,13 @@ @PHDTHESIS{Gagnaire-Renou2009
year = 2010,
}
+@ARTICLE{Srokosz1986,
+ author = "Meric A. Srokosz",
+ title = "On the joint distribution of surface elevation and slopes for a non linear random sea, with an application to radar altimetry",
+ journal = JGR,
+ volume = 91,
+ pages = "995--1006",
+ year = 1986,
+ keywords={altimeter;sea state bias},
+}
+
diff --git a/model/bin/ww3_from_ftp.sh b/model/bin/ww3_from_ftp.sh
index 67efc9284..4ab231e54 100755
--- a/model/bin/ww3_from_ftp.sh
+++ b/model/bin/ww3_from_ftp.sh
@@ -61,11 +61,14 @@ fi
#Move to top level directory of ww3:
cd $ww3dir
-#Download from ftp and uptar:
-echo -e "Downloading and untaring file from ftp:"
-wget --no-check-certificate https://ftp.emc.ncep.noaa.gov/static_files/public/WW3/ww3_from_ftp.${ww3ver}.tar.gz
+#Download from ftp (if not already present) and uptar:
+echo -e "Downloading (or finding) and untaring file from ftp:"
+if ! test -f ww3_from_ftp.${ww3ver}.tar.gz; then
+ wget --no-check-certificate https://ftp.emc.ncep.noaa.gov/static_files/public/WW3/ww3_from_ftp.${ww3ver}.tar.gz
+fi
tar -xvzf ww3_from_ftp.${ww3ver}.tar.gz
+
#Move regtest info from data_regtests to regtests:
echo -e "Moving data from data_regtests to regtests"
cp -r data_regtests/ww3_tp2.18/input/*.nc regtests/ww3_tp2.18/input/
diff --git a/model/inp/ww3_grid.inp b/model/inp/ww3_grid.inp
index a3223b9c0..0bea2697d 100644
--- a/model/inp/ww3_grid.inp
+++ b/model/inp/ww3_grid.inp
@@ -73,6 +73,12 @@ $ effective wind speed (!/STAB2).
$ WAM4 and variants : Namelist SIN3
$ ZWND : Height of wind (m).
$ ALPHA0 : minimum value of Charnock coefficient
+$ CAPCHA : enable functional form for Cd (1=enabled),
+$ only valid when SINTABLE=0.
+$ UCAP : Wind speed threshold for cap (CAPCHA=1)
+$ SIGMAUCAP : Width of functional form (CAPCHA=1)
+$ CHA0 : Initial Charnock coefficient (CAPCHA=1)
+$ CHAMIN : Minimum Charnock value (CAPCHA=1)
$ Z0MAX : maximum value of air-side roughness z0
$ BETAMAX : maximum value of wind-wave coupling
$ SINTHP : power of cosine in wind input
diff --git a/model/inp/ww3_ounf.inp b/model/inp/ww3_ounf.inp
index 7bde30754..b0c29ff75 100644
--- a/model/inp/ww3_ounf.inp
+++ b/model/inp/ww3_ounf.inp
@@ -16,7 +16,7 @@ $ DPT CUR WND AST WLV ICE IBG TAU RHO D50 IC1 IC5 HS LM T02 T0M1 T01 FP
$ DIR SPR DP HIG EF TH1M STH1M TH2M STH2M WN PHS PTP PLP PDIR PSPR PWS PDP
$ PQP PPE PGW PSW PTM10 PT01 PT02 PEP TWS PNR UST CHA CGE FAW TAW TWA WCC
$ WCF WCH WCM SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC ABR UBR BED
-$ FBB TBB MSS MSC DTD FC CFX CFD CFK U1 U2 WNM TOC
+$ FBB TBB MSS MSC DTD FC CFX CFD CFK U1 U2 WNM TOC MSS QP QKK SKW EMB EMC
$
N
DPT HS FP T01
diff --git a/model/inp/ww3_shel.inp b/model/inp/ww3_shel.inp
index 7980cbe06..576e01c5f 100644
--- a/model/inp/ww3_shel.inp
+++ b/model/inp/ww3_shel.inp
@@ -212,10 +212,13 @@ $ 8 Spectrum parameters
$ -------------------------------------------------
$ F F 8 1 MSS[X,Y] MSS Mean square slopes
$ F F 8 2 MSC[X,Y] MSC Spectral level at high frequency tail
-! F F 8 3 MSSD MSD Slope direction
-! F F 8 4 MSCD MCD Tail slope direction
-! F F 8 5 QP QP Goda peakedness parameter
-! F F 8 6 QKK QKK Wavenumber peakedness
+$ F F 8 3 MSSD MSD Slope direction
+$ F F 8 4 MSCD MCD Tail slope direction
+$ F F 8 5 QP QP Goda peakedness parameter
+$ F F 8 6 QKK QKK Wavenumber peakedness
+$ F F 8 7 SKEW SKW Skewness of elevation for zero slopes
+$ F F 8 8 EMBIA1 EMB Mean sea level at zero slopes / Hs
+$ F F 8 9 EMBIA2 EMC Tracker bias for LRM least square altimetry
$ -------------------------------------------------
$ 9 Numerical diagnostics
$ -------------------------------------------------
diff --git a/model/nml/namelists.nml b/model/nml/namelists.nml
index f4172ddec..2a15e3832 100644
--- a/model/nml/namelists.nml
+++ b/model/nml/namelists.nml
@@ -25,51 +25,74 @@ $ Define constants in source terms ----------------------------------- $
$
$ Stresses - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$ TC 1996 with cap : Namelist FLX3
-$ CDMAX : Maximum allowed CD (cap)
-$ CTYPE : Cap type :
+$ CDMAX : Maximum allowed CD (cap)
+$ CTYPE : Cap type :
$ 0: Discontinuous (default).
$ 1: Hyperbolic tangent.
+$
$ Hwang 2011 : Namelist FLX4
-$ CDFAC : re-scaling of drag
+$ CDFAC : re-scaling of drag
$
$ Linear input - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$ Cavaleri and M-R : Namelist SLN1
-$ CLIN : Proportionality constant.
-$ RFPM : Factor for fPM in filter.
-$ RFHF : Factor for fh in filter.
+$ CLIN : Proportionality constant.
+$ RFPM : Factor for fPM in filter.
+$ RFHF : Factor for fh in filter.
$
$ Exponential input - - - - - - - - - - - - - - - - - - - - - - - - -
$ WAM-3 : Namelist SIN1
-$ CINP : Proportionality constant.
+$ CINP : Proportionality constant.
$
$ Tolman and Chalikov : Namelist SIN2
-$ ZWND : Height of wind (m).
+$ ZWND : Height of wind (m).
$ SWELLF : swell factor in (n.nn).
-$ STABSH, STABOF, CNEG, CPOS, FNEG :
-$ c0, ST0, c1, c2 and f1 in . (n.nn)
+$ STABSH, STABOF, CNEG, CPOS, FNEG : c0, ST0, c1, c2 and f1 in . (n.nn)
$ through (2.65) for definition of
$ effective wind speed (!/STAB2).
-$ WAM4 and variants : Namelist SIN3
-$ ZWND : Height of wind (m).
-$ ALPHA0 : minimum value of Charnock coefficient
-$ Z0MAX : maximum value of air-side roughness z0
-$ BETAMAX : maximum value of wind-wave coupling
-$ SINTHP : power of cosine in wind input
-$ ZALP : wave age shift to account for gustiness
-$ TAUWSHELTER : sheltering of short waves to reduce u_star
-$ SWELLFPAR : choice of swell attenuation formulation
+$
+$ WAM4 and variants : Namelist SIN3
+$ ZWND : Height of wind (m).
+$ ALPHA0 : minimum value of Charnock coefficient
+$ Z0MAX : maximum value of air-side roughness z0
+$ BETAMAX : maximum value of wind-wave coupling
+$ SINTHP : power of cosine in wind input
+$ ZALP : wave age shift to account for gustiness
+$ SWELLF : swell attenuation factor
+$
+$ Janssen / Ardhuin : Namelist SIN4
+$ ZWND : Height of wind (m).
+$ ALPHA0 : minimum value of Charnock coefficient
+$ CAPCHA : enable functional form for Cd (1=enabled),
+$ only valid when SINTABLE=0.
+$ UCAP : Wind speed threshold for cap (CAPCHA=1)
+$ SIGMAUCAP : Width of functional form (CAPCHA=1)
+$ CHA0 : Initial Charnock coefficient (CAPCHA=1)
+$ CHAMIN : Minimum Charnock value (CAPCHA=1)
+$ Z0MAX : maximum value of air-side roughness z0
+$ BETAMAX : maximum value of wind-wave coupling
+$ SINTHP : power of cosine in wind input
+$ ZALP : wave age shift to account for gustiness
+$ SWELLF : swell attenuation factor
+$ TAUWSHELTER : sheltering of short waves to reduce u_star
+$ SWELLFPAR : choice of swell attenuation formulation
$ (1: TC 1996, 3: ACC 2008)
-$ SWELLF : swell attenuation factor
-$ Extra parameters for SWELLFPAR=3 only
-$ SWELLF2, SWELLF3 : swell attenuation factors
-$ SWELLF4 : Threshold Reynolds number for ACC2008
-$ SWELLF5 : Relative viscous decay below threshold
-$ Z0RAT : roughness for oscil. flow / mean flow
+$ Extra parameters for SWELLFPAR=3 only
+$ SWELLF2, SWELLF3 : swell attenuation factors
+$ SWELLF4 : Threshold Reynolds number for ACC2008
+$ SWELLF5 : Relative viscous decay below threshold
+$ Z0RAT : roughness for oscil. flow / mean flow
+$ SINBR : effect of wave breaking on wind input
+$ SINTABLE : flag to enable or the table computation
+$ SINTAIL1 : tauwshelter for tail (no table)
+$ SINTAIL2 : additional peak in capillary range
+$ TAUWBUG : Set to 1 to keep bug on TAUW
+$ VISCSTRESS : coefficient for viscous part of wind stress
+$
$ BYDRZ input : Namelist SIN6
-$ SINA0 : factor for negative input
-$ SINWS : wind speed scaling option
-$ SINFC : high-frequency extent of the
-$ prognostic frequency region
+$ SINA0 : factor for negative input
+$ SINWS : wind speed scaling option
+$ SINFC : high-frequency extent of the
+$ prognostic frequency region
$
$ Nonlinear interactions - - - - - - - - - - - - - - - - - - - - - - -
$ Discrete I.A. : Namelist SNL1
@@ -78,8 +101,7 @@ $ NLPROP : C in sourc term. NOTE : default
$ value depends on other source
$ terms selected.
$ KDCONV : Factor before kd in Eq. (n.nn).
-$ KDMIN, SNLCS1, SNLCS2, SNLCS3 :
-$ Minimum kd, and constants c1-3
+$ KDMIN, SNLCS1, SNLCS2, SNLCS3 : Minimum kd, and constants c1-3
$ in depth scaling function.
$ IQTYPE : Type of depth treatment
$ -2 : Deep water GQM with scaling
@@ -87,10 +109,11 @@ $ 1 : Deep water DIA
$ 2 : Deep water DIA with scaling
$ 3 : Shallow water DIA
$ TAILNL : Parametric tail power.
-$ GQMNF1, GQMNT1, GQMNQ_OM2 : Gaussian quadrature resolution
-$ GQMTHRSAT : Threshold on saturation for SNL calculation
-$ GQMTHRCOU : Threshold for filter on coupling coefficient
-$ GQAMP1, GQAMP2, GQAMP3, GQAMP4 : Amplification factors
+$ GQMNF1, GQMNT1, GQMNQ_OM2 : Gaussian quadrature resolution
+$ GQMTHRSAT : Threshold on saturation for SNL calculation
+$ GQMTHRCOU : Threshold for filter on coupling coefficient
+$ GQAMP1, GQAMP2, GQAMP3, GQAMP4 : Amplification factors
+$
$ Exact interactions : Namelist SNL2
$ IQTYPE : Type of depth treatment
$ 1 : Deep water
@@ -100,22 +123,26 @@ $ TAILNL : Parametric tail power.
$ NDEPTH : Number of depths in for which
$ integration space is established.
$ Used for IQTYPE = 3 only
+$
$ Namelist ANL2
$ DEPTHS : Array with depths for NDEPTH = 3
+$
$ Gen. Multiple DIA : Namelist SNL3
-$ NQDEF : Number of quadruplets.
-$ MSC : Scaling constant 'm'.
-$ NSC : Scaling constant 'N'.
-$ KDFD : Deep water relative filter depth,
-$ KDFS : Shallow water relative filter depth,
+$ NQDEF : Number of quadruplets.
+$ MSC : Scaling constant 'm'.
+$ NSC : Scaling constant 'N'.
+$ KDFD : Deep water relative filter depth,
+$ KDFS : Shallow water relative filter depth,
+$
$ Namelist ANL3
$ QPARMS : 5 x NQDEF paramaters describing the
$ quadruplets, repeating LAMBDA, MU, DT12.
$ Cdeep and Cshal. See examples below.
+$
$ Two Scale Approx. : Namelist SNL4
$ INDTSA : Index for TSA/FBI computations
$ (0 = FBI ; 1 = TSA)
-$ ALTLP : Index for alternate looping
+$ ALTLP : Index for alternate looping
$ (1 = no ; 2 = yes)
$
$ Traditional DIA setup (default):
@@ -141,141 +168,182 @@ $ 0.369, 0.226, 11.5, 0.118E+08, 0.000E+00 /
$
$ Nonlinear filter based on DIA - - - - - - - - - - - - - - - - - - -
$ Namelist SNLS
-$ A34 : Relative offset in quadruplet
-$ FHFC : Proportionality constants.
-$ DMN : Maximum relative change.
-$ FC1-3 : Constants in frequency filter.
+$ A34 : Relative offset in quadruplet
+$ FHFC : Proportionality constants.
+$ DMN : Maximum relative change.
+$ FC1-3 : Constants in frequency filter.
$
$ Whitecapping dissipation - - - - - - - - - - - - - - - - - - - - -
$ WAM-3 : Namelist SDS1
-$ CDIS, APM : As in source term.
+$ CDIS, APM : As in source term.
$
$ Tolman and Chalikov : Namelist SDS2
-$ SDSA0, SDSA1, SDSA2, SDSB0, SDSB1, PHIMIN :
-$ Constants a0, a1, a2, b0, b1 and
-$ PHImin.
+$ SDSA0,SDSA1,SDSA2,SDSB0,SDSB1 : Constants a0, a1, a2, b0, b1 and
+$ PKIMIN : Constants PHImin
$
$ WAM4 and variants : Namelist SDS3
-$ SDSC1 : WAM4 Cds coeffient
-$ MNMEANP, WNMEANPTAIL : power of wavenumber
+$ SDSC1 : WAM4 Cds coeffient
+$ MNMEANP, WNMEANPTAIL : power of wavenumber
$ for mean definitions in Sds and tail
-$ SDSDELTA1, SDSDELTA2 : relative weights
+$ SDSDELTA1, SDSDELTA2 : relative weights
$ of k and k^2 parts of WAM4 dissipation
-$ SDSLF, SDSHF : coefficient for activation of
-$ WAM4 dissipation for unsaturated (SDSLF) and
-$ saturated (SDSHF) parts of the spectrum
-$ SDSC2 : Saturation dissipation coefficient
-$ SDSC4 : Value of B0=B/Br for wich Sds is zero
-$ SDSBR : Threshold Br for saturation
-$ SDSP : power of (B/Br-B0) in Sds
-$ SDSBR2 : Threshold Br2 for the separation of
-$ WAM4 dissipation in saturated and non-saturated
-$ SDSC5 : coefficient for turbulence dissipation
-$ SDSC6 : Weight for the istropic part of Sds_SAT
-$ SDSDTH: Angular half-width for integration of B
+$ SDSLF, SDSHF : coefficient for activation of
+$ WAM4 dissipation for unsaturated (SDSLF) and
+$ saturated (SDSHF) parts of the spectrum
+$ SDSC2 : Saturation dissipation coefficient
+$ SDSC4 : Value of B0=B/Br for wich Sds is zero
+$ SDSBR : Threshold Br for saturation
+$ SDSP : power of (B/Br-B0) in Sds
+$ SDSBR2 : Threshold Br2 for the separation of
+$ WAM4 dissipation in saturated and non-saturated
+$ SDSC5 : coefficient for turbulence dissipation
+$ SDSC6 : Weight for the istropic part of Sds_SAT
+$ SDSDTH : Angular half-width for integration of B
+$
+$ Ardhuin : Namelist SDS4
+$ SDSBCHOICE : 1: Ardhuin et al., 2: Filipot & Ardhuin, 3: Romero
+$ WNMEANP, WNMEANPTAIL : power of wavenumber
+$ for mean definitions in Sds and tail
+$ FXPM3 : Coefficient defining the diagnostic tail
+$ FXFM3 : Coefficient defining the diagnostic tail
+$ FXFMAGE : This does not do anything as FHIGI is not used in W3SRCE
+$ SDSC2 : coefficient in front of dissipation term
+$ SDSCUM : coefficient for cumulative breaking term
+$ SDSSTRAIN : Straining coefficient
+$ SDSSTRAINA : Not used anymore
+$ SDSSTRAIN2 : If non-zero, uses a directionally-enhanced straining
+$ SDSC4 : Not used anymore
+$ SDSFACMTF : MTF factor for Lambda , Romero (2019)
+$ SDSNMTF : MTF power
+$ SDSCUMP : 2 for cumulative mss, 1 for cumulative orb. vel.
+$ SDSC5 : coefficient for wave-turbulence interaction (Ardhuin & Jenkins
+$ SDSC6 : delta_d in eq. (13) of Ardhuin et al. (2010)
+$ SDSBR : saturation threshold
+$ SDSBT : Saturation threshold for dissipation rate b
+$ SDSP : power of saturation in diagonal term
+$ SDSISO : Not used anymore
+$ SDSBCK : Coefficient for Filipot & Ardhuin
+$ SDSABK : Coefficient for Filipot & Ardhuin
+$ SDSPBK : Coefficient for Filipot & Ardhuin
+$ SDSBINT : frequency integration factor for Filipot & Ardhuin
+$ SDSHCK : power of tanh(KD) in Filipot & Ardhuin
+$ SDSDTH : half-widht of directional integration for Ardhuin saturation
+$ SDSCOS : power of coside for saturation
+$ SDSBRF1 : ratio of f_high / f for which cumulative term at f has an impact on f_high
+$ SDSBRFDF : not used anymore
+$ SDSNUW : viscous dissipation term (water side only) : DVISC = - 4 SDSNUW*k**2
+$ SDSBM0 : activates depth correction to Ardhuin et al. , with X = tanhs (kD)
+$ SDSBM1 : coefficients of polynomial function to enhance saturation
+$ SDSBM2 : based on Fig. 2 in Filipot et et al. (JGR 2010)
+$ SDSBM3 : the code is MICHE=(X*(SSDSBM(1)+X*(SSDSBM(2)+X*(SSDSBM(3) +X*SSDSBM(4)))))**2
+$ SDSBM4 : it should be MICHE=(X*(SSDSBM(1)+X*(SSDSBM(2)+X**2*(SSDSBM(3)+X**3*SSDSBM(4)))))**2
+$ CUMSIGP : power of frequency for defining the direction of mean direction used in Romero (default is 0 but not optimal)
+$ see Alday and Ardhuin (2023) with CUMSIGP=2 in T701-GQM
+$ WHITECAPWIDTH : constant fraction of breaker wavelength
+$ WHITECAPDUR : breaking duration factor
+$ SDSMWD : new AFo
+$ SDSMWPOW : (k)^pow
+$ SDKOF : ko factor such that ko= g (SDKOF/(28 us))^2
$
$ BYDRZ : Namelist SDS6
-$ SDSET : Select threshold normalization spectra
-$ SDSA1, SDSA2, SDSP1, SDSP2 :
-$ Coefficients for dissipation terms T1 and T2
+$ SDSET : Select threshold normalization spectra
+$ SDSA1, SDSA2, SDSP1, SDSP2 : Coefficients for dissipation terms T1 and T2
$ : Namelist SWL6
-$ SWLB1 : Coefficient for swell dissipation
+$ SWLB1 : Coefficient for swell dissipation
$
$ Bottom friction - - - - - - - - - - - - - - - - - - - - - - - - - -
$ JONSWAP : Namelist SBT1
-$ GAMMA : Bottom friction emprical constant
+$ GAMMA : Bottom friction emprical constant
$
$
$ Surf breaking - - - - - - - - - - - - - - - - - - - - - - - - - - -
$ Battjes and Janssen : Namelist SDB1
-$ BJALFA : Dissipation constant (default = 1)
-$ BJGAM : Breaking threshold (default = 0.73)
-$ BJFLAG : TRUE - Use Hmax/d ratio only (default)
-$ FALSE - Use Hmax/d in Miche formulation
+$ BJALFA : Dissipation constant (default = 1)
+$ BJGAM : Breaking threshold (default = 0.73)
+$ BJFLAG : TRUE - Use Hmax/d ratio only (default)
+$ FALSE - Use Hmax/d in Miche formulation
$
$ Dissipation in the ice - - - - - - - - - - - - - - - - - - - - - -
$ Generalization of Liu et al. : Namelist SIC2
-$ IC2DISPER : If true uses Liu formulation with eddy viscosity
-$ If false, uses the generalization with turbulent
-$ to laminar transition
-$ IC2TURB : empirical factor for the turbulent part
-$ IC2ROUGH : under-ice roughness length
-$ IC2REYNOLDS: Re number for laminar to turbulent transition
-$ IC2SMOOTH : smoothing of transition reprensenting random waves
-$ IC2VISC : empirical factor for viscous part
+$ IC2DISPER : If true uses Liu formulation with eddy viscosity
+$ If false, uses the generalization with turbulent
+$ to laminar transition
+$ IC2TURB : empirical factor for the turbulent part
+$ IC2ROUGH : under-ice roughness length
+$ IC2REYNOLDS : Re number for laminar to turbulent transition
+$ IC2SMOOTH : smoothing of transition reprensenting random waves
+$ IC2VISC : empirical factor for viscous part
$
$
$ Scattering in the ice & creep dissipations- - - - - - - - - - - - -
$ Generalization of Wiliams et al. : Namelist SIS2
-$ ISC1 : scattering coefficient (default = 1)
-$ IS2BACKSCAT : fraction of energy back-scattered (default = 1 )
-$ IS2BREAK : TRUE - changes floe max diameter
-$ : FALSE - does not change floe max diameter
-$ IS2C1 : scattering in pack ice
-$ IS2C2 : frequency dependance of scattering in pack ice
-$ IS2C3 : frequency dependance of scattering in pack ice
-$ ISBACKSCAT : fraction of scattered energy actualy redistributed
-$ IS2DISP : use of ice-specific dispersion relation (T/F)
-$ FRAGILITY : parameter between 0 and 1 that gives the shape of FSD
-$ IS2DMIN : minimum floe diameter in meters
-$ IS2DAMP : multiplicative coefficient for dissipation term from RP
-$ IS2UPDATE : TRUE - updates the max floe diameter with forcing only
-$ : FALSE - updates the max floe diameter at each time step
+$ ISC1 : scattering coefficient (default = 1)
+$ IS2BACKSCAT : fraction of energy back-scattered (default = 1 )
+$ IS2BREAK : TRUE - changes floe max diameter
+$ FALSE - does not change floe max diameter
+$ IS2C1 : scattering in pack ice
+$ IS2C2 : frequency dependance of scattering in pack ice
+$ IS2C3 : frequency dependance of scattering in pack ice
+$ ISBACKSCAT : fraction of scattered energy actualy redistributed
+$ IS2DISP : use of ice-specific dispersion relation (T/F)
+$ FRAGILITY : parameter between 0 and 1 that gives the shape of FSD
+$ IS2DMIN : minimum floe diameter in meters
+$ IS2DAMP : multiplicative coefficient for dissipation term from RP
+$ IS2UPDATE : TRUE - updates the max floe diameter with forcing only
+$ FALSE - updates the max floe diameter at each time step
$
$ Dissipation by sea ice
$ Empirical/parametric representations : Namelist SIC4
-$ IC4METHOD : integer 1 to 7
-$ : In most cases, additional input
-$ : is required.
-$ : See examples in /regtests/ww3_tic1.1/
-$ : See also: 1) description in manual
-$ : and 2) inline documentation in
-$ w3sic4md.ftn
+$ IC4METHOD : integer 1 to 7
+$ In most cases, additional input is required.
+$ See examples in /regtests/ww3_tic1.1/
+$ See also: 1) description in manual
+$ and 2) inline documentation in w3sic4md.ftn
$
$ Triad nonlinear interactions - - - - - - - - - - - - - - - - - - - -
$ Lumped Triad Interaction (LTA) : Namelist STR1 (To be implemented)
-$ PTRIAD1 : Proportionality coefficient (default 1.)
-$ PTRIAD2 : Multiple of Tm01 up to which interaction
-$ is computed (2.5)
-$ PTRIAD3 : Ursell upper limit for computing
-$ interactions (not used, default 10.)
-$ PTRIAD4 : Shape parameter for biphase
-$ computation (0.2)
-$ PTRIAD5 : Ursell number treshold for computing
-$ interactions (0.01)
+$ PTRIAD1 : Proportionality coefficient (default 1.)
+$ PTRIAD2 : Multiple of Tm01 up to which interaction
+$ is computed (2.5)
+$ PTRIAD3 : Ursell upper limit for computing
+$ interactions (not used, default 10.)
+$ PTRIAD4 : Shape parameter for biphase
+$ computation (0.2)
+$ PTRIAD5 : Ursell number treshold for computing
+$ interactions (0.01)
$
$ Shoreline reflections - - - - - - - - - - - - - - - - - - - - - - - -
$ ref. parameters : Namelist REF1
-$ REFCOAST : Reflection coefficient at shoreline
-$ REFFREQ : Activation of freq-dependent ref.
-$ REFMAP : Scale factor for bottom slope map
-$ REFRMAX : maximum ref. coeffient (default 0.8)
-$ REFFREQPOW: power of frequency
-$ REFICEBERG: Reflection coefficient for icebergs
-$ REFSUBGRID: Reflection coefficient for islands
-$ REFCOSP_STRAIGHT: power of cosine used for
-$ straight shoreline
+$ REFCOAST : Reflection coefficient at shoreline
+$ REFFREQ : Activation of freq-dependent ref.
+$ REFMAP : Scale factor for bottom slope map
+$ REFRMAX : maximum ref. coeffient (default 0.8)
+$ REFFREQPOW : power of frequency
+$ REFICEBERG : Reflection coefficient for icebergs
+$ REFSUBGRID : Reflection coefficient for islands
+$ REFCOSP_STRAIGHT : power of cosine used for
+$ straight shoreline
$
$ Bound 2nd order spectrum and free IG - - - - - - - - - - - - - - - - -
$ IG1 parameters : Namelist SIG1
-$ IGMETHOD : 1: Hasselmann, 2: Krasitskii-Janssen
-$ IGADDOUTP : activation of bound wave correction
-$ in ww3_outp / ww3_ounp
-$ IGSOURCE : 1: uses bound waves, 2: empirical
-$ IGSTERMS : > 0 : no source term in IG band
-$ IGMAXFREQ : maximum frequency of IG band
-$ IGEMPIRICAL: constant in empirical free IG source
-$ IGBCOVERWRITE: T: Replaces IG spectrum, does not add
-$ IGSWELLMAX: T: activates free IG sources for all freq.
+$ IGMETHOD : 1: Hasselmann, 2: Krasitskii-Janssen
+$ IGADDOUTP : activation of bound wave correction
+$ in ww3_outp / ww3_ounp
+$ IGSOURCE : 1: uses bound waves, 2: empirical
+$ IGSTERMS : > 0 : no source term in IG band
+$ IGMAXFREQ : maximum frequency of IG band
+$ IGEMPIRICAL : constant in empirical free IG source
+$ IGBCOVERWRITE : T: Replaces IG spectrum, does not add
+$ IGSWELLMAX : T: activates free IG sources for all freq.
$
$
$ Propagation schemes ------------------------------------------------ $
$ First order : Namelist PRO1
-$ CFLTM : Maximum CFL number for refraction.
+$ CFLTM : Maximum CFL number for refraction.
$
$ UQ/UNO with diffusion : Namelist PRO2
-$ CFLTM : Maximum CFL number for refraction.
-$ DTIME : Swell age (s) in garden sprinkler
+$ CFLTM : Maximum CFL number for refraction.
+$ DTIME : Swell age (s) in garden sprinkler
$ correction. If 0., all diffusion
$ switched off. If small non-zero
$ (DEFAULT !!!) only wave growth
@@ -284,7 +352,7 @@ $ LATMIN : Maximum latitude used in calc. of
$ strength of diffusion for prop.
$
$ UQ/UNO with averaging : Namelist PRO3
-$ CFLTM : Maximum CFL number for refraction.
+$ CFLTM : Maximum CFL number for refraction.
$ WDTHCG : Tuning factor propag. direction.
$ WDTHTH : Tuning factor normal direction.
$
@@ -325,25 +393,26 @@ $ SOLVERTHR_SETUP : Solver threshold for setup comput
$ CRIT_DEP_SETUP : Critical depths for setup computations
$
$ SMC grid propagation : Namelist PSMC and default values
-$ CFLTM : Maximum CFL no. for propagation, 0.7
-$ DTIME : Swell age for diffusion term (s), 0.0
+$ CFLTM : Maximum CFL no. for propagation, 0.7
+$ DTIME : Swell age for diffusion term (s), 0.0
$ LATMIN : Maximum latitude (deg) for GCT, 86.0
$ RFMAXD : Maximum refraction turning (deg), 80.0
-$ LvSMC : No. of refinement level, default 1
-$ ISHFT : Shift number of i-index, default 0
-$ JEQT : Shift number of j-index, default 0
+$ LvSMC : No. of refinement level, default 1
+$ ISHFT : Shift number of i-index, default 0
+$ JEQT : Shift number of j-index, default 0
$ NBISMC : No. of input boundary points, 0
-$ UNO3 : Use 3rd order advection scheme, .FALSE.
-$ AVERG : Add extra spatial averaging, .FALSE.
+$ UNO3 : Use 3rd order advection scheme, .FALSE.
+$ AVERG : Add extra spatial averaging, .FALSE.
$ SEAWND : Use sea-point only wind input. .FALSE.
+$
$ &PSMC DTIME = 39600.0, LATMIN=85.0, RFMAXD = 36.0, LvSMC=3, JEQT=1344 /
$
$ Rotated pole ------------------------------------------------------ $
$ Pole parameters : Namelist ROTD
-$ PLAT : Rotated pole latitude
-$ PLON : Rotated pole longitude
-$ UNROT : Logical, un-rotate directions to
-$ true north
+$ PLAT : Rotated pole latitude
+$ PLON : Rotated pole longitude
+$ UNROT : Logical, un-rotate directions to
+$ true north
$
$ Compile switch /RTD required.
$
@@ -363,8 +432,8 @@ $
$ Output boundary conditions to rotated pole grids ------------------ $
$
$ Pole parameters : Namelist ROTB
-$ BPLAT(1:9) : Pole latitude of each destination grid
-$ BPLON(1:9) : Pole longitude of each destination grid
+$ BPLAT(1:9) : Pole latitude of each destination grid
+$ BPLON(1:9) : Pole longitude of each destination grid
$
$ Compile switch /RTD required.
$
@@ -388,24 +457,24 @@ $ directional spectrum using, e.g. MEM (Lygre&Krogstad 1986).
$
$ Parameters (integers) : Namelist OUTS
$ For the frequency spectrum E(f)
-$ E3D : <=0: not declared, > 0: declared
-$ I1E3D : First frequency index of output (default is 1)
-$ I2E3D : Last frequency index of output (default is NK)
+$ E3D : <=0: not declared, > 0: declared
+$ I1E3D : First frequency index of output (default is 1)
+$ I2E3D : Last frequency index of output (default is NK)
$ For the mean direction th1m(f), and spread sth1m(f)
-$ TH1MF, STH1MF : <=0: not declared, > 0: declared
-$ I1TH1MF, I1STH1MF: First frequency index of output (default is 1)
-$ I2TH1MF, I2STH1MF: First frequency index of output (default is 1)
+$ TH1MF, STH1MF : <=0: not declared, > 0: declared
+$ I1TH1MF, I1STH1MF : First frequency index of output (default is 1)
+$ I2TH1MF, I2STH1MF : First frequency index of output (default is 1)
$ For the mean direction th2m(f), and spread sth2m(f)
-$ TH2MF, STH2MF : <=0: not declared, > 0: declared
-$ I1TH2MF, I1STH2MF: First frequency index of output (default is 1)
-$ I2TH2MF, I2STH2MF: First frequency index of output (default is 1)
+$ TH2MF, STH2MF : <=0: not declared, > 0: declared
+$ I1TH2MF, I1STH2MF : First frequency index of output (default is 1)
+$ I2TH2MF, I2STH2MF : First frequency index of output (default is 1)
$ For 2nd order pressure at K=0 (source of microseisms & microbaroms)
-$ P2SF : <=0: not declared, > 0: declared
+$ P2SF : <=0: not declared, > 0: declared
$ I1P2SF : First frequency index of output (default is 1)
$ I2P2SF : Last frequency index of output (default is NK)
$ For the surface Stokes drift partitions (USP)
-$ USSP : First index (default is 1, should always be 1)
-$ IUSSP : Last index (must be <= than NK and should be
+$ USSP : First index (default is 1, should always be 1)
+$ IUSSP : Last index (must be <= than NK and should be
$ between 3 and ~10 with the tradeoff
$ between accuracy and resources)
$ STK_WN : List of wavenumbers (size of IUSSP)
@@ -416,11 +485,10 @@ $ a climate model.
$
$ Miscellaneous ------------------------------------------------------ $
$ Misc. parameters : Namelist MISC
-$ CICE0 : Ice concentration cut-off.
-$ CICEN : Ice concentration cut-off.
-$ PMOVE : Power p in GSE aleviation for
-$ moving grids in Eq. (D.4).
-$ XSEED : Xseed in seeding alg. (!/SEED).
+$ CICE0 : Ice concentration cut-off.
+$ CICEN : Ice concentration cut-off.
+$ LICE : Length scale for sea ice damping
+$ XSEED : Xseed in seeding alg. (!/SEED).
$ FLAGTR : Indicating presence and type of
$ subgrid information :
$ 0 : No subgrid information.
@@ -429,67 +497,86 @@ $ daries between grid points.
$ 2 : Transp. at cell centers.
$ 3 : Like 1 with cont. ice.
$ 4 : Like 2 with cont. ice.
-$ TRCKCMPR : Logical variable (T/F). Set to F to
-$ disable "compression" of track output.
-$ This simplifies post-processing.
-$ Default is T and will create track
-$ output in the traditional manner
-$ (WW3 v3, v4, v5).
-$ XP, XR, XFILT
-$ Xp, Xr and Xf for the dynamic
+$ XP, XR, XFILT : Xp, Xr and Xf for the dynamic
$ integration scheme.
-$ IHMAX : Number of discrete levels in part.
-$ HSPMIN : Minimum Hs in partitioning.
-$ WSM : Wind speed multiplier in part.
-$ WSC : Cut of wind sea fraction for
+$ PMOVE : Power p in GSE aleviation for
+$ moving grids in Eq. (D.4).
+$ IHM : Number of discrete levels in part.
+$ HSPM : Minimum Hs in partitioning.
+$ WSM : Wind speed multiplier in part.
+$ WSC : Cut of wind sea fraction for
$ identifying wind sea in part.
-$ FLC : Flag for combining wind seas in
+$ FLC : Flag for combining wind seas in
$ partitioning.
-$ NOSW : Number of partitioned swell fields
+$ FMICHE : Constant in Miche limiter.
+$ RWNDC : Coefficient for current in relative wind
+$ FACBERG : Multiplicative factor for iceberg mask
+$ NOSW : Number of partitioned swell fields
$ in field output.
-$ PTM : Partioning method:
+$ GSHIFT : grid offset for multi-grid boundaries
+$ WCOR1 : wind correction threshold
+$ WCOR2 : wind wind correction factor
+$ STDX : Space-Time Extremes X-Length
+$ STDY : Space-Time Extremes Y-Length
+$ STDT : Space-Time Extremes Duration
+$ ICEHMIN : Minimum thickness of sea ice
+$ ICEHINIT : Initial value of ice thickness
+$ ICEDISP : Flag for use of the ice covered dispertion relation
+$ ICESLN :
+$ ICEWIND : Scale factor for reduction of wind input by ice concentration
+$ ICESNL :
+$ ICESDS :
+$ ICEHFAC : Scale factor for sea ice thickness
+$ ICEHDISP : Minimum thickness of sea ice in the dispersion
+$ relation before relaxing the conv. criterion
+$ ICEDDISP :
+$ ICEFDISP :
+$ CALTYPE : Calendar type. The only accepted
+$ values are 'standard' (default),
+$ '365_day', or '360_day'.
+$ TRCKCMPR : Logical variable (T/F). Set to F to
+$ disable "compression" of track output.
+$ This simplifies post-processing.
+$ Default is T and will create track
+$ output in the traditional manner
+$ (WW3 v3, v4, v5).
+$ PTM : Partioning method:
$ 1 : Default WW3
$ 2 : Watershedding + wind cutoff
$ 3 : Watershedding only
$ 4 : Wind speed cutoff only
$ 5 : High/Low band cutoff (see PTFC)
-$ PTFC : Cutouf frequency for High/Low band
+$ PTFC : Cutouf frequency for High/Low band
$ partioning (PTM=5). Default = 0.1Hz
-$ FMICHE : Constant in Miche limiter.
-$ STDX : Space-Time Extremes X-Length
-$ STDY : Space-Time Extremes Y-Length
-$ STDT : Space-Time Extremes Duration
-$ P2SF : ......
-$ CALTYPE: Calendar type. The only accepted
-$ values are 'standard' (default),
-$ '365_day', or '360_day'.
+$ BTBET : The constant used for separating wind sea
+$ and swell when we estimate WBT
$
$ Diagnostic Sea-state Dependent Stress- - - - - - - - - - - - - - - - -
$ Reichl et al. 2014 : Namelist FLD1
-$ TAILTYPE : High Frequency Tail Method
-$ 0: Constant value (prescribed)
-$ 1: Wind speed dependent
-$ (Based on GFDL Hurricane
-$ Model Z0 relationship)
-$ TAILLEV : Level of high frequency tail
-$ (if TAILTYPE==0)
-$ Valid choices:
-$ Capped min: 0.001, max: 0.02
-$ TAILT1 : Tail transition ratio 1
-$ TAILT1*peak input frequency
-$ is the first transition point of
-$ the saturation specturm
-$ Default is 1.25
-$ TAILT1 : Tail transition ratio 2
-$ TAILT2*peak input frequency
-$ is the second transition point of
-$ the saturation specturm
-$ Default is 3.00
+$ TAILTYPE : High Frequency Tail Method
+$ 0: Constant value (prescribed)
+$ 1: Wind speed dependent
+$ (Based on GFDL Hurricane
+$ Model Z0 relationship)
+$ TAILLEV : Level of high frequency tail
+$ (if TAILTYPE==0)
+$ Valid choices:
+$ Capped min: 0.001, max: 0.02
+$ TAILT1 : Tail transition ratio 1
+$ TAILT1*peak input frequency
+$ is the first transition point of
+$ the saturation specturm
+$ Default is 1.25
+$ TAILT1 : Tail transition ratio 2
+$ TAILT2*peak input frequency
+$ is the second transition point of
+$ the saturation specturm
+$ Default is 3.00
$ Donelan et al. 2012 : Namelist FLD2
-$ TAILTYPE : See above (FLD1)
-$ TAILLEV : See above (FLD1)
-$ TAILT1 : See above (FLD1)
-$ TAILT2 : See above (FLD1)
+$ TAILTYPE : See above (FLD1)
+$ TAILLEV : See above (FLD1)
+$ TAILT1 : See above (FLD1)
+$ TAILT2 : See above (FLD1)
$
$ In the 'Out of the box' test setup we run with sub-grid obstacles
$ and with continuous ice treatment.
diff --git a/model/nml/ww3_ounf.nml b/model/nml/ww3_ounf.nml
index 9b1ffe136..a70cf9eae 100644
--- a/model/nml/ww3_ounf.nml
+++ b/model/nml/ww3_ounf.nml
@@ -14,7 +14,7 @@
! UST CHA CGE FAW TAW TWA WCC WCF WCH WCM FWS
! SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC TOC
! ABR UBR BED FBB TBB
-! MSS MSC WL02 AXT AYT AXY
+! MSS MSC MSD MCD QP QKK SKW EMB EMC
! DTD FC CFX CFD CFK
! U1 U2
!
diff --git a/model/nml/ww3_shel.nml b/model/nml/ww3_shel.nml
index 97beaf6a0..b6ae8cfef 100644
--- a/model/nml/ww3_shel.nml
+++ b/model/nml/ww3_shel.nml
@@ -206,6 +206,9 @@
! F F 8 4 MSCD MCD Tail slope direction
! F F 8 5 QP QP Goda peakedness parameter
! F F 8 6 QKK QKK Wavenumber peakedness
+! F F 8 7 SKEW SKW Skewness of elevation for zero slopes
+! F F 8 8 EMBIA1 EMB Mean sea level at zero slopes / Hs
+! F F 8 9 EMBIA2 EMC Tracker bias for LRM least square altimetry
! -------------------------------------------------
! 9 Numerical diagnostics
! -------------------------------------------------
diff --git a/model/src/CMakeLists.txt b/model/src/CMakeLists.txt
index 7dd7d82a2..4710576a5 100644
--- a/model/src/CMakeLists.txt
+++ b/model/src/CMakeLists.txt
@@ -174,10 +174,9 @@ if("SCRIP" IN_LIST switches)
target_sources(ww3_lib PRIVATE ${scrip_src})
endif()
-
-if("SCRIPNC" IN_LIST switches OR "OASIS" IN_LIST switches OR "TRKNC" IN_LIST switches)
+if("SCRIPNC" IN_LIST switches OR "OASIS" IN_LIST switches OR "TRKNC" IN_LIST switches OR "BIN2NC" IN_LIST switches)
if(NOT NetCDF_Fortran_FOUND)
- message(FATAL_ERROR "Cannot build SCRIPNC, OASIS, or TRKNC without NetCDF")
+ message(FATAL_ERROR "Cannot build SCRIPNC, OASIS, TRKNC, or BIN2NC without NetCDF")
endif()
endif()
diff --git a/model/src/cmake/src_list.cmake b/model/src/cmake/src_list.cmake
index a73f3b72b..d745be388 100644
--- a/model/src/cmake/src_list.cmake
+++ b/model/src/cmake/src_list.cmake
@@ -92,5 +92,3 @@ set(scripnc_src
${CMAKE_CURRENT_SOURCE_DIR}/SCRIP/scrip_remap_write.f
${CMAKE_CURRENT_SOURCE_DIR}/SCRIP/scrip_remap_read.f
)
-
-
diff --git a/model/src/cmake/switches.json b/model/src/cmake/switches.json
index 30eca480c..a7b9bc94f 100644
--- a/model/src/cmake/switches.json
+++ b/model/src/cmake/switches.json
@@ -814,6 +814,16 @@
}
]
},
+ {
+ "name": "bin2nc",
+ "num_switches": "upto1",
+ "description": "use netcdf instead of binary model output",
+ "valid-options": [
+ {
+ "name": "BIN2NC"
+ }
+ ]
+ },
{
"name": "ascii",
"num_switches": "upto1",
diff --git a/model/src/gx_outp.F90 b/model/src/gx_outp.F90
index d34fdbaa7..8dce5f4d0 100644
--- a/model/src/gx_outp.F90
+++ b/model/src/gx_outp.F90
@@ -165,7 +165,11 @@ PROGRAM GXOUTP
#endif
USE W3ODATMD, ONLY: W3SETO, W3NOUT
USE W3IOGRMD, ONLY: W3IOGR
+#ifdef W3_BIN2NC
+ USE W3IOPOMD, ONLY: W3IOPON
+#else
USE W3IOPOMD, ONLY: W3IOPO
+#endif
USE W3SERVMD, ONLY : ITRACE, NEXTLN, EXTCDE
#ifdef W3_S
USE W3SERVMD, ONLY : STRACE
@@ -277,7 +281,11 @@ PROGRAM GXOUTP
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! 3. Read general data and first fields from file
!
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
ALLOCATE ( FLREQ(NOPTS) )
!
WRITE (NDSO,930)
@@ -369,7 +377,11 @@ PROGRAM GXOUTP
DO
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
IF ( IOTEST .EQ. -1 ) THEN
WRITE (NDSO,998)
EXIT
diff --git a/model/src/w3adatmd.F90 b/model/src/w3adatmd.F90
index 1ee07eca4..2daee3609 100644
--- a/model/src/w3adatmd.F90
+++ b/model/src/w3adatmd.F90
@@ -188,6 +188,7 @@ MODULE W3ADATMD
! MSCD R.A. Public Direction of MSCX
! QP R.A. Public Goda peakedness parameter.
! QKK R.A. Public Spectral bandwidth (De Carlo et al. 2023)
+ ! SKEW R.A. Public skewness lambda_3,0,0 (Srokosz 1986)
!
! DTDYN R.A. Public Mean dynamic time step (raw).
! FCUT R.A. Public Cut-off frequency for tail.
@@ -475,9 +476,10 @@ MODULE W3ADATMD
! Output fields group 8)
!
REAL, POINTER :: MSSX(:), MSSY(:), MSSD(:), &
- MSCX(:), MSCY(:), MSCD(:), QKK(:)
+ MSCX(:), MSCY(:), MSCD(:), QKK(:), SKEW(:), EMBIA1(:), EMBIA2(:)
REAL, POINTER :: XMSSX(:), XMSSY(:), XMSSD(:), &
- XMSCX(:), XMSCY(:), XMSCD(:), XQKK(:)
+ XMSCX(:), XMSCY(:), XMSCD(:), XQKK(:), &
+ XSKEW(:), XEMBIA1(:), XEMBIA2(:)
!
! Output fields group 9)
!
@@ -613,7 +615,7 @@ MODULE W3ADATMD
BEDFORMS(:,:), PHIBBL(:), TAUBBL(:,:)
!
REAL, POINTER :: MSSX(:), MSSY(:), MSSD(:), &
- MSCX(:), MSCY(:), MSCD(:), QKK(:)
+ MSCX(:), MSCY(:), MSCD(:), QKK(:), SKEW(:), EMBIA1(:), EMBIA2(:)
!
REAL, POINTER :: DTDYN(:), FCUT(:), CFLXYMAX(:), &
CFLTHMAX(:), CFLKMAX(:)
@@ -1265,7 +1267,9 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
ALLOCATE ( WADATS(IMOD)%MSSX(NSEALM), WADATS(IMOD)%MSSY(NSEALM), &
WADATS(IMOD)%MSCX(NSEALM), WADATS(IMOD)%MSCY(NSEALM), &
WADATS(IMOD)%MSSD(NSEALM), WADATS(IMOD)%MSCD(NSEALM), &
- WADATS(IMOD)%QKK(NSEALM), STAT=ISTAT )
+ WADATS(IMOD)%QKK(NSEALM), WADATS(IMOD)%SKEW(NSEALM), &
+ WADATS(IMOD)%EMBIA1(NSEALM), WADATS(IMOD)%EMBIA2(NSEALM), &
+ STAT=ISTAT )
CHECK_ALLOC_STATUS ( ISTAT )
!
WADATS(IMOD)%MSSX = UNDEF
@@ -1275,6 +1279,9 @@ SUBROUTINE W3DIMA ( IMOD, NDSE, NDST, D_ONLY )
WADATS(IMOD)%MSCY = UNDEF
WADATS(IMOD)%MSCD = UNDEF
WADATS(IMOD)%QKK = UNDEF
+ WADATS(IMOD)%SKEW = UNDEF
+ WADATS(IMOD)%EMBIA1 = UNDEF
+ WADATS(IMOD)%EMBIA2 = UNDEF
call print_memcheck(memunit, 'memcheck_____:'//' W3DIMA 8')
!
! 9) Numerical diagnostics
@@ -2281,6 +2288,24 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
ALLOCATE ( WADATS(IMOD)%XQKK(1) )
END IF
!
+ IF ( OUTFLAGS( 8, 7) ) THEN
+ ALLOCATE ( WADATS(IMOD)%XSKEW(NXXX) )
+ ELSE
+ ALLOCATE ( WADATS(IMOD)%XSKEW(1) )
+ END IF
+ !
+ IF ( OUTFLAGS( 8, 8) ) THEN
+ ALLOCATE ( WADATS(IMOD)%XEMBIA1(NXXX) )
+ ELSE
+ ALLOCATE ( WADATS(IMOD)%XEMBIA1(1) )
+ END IF
+ !
+ IF ( OUTFLAGS( 8, 9) ) THEN
+ ALLOCATE ( WADATS(IMOD)%XEMBIA2(NXXX) )
+ ELSE
+ ALLOCATE ( WADATS(IMOD)%XEMBIA2(1) )
+ END IF
+ !
WADATS(IMOD)%XMSSX = UNDEF
WADATS(IMOD)%XMSSY = UNDEF
WADATS(IMOD)%XMSSD = UNDEF
@@ -2289,6 +2314,9 @@ SUBROUTINE W3XDMA ( IMOD, NDSE, NDST, OUTFLAGS )
WADATS(IMOD)%XMSCD = UNDEF
WADATS(IMOD)%XQP(1) = UNDEF
WADATS(IMOD)%XQKK = UNDEF
+ WADATS(IMOD)%XSKEW = UNDEF
+ WADATS(IMOD)%XEMBIA1 = UNDEF
+ WADATS(IMOD)%XEMBIA2 = UNDEF
!
IF ( OUTFLAGS( 9, 1) ) THEN
ALLOCATE ( WADATS(IMOD)%XDTDYN(NXXX), STAT=ISTAT )
@@ -2903,6 +2931,9 @@ SUBROUTINE W3SETA ( IMOD, NDSE, NDST )
MSCY => WADATS(IMOD)%MSCY
MSCD => WADATS(IMOD)%MSCD
QKK => WADATS(IMOD)%QKK
+ SKEW => WADATS(IMOD)%SKEW
+ EMBIA1 => WADATS(IMOD)%EMBIA1
+ EMBIA2 => WADATS(IMOD)%EMBIA2
!
DTDYN => WADATS(IMOD)%DTDYN
FCUT => WADATS(IMOD)%FCUT
@@ -3242,6 +3273,9 @@ SUBROUTINE W3XETA ( IMOD, NDSE, NDST )
MSCY => WADATS(IMOD)%XMSCY
MSCD => WADATS(IMOD)%XMSCD
QKK => WADATS(IMOD)%XQKK
+ SKEW => WADATS(IMOD)%XSKEW
+ EMBIA1 => WADATS(IMOD)%XEMBIA1
+ EMBIA2 => WADATS(IMOD)%XEMBIA2
!
DTDYN => WADATS(IMOD)%XDTDYN
FCUT => WADATS(IMOD)%XFCUT
diff --git a/model/src/w3arrymd.F90 b/model/src/w3arrymd.F90
index 600e6f014..845d6ccae 100644
--- a/model/src/w3arrymd.F90
+++ b/model/src/w3arrymd.F90
@@ -2250,10 +2250,10 @@ SUBROUTINE PRT2DS (NDS, NFR0, NFR, NTH, E, FR, UFR, FACSP, FSC, &
!
900 FORMAT (/' Location : ',A/ &
' Spectrum : ',A,' (Normalized) ', &
- ' Maximum value : ',E8.3,1X,A/)
+ ' Maximum value : ',E10.3,1X,A/)
901 FORMAT (/' Location : ',A/ &
- ' Spectrum : ',A,' Units : ',E8.3,1X,A, &
- ' Maximum value : ',E8.3,1X,A/)
+ ' Spectrum : ',A,' Units : ',E10.3,1X,A, &
+ ' Maximum value : ',E10.3,1X,A/)
!
910 FORMAT (5X,' ang.| frequencies (Hz) '/ &
5X,' deg.|',F6.3,15F8.3)
diff --git a/model/src/w3bullmd.F90 b/model/src/w3bullmd.F90
index 10301e8ca..af749549a 100644
--- a/model/src/w3bullmd.F90
+++ b/model/src/w3bullmd.F90
@@ -268,8 +268,8 @@ SUBROUTINE W3BULL &
!
CSVBLINE = BLANK2
!
+ IPG1 = 0
IF (IOUT .EQ. 1) THEN
- IPG1 = 0
DO IP=1, NPTAB
HST(IP,1) = -99.9
TPT(IP,1) = -99.9
@@ -286,10 +286,12 @@ SUBROUTINE W3BULL &
!
HSTOT = XPART(1,0)
TP = XPART(2,0)
- HSP = XPART(1,1:NPART)
- TPP = XPART(2,1:NPART)
- WNP = TPI / XPART(3,1:NPART)
- DMP = MOD( XPART(4,1:NPART) + 180., 360.)
+ DO IP=1, NPART
+ HSP(IP) = XPART(1,IP)
+ TPP(IP) = XPART(2,IP)
+ WNP(IP) = TPI / XPART(3,IP)
+ DMP(IP) = MOD( XPART(4,IP) + 180., 360.)
+ ENDDO
NZERO = 0
NZERO = COUNT( HSP <= BHSMIN .AND. HSP /= 0. )
diff --git a/model/src/w3fld1md.F90 b/model/src/w3fld1md.F90
index 960fd185a..fdd5ad230 100644
--- a/model/src/w3fld1md.F90
+++ b/model/src/w3fld1md.F90
@@ -550,9 +550,13 @@ SUBROUTINE W3FLD1( ASPC, FPI, WNDX,WNDY, ZWND, &
TAUDIR=atan2(TAUY, TAUX)
! Note: add another criterion (stress direction) for iteration.
CRIT1=(ABS(USTAR-USTRB)*100.0)/((USTAR+USTRB)*0.5) .GT. 0.1
- CRIT2=(ABS(TAUDIR-TAUDIRB)*100.0/(TAUDIR+TAUDIRB)*0.5) .GT. 0.1
+ IF ((TAUDIR+TAUDIRB).NE.0.) THEN
+ CRIT2=(ABS(TAUDIR-TAUDIRB)*100.0/(TAUDIR+TAUDIRB)*0.5) .GT. 0.1
+ ELSE
+ CRIT2=.TRUE.
+ ENDIF
IF (CRIT1 .OR. CRIT2) THEN
- ! IF ((ABS(USTAR-USTRB)*100.0)/((USTAR+USTRB)*0.5) .GT. 0.1) THEN
+ ! IF ((ABS(USTAR-USTRB)*100.0)/((USTAR+USTRB)*0.5) .GT. 0.1) THEN
USTRB=USTAR
TAUDIRB=TAUDIR
CTR=CTR+1
@@ -1116,7 +1120,11 @@ SUBROUTINE APPENDTAIL(INSPC, WN2, NKT, KA1, KA2, KA3, WNDDIR,SAT)
DO K=KA1, KA2-1
AVG=SUM(INSPC(K,:))/MAX(REAL(NTH),1.)
DO T=1,NTH
- INSPC(K,T)=BT(K)*INSPC(K,T)/TPI/(WN2(K)**3.0)/AVG
+ if (avg /= 0.0) then
+ INSPC(K,T)=BT(K)*INSPC(K,T)/TPI/(WN2(K)**3.0)/AVG
+ else
+ inspc(k,t) = 0.0
+ end if
ENDDO
ENDDO
!-----------------------------------------------------------
@@ -1134,7 +1142,11 @@ SUBROUTINE APPENDTAIL(INSPC, WN2, NKT, KA1, KA2, KA3, WNDDIR,SAT)
ENDDO
AVG=SUM(NORMSPC)/MAX(REAL(NTH),1.)
DO T=1, NTH
- INSPC(K,T) = SAT * NORMSPC(T)/TPI/(WN2(K)**3.0)/AVG
+ if (avg /= 0.0) then
+ INSPC(K,T) = SAT * NORMSPC(T)/TPI/(WN2(K)**3.0)/AVG
+ else
+ inspc(k,t) = 0.0
+ end if
ENDDO
ENDDO
DO T=1, NTH
@@ -1148,7 +1160,11 @@ SUBROUTINE APPENDTAIL(INSPC, WN2, NKT, KA1, KA2, KA3, WNDDIR,SAT)
AVG=SUM(NORMSPC)/MAX(REAL(NTH),1.)!1./4.
DO K=KA3+1, NKT
DO T=1, NTH
- INSPC(K,T)=NORMSPC(T)*(SAT)/TPI/(WN2(K)**3.0)/AVG
+ if (avg /= 0.0) then
+ INSPC(K,T)=NORMSPC(T)*(SAT)/TPI/(WN2(K)**3.0)/AVG
+ else
+ inspc(k,t) = 0.0
+ end if
ENDDO
ENDDO
DEALLOCATE(ANGLE1)
diff --git a/model/src/w3gdatmd.F90 b/model/src/w3gdatmd.F90
index 4b600aabc..655e02fcf 100644
--- a/model/src/w3gdatmd.F90
+++ b/model/src/w3gdatmd.F90
@@ -905,7 +905,8 @@ MODULE W3GDATMD
SSDSP, WWNMEANP, SSTXFTF, SSTXFTWN, &
FFXPM, FFXFM, FFXFA, &
SSDSBRF1, SSDSBRF2, SSDSBINT,SSDSBCK,&
- SSDSHCK, SSDSABK, SSDSPBK, SSINBR
+ SSDSHCK, SSDSABK, SSDSPBK, SSINBR, &
+ CAPCHNK(1:10)
REAL :: ZZWND
REAL :: SSDSCOS, SSDSDTH, SSDSBT, SSDSBM(0:4)
#endif
@@ -1326,7 +1327,8 @@ MODULE W3GDATMD
SSDSPBK, SSINBR,SSINTHP,TTAUWSHELTER,&
SINTAILPAR(:), SSWELLF(:), SSDSC(:), SSDSBR, &
SSDSP, WWNMEANP, SSTXFTF, SSTXFTWN, &
- SSDSBT, SSDSCOS, SSDSDTH, SSDSBM(:)
+ SSDSBT, SSDSCOS, SSDSDTH, SSDSBM(:), &
+ CAPCHNK(:)
#endif
#ifdef W3_ST6
REAL, POINTER :: SIN6A0, SDS6A1, SDS6A2, SWL6B1, &
@@ -2668,6 +2670,7 @@ SUBROUTINE W3SETG ( IMOD, NDSE, NDST )
ZZALP => MPARS(IMOD)%SRCPS%ZZALP
TTAUWSHELTER => MPARS(IMOD)%SRCPS%TTAUWSHELTER
SINTAILPAR => MPARS(IMOD)%SRCPS%SINTAILPAR
+ CAPCHNK => MPARS(IMOD)%SRCPS%CAPCHNK
SSWELLFPAR => MPARS(IMOD)%SRCPS%SSWELLFPAR
SSWELLF => MPARS(IMOD)%SRCPS%SSWELLF
SSDSC => MPARS(IMOD)%SRCPS%SSDSC
diff --git a/model/src/w3gridmd.F90 b/model/src/w3gridmd.F90
index b72ed8e8e..3b922dd61 100644
--- a/model/src/w3gridmd.F90
+++ b/model/src/w3gridmd.F90
@@ -115,6 +115,7 @@ MODULE W3GRIDMD
!/ 19-Jul-2021 : Momentum and air density support ( version 7.14 )
!/ 28-Feb-2023 : GQM as an alternative for NL1 ( version 7.15 )
!/ 11-Jan-2024 : New namelist parameters for IC4 ( version 7.15 )
+ !/ 03-May-2024 : New CAPCHNK parameters for SIN4 ( version 7.15 )
!/
!/ Copyright 2009-2013 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
@@ -678,6 +679,7 @@ MODULE W3GRIDMD
#endif
!
#ifdef W3_SMC
+ REAL :: DVSMC
REAL :: TRNMX, TRNMY
INTEGER, ALLOCATABLE :: NLvCelsk(:), NLvUFcsk(:), NLvVFcsk(:)
INTEGER, ALLOCATABLE :: IJKCelin(:,:),IJKUFcin(:,:),IJKVFcin(:,:)
@@ -859,7 +861,8 @@ MODULE W3GRIDMD
SDSBM0, SDSBM1, SDSBM2, SDSBM3, &
SDSBM4, SDSFACMTF, SDSCUMP, SDSNUW, &
SDSL, SDSMWD, SDSMWPOW, SPMSS, SDSNMTF, SINTAIL1, SINTAIL2, &
- CUMSIGP, VISCSTRESS
+ CUMSIGP, VISCSTRESS, &
+ CAPCHA, CHAMIN, CHA0, UCAP, SIGMAUCAP
#endif
!
#ifdef W3_ST6
@@ -1005,7 +1008,8 @@ MODULE W3GRIDMD
NAMELIST /SIN4/ ZWND, ALPHA0, Z0MAX, BETAMAX, SINTHP, ZALP, &
TAUWSHELTER, SWELLFPAR, SWELLF, &
SWELLF2, SWELLF3, SWELLF4, SWELLF5, SWELLF6, &
- SWELLF7, Z0RAT, SINBR, SINTABLE, SINTAIL1, SINTAIL2, TAUWBUG, VISCSTRESS
+ SWELLF7, Z0RAT, SINBR, SINTABLE, SINTAIL1, SINTAIL2, TAUWBUG, VISCSTRESS, &
+ CAPCHA, CHAMIN, CHA0, UCAP, SIGMAUCAP
#endif
#ifdef W3_NL1
NAMELIST /SNL1/ LAMBDA, NLPROP, KDCONV, KDMIN, &
@@ -1735,6 +1739,11 @@ SUBROUTINE W3GRID()
TAUWBUG = 1 ! TAUWBUG is 1 is the bug is kept:
! initializes TAUWX/Y to zero in W3SRCE
VISCSTRESS =0
+ CAPCHA = 0. ! =1 indicates capping of drag is active
+ CHAMIN = 0.0001 !
+ CHA0 = ALPHA0 ! initial value for charnock
+ UCAP = 30. ! U10 threshold from which drag capping is applied
+ SIGMAUCAP = 10. ! Width for reduction of drag beyond UCAP
#endif
!
#ifdef W3_ST6
@@ -1823,6 +1832,11 @@ SUBROUTINE W3GRID()
SINTAILPAR(3) = SINTAIL2
SINTAILPAR(4) = FLOAT(TAUWBUG)
SINTAILPAR(5) = VISCSTRESS
+ CAPCHNK(1) = CAPCHA
+ CAPCHNK(2) = CHAMIN
+ CAPCHNK(3) = CHA0
+ CAPCHNK(4) = UCAP
+ CAPCHNK(5) = SIGMAUCAP
#endif
!
#ifdef W3_ST6
@@ -3231,7 +3245,8 @@ SUBROUTINE W3GRID()
#ifdef W3_ST4
WRITE (NDSO,2920) ZWND, ALPHA0, Z0MAX, BETAMAX, SINTHP, ZALP, &
TAUWSHELTER, SWELLFPAR, SWELLF, SWELLF2, SWELLF3, SWELLF4, &
- SWELLF5, SWELLF6, SWELLF7, Z0RAT, SINBR, SINTABLE, TAUWBUG, VISCSTRESS, SINTAIL1, SINTAIL2
+ SWELLF5, SWELLF6, SWELLF7, Z0RAT, SINBR, SINTABLE, TAUWBUG, VISCSTRESS, SINTAIL1, SINTAIL2, &
+ CAPCHA, CHAMIN, CHA0, UCAP, SIGMAUCAP
#endif
#ifdef W3_ST6
WRITE (NDSO,2920) SINA0, SINWS, SINFC
@@ -3960,6 +3975,12 @@ SUBROUTINE W3GRID()
IF (IDFM.EQ.2) WRITE (NDSO,973) TRIM(RFORM)
IF (FROM.EQ.'NAME' .AND. NDSG.NE.NDSI) &
WRITE (NDSO,974) TRIM(FNAME)
+
+#ifdef W3_SMC
+ !Li Save the depth conversion factor for SMC grid use. JGLi03Nov2023
+ DVSMC = VSC
+#endif
+
!
! 7.e Read bottom depths
!
@@ -5081,14 +5102,17 @@ SUBROUTINE W3GRID()
CALL EXTCDE(65)
END IF
- !Li Minimum DMIN depth is used as well for SMC.
- ZB(ISEA)= - MAX( DMIN, FLOAT( IJKDep(ISEA) ) )
- MAPFS(IY:IY+JS-1,IX:IX+IK-1) = ISEA
- MAPSTA(IY:IY+JS-1,IX:IX+IK-1) = 1
- MAPST2(IY:IY+JS-1,IX:IX+IK-1) = 0
- MAPSF(ISEA,1) = IX
- MAPSF(ISEA,2) = IY
- MAPSF(ISEA,3) = IY + (IX -1)*NY
+ !Li Allow land cell to be defined by ZLIM value and only reset
+ !Li MAPST* land values for sea points. JGLi03Nov2023
+ ZB(ISEA) = DVSMC * FLOAT(IJKDep(ISEA))
+ IF( ZB(ISEA) .LT. ZLIM ) THEN
+ MAPSTA(IY:IY+JS-1,IX:IX+IK-1) = 1
+ MAPST2(IY:IY+JS-1,IX:IX+IK-1) = 0
+ ENDIF
+ MAPFS(IY:IY+JS-1,IX:IX+IK-1) = ISEA
+ MAPSF(ISEA,1) = IX
+ MAPSF(ISEA,2) = IY
+ MAPSF(ISEA,3) = IY + (IX-1) * NY
!Li New variable CLATS to hold cosine latitude at cell centre.
!Li Also added CLATIS and CTHG0S for version 4.08.
@@ -6276,7 +6300,9 @@ SUBROUTINE W3GRID()
' SWELLF5 =',F8.5,', SWELLF6 =',F8.5, &
', SWELLF7 =',F12.2,', Z0RAT =',F8.5,', SINBR =',F8.5,','/ &
' SINTABLE =',I2,', TAUWBUG =',I2, &
- ', VISCSTRESS =',F8.5,', SINTAIL1 =',F8.5,', SINTAIL2 =',F8.5,' /')
+ ', VISCSTRESS =',F8.5,', SINTAIL1 =',F8.5,', SINTAIL2 =',F8.5,',' / &
+ ', CAPCHA =',F8.5,', CHAMIN =',F8.5,', CHA0 =',F8.5,', UCAP =',F5.1,', SIGMAUCAP =', &
+ F5.1,' /')
#endif
!
#ifdef W3_ST6
@@ -6336,14 +6362,14 @@ SUBROUTINE W3GRID()
2923 FORMAT ( ' ',2F8.3,F6.1,2E12.4)
2922 FORMAT ( ' &SNL3 NQDEF =',I3,', MSC =',F6.2,', NSC =', &
F6.2,', KDFD =',F6.2,', KDFS =',F6.2,' /')
-3923 FORMAT ( ' &ANL3 QPARMS = ',2(F5.3,', '),F5.1,', ',E10.4, &
- ', ',E10.4,' /')
-4923 FORMAT ( ' &ANL3 QPARMS = ',2(F5.3,', '),F5.1,', ',E10.4, &
- ', ',E10.4,' ,')
-5923 FORMAT ( ' ',2(F5.3,', '),F5.1,', ',E10.4, &
- ', ',E10.4,' ,')
-6923 FORMAT ( ' ',2(F5.3,', '),F5.1,', ',E10.4, &
- ', ',E10.4,' /')
+3923 FORMAT ( ' &ANL3 QPARMS = ',2(F5.3,', '),F5.1,', ',E11.4, &
+ ', ',E11.4,' /')
+4923 FORMAT ( ' &ANL3 QPARMS = ',2(F5.3,', '),F5.1,', ',E11.4, &
+ ', ',E11.4,' ,')
+5923 FORMAT ( ' ',2(F5.3,', '),F5.1,', ',E11.4, &
+ ', ',E11.4,' ,')
+6923 FORMAT ( ' ',2(F5.3,', '),F5.1,', ',E11.4, &
+ ', ',E11.4,' /')
#endif
!
#ifdef W3_NL4
@@ -6445,7 +6471,7 @@ SUBROUTINE W3GRID()
' SDSBRF1 = ',F5.2,', SDSBRFDF =',I2,', '/ &
' SDSBM0 = ',F5.2, ', SDSBM1 =',F5.2, &
', SDSBM2 =',F5.2,', SDSBM3 =',F5.2,', SDSBM4 =', &
- F5.2,', '/, &
+ F7.2,', '/, &
' SPMSS = ',F5.2, ', SDKOF =',F5.2, &
', SDSMWD =',F5.2,', SDSFACMTF =',F5.1,', '/ &
' SDSMWPOW =',F3.1,', SDSNMTF =', F5.2, &
@@ -6459,18 +6485,18 @@ SUBROUTINE W3GRID()
925 FORMAT ( ' normalise by threshold spectral density : ',A/&
' normalise by spectral density : ',A/&
' coefficient and exponent for '/ &
- ' inherent breaking term a1, L as in (21) : ',E9.3,I3/ &
- ' cumulative breaking term a2, M as in (22) : ',E9.3,I3/ &
+ ' inherent breaking term a1, L as in (21) : ',E10.3,I3/ &
+ ' cumulative breaking term a2, M as in (22) : ',E10.3,I3/ &
' ')
-2924 FORMAT ( ' &SDS6 SDSET = ',L,', SDSA1 = ',E9.3, &
- ', SDSA2 = ',E9.3,', SDSP1 = ',I2,', SDSP1 = ', &
+2924 FORMAT ( ' &SDS6 SDSET = ',L,', SDSA1 = ',E10.3, &
+ ', SDSA2 = ',E10.3,', SDSP1 = ',I2,', SDSP1 = ', &
I2,' /' )
937 FORMAT (/' Swell dissipation ',A/ &
' --------------------------------------------------')
940 FORMAT ( ' subroutine W3SWL6 activated : ',A/ &
- ' coefficient b1 ',A, ' : ',E9.3/ )
-2937 FORMAT ( ' &SWL6 SWLB1 = ',E9.3,', CSTB1 = ',L,' /')
+ ' coefficient b1 ',A, ' : ',E10.3/ )
+2937 FORMAT ( ' &SWL6 SWLB1 = ',E10.3,', CSTB1 = ',L,' /')
#endif
!
#ifdef W3_BT0
@@ -6555,7 +6581,7 @@ SUBROUTINE W3GRID()
946 FORMAT (' Isotropic (linear function of ice concentration)'/&
' slope : ',E10.3/ &
' offset : ',E10.3)
-2946 FORMAT ( ' &SIS1 ISC1 =',E9.3,', ISC2 =',E9.3)
+2946 FORMAT ( ' &SIS1 ISC1 =',E10.3,', ISC2 =',E10.3)
#endif
#ifdef W3_IS2
947 FORMAT (/' Ice scattering ',A,/ &
diff --git a/model/src/w3initmd.F90 b/model/src/w3initmd.F90
index 93218d473..4badbcb1a 100644
--- a/model/src/w3initmd.F90
+++ b/model/src/w3initmd.F90
@@ -2150,7 +2150,7 @@ SUBROUTINE W3MPIO ( IMOD )
STMAXE, STMAXD, HMAXE, HCMAXE, HMAXD, &
HCMAXD, QP, PTHP0, PQP, PPE, PGW, PSW, &
PTM1, PT1, PT2, PEP, WBT, CX, CY, &
- TAUOCX, TAUOCY, WNMEAN, QKK
+ TAUOCX, TAUOCY, WNMEAN, QKK, SKEW, EMBIA1, EMBIA2
#endif
#ifdef W3_MPI
@@ -2272,22 +2272,18 @@ SUBROUTINE W3MPIO ( IMOD )
!
IF ( IAPROC .LE. NAPROC ) THEN
IT = IT0
-#endif
#ifdef W3_MPIT
WRITE (NDST,9010) '(SEND)'
#endif
!
-#ifdef W3_MPI
IF ( FLGRDALL( 1, 12) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (ICEF (IAPROC), 1, WW3_FIELD_VEC, IROOT, IT, &
MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 1/09', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 1) ) THEN
@@ -2295,11 +2291,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (HS (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 2) ) THEN
@@ -2307,11 +2301,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WLM (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 3) ) THEN
@@ -2319,11 +2311,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (T02 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 4) ) THEN
@@ -2331,11 +2321,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (T0M1 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 5) ) THEN
@@ -2343,11 +2331,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (T01 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 6) .OR. FLGRDALL( 2,18) ) THEN
@@ -2356,11 +2342,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (FP0 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 7) ) THEN
@@ -2368,11 +2352,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (THM (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/07', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 8) ) THEN
@@ -2380,11 +2362,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (THS (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/09', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 9) ) THEN
@@ -2392,11 +2372,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (THP0 (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/09', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 10) ) THEN
@@ -2404,11 +2382,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (HSIG (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/10', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 11) ) THEN
@@ -2416,11 +2392,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (STMAXE (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/11', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 12) ) THEN
@@ -2428,11 +2402,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (STMAXD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/12', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 13) ) THEN
@@ -2440,11 +2412,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (HMAXE (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/13', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 14) ) THEN
@@ -2452,11 +2422,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (HCMAXE (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/14', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 15) ) THEN
@@ -2464,11 +2432,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (HMAXD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/15', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 16) ) THEN
@@ -2476,11 +2442,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (HCMAXD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/16', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 17) ) THEN
@@ -2488,11 +2452,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WBT (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/17', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 19) ) THEN
@@ -2500,11 +2462,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WNMEAN(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/19', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 3, 1) ) THEN
@@ -2513,11 +2473,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (EF(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'EF', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2527,11 +2485,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TH1M(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'TH1M', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2541,11 +2497,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (STH1M(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'STH1M', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2555,11 +2509,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TH2M(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'TH2M', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2569,11 +2521,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (STH2M(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'STH2M', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2583,11 +2533,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PHS(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2597,11 +2545,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PTP(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2611,11 +2557,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PLP(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2625,11 +2569,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PDIR(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2639,11 +2581,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PSI(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2653,11 +2593,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PWS(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2667,11 +2605,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PTHP0(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/07', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2681,11 +2617,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PQP (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/08', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2695,11 +2629,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PPE (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/09', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2709,11 +2641,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PGW (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/10', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2723,11 +2653,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PSW (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/11', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2737,11 +2665,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PTM1(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/12', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2752,11 +2678,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PT1 (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/13', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2766,11 +2690,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PT2 (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/14', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2780,11 +2702,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PEP (1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/15', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -2793,11 +2713,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PWST (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/16', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 4,17) ) THEN
@@ -2805,11 +2723,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PNR (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/17', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 1) ) THEN
@@ -2817,29 +2733,23 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (UST (IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (USTDIR(IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (ASF (IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 2) ) THEN
@@ -2847,11 +2757,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (CHARN(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 3) ) THEN
@@ -2859,11 +2767,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (CGE (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 4) ) THEN
@@ -2871,11 +2777,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PHIAW(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 5) ) THEN
@@ -2883,20 +2787,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TAUWIX(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TAUWIY(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 6) ) THEN
@@ -2904,20 +2804,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TAUWNX(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TAUWNY(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 7) ) THEN
@@ -2925,11 +2821,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WHITECAP(1,1),NSEALM , MPI_REAL, IROOT,&
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/07', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 8) ) THEN
@@ -2937,11 +2831,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WHITECAP(1,2),NSEALM , MPI_REAL, IROOT,&
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/08', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 9) ) THEN
@@ -2949,11 +2841,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WHITECAP(1,3),NSEALM , MPI_REAL, IROOT,&
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/09', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5,10) ) THEN
@@ -2961,11 +2851,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (WHITECAP(1,4),NSEALM , MPI_REAL, IROOT,&
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/10', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 11) ) THEN
@@ -2973,11 +2861,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TWS(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/11', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 1) ) THEN
@@ -2985,29 +2871,23 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (SXX (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (SYY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (SXY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 2) ) THEN
@@ -3015,20 +2895,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TAUOX (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TAUOY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 3) ) THEN
@@ -3036,11 +2912,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (BHD(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 4) ) THEN
@@ -3048,11 +2922,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PHIOC (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 5) ) THEN
@@ -3060,20 +2932,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TUSX (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TUSY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 6) ) THEN
@@ -3081,20 +2949,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (USSX (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (USSY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 7) ) THEN
@@ -3102,20 +2966,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PRMS (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/07', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TPMS (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/07', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 8) ) THEN
@@ -3124,11 +2984,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (US3D(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'US3D ', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3138,11 +2996,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (P2SMS(1,K),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'P2SMS', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3151,20 +3007,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TAUICE (1,1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/10', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TAUICE (1,2),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/10', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6,11) ) THEN
@@ -3172,11 +3024,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PHICE (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/11', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 12) ) THEN
@@ -3185,11 +3035,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (USSP(1,IK),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'USSP ', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3198,20 +3046,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TAUOCX(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/13', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TAUOCY(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/13', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 1) ) THEN
@@ -3219,20 +3063,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (ABA (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (ABD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 2) ) THEN
@@ -3240,20 +3080,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (UBA (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (UBD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 3) ) THEN
@@ -3261,29 +3097,23 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (BEDFORMS(1,1),NSEALM , MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (BEDFORMS(1,2),NSEALM , MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (BEDFORMS(1,3),NSEALM , MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 4) ) THEN
@@ -3291,11 +3121,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (PHIBBL(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 5) ) THEN
@@ -3303,20 +3131,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (TAUBBL(1,1),NSEALM , MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (TAUBBL(1,2),NSEALM , MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 1) ) THEN
@@ -3324,20 +3148,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (MSSX (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (MSSY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 2) ) THEN
@@ -3345,20 +3165,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (MSCX (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (MSCY (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 3) ) THEN
@@ -3366,11 +3182,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (MSSD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 4) ) THEN
@@ -3378,11 +3192,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (MSCD (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 5) ) THEN
@@ -3390,11 +3202,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (QP (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 6) ) THEN
@@ -3402,25 +3212,49 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (QKK (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/06', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
+ !
+ IF ( FLGRDALL( 8, 7) ) THEN
+ IH = IH + 1
+ IT = IT + 1
+ CALL MPI_SEND_INIT (SKEW (1),NSEALM , MPI_REAL, IROOT, &
+ IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
+#ifdef W3_MPIT
+ WRITE (NDST,9011) IH, ' 8/07', IROOT, IT, IRQGO(IH), IERR
#endif
+ END IF
+ !
+ IF ( FLGRDALL( 8, 8) ) THEN
+ IH = IH + 1
+ IT = IT + 1
+ CALL MPI_SEND_INIT (EMBIA1 (1),NSEALM , MPI_REAL, IROOT, &
+ IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
+#ifdef W3_MPIT
+ WRITE (NDST,9011) IH, ' 8/08', IROOT, IT, IRQGO(IH), IERR
+#endif
+ END IF
+ !
+ IF ( FLGRDALL( 8, 9) ) THEN
+ IH = IH + 1
+ IT = IT + 1
+ CALL MPI_SEND_INIT (EMBIA2 (1),NSEALM , MPI_REAL, IROOT, &
+ IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
+#ifdef W3_MPIT
+ WRITE (NDST,9011) IH, ' 8/09', IROOT, IT, IRQGO(IH), IERR
+#endif
+ END IF
!
-#ifdef W3_MPI
IF ( FLGRDALL( 9, 1) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_SEND_INIT (DTDYN(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/01', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 2) ) THEN
@@ -3428,11 +3262,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (FCUT (1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/02', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 3) ) THEN
@@ -3440,11 +3272,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (CFLXYMAX(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/03', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 4) ) THEN
@@ -3452,11 +3282,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (CFLTHMAX(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/04', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 5) ) THEN
@@ -3464,11 +3292,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (CFLKMAX(1),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/05', IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
DO I=1, NOEXTR
@@ -3477,23 +3303,19 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_SEND_INIT (USERO(1,I),NSEALM , MPI_REAL, IROOT, &
IT, MPI_COMM_WAVE, IRQGO(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (STRING,'(A3,I2.2)') '10/', I
WRITE (NDST,9011) IH, STRING, IROOT, IT, IRQGO(IH), IERR
#endif
-#ifdef W3_MPI
END IF
END DO
!
NRQGO = IH
-#endif
#ifdef W3_MPIT
WRITE (NDST,9012)
WRITE (NDST,9013) NRQGO, NRQMAX
#endif
!
-#ifdef W3_MPI
END IF !IF ( IAPROC .LE. NAPROC ) THEN
!
IF ( NRQGO .GT. NRQMAX ) THEN
@@ -3514,12 +3336,10 @@ SUBROUTINE W3MPIO ( IMOD )
! 1.c Receives of fields
!
CALL W3XETA ( IMOD, NDSE, NDST )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9010) '(RECV)'
#endif
!
-#ifdef W3_MPI
IH = 0
!
DO I0=1, NAPROC
@@ -3531,11 +3351,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (ICEF (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 1/09', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 1) ) THEN
@@ -3543,11 +3361,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (HS (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 2) ) THEN
@@ -3555,11 +3371,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WLM (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 3) ) THEN
@@ -3567,11 +3381,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (T02 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 4) ) THEN
@@ -3579,11 +3391,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (T0M1 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 5) ) THEN
@@ -3591,11 +3401,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (T01(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 6) .OR. FLGRDALL( 2,18) ) THEN
@@ -3604,11 +3412,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (FP0 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 7) ) THEN
@@ -3616,11 +3422,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (THM (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/07', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 8) ) THEN
@@ -3628,11 +3432,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (THS (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/08', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 9) ) THEN
@@ -3640,11 +3442,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (THP0 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/09', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 10) ) THEN
@@ -3652,11 +3452,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (HSIG (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/10', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 11) ) THEN
@@ -3664,11 +3462,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (STMAXE (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/11', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 12) ) THEN
@@ -3676,11 +3472,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (STMAXD(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/12', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 13) ) THEN
@@ -3688,11 +3482,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (HMAXE (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/13', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 14) ) THEN
@@ -3700,11 +3492,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (HCMAXE(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/14', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 15) ) THEN
@@ -3712,11 +3502,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (HMAXD (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/15', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 16) ) THEN
@@ -3724,11 +3512,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (HCMAXD(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/16', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 17) ) THEN
@@ -3736,11 +3522,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WBT(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/17', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 2, 19) ) THEN
@@ -3748,11 +3532,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WNMEAN(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 2/19', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 3, 1) ) THEN
@@ -3761,11 +3543,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (EF(I0,IK),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'EF', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3775,11 +3555,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TH1M(I0,IK),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'TH1M', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3789,11 +3567,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (STH1M(I0,IK),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'STH1M', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3803,11 +3579,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TH2M(I0,IK),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'TH2M', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3817,11 +3591,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (STH2M(I0,IK),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'STH2M', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3831,11 +3603,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PHS(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3845,11 +3615,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PTP(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3859,11 +3627,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PLP(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3873,11 +3639,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PDIR(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3887,11 +3651,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PSI(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3901,11 +3663,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PWS(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3915,11 +3675,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PTHP0(I0,K),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/07', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3929,11 +3687,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PQP(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/08', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3943,11 +3699,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PPE(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/09', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3957,11 +3711,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PGW(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/10', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3971,11 +3723,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PSW(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/11', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3985,11 +3735,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PTM1(I0,K),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/12', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -3999,11 +3747,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PT1(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/13', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -4013,11 +3759,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PT2(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/14', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -4027,11 +3771,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PEP(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/15', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -4040,11 +3782,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PWST (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/16', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 4,17) ) THEN
@@ -4052,11 +3792,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PNR (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 4/17', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 1) ) THEN
@@ -4064,29 +3802,23 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (UST (I0), 1, WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (USTDIR(I0), 1, WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (ASF (I0), 1, WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 2) ) THEN
@@ -4094,11 +3826,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (CHARN(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 3) ) THEN
@@ -4106,11 +3836,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (CGE (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 4) ) THEN
@@ -4118,11 +3846,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PHIAW(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 5) ) THEN
@@ -4130,20 +3856,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TAUWIX(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TAUWIY(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 6) ) THEN
@@ -4151,20 +3873,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TAUWNX(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TAUWNY(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 7) ) THEN
@@ -4172,11 +3890,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WHITECAP(I0,1),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/07', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 8) ) THEN
@@ -4184,11 +3900,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WHITECAP(I0,2),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/08', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5, 9) ) THEN
@@ -4196,11 +3910,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WHITECAP(I0,3),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/09', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5,10) ) THEN
@@ -4208,11 +3920,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (WHITECAP(I0,4),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/10', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 5,11) ) THEN
@@ -4220,11 +3930,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TWS(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 5/11', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 1) ) THEN
@@ -4232,29 +3940,23 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (SXX (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (SYY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (SXY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 2) ) THEN
@@ -4262,20 +3964,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TAUOX (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TAUOY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 3) ) THEN
@@ -4283,11 +3981,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (BHD(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 4) ) THEN
@@ -4295,11 +3991,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PHIOC (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 5) ) THEN
@@ -4307,20 +4001,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TUSX (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TUSY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 6) ) THEN
@@ -4328,20 +4018,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (USSX (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (USSY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 7) ) THEN
@@ -4349,20 +4035,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PRMS (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/07', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TPMS (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/07', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 8) ) THEN
@@ -4371,11 +4053,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (US3D(I0,IK),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'US3D ', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -4385,11 +4065,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (P2SMS(I0,K),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'P3SMS', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -4398,20 +4076,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TAUICE (I0,1),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/10', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TAUICE (I0,2),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/10', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6,11) ) THEN
@@ -4419,11 +4093,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PHICE (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/11', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 6, 12) ) THEN
@@ -4432,11 +4104,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (USSP(I0,IK),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, 'USSP ', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END DO
END IF
!
@@ -4445,20 +4115,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TAUOCX(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/13', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TAUOCY(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 6/13', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 1) ) THEN
@@ -4466,20 +4132,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (ABA (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (ABD (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 2) ) THEN
@@ -4487,20 +4149,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (UBA (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (UBD (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 3) ) THEN
@@ -4508,29 +4166,23 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (BEDFORMS(I0,1),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (BEDFORMS(I0,2),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (BEDFORMS(I0,3),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 4) ) THEN
@@ -4538,11 +4190,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (PHIBBL(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 7, 5) ) THEN
@@ -4550,20 +4200,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (TAUBBL(I0,1),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (TAUBBL(I0,2),1,WW3_FIELD_VEC, IFROM, &
IT, MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 7/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 1) ) THEN
@@ -4571,20 +4217,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (MSSX (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (MSSY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 2) ) THEN
@@ -4592,20 +4234,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (MSCX (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (MSCY (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 3) ) THEN
@@ -4613,11 +4251,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (MSSD (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 4) ) THEN
@@ -4625,11 +4261,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (MSCD (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 5) ) THEN
@@ -4637,11 +4271,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (QP (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 8, 6) ) THEN
@@ -4649,25 +4281,49 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (QKK (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 8/06', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
+ !
+ IF ( FLGRDALL( 8, 7) ) THEN
+ IH = IH + 1
+ IT = IT + 1
+ CALL MPI_RECV_INIT (SKEW (I0),1,WW3_FIELD_VEC, IFROM, IT, &
+ MPI_COMM_WAVE, IRQGO2(IH), IERR )
+#ifdef W3_MPIT
+ WRITE (NDST,9011) IH, ' 8/07', IFROM, IT, IRQGO2(IH), IERR
#endif
+ END IF
+ !
+ IF ( FLGRDALL( 8, 8) ) THEN
+ IH = IH + 1
+ IT = IT + 1
+ CALL MPI_RECV_INIT (EMBIA1 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
+ MPI_COMM_WAVE, IRQGO2(IH), IERR )
+#ifdef W3_MPIT
+ WRITE (NDST,9011) IH, ' 8/08', IFROM, IT, IRQGO2(IH), IERR
+#endif
+ END IF
+ !
+ IF ( FLGRDALL( 8, 9) ) THEN
+ IH = IH + 1
+ IT = IT + 1
+ CALL MPI_RECV_INIT (EMBIA2 (I0),1,WW3_FIELD_VEC, IFROM, IT, &
+ MPI_COMM_WAVE, IRQGO2(IH), IERR )
+#ifdef W3_MPIT
+ WRITE (NDST,9011) IH, ' 8/09', IFROM, IT, IRQGO2(IH), IERR
+#endif
+ END IF
!
-#ifdef W3_MPI
IF ( FLGRDALL( 9, 1) ) THEN
IH = IH + 1
IT = IT + 1
CALL MPI_RECV_INIT (DTDYN(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/01', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 2) ) THEN
@@ -4675,11 +4331,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (FCUT (I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/02', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 3) ) THEN
@@ -4687,11 +4341,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (CFLXYMAX(I0),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/03', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 4) ) THEN
@@ -4699,11 +4351,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (CFLTHMAX(I0),1,WW3_FIELD_VEC, IFROM, IT,&
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/04', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLGRDALL( 9, 5) ) THEN
@@ -4711,11 +4361,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (CFLKMAX(I0),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9011) IH, ' 9/05', IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
DO I=1, NOEXTR
@@ -4725,25 +4373,21 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT + 1
CALL MPI_RECV_INIT (USERO(I0,I),1,WW3_FIELD_VEC, IFROM, IT, &
MPI_COMM_WAVE, IRQGO2(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (STRING,'(A3,I2.2)') '10/', I
WRITE (NDST,9011) IH, STRING, IFROM, IT, IRQGO2(IH), IERR
#endif
-#ifdef W3_MPI
END IF
END DO
!
END DO
!
NRQGO2 = IH
-#endif
#ifdef W3_MPIT
WRITE (NDST,9012)
WRITE (NDST,9014) NRQGO2, NRQMAX*NAPROC
#endif
!
-#ifdef W3_MPI
CALL W3SETA ( IMOD, NDSE, NDST )
!
END IF ! IF ( IAPROC .EQ. NAPFLD ) THEN
@@ -4769,7 +4413,6 @@ SUBROUTINE W3MPIO ( IMOD )
ALLOCATE ( OUTPTS(IMOD)%OUT4%IRQRS(3*NAPROC) )
ENDIF
IRQRS => OUTPTS(IMOD)%OUT4%IRQRS
-#endif
!
! 2.b Fields at end of file (always)
!
@@ -4777,39 +4420,32 @@ SUBROUTINE W3MPIO ( IMOD )
WRITE (NDST,9020)
#endif
!
-#ifdef W3_MPI
IF ( IAPROC.NE.NAPRST .AND. IAPROC.LE.NAPROC ) THEN
!
IH = IH + 1
IT = IT0 + 1
CALL MPI_SEND_INIT (UST (IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S U*', IROOT, IT, IRQRS(IH), IERR
#endif
!
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 2
CALL MPI_SEND_INIT (USTDIR(IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S UD', IROOT, IT, IRQRS(IH), IERR
#endif
!
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 3
CALL MPI_SEND_INIT (FPIS(IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S FP', IROOT, IT, IRQRS(IH), IERR
#endif
!
-#ifdef W3_MPI
ELSE IF ( IAPROC .EQ. NAPRST ) THEN
DO I0=1, NAPROC
IFROM = I0 - 1
@@ -4819,31 +4455,25 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 1
CALL MPI_RECV_INIT (UST (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R U*', IFROM, IT, IRQRS(IH), IERR
#endif
!
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 2
CALL MPI_RECV_INIT (USTDIR(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R UD', IFROM, IT, IRQRS(IH), IERR
#endif
!
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 3
CALL MPI_RECV_INIT (FPIS(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R FP', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
END DO
END IF
@@ -4854,20 +4484,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 4
CALL MPI_SEND_INIT (CX(IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S CX', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 5
CALL MPI_SEND_INIT (CY(IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S CY', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 1, 12) ) THEN
@@ -4875,11 +4501,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 6
CALL MPI_SEND_INIT (ICEF(IAPROC), 1, WW3_FIELD_VEC, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S IF', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 1) ) THEN
@@ -4887,11 +4511,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 7
CALL MPI_SEND_INIT (HS (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S HS', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 2) ) THEN
@@ -4899,11 +4521,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 8
CALL MPI_SEND_INIT (WLM (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S WL', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 4) ) THEN
@@ -4911,11 +4531,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 9
CALL MPI_SEND_INIT (T0M1(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S T0', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
ENDIF
!
IF ( FLOGRR( 2, 5) ) THEN
@@ -4923,11 +4541,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 10
CALL MPI_SEND_INIT (T01 (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S T1', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
ENDIF
!
IF ( FLOGRR( 2, 6) ) THEN
@@ -4935,11 +4551,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 11
CALL MPI_SEND_INIT (FP0 (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S FP', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 7) ) THEN
@@ -4947,11 +4561,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 12
CALL MPI_SEND_INIT (THM (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S TH', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 19) ) THEN
@@ -4959,11 +4571,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 13
CALL MPI_SEND_INIT (WNMEAN(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S WM', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 5, 2) ) THEN
@@ -4971,11 +4581,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 14
CALL MPI_SEND_INIT (CHARN(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S CH', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
ENDIF
!
IF ( FLOGRR( 5, 5) ) THEN
@@ -4983,20 +4591,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 15
CALL MPI_SEND_INIT (TAUWIX(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S WX', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 16
CALL MPI_SEND_INIT (TAUWIY(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S WY', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 5, 11) ) THEN
@@ -5004,11 +4608,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 17
CALL MPI_SEND_INIT (TWS (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S TS', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 2) ) THEN
@@ -5016,20 +4618,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 18
CALL MPI_SEND_INIT (TAUOX(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S OX', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 19
CALL MPI_SEND_INIT (TAUOY(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S OY', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 3) ) THEN
@@ -5037,11 +4635,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 20
CALL MPI_SEND_INIT (BHD (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S BH', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 4) ) THEN
@@ -5049,11 +4645,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 21
CALL MPI_SEND_INIT (PHIOC(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S PH', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 5) ) THEN
@@ -5061,20 +4655,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 22
CALL MPI_SEND_INIT (TUSX (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S UX', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 23
CALL MPI_SEND_INIT (TUSY (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S UY', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 6) ) THEN
@@ -5082,20 +4672,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 24
CALL MPI_SEND_INIT (USSX (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S SX', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 25
CALL MPI_SEND_INIT (USSY (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S SY', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6,10) ) THEN
@@ -5103,20 +4689,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 26
CALL MPI_SEND_INIT (TAUICE(1,1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S I1', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 27
CALL MPI_SEND_INIT (TAUICE(1,2), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S I2', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6,13) ) THEN
@@ -5124,20 +4706,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 28
CALL MPI_SEND_INIT (TAUOCX(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S TX', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 29
CALL MPI_SEND_INIT (TAUOCY(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S TY', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 7, 2) ) THEN
@@ -5145,20 +4723,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 30
CALL MPI_SEND_INIT (UBA (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S BA', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 31
CALL MPI_SEND_INIT (UBD (1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S BD', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 7, 4) ) THEN
@@ -5166,11 +4740,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 32
CALL MPI_SEND_INIT (PHIBBL(1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S PB', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 7, 5) ) THEN
@@ -5178,20 +4750,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 33
CALL MPI_SEND_INIT (TAUBBL(1,1), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S T1', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 34
CALL MPI_SEND_INIT (TAUBBL(1,2), NSEALM, MPI_REAL, &
IROOT, IT, MPI_COMM_WAVE, IRQRS(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'S T2', IROOT, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( IAPROC .EQ. NAPRST ) THEN
@@ -5205,20 +4773,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 4
CALL MPI_RECV_INIT (CX (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R CX', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IT0 + 5
IT = IT + 1
CALL MPI_RECV_INIT (CY (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R CY', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 1, 12) ) THEN
@@ -5226,11 +4790,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 6
CALL MPI_RECV_INIT (ICEF (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R IF', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 1) ) THEN
@@ -5238,11 +4800,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 7
CALL MPI_RECV_INIT (HS (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R HS', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 2) ) THEN
@@ -5250,11 +4810,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 8
CALL MPI_RECV_INIT (WLM (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R WL', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 4) ) THEN
@@ -5262,11 +4820,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 9
CALL MPI_RECV_INIT (T0M1(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R T0', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
ENDIF
!
IF ( FLOGRR( 2, 5) ) THEN
@@ -5274,11 +4830,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 10
CALL MPI_RECV_INIT (T01 (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R T1', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
ENDIF
!
IF ( FLOGRR( 2, 6) ) THEN
@@ -5286,11 +4840,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 11
CALL MPI_RECV_INIT (FP0 (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R FP', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 7) ) THEN
@@ -5298,11 +4850,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 12
CALL MPI_RECV_INIT (THM (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R TH', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 2, 19) ) THEN
@@ -5310,11 +4860,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 13
CALL MPI_RECV_INIT (WNMEAN(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R WM', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 5, 2) ) THEN
@@ -5322,11 +4870,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 14
CALL MPI_RECV_INIT (CHARN(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R CH', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
ENDIF
!
IF ( FLOGRR( 5, 5) ) THEN
@@ -5334,20 +4880,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 15
CALL MPI_RECV_INIT (TAUWIX(I0),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R WX', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 16
CALL MPI_RECV_INIT (TAUWIY(I0),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R WY', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 5,11) ) THEN
@@ -5355,11 +4897,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 17
CALL MPI_RECV_INIT (TWS (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R TS', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 2) ) THEN
@@ -5367,20 +4907,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 18
CALL MPI_RECV_INIT (TAUOX(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R OX', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 19
CALL MPI_RECV_INIT (TAUOY(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R OY', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 3) ) THEN
@@ -5388,11 +4924,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 20
CALL MPI_RECV_INIT (BHD (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R BH', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 4) ) THEN
@@ -5400,11 +4934,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 21
CALL MPI_RECV_INIT (PHIOC(I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R PH', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 5) ) THEN
@@ -5412,20 +4944,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 22
CALL MPI_RECV_INIT (TUSX (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R UX', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 23
CALL MPI_RECV_INIT (TUSY (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R UY', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6, 6) ) THEN
@@ -5433,20 +4961,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 24
CALL MPI_RECV_INIT (USSX (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R SX', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 25
CALL MPI_RECV_INIT (USSY (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R SY', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6,10) ) THEN
@@ -5454,20 +4978,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 26
CALL MPI_RECV_INIT (TAUICE(I0,1),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R I1', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 27
CALL MPI_RECV_INIT (TAUICE(I0,2),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R I2', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 6,13) ) THEN
@@ -5475,20 +4995,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 28
CALL MPI_RECV_INIT (TAUOCX(I0),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R SX', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 29
CALL MPI_RECV_INIT (TAUOCY(I0),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R SY', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 7, 2) ) THEN
@@ -5496,20 +5012,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 30
CALL MPI_RECV_INIT (UBA (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R BA', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 31
CALL MPI_RECV_INIT (UBD (I0),1,WW3_FIELD_VEC, &
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R BD', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 7, 4) ) THEN
@@ -5517,11 +5029,9 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 32
CALL MPI_RECV_INIT (PHIBBL(I0),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R PB', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
IF ( FLOGRR( 7, 5) ) THEN
@@ -5529,20 +5039,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 33
CALL MPI_RECV_INIT (TAUBBL(I0,1),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R T1', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 34
CALL MPI_RECV_INIT (TAUBBL(I0,2),1,WW3_FIELD_VEC,&
IFROM, IT, MPI_COMM_WAVE, IRQRS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9021) IH, 'R T2', IFROM, IT, IRQRS(IH), IERR
#endif
-#ifdef W3_MPI
END IF
END DO
!
@@ -5556,7 +5062,6 @@ SUBROUTINE W3MPIO ( IMOD )
ELSE
IT0 = IT0 + 3
ENDIF
-#endif
!
#ifdef W3_MPIT
WRITE (NDST,9022)
@@ -5565,19 +5070,16 @@ SUBROUTINE W3MPIO ( IMOD )
!
! 2.c Data server mode
!
-#ifdef W3_MPI
IF ( IOSTYP .GT. 0 ) THEN
!
NBLKRS = 10
RSBLKS = MAX ( 5 , NSEALM/NBLKRS )
IF ( NBLKRS*RSBLKS .LT. NSEALM ) RSBLKS = RSBLKS + 1
NBLKRS = 1 + (NSEALM-1)/RSBLKS
-#endif
!
#ifdef W3_MPIT
WRITE (NDST,9025) RSBLKS, NBLKRS
#endif
-#ifdef W3_MPI
IH = 0
!
IF ( IAPROC .NE. NAPRST ) THEN
@@ -5593,11 +5095,9 @@ SUBROUTINE W3MPIO ( IMOD )
NSEAB = 1 + JSEAN - JSEA0
CALL MPI_SEND_INIT (VA(1,JSEA0), NSPEC*NSEAB, MPI_REAL, IROOT, IT, &
MPI_COMM_WAVE, IRQRSS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9026) IH, 'S', IB, IROOT, IT, IRQRSS(IH), IERR, NSEAB
#endif
-#ifdef W3_MPI
END DO
!
ELSE
@@ -5619,33 +5119,27 @@ SUBROUTINE W3MPIO ( IMOD )
IBOFF = MOD(IB-1,2)*RSBLKS
CALL MPI_RECV_INIT (VAAUX(1,1+IBOFF,I0), NSPEC*NSEAB, MPI_REAL, &
IFROM, IT, MPI_COMM_WAVE, IRQRSS(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9026) IH, 'R', IB, IFROM, IT, IRQRSS(IH), IERR, NSEAB
#endif
-#ifdef W3_MPI
END IF
END DO
END DO
!
END IF
-#endif
!
#ifdef W3_MPIT
WRITE (NDST,9027)
WRITE (NDST,9028) IH
#endif
-#ifdef W3_MPI
IT0 = IT0 + NBLKRS
!
END IF
!
END IF ! IF ((FLOUT(4) .OR. FLOUT(8)) .and. (.not. LPDLIB)) THEN
-#endif
!
! 3. Set-up for W3IOBC ( SENDs ) ------------------------------------ /
!
-#ifdef W3_MPI
NRQBP = 0
NRQBP2 = 0
IH = 0
@@ -5657,7 +5151,6 @@ SUBROUTINE W3MPIO ( IMOD )
OUTPTS(IMOD)%OUT5%IRQBP2(NBO2(NFBPO)) )
IRQBP1 => OUTPTS(IMOD)%OUT5%IRQBP1
IRQBP2 => OUTPTS(IMOD)%OUT5%IRQBP2
-#endif
!
! 3.a Loops over files and points
!
@@ -5665,7 +5158,6 @@ SUBROUTINE W3MPIO ( IMOD )
WRITE (NDST,9030) 'MPI_SEND_INIT'
#endif
!
-#ifdef W3_MPI
DO J=1, NFBPO
DO I=NBO2(J-1)+1, NBO2(J)
!
@@ -5682,22 +5174,17 @@ SUBROUTINE W3MPIO ( IMOD )
IH = IH + 1
CALL MPI_SEND_INIT (VA(1,JSEA),NSPEC,MPI_REAL, IROOT, IT, MPI_COMM_WAVE, &
IRQBP1(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9031) IH, I, J, IROOT, IT, IRQBP1(IH), IERR
#endif
-#ifdef W3_MPI
END IF
!
END DO
END DO
-#endif
!
! ... End of loops 4.a
!
-#ifdef W3_MPI
NRQBP = IH
-#endif
!
#ifdef W3_MPIT
WRITE (NDST,9032)
@@ -5706,12 +5193,10 @@ SUBROUTINE W3MPIO ( IMOD )
!
! 3.d Set-up for W3IOBC ( RECVs ) ------------------------------------ /
!
-#ifdef W3_MPI
IF ( IAPROC .EQ. NAPBPT ) THEN
!
IH = 0
IT = IT0
-#endif
!
! 3.e Loops over files and points
!
@@ -5719,7 +5204,6 @@ SUBROUTINE W3MPIO ( IMOD )
WRITE (NDST,9030) 'MPI_RECV_INIT'
#endif
!
-#ifdef W3_MPI
DO J=1, NFBPO
DO I=NBO2(J-1)+1, NBO2(J)
!
@@ -5735,17 +5219,14 @@ SUBROUTINE W3MPIO ( IMOD )
ITARG = ISPROC - 1
CALL MPI_RECV_INIT (ABPOS(1,IH),NSPEC,MPI_REAL, ITARG, IT, MPI_COMM_WAVE, &
IRQBP2(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9031) IH, I, J, ITARG, IT, IRQBP2(IH), IERR
#endif
!
-#ifdef W3_MPI
END DO
END DO
!
NRQBP2 = IH
-#endif
!
! ... End of loops 4.e
!
@@ -5754,13 +5235,11 @@ SUBROUTINE W3MPIO ( IMOD )
WRITE (NDST,9033) NRQBP2
#endif
!
-#ifdef W3_MPI
END IF
!
IT0 = IT0 + NBO2(NFBPO)
!
END IF
-#endif
!
#ifdef W3_MPIT
WRITE (NDST,*)
@@ -5768,12 +5247,10 @@ SUBROUTINE W3MPIO ( IMOD )
!
! 4. Set-up for W3IOTR ---------------------------------------------- /
!
-#ifdef W3_MPI
IH = 0
IROOT = NAPTRK - 1
!
IF ( FLOUT(3) ) THEN
-#endif
!
! 4.a U*
!
@@ -5781,7 +5258,6 @@ SUBROUTINE W3MPIO ( IMOD )
WRITE (NDST,9040)
#endif
!
-#ifdef W3_MPI
IF ( IAPROC .NE. NAPTRK ) THEN
ALLOCATE ( OUTPTS(IMOD)%OUT3%IRQTR(2) )
IRQTR => OUTPTS(IMOD)%OUT3%IRQTR
@@ -5789,20 +5265,16 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 1
CALL MPI_SEND_INIT (UST (IAPROC),1,WW3_FIELD_VEC, IROOT, IT, MPI_COMM_WAVE, &
IRQTR(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9041) IH, 'S U*', IROOT, IT, IRQTR(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 2
CALL MPI_SEND_INIT (USTDIR(IAPROC),1,WW3_FIELD_VEC, IROOT, IT, MPI_COMM_WAVE, &
IRQTR(IH), IERR )
-#endif
#ifdef W3_MPIT
WRITE (NDST,9041) IH, 'S U*', IROOT, IT, IRQTR(IH), IERR
#endif
-#ifdef W3_MPI
ELSE
ALLOCATE ( OUTPTS(IMOD)%OUT3%IRQTR(2*NAPROC) )
IRQTR => OUTPTS(IMOD)%OUT3%IRQTR
@@ -5813,40 +5285,32 @@ SUBROUTINE W3MPIO ( IMOD )
IT = IT0 + 1
CALL MPI_RECV_INIT(UST (I0),1,WW3_FIELD_VEC, IFROM, IT, MPI_COMM_WAVE, &
IRQTR(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9041) IH, 'R U*', IFROM, IT, IRQTR(IH), IERR
#endif
-#ifdef W3_MPI
IH = IH + 1
IT = IT0 + 2
CALL MPI_RECV_INIT(USTDIR(I0),1,WW3_FIELD_VEC, IFROM, IT, MPI_COMM_WAVE, &
IRQTR(IH), IERR)
-#endif
#ifdef W3_MPIT
WRITE (NDST,9041) IH, 'R U*', IFROM, IT, IRQTR(IH), IERR
#endif
-#ifdef W3_MPI
END IF
END DO
END IF
!
NRQTR = IH
IT0 = IT0 + 2
-#endif
!
#ifdef W3_MPIT
WRITE (NDST,9042)
WRITE (NDST,9043) NRQTR
#endif
!
-#ifdef W3_MPI
END IF
-#endif
!
! 5. Set-up remaining counters -------------------------------------- /
!
-#ifdef W3_MPI
IT0PRT = IT0
IT0PNT = IT0PRT + 2*NAPROC
IT0TRK = IT0PNT + 5000
diff --git a/model/src/w3iogomd.F90 b/model/src/w3iogomd.F90
index 2ddfa77e0..de660ded4 100644
--- a/model/src/w3iogomd.F90
+++ b/model/src/w3iogomd.F90
@@ -18,7 +18,7 @@ MODULE W3IOGOMD
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
- !/ | Last update : 22-Mar-2021 |
+ !/ | Last update : 02-Mar-2024 |
!/ +-----------------------------------+
!/
!/ 04-Jan-2001 : Origination. ( version 2.00 )
@@ -74,8 +74,9 @@ MODULE W3IOGOMD
!/ 22-Mar-2021 : Add extra coupling fields as output ( version 7.13 )
!/ 21-Jul-2022 : Correct FP0 calc for peak energy in ( version 7.14 )
!/ min/max freq band (B. Pouliot, CMC)
+ !/ 02-Mar-2024 : Add skweness and EM bias varaible ( version 7.xx )
!/
- !/ Copyright 2009-2014 National Weather Service (NWS),
+ !/ Copyright 2009-2024 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
!/ reserved. WAVEWATCH III is a trademark of the NWS.
!/ No unauthorized use without permission.
@@ -1126,6 +1127,15 @@ SUBROUTINE W3FLDTOIJ(FLD, I, J, IAPROC, NAPOUT, NDSEN)
CASE('QKK')
I = 8
J = 6
+ CASE('SKW')
+ I = 8
+ J = 7
+ CASE('EMB')
+ I = 8
+ J = 8
+ CASE('EMC')
+ I = 8
+ J = 9
!
! Group 9
!
@@ -2340,6 +2350,11 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 )
IF (FLOLOC( 6, 12)) THEN
CALL CALC_U3STOKES(A,2)
ENDIF
+ !
+ IF (FLOLOC( 8, 7).OR.FLOLOC( 8, 8).OR.FLOLOC( 8, 9)) THEN
+ CALL SKEWNESS(A)
+ END IF
+
!
! Dominant wave breaking probability
!
@@ -2417,6 +2432,7 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD &
!/ processing code)
!/ 25-Aug-2018 : Add WBT parameter ( version 6.06 )
!/ 22-Mar-2021 : Add extra coupling fields as output ( version 7.13 )
+ !/ 07-Mar-2024 : Add Skewness parameters ( version 7.13 )
!/
! 1. Purpose :
!
@@ -2513,7 +2529,7 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD &
CFLXYMAX, CFLTHMAX, CFLKMAX, P2SMS, US3D, &
TH1M, STH1M, TH2M, STH2M, HSIG, PHICE, TAUICE,&
STMAXE, STMAXD, HMAXE, HCMAXE, HMAXD, HCMAXD,&
- USSP, TAUOCX, TAUOCY, QKK
+ USSP, TAUOCX, TAUOCY, QKK, SKEW, EMBIA1, EMBIA2
!/
USE W3ODATMD, ONLY: NOGRP, NGRPP, IDOUT, UNDEF, NDST, NDSE, &
FLOGRD, IPASS => IPASS1, WRITE => WRITE1, &
@@ -2923,6 +2939,9 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD &
IF ( FLOGRD( 8, 4) ) MSCD (ISEA) = UNDEF
IF ( FLOGRD( 8, 5) ) QP (ISEA) = UNDEF
IF ( FLOGRD( 8, 6) ) QKK (ISEA) = UNDEF
+ IF ( FLOGRD( 8, 7) ) SKEW (ISEA) = UNDEF
+ IF ( FLOGRD( 8, 8) ) EMBIA1(ISEA) = UNDEF
+ IF ( FLOGRD( 8, 9) ) EMBIA2(ISEA) = UNDEF
!
IF ( FLOGRD( 9, 1) ) DTDYN (ISEA) = UNDEF
IF ( FLOGRD( 9, 2) ) FCUT (ISEA) = UNDEF
@@ -3576,7 +3595,7 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD &
#endif
!
! Section 8)
- !
+ !Skewness
ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 1 ) THEN
WRITE ( NDSOG ) MSSX(1:NSEA)
#ifdef W3_ASCII
@@ -3614,6 +3633,21 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD &
WRITE ( NDSOG ) QKK(1:NSEA)
#ifdef W3_ASCII
WRITE ( NDSOA,* ) 'QKK:', QKK(1:NSEA)
+#endif
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 7 ) THEN
+ WRITE ( NDSOG ) SKEW(1:NSEA)
+#ifdef W3_ASCII
+ WRITE ( NDSOA,* ) 'SKW:', SKEW(1:NSEA)
+#endif
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 8 ) THEN
+ WRITE ( NDSOG ) EMBIA1(1:NSEA)
+#ifdef W3_ASCII
+ WRITE ( NDSOA,* ) 'EMB:', EMBIA1(1:NSEA)
+#endif
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 9 ) THEN
+ WRITE ( NDSOG ) EMBIA2(1:NSEA)
+#ifdef W3_ASCII
+ WRITE ( NDSOA,* ) 'EMC:', EMBIA2(1:NSEA)
#endif
!
! Section 9)
@@ -3967,6 +4001,12 @@ SUBROUTINE W3IOGO ( INXOUT, NDSOG, IOTST, IMOD &
READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) QP(1:NSEA)
ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 6 ) THEN
READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) QKK(1:NSEA)
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 7 ) THEN
+ READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) SKEW(1:NSEA)
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 8 ) THEN
+ READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) EMBIA1(1:NSEA)
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 9 ) THEN
+ READ (NDSOG,END=801,ERR=802,IOSTAT=IERR) EMBIA2(1:NSEA)
!
! Section 9)
!
@@ -4610,4 +4650,512 @@ SUBROUTINE CALC_WBT (A)
!/
END SUBROUTINE CALC_WBT
!/ ------------------------------------------------------------------- /
+ !/
+ !>
+ !> @brief Computation of second order harmonics and
+ !> relevant tables for the altimeter corrections
+ !>
+ !> @param[in] NKHF Extended number of frequencies.
+ !> @param[out] FAC0 2nd order coef correction.
+ !> @param[out] FAC1 2nd order coef correction.
+ !> @param[out] FAC2 2nd order coef correction.
+ !> @param[out] FAC3 2nd order coef correction.
+ !>
+ !> @author P. Janssen @date 29-Mar-2024
+ !>
+ SUBROUTINE SECONDHH(NKHF,FAC0,FAC1,FAC2,FAC3)
+!----------------------------------------------------------------
+
+!**** *SECONDHH* - COMPUTATION OF SECOND ORDER HARMONICS AND
+! RELEVANT TABLES FOR THE ALTIMETER CORRECTIONS.
+
+! P.A.E.M. JANSSEN
+
+! PURPOSE.
+! ---------
+
+! COMPUTE SECOND HARMONICS
+
+!** INTERFACE.
+! ----------
+
+! *CALL* *SECONDHH*
+
+! METHOD.
+! -------
+
+! SEE REFERENCE.
+
+! EXTERNALS.
+! ----------
+
+! VMIN_D
+! VPLUS_D
+
+! REFERENCES.
+! -----------
+
+! V E ZAKHAROV(1967)
+
+!-------------------------------------------------------------------
+
+!-------------------------------------------------------------------
+USE CONSTANTS, ONLY: GRAV, TPI
+USE W3GDATMD, ONLY: NK, NTH, XFR, SIG, TH, DTH, ECOS, ESIN
+ IMPLICIT NONE
+ ! REAL(KIND=4) :: VMIN_D,VPLUS_D
+
+
+
+ INTEGER, INTENT(IN) :: NKHF
+ REAL(KIND=4), DIMENSION(NTH,NTH,NKHF,NKHF), INTENT(OUT) :: FAC0, FAC1, FAC2, FAC3
+ REAL(KIND=4), PARAMETER :: FRATIO = 1.1
+
+
+ INTEGER :: M, K1, M1, K2, M2
+
+ REAL(KIND=4), PARAMETER :: DEL1=1.0E-8
+ REAL(KIND=4), PARAMETER :: ZCONST = 0.0281349
+
+ !REAL(KIND=4) :: VMIN_D, VPLUS_D
+ REAL(KIND=4) :: CO1
+ REAL(KIND=4) :: XK1, XK1SQ, XK2, XK2SQ, XK3
+ REAL(KIND=4) :: COSDIFF
+ REAL(KIND=4) :: X12, X13, X32, OM1, OM2, OM3, F1, F2, F3
+ REAL(KIND=4) :: VM, VP
+ REAL(KIND=4) :: DELOM1, DELOM2
+ REAL(KIND=4) :: DELOM321, DELOM312
+ REAL(KIND=4) :: C22, S22
+
+ REAL(KIND=4), DIMENSION(NTH,NTH,NKHF,NKHF) :: B
+ REAL(KIND=4), DIMENSION(:), ALLOCATABLE:: FAK, SIGHF, DFIMHF
+
+
+
+
+!-----------------------------------------------------------------------
+
+
+
+
+!* 1. INITIALISE RELEVANT QUANTITIES.
+
+ ALLOCATE(FAK(NKHF))
+ ALLOCATE(SIGHF(NKHF))
+ ALLOCATE(DFIMHF(NKHF))
+
+ SIGHF(1) = SIG(1)
+ DO M=2,NKHF
+ SIGHF(M) = XFR*SIGHF(M-1)
+ ENDDO
+
+ DO M=1,NKHF
+ FAK(M) = (SIGHF(M))**2/GRAV
+ ENDDO
+
+ CO1 = 0.5*(XFR-1.)*DTH
+ DFIMHF(1) = CO1*SIGHF(1)
+ DO M=2,NKHF-1
+ DFIMHF(M)=CO1*(SIGHF(M)+SIGHF(M-1))
+ ENDDO
+ DFIMHF(NKHF)=CO1*SIGHF(NKHF-1)
+
+ DO M2=1,NKHF
+ XK2 = FAK(M2)
+ XK2SQ = FAK(M2)**2
+ DO M1=1,NKHF
+ XK1 = FAK(M1)
+ XK1SQ = FAK(M1)**2
+ DO K1=1,NTH
+ DO K2=1,NTH
+ COSDIFF = COS(TH(K1)-TH(K2))
+ X12 = XK1*XK2*COSDIFF
+ XK3 = XK1SQ + XK2SQ +2.0*X12 +DEL1
+ XK3 = SQRT(XK3)
+ X13 = XK1SQ+X12
+ X32 = X12+XK2SQ
+ OM1 = SQRT(GRAV*XK1)
+ OM2 = SQRT(GRAV*XK2)
+ OM3 = SQRT(GRAV*XK3)
+ F1 = SQRT(XK1/(2.0*OM1))
+ F2 = SQRT(XK2/(2.0*OM2))
+ F3 = SQRT(XK3/(2.0*OM3))
+ VM = TPI*VMIN_D(XK3,XK1,XK2,X13,X32,X12,OM3,OM1,OM2)
+ VP = TPI*VPLUS_D(-XK3,XK1,XK2,-X13,-X32,X12,OM3,OM1,OM2)
+ DELOM1 = OM3-OM1-OM2+DEL1
+ DELOM2 = OM3+OM1+OM2+DEL1
+ FAC0(K1,K2,M1,M2) = -F3/(F1*F2)*(VM/(DELOM1)+ &
+ & VP/(DELOM2))
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDDO
+
+ DO M2=1,NKHF
+ XK2 = FAK(M2)
+ XK2SQ = FAK(M2)**2
+ DO M1=1,NKHF
+ XK1 = FAK(M1)
+ XK1SQ = FAK(M1)**2
+ DO K1=1,NTH
+ DO K2=1,NTH
+ COSDIFF = COS(TH(K1)-TH(K2))
+ X12 = XK1*XK2*COSDIFF
+ XK3 = XK1SQ + XK2SQ - 2.*X12 + DEL1
+ XK3 = SQRT(XK3)
+ X13 = XK1SQ-X12
+ X32 = X12-XK2SQ
+ OM1 = SQRT(GRAV*XK1)
+ OM2 = SQRT(GRAV*XK2)
+ OM3 = SQRT(GRAV*XK3)+DEL1
+ F1 = SQRT(XK1/(2.0*OM1))
+ F2 = SQRT(XK2/(2.0*OM2))
+ F3 = SQRT(ABS(XK3)/(2.0*OM3))
+ VM = TPI*VMIN_D(XK1,XK3,XK2,X13,X12,X32,OM1,OM3,OM2)
+ VP = TPI*VMIN_D(XK2,-XK3,XK1,-X32,X12,-X13,OM2,OM3,OM1)
+ DELOM321 = OM3+OM2-OM1+DEL1
+ DELOM312 = OM3+OM1-OM2+DEL1
+ B(K1,K2,M1,M2) = -F3/(F1*F2)*(VM/(DELOM321)+ &
+ & VP/(DELOM312))
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDDO
+
+ DO M2=1,NKHF
+ XK2SQ = FAK(M2)**2
+ DO M1=1,NKHF
+ XK1SQ = FAK(M1)**2
+ DO K2=1,NTH
+ DO K1=1,NTH
+ C22 = FAC0(K1,K2,M1,M2)+B(K1,K2,M1,M2)
+ S22 = B(K1,K2,M1,M2)-FAC0(K1,K2,M1,M2)
+ FAC1(K1,K2,M1,M2) = &
+ & (XK1SQ*ECOS(K1)**2 + XK2SQ*ECOS(K2)**2)*C22 &
+ & -FAK(M1)*FAK(M2)*ECOS(K1)*ECOS(K2)*S22
+ FAC2(K1,K2,M1,M2) = &
+ & (XK1SQ*ESIN(K1)**2 + XK2SQ*ESIN(K2)**2)*C22 &
+ & -FAK(M1)*FAK(M2)*ESIN(K1)*ESIN(K2)*S22
+ FAC3(K1,K2,M1,M2) = &
+ & (XK1SQ*ESIN(K1)*ECOS(K1) + &
+ & XK2SQ*ESIN(K2)*ECOS(K2))*C22 &
+ & -FAK(M1)*FAK(M2)*ECOS(K1)*ESIN(K2)*S22
+ FAC0(K1,K2,M1,M2) = C22
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDDO
+
+
+ CONTAINS
+
+!-----------------------------------------------------------------------
+
+ REAL(KIND=4) FUNCTION VMIN_D(XI,XJ,XK,XIJ,XIK,XJK,XOI,XOJ,XOK)
+
+! PETER JANSSEN
+
+! PURPOSE.
+! --------
+
+! GIVES NONLINEAR TRANSFER COEFFICIENT FOR THREE
+! WAVE INTERACTIONS OF DEEP-WATER WAVES IN THE
+! IDEAL CASE OF NO CURRENT. (CF.ZAKHAROV)
+
+! INTERFACE.
+! ----------
+! *VMIN_D(XI,XJ,XK)*
+! *XI* - WAVE NUMBER
+! *XJ* - WAVE NUMBER
+! *XK* - WAVE NUMBER
+! METHOD.
+! -------
+! NONE
+
+! EXTERNALS.
+! ----------
+! NONE.
+
+
+!*** 1. DETERMINE NONLINEAR TRANSFER.
+! --------------------------------
+ IMPLICIT NONE
+ REAL, INTENT(IN) :: XI, XJ, XK, XIJ, XIK, XJK, XOI, XOJ, XOK
+ REAL :: RI, RJ, RK, OI, OJ, OK, SQIJK, SQIKJ, SQJKI
+
+ RI=ABS(XI)+DEL1
+ RJ=ABS(XJ)+DEL1
+ RK=ABS(XK)+DEL1
+ OI=XOI+DEL1
+ OJ=XOJ+DEL1
+ OK=XOK+DEL1
+ SQIJK=SQRT(OI*OJ*RK/(OK*RI*RJ))
+ SQIKJ=SQRT(OI*OK*RJ/(OJ*RI*RK))
+ SQJKI=SQRT(OJ*OK*RI/(OI*RJ*RK))
+ VMIN_D=ZCONST*( (XIJ-RI*RJ)*SQIJK + (XIK-RI*RK)*SQIKJ &
+ & + (XJK+RJ*RK)*SQJKI )
+
+ END FUNCTION VMIN_D
+
+!-----------------------------------------------------------------------
+
+ REAL(KIND=4) FUNCTION VPLUS_D(XI,XJ,XK,XIJ,XIK,XJK,XOI,XOJ,XOK)
+
+!*** *VPLUS_D* DETERMINES THE NONLINEAR TRANSFER COEFFICIENT FOR THREE
+! WAVE INTERACTIONS OF DEEP-WATER WAVES.
+
+! PETER JANSSEN
+
+! PURPOSE.
+! --------
+
+! GIVES NONLINEAR TRANSFER COEFFICIENT FOR THREE
+! WAVE INTERACTIONS OF GRAVITY-CAPILLARY WAVES IN THE
+! IDEAL CASE OF NO CURRENT. (CF.ZAKHAROV)
+
+! INTERFACE.
+! ----------
+! *VPLUS_D(XI,XJ,XK)*
+! *XI* - WAVE NUMBER
+! *XJ* - WAVE NUMBER
+! *XK* - WAVE NUMBER
+! METHOD.
+! -------
+! NONE
+
+! EXTERNALS.
+! ----------
+! NONE.
+
+
+
+!*** 1. DETERMINE NONLINEAR TRANSFER.
+! --------------------------------
+
+ IMPLICIT NONE
+ REAL, INTENT(IN) :: XI, XJ, XK, XIJ, XIK, XJK, XOI, XOJ, XOK
+ REAL :: RI, RJ, RK, OI, OJ, OK, SQIJK, SQIKJ, SQJKI
+
+ RI=ABS(XI)+DEL1
+ RJ=ABS(XJ)+DEL1
+ RK=ABS(XK)+DEL1
+ OI=XOI+DEL1
+ OJ=XOJ+DEL1
+ OK=XOK+DEL1
+ SQIJK=SQRT(OI*OJ*RK/(OK*RI*RJ))
+ SQIKJ=SQRT(OI*OK*RJ/(OJ*RI*RK))
+ SQJKI=SQRT(OJ*OK*RI/(OI*RJ*RK))
+ VPLUS_D=ZCONST*( (XIJ+RI*RJ)*SQIJK + (XIK+RI*RK)*SQIKJ &
+ & + (XJK+RJ*RK)*SQJKI )
+
+ END FUNCTION VPLUS_D
+! -----------------------------------------------------------------
+
+ END SUBROUTINE SECONDHH
+ !/ ------------------------------------------------------------------- /
+ !/
+ !>
+ !> @brief Determines skewness paramters in order to obtain
+ !> correction on altimeter wave height
+ !>
+ !> @details Evaluate deviations from gaussianity following the work
+ !> of Srokosz and Longuet-Higgins. For second order
+ !> corrections to surface elevation, the approach of
+ !> Zaharov has been used.
+ !>
+ !> @param[in] NKHF Extended number of frequencies.
+ !> @param[out] FAC0 2nd order coef correction.
+ !> @param[out] FAC1 2nd order coef correction.
+ !> @param[out] FAC2 2nd order coef correction.
+ !> @param[out] FAC3 2nd order coef correction.
+ !>
+ !> @author P. Janssen @date 29-Mar-2024
+ !>
+ SUBROUTINE SKEWNESS(A)
+
+!--------------------------------------------------------------------
+
+!*****SKEWNESS** COMPUTES PARAMETERS OF THE NEARLY-GAUSSIAN
+! DISTRIBUTION OF OCEAN WAVES AT A FIXED GRID POINT.
+
+! P.JANSSEN JULY 1997
+
+! PURPOSE
+! -------
+! DETERMINES SKEWNESS PARAMETERS IN ORDER TO OBTAIN
+! CORRECTION ON ALTIMETER WAVE HEIGHT.
+
+! INTERFACE
+! ---------
+! *CALL* *SKEWNESS(IU06,F1,NCOLL,XKAPPA1,DELH_ALT)*
+
+
+
+! METHOD
+! ------
+! EVALUATE DEVIATIONS FROM GAUSSIANITY FOLLOWING THE WORK
+! OF SROKOSZ AND LONGUET-HIGGINS. FOR SECOND ORDER
+! CORRECTIONS TO SURFACE ELEVATION THE APPROACH OF
+! ZAKHAROV HAS BEEN USED.
+
+! EXTERNALS
+! ---------
+! NONE
+
+! REFERENCES
+! ----------
+! M.A. SROKOSZ, J.G.R.,91,995-1006(1986)
+! V.E. ZAKHAROV, HAMILTONIAN APPROACH(1967)
+!--------------------------------------------------------------------
+
+
+
+!--------------------------------------------------------------------
+! *TH* REAL DIRECTIONS IN RADIANS.
+USE CONSTANTS, ONLY: GRAV, TPI, TPIINV
+USE W3GDATMD, ONLY: NK, NTH, XFR, SIG, DTH, ECOS, ESIN, NSEAL
+USE W3PARALL, ONLY: INIT_GET_ISEA
+USE W3ADATMD, ONLY: CG, SKEW, EMBIA1, EMBIA2
+
+
+ IMPLICIT NONE
+
+ REAL, INTENT(IN) :: A(NTH,NK,0:NSEAL)
+
+ INTEGER :: NKHF
+ REAL(KIND=4), DIMENSION(:,:,:,:) , ALLOCATABLE:: FAC0,FAC1,FAC2,FAC3
+
+ INTEGER :: M, K, M1, K1, M2, K2, I, J
+ INTEGER :: MSTART, JSEA
+
+ REAL(KIND=4) :: CONX, DELTA
+ REAL(KIND=4) :: FH, DELF, XK1
+ REAL(KIND=4) :: XPI, XPJ, XPK, XN, XFAC, CO1
+ REAL(KIND=4), DIMENSION(:,:), ALLOCATABLE :: F2
+ REAL(KIND=4), DIMENSION(0:3,0:2,0:2) :: XMU, XLAMBDA
+ REAL(KIND=4), DIMENSION(:) , ALLOCATABLE:: SIGHF, DFIMHF, FAK
+
+! ----------------------------------------------------------------------
+
+ NKHF=NK+13 ! same offset as in ECWAM
+
+ ALLOCATE(FAC0(NTH,NTH,NKHF,NKHF))
+ ALLOCATE(FAC1(NTH,NTH,NKHF,NKHF))
+ ALLOCATE(FAC2(NTH,NTH,NKHF,NKHF))
+ ALLOCATE(FAC3(NTH,NTH,NKHF,NKHF))
+
+ CALL SECONDHH(NKHF,FAC0,FAC1,FAC2,FAC3)
+
+ ALLOCATE(F2(NTH,NKHF))
+ ALLOCATE(SIGHF(NKHF), DFIMHF(NKHF), FAK(NKHF))
+
+! 1. COMPUTATION OF FREQUENCY-DIRECTION INCREMENT
+! -----------------------------------------------
+
+ MSTART = 1
+
+
+#ifdef W3_OMPG
+ !$OMP PARALLEL DO PRIVATE(JSEA)
+#endif
+ DO JSEA=1, NSEAL
+ XMU(:,:,:) = 0.0
+ DO K=1,NTH
+ DO M=1,NK
+ CONX = TPIINV / SIG(M) * CG(M,JSEA)
+ F2(K,M)=A(K,M,JSEA)/ CONX
+ END DO
+ END DO
+
+ SIGHF(1) = SIG(1)
+ DO M=2,NKHF
+ SIGHF(M) = XFR*SIGHF(M-1)
+ ENDDO
+
+ CO1 = 0.5*(XFR-1.)*DTH*TPIINV
+ DFIMHF(1) = CO1*SIGHF(1) ! this is DF*DTH
+ DO M=2,NKHF-1
+ DFIMHF(M)=CO1*(SIGHF(M)+SIGHF(M-1))
+ ENDDO
+ DFIMHF(NKHF)=CO1*SIGHF(NKHF-1)
+
+ DO M=1,NKHF
+ FAK(M) = (SIGHF(M))**2/GRAV
+ ENDDO
+
+! Deals with the tail ...
+ DO M=NK+1,NKHF
+ FH=(SIGHF(NK)/SIGHF(M))**5
+ DO K=1,NTH
+ F2(K,M)=F2(K,NK)*FH
+ ENDDO
+ ENDDO
+
+! 2. COMPUTATION OF THE SKEWNESS COEFFICIENTS
+! --------------------------------------------
+
+ DO M1=MSTART,NKHF
+ DO M2=MSTART,NKHF
+ DO K1=1,NTH
+ DO K2=1,NTH
+ DELF = DFIMHF(M1)*DFIMHF(M2)*F2( K1,M1)*F2(K2,M2)
+ XMU(3,0,0) = XMU(3,0,0)+3.0*FAC0(K1,K2,M1,M2)*DELF
+ XMU(1,2,0) = XMU(1,2,0)+FAC1(K1,K2,M1,M2)*DELF
+ XMU(1,0,2) = XMU(1,0,2)+FAC2(K1,K2,M1,M2)*DELF
+ XMU(1,1,1) = XMU(1,1,1)+FAC3(K1,K2,M1,M2)*DELF
+ ENDDO
+ ENDDO
+ ENDDO
+ ENDDO
+
+ DO K1=1,NTH
+ DO M1=MSTART,NKHF
+ XK1 = FAK(M1)**2
+ DELF = DFIMHF(M1)*F2(K1,M1)
+ XMU(2,0,0) = XMU(2,0,0) + DELF
+ XMU(0,2,0) = XMU(0,2,0) + XK1*ECOS(K1)**2*DELF
+ XMU(0,0,2) = XMU(0,0,2) + XK1*ESIN(K1)**2*DELF
+ XMU(0,1,1) = XMU(0,1,1) + XK1*ECOS(K1)*ESIN(K1)*DELF
+ ENDDO
+ ENDDO
+
+
+! 3. COMPUTATION OF THE NORMALISED SKEWNESS COEFFICIENTS
+! ------------------------------------------------------
+
+ DO I=0,3
+ XPI = 0.5*FLOAT(I)
+ DO J=0,2
+ XPJ = 0.5*FLOAT(J)
+ DO K=0,2
+ XPK = 0.5*FLOAT(K)
+ XN = XMU(2,0,0)**XPI*XMU(0,2,0)**XPJ*XMU(0,0,2)**XPK ! denom in Srokosz eq. 11
+ IF (XN .NE. 0) THEN
+ XLAMBDA(I,J,K) = XMU(I,J,K)/XN
+ ELSE
+ XLAMBDA(I,J,K) = 0
+ END IF
+ END DO
+ END DO
+ END DO
+ IF ( XMU(2,0,0) .GT. 1.E-7 ) THEN
+ SKEW(JSEA)=XLAMBDA(3,0,0)
+ DELTA = ( XLAMBDA(1,2,0) + XLAMBDA(1,0,2) &
+ - 2.0*XLAMBDA(0,1,1)*XLAMBDA(1,1,1) )/ &
+ (1.0 - XLAMBDA(0,1,1)**2) ! this is called gamma eq. 20
+ EMBIA1(JSEA)=-0.125*DELTA ! EM Bias coefficient
+ EMBIA2(JSEA)=-0.125*XLAMBDA(3,0,0)/3.0 ! tracker bias (least squares only)
+ END IF
+ END DO ! end of loop on JSEA
+ !
+#ifdef W3_OMPG
+ !$OMP END PARALLEL DO
+#endif
+
+ DEALLOCATE(FAC0,FAC1,FAC2,FAC3)
+ DEALLOCATE(F2,SIGHF,DFIMHF,FAK)
+
+
+ END SUBROUTINE SKEWNESS
+
END MODULE W3IOGOMD
diff --git a/model/src/w3iogrmd.F90 b/model/src/w3iogrmd.F90
index 0c3e3ec94..ab133962d 100644
--- a/model/src/w3iogrmd.F90
+++ b/model/src/w3iogrmd.F90
@@ -1511,7 +1511,7 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
SSDSPBK, SSDSBINT, FFXPM, FFXFM, FFXFA, &
SSDSHCK, &
IKTAB, DCKI, QBI, SATINDICES, SATWEIGHTS, &
- DIKCUMUL, CUMULW, SINTAILPAR
+ DIKCUMUL, CUMULW, SINTAILPAR, CAPCHNK
#ifdef W3_ASCII
WRITE (NDSA,*) &
'ZZWND, AALPHA, ZZ0MAX, BBETA, SSINTHP, ZZALP, &
@@ -1524,7 +1524,7 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
SSDSPBK, SSDSBINT, FFXPM, FFXFM, FFXFA, &
SSDSHCK, &
IKTAB, DCKI, QBI, SATINDICES, SATWEIGHTS, &
- DIKCUMUL, CUMULW, SINTAILPAR:', &
+ DIKCUMUL, CUMULW, SINTAILPAR, CAPCHNK:', &
ZZWND, AALPHA, ZZ0MAX, BBETA, SSINTHP, ZZALP, &
TTAUWSHELTER, SSWELLFPAR, SSWELLF, SSINBR, &
ZZ0RAT, SSDSC, &
@@ -1535,7 +1535,7 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
SSDSPBK, SSDSBINT, FFXPM, FFXFM, FFXFA, &
SSDSHCK, &
IKTAB, DCKI, QBI, SATINDICES, SATWEIGHTS, &
- DIKCUMUL, CUMULW, SINTAILPAR
+ DIKCUMUL, CUMULW, SINTAILPAR, CAPCHNK
#endif
IF (SINTAILPAR(1).GT.0.5) THEN
WRITE (NDSM) DELUST, DELTAIL, DELTAUW, DELU, DELALP, &
@@ -1561,7 +1561,7 @@ SUBROUTINE W3IOGR ( INXOUT, NDSM, IMOD, FEXT &
SSDSPBK, SSDSBINT, FFXPM, FFXFM, FFXFA, &
SSDSHCK, &
IKTAB, DCKI, QBI, SATINDICES, SATWEIGHTS, &
- DIKCUMUL, CUMULW, SINTAILPAR
+ DIKCUMUL, CUMULW, SINTAILPAR, CAPCHNK
IF (SINTAILPAR(1).GT.0.5) THEN
CALL INSIN4(.FALSE.)
READ (NDSM,END=801,ERR=802,IOSTAT=IERR) &
diff --git a/model/src/w3iopomd.F90 b/model/src/w3iopomd.F90
index 0c15ea8c6..bbdfda34c 100644
--- a/model/src/w3iopomd.F90
+++ b/model/src/w3iopomd.F90
@@ -5,6 +5,7 @@
!>
#include "w3macros.h"
+#define nf90_err(ncerr) nf90_err_check(ncerr, __LINE__)
!/ ------------------------------------------------------------------- /
!>
!> @brief Process point output.
@@ -65,7 +66,7 @@ MODULE W3IOPOMD
! Name Type Scope Description
! ----------------------------------------------------------------
! VEROPT C*10 Private Point output file version number.
- ! IDSTR C*32 Private Point output file ID string.
+ ! IDSTR C*31 Private Point output file ID string.
! ----------------------------------------------------------------
!
! 3. Subroutines and functions :
@@ -118,6 +119,96 @@ MODULE W3IOPOMD
CHARACTER(LEN=10), PARAMETER, PRIVATE :: VEROPT = '2021-04-06'
CHARACTER(LEN=31), PARAMETER, PRIVATE :: &
IDSTR = 'WAVEWATCH III POINT OUTPUT FILE'
+
+ !> Dimension name for the netCDF point output file, for NOPTS, the
+ !> Number of Output Points.
+ character(*), parameter, private :: DNAME_NOPTS = 'NOPTS'
+
+ !> Dimension name for the netCDF point output file, for NSPEC.
+ character(*), parameter, private :: DNAME_NSPEC = 'NSPEC'
+
+ !> Dimension name for the netCDF point output file, for VSIZE. This
+ !> is for the vector size for points, which is 2.
+ character(*), parameter, private :: DNAME_VSIZE = 'VSIZE'
+
+ !> Dimension name for the netCDF point output file, for
+ !> NAMELEN. This is the length of the PTNME strings, which contains
+ !> the names of the points.
+ character(*), parameter, private :: DNAME_NAMELEN = 'NAMELEN'
+
+ !> Dimension name for the netCDF point output file, for GRDIDLEN,
+ !> this is the length of the GRDID character array.
+ character(*), parameter, private :: DNAME_GRDIDLEN = 'GRDIDLEN'
+
+ !> Dimension name for the netCDF point output file, for TIME
+ character(*), parameter, private :: DNAME_TIME = 'TIME'
+
+ !> Dimension name for the netCDF point output file, for WW3TIME
+ character(*), parameter, private :: DNAME_WW3TIME = 'WW3TIME'
+
+ !> Variable name for the netCDF point output file, for NK.
+ character(*), parameter, private :: VNAME_NK = 'NK'
+
+ !> Variable name for the netCDF point output file, for MTH.
+ character(*), parameter, private :: VNAME_NTH = 'NTH'
+
+ !> Variable name for the netCDF point output file, for PTLOC.
+ character(*), parameter, private :: VNAME_PTLOC = 'PTLOC'
+
+ !> Variable name for the netCDF point output file, for PTNME.
+ character(*), parameter, private :: VNAME_PTNME = 'PTNME'
+
+ !> Variable name for the netCDF point output file, for TIME.
+ character(*), parameter, private :: VNAME_TIME = 'TIME'
+
+ !> Variable name for the netCDF point output file, for WW3TIME.
+ character(*), parameter, private :: VNAME_WW3TIME = 'WW3TIME'
+
+ !> Variable name for the netCDF point output file, for DPO.
+ character(*), parameter, private :: VNAME_DPO = 'DPO'
+
+ !> Variable name for the netCDF point output file, for WAO.
+ character(*), parameter, private :: VNAME_WAO = 'WAO'
+
+ !> Variable name for the netCDF point output file, for WDO.
+ character(*), parameter, private :: VNAME_WDO = 'WDO'
+
+ !> Variable name for the netCDF point output file, for TAUAO.
+ character(*), parameter, private :: VNAME_TAUAO = 'TAUAO'
+
+ !> Variable name for the netCDF point output file, for TAUDO.
+ character(*), parameter, private :: VNAME_TAUDO = 'TAUDO'
+
+ !> Variable name for the netCDF point output file, for DAIRO.
+ character(*), parameter, private :: VNAME_DAIRO = 'DAIRO'
+
+ !> Variable name for the netCDF point output file, for ZET_SETO.
+ character(*), parameter, private :: VNAME_ZET_SETO = 'ZET_SETO'
+
+ !> Variable name for the netCDF point output file, for ASO.
+ character(*), parameter, private :: VNAME_ASO = 'ASO'
+
+ !> Variable name for the netCDF point output file, for CAO.
+ character(*), parameter, private :: VNAME_CAO = 'CAO'
+
+ !> Variable name for the netCDF point output file, for CDO.
+ character(*), parameter, private :: VNAME_CDO = 'CDO'
+
+ !> Variable name for the netCDF point output file, for ICEO.
+ character(*), parameter, private :: VNAME_ICEO = 'ICEO'
+
+ !> Variable name for the netCDF point output file, for ICEHO.
+ character(*), parameter, private :: VNAME_ICEHO = 'ICEHO'
+
+ !> Variable name for the netCDF point output file, for ICEFO.
+ character(*), parameter, private :: VNAME_ICEFO = 'ICEFO'
+
+ !> Variable name for the netCDF point output file, for GRDID.
+ character(*), parameter, private :: VNAME_GRDID = 'GRDID'
+
+ !> Variable name for the netCDF point output file, for SPCO.
+ character(*), parameter, private :: VNAME_SPCO = 'SPCO'
+
!/
CONTAINS
!/ ------------------------------------------------------------------- /
@@ -1024,6 +1115,717 @@ SUBROUTINE W3IOPE ( A )
!/
END SUBROUTINE W3IOPE
+#ifdef W3_BIN2NC
+ !> Handle netCDF return code.
+ !>
+ !> @param errcode NetCDF error code. 0 for no error.
+ !>
+ !> @author Edward Hartnett @date 1-Nov-2023
+ !>
+ integer function nf90_err_check(errcode, ILINE)
+ USE NetCDF
+ USE W3ODATMD, ONLY: NDSE
+ implicit none
+ integer, intent(in) :: errcode, ILINE
+
+ nf90_err_check = errcode
+ if(errcode /= nf90_noerr) then
+ WRITE(NDSE,*) ' *** WAVEWATCH III ERROR IN W3IOPO :'
+ WRITE(NDSE,*) ' LINE NUMBER ', ILINE
+ WRITE(NDSE,*) ' NETCDF ERROR MESSAGE: '
+ WRITE(NDSE,*) 'Error: ', trim(nf90_strerror(errcode))
+ return
+ endif
+ end function nf90_err_check
+
+ !> Read point output in netCDF format.
+ !>
+ !> @param[out] IOTST Test indictor for reading.
+ !> @param[in] IMOD_IN Model number for W3GDAT etc.
+ !> @param[in] filename Name of file to read.
+ !> @param[inout] ncerr Error code, 0 for success, netCDF error code
+ !> otherwise.
+ !>
+ !> @author Edward Hartnett @date 1-Nov-2023
+ !>
+ SUBROUTINE W3IOPON_READ(IOTST, IMOD_IN, filename, ncerr)
+ USE NetCDF
+ USE W3ODATMD, ONLY: W3DMO2
+ USE W3WDATMD, ONLY: TIME
+ USE W3GDATMD, ONLY: NTH, NK, NSPEC, FILEXT
+ USE W3ODATMD, ONLY: NDST, NDSE, IPASS => IPASS2, NOPTS, IPTINT, &
+ IL, IW, II, PTLOC, PTIFAC, DPO, WAO, WDO, &
+ ASO, CAO, CDO, SPCO, PTNME, O2INIT, FNMPRE, &
+ GRDID, ICEO, ICEHO, ICEFO, W3DMO2
+ USE W3SERVMD, ONLY: EXTCDE
+#ifdef W3_FLX5
+ USE W3ODATMD, ONLY: TAUAO, TAUDO, DAIRO
+#endif
+#ifdef W3_SETUP
+ USE W3ODATMD, ONLY: ZET_SETO
+#endif
+ IMPLICIT NONE
+
+ INTEGER, INTENT(OUT) :: IOTST
+ INTEGER, INTENT(IN), OPTIONAL :: IMOD_IN
+ character(*), intent(in) :: filename
+ integer, intent(inout) :: ncerr
+ INTEGER :: IGRD,MK,MTH
+ integer :: fh
+ integer :: d_nopts, d_nspec, d_vsize, d_namelen, d_grdidlen, d_time, d_ww3time
+ integer :: d_nopts_len, d_nspec_len, d_vsize_len, d_namelen_len, d_grdidlen_len, d_time_len, d_ww3time_len
+ integer :: v_idtst, v_vertst, v_nk, v_nth, v_ptloc, v_ptnme, v_time, v_ww3time
+ integer :: v_dpo, v_wao, v_wdo
+#ifdef W3_FLX5
+ integer :: v_tauao,v_taudo, v_dairo
+#endif
+#ifdef W3_SETUP
+ integer :: v_zet_seto
+#endif
+ integer :: v_aso, v_cao, v_cdo, v_iceo
+ integer :: v_iceho, v_icefo, v_grdid, v_spco
+ integer :: v_title_len, v_version_len
+ CHARACTER(LEN=31) :: IDTST
+ CHARACTER(LEN=10) :: VERTST
+
+ IOTST = 0
+
+ IF (PRESENT(IMOD_IN)) THEN
+ IGRD = IMOD_IN
+ ELSE
+ IGRD = 1
+ END IF
+
+ ! Open the netCDF file.
+ ncerr = nf90_open(filename, NF90_NOWRITE, fh)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Read and check the version:
+ ncerr = nf90_inquire_attribute(fh, NF90_GLOBAL, 'title', len = v_title_len)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_att(fh, NF90_GLOBAL, 'title', IDTST)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_attribute(fh, NF90_GLOBAL, 'version', len = v_version_len)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_att(fh, NF90_GLOBAL, 'version', VERTST)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ IF ( IDTST .NE. IDSTR ) THEN
+ WRITE (NDSE,902) IDTST, IDSTR
+ CALL EXTCDE ( 10 )
+ END IF
+ IF ( VERTST .NE. VEROPT ) THEN
+ WRITE (NDSE,903) VERTST, VEROPT
+ CALL EXTCDE ( 11 )
+ END IF
+
+ ! Read the dimension information for NOPTS.
+ ncerr = nf90_inq_dimid(fh, DNAME_NOPTS, d_nopts)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_dimension(fh, d_nopts, len = d_nopts_len)
+ if (nf90_err(ncerr) .ne. 0) return
+ NOPTS=d_nopts_len
+
+ ! Read the dimension information for NSPEC.
+ ncerr = nf90_inq_dimid(fh, DNAME_NSPEC, d_nspec)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_dimension(fh, d_nspec, len = d_nspec_len)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Read the dimension information for VSIZE.
+ ncerr = nf90_inq_dimid(fh, DNAME_VSIZE, d_vsize)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_dimension(fh, d_vsize, len = d_vsize_len)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Read the dimension information for NAMELEN.
+ ncerr = nf90_inq_dimid(fh, DNAME_NAMELEN, d_namelen)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_dimension(fh, d_namelen, len = d_namelen_len)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Read the dimension information for GRDIDLEN.
+ ncerr = nf90_inq_dimid(fh, DNAME_GRDIDLEN, d_grdidlen)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_dimension(fh, d_grdidlen, len = d_grdidlen_len)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Read the dimention information from time
+ ncerr = nf90_inq_dimid(fh, DNAME_TIME, d_time)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inquire_dimension(fh, d_time, len = d_time_len)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ IF ( IPASS .LE. d_time_len ) THEN
+
+ IF ( IPASS.EQ.1 ) THEN
+
+ ! Read scalar variables.
+ ncerr = nf90_inq_varid(fh, VNAME_NK, v_nk)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_nk, MK)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_NTH, v_nth)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_nth, MTH)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ !read in written variables NK, NTH as MK and MTH
+ !and ensure they match
+ IF (NK.NE.MK .OR. NTH.NE.MTH) THEN
+ WRITE (NDSE,904) MK, MTH, NK, NTH
+ CALL EXTCDE ( 12 )
+ END IF
+
+ ! Allocate variables:
+ IF ( .NOT. O2INIT ) &
+ CALL W3DMO2 ( IGRD, NDSE, NDST, NOPTS )
+
+ ! Read vars with nopts as a dimension.
+ ncerr = nf90_inq_varid(fh, VNAME_PTLOC, v_ptloc)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_ptloc, PTLOC, start = (/ 1, 1/), &
+ count = (/ d_vsize_len, d_nopts_len /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_PTNME, v_ptnme)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_ptnme, PTNME)
+ if (nf90_err(ncerr) .ne. 0) return
+ END IF
+
+ !Variables read based on time (IPASS):
+
+ ncerr = nf90_inq_varid(fh, VNAME_WW3TIME, v_ww3time)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_ww3time, TIME, start = (/ 1, IPASS/), &
+ count = (/ d_vsize_len, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! set IW, II and IL to 0,
+ ! These values are set to 0 in binary file and have been removed
+ ! from netcdf file. Possible can be completely removed.
+ IW = 0
+ II = 0
+ IL = 0
+
+ ncerr = nf90_inq_varid(fh, VNAME_DPO, v_dpo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_dpo, DPO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_WAO, v_wao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_wao, WAO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_WDO, v_wdo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_wdo, WDO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+#ifdef W3_FLX5
+ ncerr = nf90_inq_varid(fh, VNAME_TAUAO, v_tauao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_tauao, TAUAO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_TAUDO, v_taudo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_taudo, TAUDO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_DAIRO, v_dairo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_dairo, DAIRO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+#ifdef W3_SETUP
+ ncerr = nf90_inq_varid(fh, ZET_SETO, v_zet_seto)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_zet_seto, ZET_SETO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+ ncerr = nf90_inq_varid(fh, VNAME_ASO, v_aso)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_aso, ASO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_CAO, v_cao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_cao, CAO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_CDO, v_cdo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_cdo, CDO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_ICEO, v_iceo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_iceo, ICEO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_ICEHO, v_iceho)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_iceho, ICEHO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_ICEFO, v_icefo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_icefo, ICEFO, start = (/ 1, IPASS/), &
+ count = (/ NOPTS, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_GRDID, v_grdid)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_grdid, GRDID, start = (/ 1, 1, IPASS/), &
+ count = (/ 13, nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_SPCO, v_spco)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_get_var(fh, v_spco, SPCO, start = (/ 1, 1, IPASS/), &
+ count = (/nspec, nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ELSE
+ ! Set flag to indicate IPASS > d_time_len
+ ! and are at the end of the
+ IOTST = -1
+ END IF
+
+ ! Close the file.
+ ncerr = nf90_close(fh)
+ if (nf90_err(ncerr) .ne. 0) return
+
+902 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPON :'/ &
+ ' ILEGAL IDSTR, READ : ',A/ &
+ ' CHECK : ',A/)
+903 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPON :'/ &
+ ' ILEGAL VEROPT, READ : ',A/ &
+ ' CHECK : ',A/)
+904 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPO :'/ &
+ ' ERROR IN SPECTRA, MK, MTH : ',2I8/ &
+ ' ARRAY DIMENSIONS : ',2I8/)
+
+
+ END SUBROUTINE W3IOPON_READ
+
+ !/ ------------------------------------------------------------------- /
+ !>
+ !> @brief Write point output in netCDF format.
+ !>
+ !> @param[in] filename Name of file to write.
+ !> @param[in] timestep_only Will be 0 if whole model run should be
+ !> written, 1 if only one timestep should be written.
+ !> @param[inout] ncerr Error code, 0 for success, netCDF error code
+ !> otherwise.
+ !>
+ !> @author Edward Hartnett @date 1-Nov-2023
+ !>
+ SUBROUTINE W3IOPON_WRITE(timestep_only,filename, ncerr)
+ USE NETCDF
+ USE W3GDATMD, ONLY: NTH, NK, NSPEC
+ USE W3WDATMD, ONLY: TIME
+ USE W3ODATMD, ONLY: NDST, NDSE, IPASS => IPASS2, NOPTS, IPTINT, &
+ PTLOC, PTIFAC, DPO, WAO, WDO, &
+ ASO, CAO, CDO, SPCO, PTNME, O2INIT, FNMPRE, &
+ GRDID, ICEO, ICEHO, ICEFO
+ USE W3TIMEMD, ONLY: CALTYPE, T2D, U2D, TSUB
+#ifdef W3_FLX5
+ USE W3ODATMD, ONLY: TAUAO, TAUDO, DAIRO
+#endif
+#ifdef W3_SETUP
+ USE W3ODATMD, ONLY: ZET_SETO
+#endif
+
+ IMPLICIT NONE
+ integer, intent(in) :: timestep_only ! 1 if only timestep should be written.
+ character(*), intent(in) :: filename
+ integer, intent(inout) :: ncerr
+ integer :: ndim, nvar, fmt, itime, fh
+ integer :: d_nopts, d_nspec, d_vsize, d_namelen, d_grdidlen, d_time
+ integer :: v_idtst, v_vertst, v_nk, v_nth, v_ptloc, v_ptnme, v_time, v_ww3time
+ integer :: v_dpo, v_wao, v_wdo
+#ifdef W3_FLX5
+ integer :: v_tauao, v_taudo, v_dairo
+#endif
+#ifdef W3_SETUP
+ integer :: v_zet_seto
+#endif
+ integer :: v_aso, v_cao, v_cdo, v_iceo
+ integer :: v_iceho, v_icefo, v_grdid, v_spco
+ integer :: curdate(8), refdate(8),ierr
+ double precision :: outjulday
+
+ !If first pass, or if you are writting a file for every time-step:
+ IF ( IPASS.EQ.1 .OR. timestep_only.EQ.1 ) THEN
+ ! Create the netCDF file.
+ ncerr = nf90_create(filename, NF90_NETCDF4, fh)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define dimensions.
+ ncerr = nf90_def_dim(fh, DNAME_NOPTS, NOPTS, d_nopts)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_dim(fh, DNAME_NSPEC, NSPEC, d_nspec)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_dim(fh, DNAME_VSIZE, 2, d_vsize)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_dim(fh, DNAME_NAMELEN, 40, d_namelen)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_dim(fh, DNAME_GRDIDLEN, 13, d_grdidlen)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_dim(fh, DNAME_TIME, NF90_UNLIMITED, d_time)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define global attributes.
+ ncerr = nf90_put_att(fh, NF90_GLOBAL, 'title', IDSTR)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_put_att(fh, NF90_GLOBAL, 'version', VEROPT)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define scalar variables.
+ ncerr = nf90_def_var(fh, VNAME_NK, NF90_INT, v_nk)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_NTH, NF90_INT, v_nth)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define vars with nopts as a dimension. Point location and name
+ ncerr = nf90_def_var(fh, VNAME_PTLOC, NF90_FLOAT, (/d_vsize, d_nopts/), v_ptloc)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_PTNME, NF90_CHAR, (/d_namelen, d_nopts/), v_ptnme)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define time for each time step
+ ncerr = nf90_def_var(fh, VNAME_WW3TIME, NF90_INT, (/d_vsize, d_time/),v_ww3time)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_TIME, NF90_DOUBLE, (/d_time/),v_time)
+ if (nf90_err(ncerr) .ne. 0) return
+ SELECT CASE (TRIM(CALTYPE))
+ CASE ('360_day')
+ ncerr = nf90_put_att(fh, v_time, 'long_name', 'time in 360 day calendar')
+ if (nf90_err(ncerr) .ne. 0) return
+ CASE ('365_day')
+ ncerr = nf90_put_att(fh, v_time, 'long_name', 'time in 365 day calendar')
+ if (nf90_err(ncerr) .ne. 0) return
+ CASE ('standard')
+ ncerr = nf90_put_att(fh, V_TIME, 'long_name', 'Julian day (UT)')
+ if (nf90_err(ncerr) .ne. 0) return
+ END SELECT
+ ncerr = nf90_put_att(fh, V_TIME, 'standard_name', 'time')
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_put_att(fh, V_TIME, 'units', 'days since 1990-01-01 00:00:00')
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_put_att(fh, V_TIME, 'conventions','Relative Julian days with decimal part (as parts of the day)')
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_put_att(fh, V_TIME, 'axis', 'T')
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_put_att(fh, V_TIME, 'calendar', TRIM(CALTYPE))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define vars with nopts and time as dimensions
+ ncerr = nf90_def_var(fh, VNAME_DPO, NF90_FLOAT, (/d_nopts, d_time/), v_dpo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_WAO, NF90_FLOAT, (/d_nopts, d_time/), v_wao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_WDO, NF90_FLOAT, (/d_nopts, d_time/), v_wdo)
+ if (nf90_err(ncerr) .ne. 0) return
+#ifdef W3_FLX5
+ ncerr = nf90_def_var(fh, VNAME_TAUAO, NF90_FLOAT, (/d_nopts, d_time/), v_tauao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_TAUDO, NF90_FLOAT, (/d_nopts, d_time/), v_taudo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_DAIRO, NF90_FLOAT, (/d_nopts, d_time/), v_dairo)
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+#ifdef W3_SETUP
+ ncerr = nf90_def_var(fh, VNAME_ZET_SETO, NF90_FLOAT, (/d_nopts, d_time/), v_zet_seto)
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+ ncerr = nf90_def_var(fh, VNAME_ASO, NF90_FLOAT, (/d_nopts, d_time/), v_aso)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_CAO, NF90_FLOAT, (/d_nopts, d_time/), v_cao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_CDO, NF90_FLOAT, (/d_nopts, d_time/), v_cdo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_ICEO, NF90_FLOAT, (/d_nopts, d_time/), v_iceo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_ICEHO, NF90_FLOAT, (/d_nopts, d_time/), v_iceho)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_ICEFO, NF90_FLOAT, (/d_nopts, d_time/), v_icefo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_def_var(fh, VNAME_GRDID, NF90_CHAR, (/d_grdidlen, d_nopts, d_time/), v_grdid)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Define spectral output with dimensions nspec, nopts and time
+ ncerr = nf90_def_var(fh, VNAME_SPCO, NF90_FLOAT, (/d_nspec, d_nopts, d_time/), v_spco)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! End of all variable definitions
+ ncerr = nf90_enddef(fh)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Write the scalar data.
+ ncerr = nf90_put_var(fh, v_nk, NK)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_put_var(fh, v_nth, NTH)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Write the data with NOPTS as a dimension. (no time dimension)
+ if (associated(PTLOC)) then
+ ncerr = nf90_put_var(fh, v_ptloc, PTLOC(:,1:NOPTS))
+ if (nf90_err(ncerr) .ne. 0) return
+ endif
+ if (associated(PTNME)) then
+ ncerr = nf90_put_var(fh, v_ptnme, PTNME(1:NOPTS))
+ if (nf90_err(ncerr) .ne. 0) return
+ endif
+
+ ELSE
+ ! If we are writing to the same file, re-open the file
+ ncerr = nf90_open(filename, nf90_write, fh)
+ if (nf90_err(ncerr) .ne. 0) return
+ END IF
+
+ !Determine the start for the time dimension
+ IF ( timestep_only.EQ.1 ) THEN
+ itime=1
+ ELSE
+ itime=IPASS
+ END IF
+
+ ! Write Time
+ IF ( itime > 1 ) THEN
+ ncerr = nf90_inq_varid(fh, VNAME_WW3TIME, v_ww3time)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_TIME, v_time)
+ if (nf90_err(ncerr) .ne. 0) return
+ END IF
+ ncerr = nf90_put_var(fh, v_ww3time, TIME, start = (/ 1, itime/), &
+ count = (/ 2, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ CALL U2D('days since 1990-01-01 00:00:00',REFDATE,IERR)
+ CALL T2D(TIME,CURDATE,IERR)
+ outjulday=TSUB(REFDATE,CURDATE)
+
+ ncerr = nf90_put_var(fh, v_time, outjulday, start = (/itime/))
+ if (nf90_err(ncerr) .ne. 0) return
+
+
+ ! If itime > 1 need to inquire varid
+ IF ( itime > 1 ) THEN
+ ncerr = nf90_inq_varid(fh, VNAME_DPO, v_dpo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_WAO, v_wao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_WDO, v_wdo)
+ if (nf90_err(ncerr) .ne. 0) return
+#ifdef W3_FLX5
+ ncerr = nf90_inq_varid(fh, VNAME_TAUAO, v_tauao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_TAUDO, v_taudo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_DAIRO, v_dairo)
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+#ifdef W3_SETUP
+ ncerr = nf90_inq_varid(fh, VNAME_ZET_SETO, v_zet_seto)
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+ ncerr = nf90_inq_varid(fh, VNAME_ASO, v_aso)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_CAO, v_cao)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_CDO, v_cdo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_ICEO, v_iceo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_ICEHO, v_iceho)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_ICEFO, v_icefo)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_GRDID, v_grdid)
+ if (nf90_err(ncerr) .ne. 0) return
+ ncerr = nf90_inq_varid(fh, VNAME_SPCO, v_spco)
+ if (nf90_err(ncerr) .ne. 0) return
+ END IF
+
+ ncerr = nf90_put_var(fh, v_dpo, DPO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_wao, WAO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_wdo, WDO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+#ifdef W3_FLX5
+ ncerr = nf90_put_var(fh, v_tauao, TAUAO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_taudo, TAUDO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_dairo, DAIRO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+#ifdef W3_SETUP
+ ncerr = nf90_put_var(fh, v_zet_seto, ZET_SETO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+#endif
+ ncerr = nf90_put_var(fh, v_aso, ASO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_cao, CAO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_cdo, CDO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_iceo, ICEO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_iceho, ICEHO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_icefo, ICEFO, start = (/ 1, itime/), &
+ count = (/ nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ncerr = nf90_put_var(fh, v_grdid, GRDID, start = (/ 1, 1, itime/), &
+ count = (/ 13, nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ !write spectral output
+ ncerr = nf90_put_var(fh, v_spco, SPCO, start = (/ 1, 1, itime/), &
+ count = (/nspec, nopts, 1 /))
+ if (nf90_err(ncerr) .ne. 0) return
+
+ ! Close the file.
+ ncerr = nf90_close(fh)
+ if (nf90_err(ncerr) .ne. 0) return
+
+ END SUBROUTINE W3IOPON_WRITE
+
+ !> 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.
+ !>
+ !> @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.
+ !>
+ !> @author Edward Hartnett @date 1-Nov-2023
+ SUBROUTINE W3IOPON ( INXOUT, NDSOP, IOTST, IMOD)
+ USE W3GDATMD, ONLY: W3SETG
+ USE W3WDATMD, ONLY: W3SETW
+ USE W3ODATMD, ONLY: W3SETO
+ USE W3GDATMD, ONLY: FILEXT
+ USE W3WDATMD, ONLY: TIME
+ USE W3ODATMD, ONLY: NDST, NDSE, IPASS => IPASS2, FNMPRE
+ USE W3ODATMD, ONLY: OFILES
+ USE W3SERVMD, ONLY: EXTCDE
+#ifdef W3_S
+ USE W3SERVMD, ONLY: STRACE
+#endif
+ use netcdf
+ IMPLICIT NONE
+
+ CHARACTER, INTENT(IN) :: INXOUT*(*)
+ INTEGER, INTENT(IN) :: NDSOP
+ INTEGER, INTENT(OUT) :: IOTST
+ INTEGER, INTENT(IN), OPTIONAL :: IMOD
+
+ CHARACTER(LEN=15) :: TIMETAG
+ INTEGER :: IGRD
+ character(len = 124) :: filename
+ integer :: ncerr
+
+#ifdef W3_S
+ CALL STRACE (IENT, 'W3IOPON')
+#endif
+
+ ! IPASS essentially is the time variable dimension
+ IPASS = IPASS + 1
+
+ ! Optimistically assume success.
+ IOTST = 0
+
+ ! Has a model number been specified?
+ IF (PRESENT(IMOD)) THEN
+ IGRD = IMOD
+ ELSE
+ IGRD = 1
+ END IF
+
+ CALL W3SETO(IGRD, NDSE, NDST)
+ CALL W3SETG(IGRD, NDSE, NDST)
+ CALL W3SETW(IGRD, NDSE, NDST)
+
+ ! INXOUT must be 'READ' or 'WRITE'.
+ IF (INXOUT .NE. 'READ' .AND. INXOUT .NE. 'WRITE') THEN
+ WRITE (NDSE, 900) INXOUT
+ CALL EXTCDE(1)
+ END IF
+
+ ! Determine filename.
+ IF ( OFILES(2) .EQ. 1 ) THEN
+ ! Create TIMETAG for file name using YYYYMMDD.HHMMS prefix
+ WRITE(TIMETAG,"(i8.8,'.'i6.6)")TIME(1),TIME(2)
+ filename = FNMPRE(:LEN_TRIM(FNMPRE))//TIMETAG//'.out_pnt.'//FILEXT(:LEN_TRIM(FILEXT))//'.nc'
+ ELSE
+ filename = FNMPRE(:LEN_TRIM(FNMPRE))//'out_pnt.'//FILEXT(:LEN_TRIM(FILEXT))//'.nc'
+ END IF
+
+ ! Do a read or a write of the point file.
+ IF (INXOUT .EQ. 'READ') THEN
+ CALL W3IOPON_READ(IOTST, IMOD, filename, ncerr)
+ ELSE
+ CALL W3IOPON_WRITE(OFILES(2), filename, ncerr)
+ ENDIF
+ if (nf90_err(ncerr) .ne. 0) then
+ WRITE(NDSE,*) ' *** WAVEWATCH III ERROR IN W3IOPO :'
+ WRITE(NDSE,*) 'Nonzero return at end of W3IOPON'
+ WRITE(NDSE,*) 'Error: ', trim(nf90_strerror(ncerr))
+ CALL EXTCDE(21)
+ endif
+
+ !/
+ !/ End of W3IOPON ----------------------------------------------------- /
+ !/
+
+900 FORMAT (/' *** WAVEWATCH III ERROR IN W3IOPO :'/ &
+ ' ILEGAL INXOUT VALUE: ',A/)
+ END SUBROUTINE W3IOPON
+#endif
+ !/ ------------------------------------------------------------------- /
!> Read or write point output.
!>
!> This subroutine can either read or write the point output file,
@@ -1045,12 +1847,12 @@ END SUBROUTINE W3IOPE
!> -------------|------|----------|--------
!> 40 | character*40 | IDTST | ID string
!> 4 | integer | VERTST | Model definition file version number
- !> 4 | integer | NK | Dimension of frequency
- !> 4 | integer | MTH | Directionality of the frequency
+ !> 4 | integer | NK | Number of discrete wavenumbers
+ !> 4 | integer | NTH | Number of discrete directions.
!> 4 | integer | NOPTS | Number of output points.
- !> 8*NOPTS | integer(2,NOPTS) | PTLOC | Point locations
+ !> 8*NOPTS | real(2,NOPTS) | PTLOC | Point locations
!> 7*NOPTS | character*7 | PTNME | Point names
- !> 8 | integer(2) | TIME | Time
+ !> 8 | integer(2) | TIME | Valid time
!> reclen*NOPTS | * | * | records
!>
!> Each record contains:
@@ -1088,7 +1890,9 @@ END SUBROUTINE W3IOPE
!>
!> @param[in] INXOUT String indicating read/write. Must be 'READ' or
!> 'WRITE'.
- !> @param[in] NDSOP File unit number.
+ !> @param[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.
!> @param[out] IOTST Error code:
!> - 0 No error.
!> - -1 Unexpected end of file when reading.
@@ -1254,7 +2058,7 @@ SUBROUTINE W3IOPO ( INXOUT, NDSOP, IOTST, IMOD &
CALL EXTCDE ( 1 )
END IF
!
- ! IF ( IPASS.EQ.1 ) THEN
+ ! First pass to this file and we are only writing 1 file for all time
IF ( IPASS.EQ.1 .AND. OFILES(2) .EQ. 0) THEN
WRITE = INXOUT.EQ.'WRITE'
ELSE
@@ -1267,10 +2071,10 @@ SUBROUTINE W3IOPO ( INXOUT, NDSOP, IOTST, IMOD &
! open file ---------------------------------------------------------- *
!
IF ( IPASS.EQ.1 .AND. OFILES(2) .EQ. 0 ) THEN
- !
+
I = LEN_TRIM(FILEXT)
J = LEN_TRIM(FNMPRE)
- !
+
#ifdef W3_T
WRITE (NDST,9001) FNMPRE(:J)//'out_pnt.'//FILEXT(:I)
#endif
@@ -1389,7 +2193,7 @@ SUBROUTINE W3IOPO ( INXOUT, NDSOP, IOTST, IMOD &
!
IF ( WRITE ) THEN
WRITE (NDSOP) &
- IDSTR, VEROPT, NK, NTH, NOPTS
+ IDSTR, VEROPT, NK, NTH, NOPTS
#ifdef W3_ASCII
WRITE (NDSOA,*) &
'IDSTR, VEROPT, NK, NTH, NOPTS:', &
@@ -1495,7 +2299,7 @@ SUBROUTINE W3IOPO ( INXOUT, NDSOP, IOTST, IMOD &
#endif
'ASO(I), CAO(I), CDO(I), ICEO(I), ICEHO(I):', &
ASO(I), CAO(I), CDO(I), ICEO(I), ICEHO(I), &
- 'ICEFO(I), GRDID(I), (SPCO(J,I),J=1,NSPEC):', &
+ 'ICEFO(I), GRDID(I), (SPCO(J,I),J=1,NSPEC):', &
ICEFO(I), GRDID(I), (SPCO(J,I),J=1,NSPEC)
#endif
ELSE
diff --git a/model/src/w3iorsmd.F90 b/model/src/w3iorsmd.F90
index 05f7e9163..5253a66ab 100644
--- a/model/src/w3iorsmd.F90
+++ b/model/src/w3iorsmd.F90
@@ -69,7 +69,7 @@ MODULE W3IORSMD
!/
!/ Private parameter statements (ID strings)
!/
- CHARACTER(LEN=10), PARAMETER, PRIVATE :: VERINI = '2021-05-28'
+ CHARACTER(LEN=10), PARAMETER, PRIVATE :: VERINI = '2024-04-26'
CHARACTER(LEN=26), PARAMETER, PRIVATE :: &
IDSTR = 'WAVEWATCH III RESTART FILE'
!/
@@ -845,7 +845,7 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
WRITEBUFF(:) = 0.
WRITE (NDSR,POS=RPOS,ERR=803,IOSTAT=IERR) WRITEBUFF
WRITE (NDSR,POS=RPOS,ERR=803,IOSTAT=IERR) &
- TLEV, TICE, TRHO
+ TLEV, TICE, TRHO, TIC1, TIC5
DO IPART=1,NPART
NREC = NREC + 1
RPOS = 1_8 + LRECL*(NREC-1_8)
@@ -1026,7 +1026,7 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
IF (TYPE.EQ.'FULL') THEN
RPOS = 1_8 + LRECL*(NREC-1_8)
READ (NDSR,POS=RPOS,ERR=802,IOSTAT=IERR) &
- TLEV, TICE, TRHO
+ TLEV, TICE, TRHO, TIC1, TIC5
DO IPART=1,NPART
NREC = NREC + 1
RPOS = 1_8 + LRECL*(NREC-1_8)
diff --git a/model/src/w3odatmd.F90 b/model/src/w3odatmd.F90
index d268793fb..3a667ebbf 100644
--- a/model/src/w3odatmd.F90
+++ b/model/src/w3odatmd.F90
@@ -887,7 +887,7 @@ SUBROUTINE W3NOUT ( NDSERR, NDSTST )
!
! 8) Spectrum parameters
!
- NOGE(8) = 6
+ NOGE(8) = 9
!
IDOUT( 8, 1) = 'Mean square slopes '
IDOUT( 8, 2) = 'Phillips tail const'
@@ -895,6 +895,9 @@ SUBROUTINE W3NOUT ( NDSERR, NDSTST )
IDOUT( 8, 4) = 'Tail slope direction'
IDOUT( 8, 5) = 'Goda peakedness parm'
IDOUT( 8, 6) = 'kxky-peakdness '
+ IDOUT( 8, 7) = 'Skewness '
+ IDOUT( 8, 8) = 'EM bias(l120+l102)/8'
+ IDOUT( 8, 9) = 'Tracker bias:-l300/8'
! IDOUT( 8, 3) = 'Lx-Ly mean wvlength'
! IDOUT( 8, 4) = 'Surf grad correl XT'
! IDOUT( 8, 5) = 'Surf grad correl YT'
diff --git a/model/src/w3ounfmetamd.F90 b/model/src/w3ounfmetamd.F90
index a4a58d079..87e606e56 100644
--- a/model/src/w3ounfmetamd.F90
+++ b/model/src/w3ounfmetamd.F90
@@ -3969,6 +3969,45 @@ SUBROUTINE DEFAULT_META()
META(1)%VARNC='2D wavenumber peakedness'
META(1)%VMIN = 0
META(1)%VMAX = 1600
+ ! IFI=8, IFJ=7, SKW
+ META => GROUP(8)%FIELD(7)%META
+ META(1)%FSC = 0.00001
+ META(1)%UNITS = '1'
+ META(1)%ENAME = '.skw'
+ META(1)%VARNM='skw'
+ META(1)%VARNL='skewness'
+ !META(1)%VARNS='sea_surface_wave_peakedness'
+ META(1)%VARNS=''
+ META(1)%VARNG='skewness of P(z,sx,sy=0)'
+ META(1)%VARNC='skewness of P(z,sx,sy=0)'
+ META(1)%VMIN = 0
+ META(1)%VMAX = 1
+ ! IFI=8, IFJ=8, EMB
+ META => GROUP(8)%FIELD(8)%META
+ META(1)%FSC = 0.00001
+ META(1)%UNITS = '1'
+ META(1)%ENAME = '.emb'
+ META(1)%VARNM='emb'
+ META(1)%VARNL='EM-bias'
+ !META(1)%VARNS='sea_surface_wave_peakedness'
+ META(1)%VARNS=''
+ META(1)%VARNG='EM bias coefficient'
+ META(1)%VARNC='EM bias coefficient'
+ META(1)%VMIN = -1
+ META(1)%VMAX = 1
+ ! IFI=8, IFJ=7, SKW
+ META => GROUP(8)%FIELD(9)%META
+ META(1)%FSC = 0.00001
+ META(1)%UNITS = '1'
+ META(1)%ENAME = '.emc'
+ META(1)%VARNM='emc'
+ META(1)%VARNL='trackerbias'
+ !META(1)%VARNS='sea_surface_wave_peakedness'
+ META(1)%VARNS=''
+ META(1)%VARNG='tracker bias coefficient'
+ META(1)%VARNC='tracker bias coefficient'
+ META(1)%VMIN = -1
+ META(1)%VMAX = 1 !
!
!---------- GROUP 9 ----------------
!
diff --git a/model/src/w3profsmd_pdlib.F90 b/model/src/w3profsmd_pdlib.F90
index 0af0e95b5..6f632b68e 100644
--- a/model/src/w3profsmd_pdlib.F90
+++ b/model/src/w3profsmd_pdlib.F90
@@ -2898,12 +2898,24 @@ SUBROUTINE PDLIB_W3XYPUG_BLOCK_EXPLICIT(IMOD, FACX, FACY, DTG, VGX, VGY, LCALC)
!
USE W3ODATMD, only: IAPROC
USE W3GDATMD, only: B_JGS_USE_JACOBI
+ USE W3TIMEMD, only: DSEC21
+ USE W3ODATMD, only: TBPI0, TBPIN, FLBPI
+ USE W3WDATMD, only: TIME
LOGICAL, INTENT(IN) :: LCALC
INTEGER, INTENT(IN) :: IMOD
REAL, INTENT(IN) :: FACX, FACY, DTG, VGX, VGY
+ REAL :: RD1, RD2
+
+ IF ( FLBPI ) THEN
+ RD1 = DSEC21 ( TBPI0, TIME )
+ RD2 = DSEC21 ( TBPI0, TBPIN )
+ ELSE
+ RD1=1.
+ RD2=0.
+ END IF
- CALL PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, DTG, VGX, VGY, LCALC)
+ CALL PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, RD1, RD2, DTG, VGX, VGY, LCALC)
!/
!/ End of W3XYPFSN ----------------------------------------------------- /
!/
@@ -6381,7 +6393,7 @@ SUBROUTINE PDLIB_JACOBI_GAUSS_SEIDEL_BLOCK(IMOD, FACX, FACY, DTG, VGX, VGY, LCAL
#endif
END SUBROUTINE PDLIB_JACOBI_GAUSS_SEIDEL_BLOCK
!/ ------------------------------------------------------------------- /
- SUBROUTINE PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, DTG, VGX, VGY, LCALC)
+ SUBROUTINE PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, RD10, RD20, DTG, VGX, VGY, LCALC)
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
@@ -6455,7 +6467,7 @@ SUBROUTINE PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, DTG, VGX, VGY, LCALC)
INTEGER, INTENT(IN) :: IMOD
- REAL, INTENT(IN) :: FACX, FACY, DTG, VGX, VGY
+ REAL, INTENT(IN) :: FACX, FACY, DTG, VGX, VGY, RD10, RD20
REAL :: KTMP(3), UTILDE(NTH), ST(NTH,NPA)
REAL :: FL11(NTH), FL12(NTH), FL21(NTH), FL22(NTH), FL31(NTH), FL32(NTH), KKSUM(NTH,NPA)
@@ -6464,7 +6476,7 @@ SUBROUTINE PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, DTG, VGX, VGY, LCALC)
REAL :: KSIG(NPA), CGSIG(NPA), CXX(NTH,NPA), CYY(NTH,NPA)
REAL :: LAMBDAX(NTH), LAMBDAY(NTH)
REAL :: DTMAX(NTH), DTMAXEXP(NTH), DTMAXOUT, DTMAXGL
- REAL :: FIN(1), FOUT(1), REST, CFLXY, RD1, RD2, RD10, RD20
+ REAL :: FIN(1), FOUT(1), REST, CFLXY, RD1, RD2
REAL :: UOLD(NTH,NPA), U(NTH,NPA)
REAL, PARAMETER :: ONESIXTH = 1.0/6.0
@@ -6623,8 +6635,8 @@ SUBROUTINE PDLIB_EXPLICIT_BLOCK(IMOD, FACX, FACY, DTG, VGX, VGY, LCALC)
IF ( FLBPI ) THEN
DO ITH = 1, NTH
ISP = ITH + (IK-1) * NTH
- RD1 = RD10 - DTG * REAL(ITER(IK)-IT)/REAL(ITER(IK))
- RD2 = RD20
+ RD1=RD10 - DTMAXGL * REAL(ITER(IK)-IT)/REAL(ITER(IK))
+ RD2=RD20
IF ( RD2 .GT. 0.001 ) THEN
RD2 = MIN(1.,MAX(0.,RD1/RD2))
RD1 = 1. - RD2
diff --git a/model/src/w3sdb1md.F90 b/model/src/w3sdb1md.F90
index 34c7ec3bf..7b4c0ce02 100644
--- a/model/src/w3sdb1md.F90
+++ b/model/src/w3sdb1md.F90
@@ -187,6 +187,7 @@ SUBROUTINE W3SDB1 (IX, A, DEPTH, EMEAN, FMEAN, WNMEAN, CG, LBREAK, S, D )
USE W3ODATMD, ONLY: NDST
USE W3GDATMD, ONLY: SIG
USE W3ODATMD, only : IAPROC
+ USE W3PARALL, only : THR
#ifdef W3_S
USE W3SERVMD, ONLY: STRACE
#endif
@@ -218,7 +219,7 @@ SUBROUTINE W3SDB1 (IX, A, DEPTH, EMEAN, FMEAN, WNMEAN, CG, LBREAK, S, D )
INTEGER, SAVE :: IENT = 0
#endif
REAL*8 :: HM, BB, ARG, Q0, QB, B, CBJ, HRMS, EB(NK)
- REAL*8 :: AUX, CBJ2, RATIO, S0, S1, THR, BR1, BR2, FAK
+ REAL*8 :: AUX, CBJ2, RATIO, S0, S1, BR1, BR2, FAK
REAL :: ETOT, FMEAN2
#ifdef W3_T0
REAL :: DOUT(NK,NTH)
@@ -231,12 +232,9 @@ SUBROUTINE W3SDB1 (IX, A, DEPTH, EMEAN, FMEAN, WNMEAN, CG, LBREAK, S, D )
#endif
!
! 0. Initialzations ------------------------------------------------- /
- ! Never touch this 4 lines below ... otherwise my exceptionhandling will not work.
- S = 0.
- D = 0.
-
- THR = DBLE(1.E-15)
- IF (SUM(A) .LT. THR) RETURN
+ IF (EMEAN .LT. TINY(1.d0)) THEN
+ RETURN
+ ENDIF
IWB = 1
!
diff --git a/model/src/w3sic4md.F90 b/model/src/w3sic4md.F90
index 3cc7da357..c6daacb20 100644
--- a/model/src/w3sic4md.F90
+++ b/model/src/w3sic4md.F90
@@ -89,6 +89,7 @@ MODULE W3SIC4MD
! *** Rogers et al. tech. rep. 2021 (RYW2021)
! *** Yu et al. CRST 2022
! *** Yu JMSE 2022
+ ! *** Meylan et al. Ocean Modeling 2021
!
! 6. Switches :
!
@@ -138,6 +139,7 @@ SUBROUTINE W3SIC4 (A, DEPTH, CG, IX, IY, S, D)
!/ 11-Jan-2024 : Method 8 added (Meylan et al. 2018) (E. Rogers)
!/ 11-Jan-2024 : Method 9 added (Rogers et al., 2021)
!/ denoted "RYW2021" (E. Rogers)
+ !/ 14-Aug-2024 : Method 10 added (Meylan et al. 2021) (E. Thomas)
!/
!/ FIXME : Move field input to W3SRCE and provide
!/ (S.Zieger) input parameter to W3SIC1 to make the subroutine
@@ -307,6 +309,8 @@ SUBROUTINE W3SIC4 (A, DEPTH, CG, IX, IY, S, D)
! suggested default is marked with "(*SD*)", for consistency
! with SWAN (v41.31AB or later)
!
+ ! 10) Meylan et al. 2021 (Ocean Modeling): ocean-wave attenuation
+ ! due to scattering by sea ice floes.
! ------------------------------------------------------------------
!
! For all methods, the user can specify namelist
@@ -450,6 +454,8 @@ SUBROUTINE W3SIC4 (A, DEPTH, CG, IX, IY, S, D)
REAL, ALLOCATABLE :: FREQ(:) ! wave frequency
REAL, ALLOCATABLE :: MARG1(:), MARG2(:) ! Arguments for M2
REAL, ALLOCATABLE :: KARG1(:), KARG2(:), KARG3(:) !Arguments for M3
+ REAL :: x1,x2,x3,x1sqr,x2sqr,x3sqr !Arguments for M10
+ REAL :: perfour,amhb,bmhb !Arguments for M10
LOGICAL :: NML_INPUT ! if using namelist input for M2
!/
@@ -699,6 +705,43 @@ SUBROUTINE W3SIC4 (A, DEPTH, CG, IX, IY, S, D)
DO IK=1,NK
WN_I(IK) = Chf*(hice**mpow)*(FREQ(IK)**npow)
END DO
+
+ CASE (10)
+ ! Cubic fit to Meylan, Horvat & Bitz 2021
+ ! ICECOEF1 is thickness
+ ! ICECOEF5 is floe size
+ ! TPI/SIG is period
+ x3=min(ICECOEF1,3.5) ! limit thickness to 3.5 m
+ x3=max(x3,0.1) ! limit thickness >0.1 m since I make fit below
+ x2=min(ICECOEF5*0.5,100.0) ! convert dia to radius, limit to 100m
+ x2=max(2.5,x2)
+ x2sqr=x2*x2
+ x3sqr=x3*x3
+ amhb = 2.12e-3
+ bmhb = 4.59e-2
+
+ DO IK=1, NK
+ x1=TPI/SIG(IK) ! period
+ x1sqr=x1*x1
+ KARG1(ik)=-0.26982 + 1.5043*x3 - 0.70112*x3sqr + 0.011037*x2 + &
+ (-0.0073178)*x2*x3 + 0.00036604*x2*x3sqr + &
+ (-0.00045789)*x2sqr + 1.8034e-05*x2sqr*x3 + &
+ (-0.7246)*x1 + 0.12068*x1*x3 + &
+ (-0.0051311)*x1*x3sqr + 0.0059241*x1*x2 + &
+ 0.00010771*x1*x2*x3 - 1.0171e-05*x1*x2sqr + &
+ 0.0035412*x1sqr - 0.0031893*x1sqr*x3 + &
+ (-0.00010791)*x1sqr*x2 + &
+ 0.00031073*x1**3 + 1.5996e-06*x2**3 + 0.090994*x3**3
+ KARG1(IK)=min(KARG1(IK),0.0)
+ ALPHA(IK) = 10.0**KARG1(IK)
+ perfour=x1sqr*x1sqr
+ if ((x1.gt.5.0) .and. (x1.lt.20.0)) then
+ ALPHA(IK) = ALPHA(IK) + amhb/x1sqr+bmhb/perfour
+ else if (x1.gt.20.0) then
+ ALPHA(IK) = amhb/x1sqr+bmhb/perfour
+ endif
+ WN_I(IK) = ALPHA(IK) * 0.5
+ end do
CASE DEFAULT
WN_I = ICECOEF1 !Default to IC1: Uniform in k
diff --git a/model/src/w3src4md.F90 b/model/src/w3src4md.F90
index 32eadaf82..dcf1e5808 100644
--- a/model/src/w3src4md.F90
+++ b/model/src/w3src4md.F90
@@ -1849,6 +1849,8 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
!/ 14-Aug-2006 : Modified following Bidlot ( version 2.22-SHOM )
!/ 18-Aug-2006 : Ported to version 3.09
!/ 03-Apr-2010 : Adding output of Charnock parameter ( version 3.14-IFREMER )
+ !/ 03-May-2024 : Optional functional form of ( version 7.15 )
+ !/ Charnock coefficient and surface drag (UK Met Office).
!
! 1. Purpose :
!
@@ -1895,7 +1897,7 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
! 10. Source code :
!-----------------------------------------------------------------------------!
USE CONSTANTS, ONLY: GRAV, KAPPA, NU_AIR
- USE W3GDATMD, ONLY: ZZWND, AALPHA, ZZ0MAX, SINTAILPAR
+ USE W3GDATMD, ONLY: ZZWND, AALPHA, ZZ0MAX, SINTAILPAR, CAPCHNK
#ifdef W3_T
USE W3ODATMD, ONLY: NDST
#endif
@@ -1908,6 +1910,7 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
INTEGER :: IND,J
REAL :: TAUW_LOCAL
REAL :: TAUOLD,CDRAG,WCD,USTOLD,X,UST,ZZ0,ZNU,ZZ00,F,DELF
+ REAL :: CHATH, XMIN ! used for reduction of high winds
INTEGER, PARAMETER :: NITER=10
REAL , PARAMETER :: XM=0.50, EPS1=0.00001
INTEGER :: ITER
@@ -1918,6 +1921,7 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
! *EPS1* REAL SMALL NUMBER TO MAKE SURE THAT A SOLUTION
! IS OBTAINED IN ITERATION WITH TAU>TAUW.
+ CHATH = AALPHA
!
IF (SINTAILPAR(1).GT.0.5) THEN
TAUW_LOCAL=MAX(MIN(TAUW,TAUWMAX),0.)
@@ -1932,6 +1936,17 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
USTAR=(TAUT(IND,J)*DELI2+TAUT(IND+1,J )*DELI1)*DELJ2 &
+ (TAUT(IND,J+1)*DELI2+TAUT(IND+1,J+1)*DELI1)*DELJ1
ELSE
+ IF (CAPCHNK(1).EQ.1.) THEN
+ ! Computation of sea surface roughness and charnock coefficient based
+ ! on Donelan (2018). Determines minimum charnock; reduction for winds
+ ! above a particular threshold
+ CHATH = CAPCHNK(2) + 0.5 * (CAPCHNK(3) - CAPCHNK(2)) * (1 &
+ - TANH((WINDSPEED-CAPCHNK(4))/CAPCHNK(5)))
+ XMIN = 0.15 * (CAPCHNK(3)-CHATH)
+ ELSE
+ XMIN = 0.
+ END IF
+
! This max is for comparison ... to be removed later
! TAUW_LOCAL=MAX(MIN(TAUW,TAUWMAX),0.)
TAUW_LOCAL=TAUW
@@ -1941,9 +1956,9 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
TAUOLD = MAX(USTOLD**2, TAUW_LOCAL+EPS1)
! Newton method to solve for ustar in U=ustar*log(Z/Z0)
DO ITER=1,NITER
- X = TAUW_LOCAL/TAUOLD
+ X = MAX(TAUW_LOCAL/TAUOLD, XMIN)
UST = SQRT(TAUOLD)
- ZZ00=AALPHA*TAUOLD/GRAV
+ ZZ00 = CHATH*TAUOLD/GRAV
IF (ZZ0MAX.NE.0) ZZ00=MIN(ZZ00,ZZ0MAX)
! Corrects roughness ZZ00 for quasi-linear effect
ZZ0 = ZZ00/(1.-X)**XM
@@ -1969,10 +1984,16 @@ SUBROUTINE CALC_USTAR(WINDSPEED,TAUW,USTAR,Z0,CHARN)
SQRTCDM1 = MIN(WINDSPEED/USTAR,100.0)
Z0 = ZZWND*EXP(-KAPPA*SQRTCDM1)
ELSE
- Z0 = AALPHA*0.001*0.001/GRAV
+ Z0 = CHATH*0.001*0.001/GRAV
END IF
- CHARN = AALPHA
+ CHARN = CHATH
END IF
+ IF(CAPCHNK(1) .EQ. 1) THEN
+ ! Problem with large values of CHARN for low winds
+ CHARN = MIN( 0.09 , CHARN )
+ IF(CHARN.LT.CHATH) CHARN = CHATH
+ ENDIF
+
! WRITE(6,*) 'CALC_USTAR:',WINDSPEED,TAUW,AALPHA,CHARN,Z0,USTAR
!
RETURN
diff --git a/model/src/w3srcemd.F90 b/model/src/w3srcemd.F90
index e90ba88eb..eeb2a95a1 100644
--- a/model/src/w3srcemd.F90
+++ b/model/src/w3srcemd.F90
@@ -1,4 +1,4 @@
-!> @file
+
!> @brief Source term integration routine.
!>
!> @author H. L. Tolman
@@ -1244,7 +1244,7 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, &
IF (.NOT. FSSOURCE .or. LSLOC) THEN
#endif
#ifdef W3_TR1
- CALL W3STR1 ( SPEC, SPECOLD, CG1, WN1, DEPTH, IX, VSTR, VDTR )
+ CALL W3STR1 ( SPEC, CG1, WN1, DEPTH, IX, VSTR, VDTR )
#endif
#ifdef W3_PDLIB
ENDIF
@@ -1534,8 +1534,13 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, &
DVS = SIGN(MIN(MAXDAC,ABS(DVS)),DVS)
ENDIF
PreVS = DVS / FAKS
- eVS = PreVS / CG1(IK) * CLATSL
- eVD = MIN(0.,VD(ISP))
+ IF (IOBP_LOC(JSEA) .EQ. 3) THEN
+ eVS = 0
+ eVD = 0
+ ELSE
+ eVS = PreVS / CG1(IK) * CLATSL
+ eVD = MIN(0.,VD(ISP))
+ ENDIF
B_JAC(ISP,JSEA) = B_JAC(ISP,JSEA) + SIDT * (eVS - eVD*SPEC(ISP)*JAC)
ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) = ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) - SIDT * eVD
#ifdef W3_DB1
@@ -1548,9 +1553,9 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, &
evS = -evS
evD = 2*evD
ENDIF
-#endif
B_JAC(ISP,JSEA) = B_JAC(ISP,JSEA) + SIDT * eVS
ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) = ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) - SIDT * eVD
+#endif
#ifdef W3_TR1
eVS = VSTR(ISP) * JAC
@@ -1562,9 +1567,9 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, &
evS = -evS
evD = 2*evD
ENDIF
-#endif
B_JAC(ISP,JSEA) = B_JAC(ISP,JSEA) + SIDT * eVS
ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) = ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) - SIDT * eVD
+#endif
END DO
END DO
diff --git a/model/src/w3str1md.F90 b/model/src/w3str1md.F90
index d8067abd7..ce14b6b36 100644
--- a/model/src/w3str1md.F90
+++ b/model/src/w3str1md.F90
@@ -180,7 +180,7 @@ MODULE W3STR1MD
!>
!> @author A. J. van der Westhuysen @date 13-Jan-2013
!>
- SUBROUTINE W3STR1 (A, AOLD, CG, WN, DEPTH, IX, S, D)
+ SUBROUTINE W3STR1 (A, CG, WN, DEPTH, IX, S, D)
!/
!/ +-----------------------------------+
!/ | WAVEWATCH III NOAA/NCEP |
@@ -259,7 +259,6 @@ SUBROUTINE W3STR1 (A, AOLD, CG, WN, DEPTH, IX, S, D)
! CG R.A. I Group velocities.
! WN R.A. I Wavenumbers.
! DEPTH Real I Mean water depth.
- ! EMEAN Real I Mean wave energy.
! FMEAN Real I Mean wave frequency.
! S R.A. O Source term (1-D version).
! D R.A. O Diagonal term of derivative (1-D version).
@@ -320,7 +319,7 @@ SUBROUTINE W3STR1 (A, AOLD, CG, WN, DEPTH, IX, S, D)
!/ ------------------------------------------------------------------- /
!/ Parameter list
!/
- REAL, INTENT(IN) :: CG(NK), WN(NK), DEPTH, A(NSPEC), AOLD(NSPEC)
+ REAL, INTENT(IN) :: CG(NK), WN(NK), DEPTH, A(NSPEC)
INTEGER, INTENT(IN) :: IX
REAL, INTENT(OUT) :: S(NSPEC), D(NSPEC)
!/
@@ -391,11 +390,13 @@ SUBROUTINE W3STR1 (A, AOLD, CG, WN, DEPTH, IX, S, D)
#ifdef W3_S
CALL STRACE (IENT, 'W3STR1')
#endif
-
-!AR: todo: check all PRX routines for differences, check original thesis of elderberky.
!
! 1. Integral over directions
!
+ IF (MAXVAL(A) .LT. TINY(1.)) THEN
+ RETURN
+ ENDIF
+
SIGM01 = 0.
EMEAN = 0.
JACEPS = 1E-12
diff --git a/model/src/w3tidemd.F90 b/model/src/w3tidemd.F90
index 4f58afd4b..00b7b047d 100644
--- a/model/src/w3tidemd.F90
+++ b/model/src/w3tidemd.F90
@@ -823,11 +823,11 @@ SUBROUTINE TIDE_READ_ANAPAR(KR1,LP,filename,KD1,KD2,XLON,XLAT,NDEF,ITREND,ITZ)
! read in inference information now as it will be used in the lsq matrix
!
DO K=1,10
- READ(KR1,'(4X,A5,E16.10,i5)')TIDE_KONAN(K),TIDE_SIGAN(K),TIDE_NINF(k)
+ READ(KR1,'(4X,A5,E17.10,i5)')TIDE_KONAN(K),TIDE_SIGAN(K),TIDE_NINF(k)
! write(6,1010)TIDE_KONAN(K),TIDE_SIGAN(K),TIDE_NINF(k)
IF (TIDE_KONAN(K).EQ.KBLANK) EXIT
do k2=1,TIDE_NINF(k)
- read(kr1,'(4X,A5,E16.10,2F10.3)') TIDE_KONIN(K,k2),TIDE_SIGIN(K,k2),TIDE_R(K,k2),TIDE_ZETA(K,k2)
+ read(kr1,'(4X,A5,E17.10,2F10.3)') TIDE_KONIN(K,k2),TIDE_SIGIN(K,k2),TIDE_R(K,k2),TIDE_ZETA(K,k2)
END DO
END DO
TIDE_NIN=K-1
diff --git a/model/src/w3timemd.F90 b/model/src/w3timemd.F90
index 11376969f..0041866db 100644
--- a/model/src/w3timemd.F90
+++ b/model/src/w3timemd.F90
@@ -6,7 +6,7 @@ MODULE W3TIMEMD
!/ | WAVEWATCH III NOAA/NCEP |
!/ | H. L. Tolman |
!/ | FORTRAN 90 |
- !/ | Last update : 12-Jan-2021 |
+ !/ | Last update : 23-Feb-2024 |
!/ +-----------------------------------+
!/
!/ Copyright 2009 National Weather Service (NWS),
@@ -1233,6 +1233,7 @@ SUBROUTINE D2J(DAT,JULIAN,IERR)
!/ +-----------------------------------+
!/
!/ 04-Jan-2018 : Origination from m_time library ( version 6.04 )
+ !/ 23-Feb-2024 : Updated to handle 360_day calendar ( version 7.14 )
!/
! 1. Purpose :
!
@@ -1251,6 +1252,8 @@ SUBROUTINE D2J(DAT,JULIAN,IERR)
! * There is no year zero
! * Julian Day must be non-negative
! * Julian Day starts at noon; while Civil Calendar date starts at midnight
+ ! * If CALTYPE is "360_day" a simpler calculation is used (30 days in every
+ ! month) with a reference date of 1800-01-01.
!
! 3. Parameters :
!
@@ -1313,6 +1316,21 @@ SUBROUTINE D2J(DAT,JULIAN,IERR)
JULIAN = -HUGE(99999) ! this is the date if an error occurs and IERR is < 0
+ ! Special case for 360 day climate calendar; return a pseudo-Julian day
+ ! Assumes a reference date of 1800-01-01 00:00:00
+ IF( CALTYPE .EQ. "360_day" ) THEN
+ JULIAN = (YEAR - 1800) * 360.0 + & ! Years since 1800
+ (MONTH - 1) * 30.0 + &
+ (DAY - 1) + &
+ HOUR / 24.0_8 + &
+ MINUTE / 1440.0_8 + &
+ SECOND / 86400.0_8
+
+ IERR = 0
+ RETURN
+ ENDIF
+
+ ! Standard/Gregorian calendar - return standard Julian day calculation:
IF(YEAR==0 .or. YEAR .lt. -4713) THEN
IERR=-1
RETURN
@@ -1356,6 +1374,7 @@ SUBROUTINE J2D(JULIAN,DAT,IERR)
!/ +-----------------------------------+
!/
!/ 04-Jan-2018 : Origination from m_time library ( version 6.04 )
+ !/ 23-Feb-2024 : Upated to handle 360_day calendar ( version 7.14 )
!/
! 1. Purpose :
!
@@ -1364,6 +1383,8 @@ SUBROUTINE J2D(JULIAN,DAT,IERR)
! * There is no year zero
! * Julian Day must be non-negative
! * Julian Day starts at noon; while Civil Calendar date starts at midnight
+ ! * If CALTYPE is "360_day" a simpler calculation is used (30 days in every
+ ! month) with a reference date of 1800-01-01.
!
! 3. Parameters :
!
@@ -1397,7 +1418,7 @@ SUBROUTINE J2D(JULIAN,DAT,IERR)
DOUBLE PRECISION,INTENT(IN) :: JULIAN ! Julian Day (non-negative, but may be non-integer)
INTEGER,INTENT(OUT) :: DAT(8) ! array like returned by DATE_AND_TIME(3f)
INTEGER,INTENT(OUT) :: IERR ! Error return, 0 for successful execution
- ! Otherwise returnb 1
+ ! ! otherwise return 1
!/
!/ ------------------------------------------------------------------- /
!/ Local parameters
@@ -1417,27 +1438,31 @@ SUBROUTINE J2D(JULIAN,DAT,IERR)
#ifdef W3_S
CALL STRACE (IENT, 'J2D')
#endif
+
!
- IF(JULIAN.LT.0.d0) THEN ! Negative Julian Day not allowed
+ IF(CALTYPE .EQ. 'standard' .AND. JULIAN .LT. 0.d0) THEN
+ ! Negative Julian Day not allowed
IERR=1
RETURN
- ELSE
- IERR=0
END IF
!CALL DATE_AND_TIME(values=TIMEZONE) ! Get the timezone
!TZ=TIMEZONE(4)
TZ=0 ! Force to UTC timezone
+ ! Calculation for time (hour,min,sec) same for Julian
+ ! and 360_day calendars:
IJUL=IDINT(JULIAN) ! Integral Julian Day
SECOND=SNGL((JULIAN-DBLE(IJUL))*SECDAY) ! Seconds from beginning of Jul. Day
SECOND=SECOND+(tz*60)
- IF(SECOND.GE.(SECDAY/2.0d0)) THEN ! In next calendar day
- IJUL=IJUL+1
- SECOND=SECOND-(SECDAY/2.0d0) ! Adjust from noon to midnight
- ELSE ! In same calendar day
- SECOND=SECOND+(SECDAY/2.0d0) ! Adjust from noon to midnight
+ IF(CALTYPE .EQ. "standard") THEN
+ IF(SECOND.GE.(SECDAY/2.0d0)) THEN ! In next calendar day
+ IJUL=IJUL+1
+ SECOND=SECOND-(SECDAY/2.0d0) ! Adjust from noon to midnight
+ ELSE ! In same calendar day
+ SECOND=SECOND+(SECDAY/2.0d0) ! Adjust from noon to midnight
+ END IF
END IF
IF(SECOND.GE.SECDAY) THEN ! Final check to prevent time 24:00:00
@@ -1450,31 +1475,38 @@ SUBROUTINE J2D(JULIAN,DAT,IERR)
HOUR=MINUTE/60 ! Integral hours from beginning of day
MINUTE=MINUTE-HOUR*60 ! Integral minutes from beginning of hour
- !---------------------------------------------
- JALPHA=IDINT((DBLE(IJUL-1867216)-0.25d0)/36524.25d0) ! Correction for Gregorian Calendar
- JA=IJUL+1+JALPHA-IDINT(0.25d0*DBLE(JALPHA))
- !---------------------------------------------
+ IF(CALTYPE .EQ. '360_day') THEN
+ ! Calculate date parts for 360 day climate calendar
+ YEAR = INT(JULIAN / 360) + 1800 ! (base year is 1800)
+ MONTH = MOD(INT(JULIAN / 30), 12) + 1
+ DAY = MOD(INT(JULIAN), 30) + 1
+ ELSE ! Stardard Julian day calculation
+ !---------------------------------------------
+ JALPHA=IDINT((DBLE(IJUL-1867216)-0.25d0)/36524.25d0) ! Correction for Gregorian Calendar
+ JA=IJUL+1+JALPHA-IDINT(0.25d0*DBLE(JALPHA))
+ !---------------------------------------------
- JB=JA+1524
- JC=IDINT(6680.d0+(DBLE(JB-2439870)-122.1d0)/365.25d0)
- JD=365*JC+IDINT(0.25d0*DBLE(JC))
- JE=IDINT(DBLE(JB-JD)/30.6001d0)
- DAY=JB-JD-IDINT(30.6001d0*DBLE(JE))
- MONTH=JE-1
+ JB=JA+1524
+ JC=IDINT(6680.d0+(DBLE(JB-2439870)-122.1d0)/365.25d0)
+ JD=365*JC+IDINT(0.25d0*DBLE(JC))
+ JE=IDINT(DBLE(JB-JD)/30.6001d0)
+ DAY=JB-JD-IDINT(30.6001d0*DBLE(JE))
+ MONTH=JE-1
- IF(MONTH.GT.12) THEN
- MONTH=MONTH-12
- END IF
-
- YEAR=jc-4715
- IF(MONTH.GT.2) THEN
- YEAR=YEAR-1
- END IF
-
- IF(YEAR.LE.0) THEN
- YEAR=YEAR-1
- END IF
+ IF(MONTH.GT.12) THEN
+ MONTH=MONTH-12
+ END IF
+ YEAR=jc-4715
+ IF(MONTH.GT.2) THEN
+ YEAR=YEAR-1
+ END IF
+
+ IF(YEAR.LE.0) THEN
+ YEAR=YEAR-1
+ END IF
+ ENDIF
+
DAT(1)=YEAR
DAT(2)=MONTH
DAT(3)=DAY
@@ -1487,7 +1519,6 @@ SUBROUTINE J2D(JULIAN,DAT,IERR)
!
RETURN
!/
- !/ End of J2D ----------------------------------------------------- /
!/
END SUBROUTINE J2D
diff --git a/model/src/w3wavemd.F90 b/model/src/w3wavemd.F90
index 46577c960..4b3293462 100644
--- a/model/src/w3wavemd.F90
+++ b/model/src/w3wavemd.F90
@@ -1453,6 +1453,12 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
call print_memcheck(memunit, 'memcheck_____:'//' WW3_WAVE TIME LOOP 13')
!
#ifdef W3_PDLIB
+
+ IF (LPDLIB .and. .not. FLSOU .and. .not. FSSOURCE) THEN
+ B_JAC = 0.
+ ASPAR_JAC = 0.
+ ENDIF
+
IF (LPDLIB .and. FLSOU .and. FSSOURCE) THEN
#endif
@@ -1484,6 +1490,8 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
CALL INIT_GET_ISEA(ISEA, JSEA)
+ IF ((IOBP_LOC(JSEA).eq.1..or.IOBP_LOC(JSEA).eq. 3).and.IOBDP_LOC(JSEA).eq.1.and.IOBPA_LOC(JSEA).eq.0) THEN
+
IX = MAPSF(ISEA,1)
IY = MAPSF(ISEA,2)
DELA=1.
@@ -1556,6 +1564,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
WRITE(740+IAPROC,*) ' SHAVETOT=', SHAVETOT(JSEA)
FLUSH(740+IAPROC)
#endif
+ ENDIF
END DO ! JSEA
END IF ! PDLIB
#endif
@@ -2171,6 +2180,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
!
DO JSEA=1, NSEAL
CALL INIT_GET_ISEA(ISEA, JSEA)
+
IX = MAPSF(ISEA,1)
IY = MAPSF(ISEA,2)
DELA=1.
@@ -2614,12 +2624,16 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
! Gets the necessary spectral data
!
CALL W3IOPE ( VA )
- CALL W3IOPO ( 'WRITE', NDS(8), ITEST, IMOD &
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'WRITE', NDS(8), ITEST, IMOD )
+#else
+ CALL W3IOPO ( 'WRITE', NDS(8), ITEST, IMOD &
#ifdef W3_ASCII
,NDS(15) &
#endif
)
- END IF
+#endif
+ END IF
!
ELSE IF ( J .EQ. 3 ) THEN
!
diff --git a/model/src/wminitmd.F90 b/model/src/wminitmd.F90
index 956490b5e..768b6d91e 100644
--- a/model/src/wminitmd.F90
+++ b/model/src/wminitmd.F90
@@ -1273,6 +1273,12 @@ SUBROUTINE WMINIT ( IDSI, IDSO, IDSS, IDST, IDSE, IFNAME, &
IF (WORDS(6) .EQ. 'T') THEN
CALL NEXTLN ( COMSTR , MDSI , MDSE2 )
READ (MDSI,*,END=2001,ERR=2002)(ODAT(I,1),I=5*(8-1)+1,5*8)
+ ELSE
+ ODAT(5*(8-1)+1,1)=0
+ ODAT(5*(8-1)+2,1)=0
+ ODAT(5*(8-1)+3,1)=0
+ ODAT(5*(8-1)+4,1)=0
+ ODAT(5*8,1)=0
END IF
ELSE
READ (MDSI,*,END=2001,ERR=2002)(ODAT(I,1),I=5*(J-1)+1,5*J)
diff --git a/model/src/wmiopomd.F90 b/model/src/wmiopomd.F90
index 73e036535..bce460483 100644
--- a/model/src/wmiopomd.F90
+++ b/model/src/wmiopomd.F90
@@ -714,8 +714,7 @@ SUBROUTINE WMIOPO ( TOUT )
USE W3ODATMD, ONLY: W3SETO
USE WMMDATMD, ONLY: WMSETM
USE W3CSPCMD, ONLY: W3CSPC
- USE W3IOPOMD, ONLY: W3IOPO
- !
+ USE W3IOPOMD
USE W3GDATMD, ONLY: NK, NTH, NSPEC, XFR, FR1, TH, SGRDS
USE W3WDATMD, ONLY: TIME
USE W3ODATMD, ONLY: IAPROC, NAPROC, NAPPNT, NOPTS, SPCO, DPO, &
@@ -1176,11 +1175,15 @@ SUBROUTINE WMIOPO ( TOUT )
!
TIME = TOUT
!
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'WRITE', MDSUP, II, 0)
+#else
CALL W3IOPO ( 'WRITE', MDSUP, II, 0 &
#ifdef W3_ASCII
- ,MDSUPA &
+ ,MDSUPA &
#endif
)
+#endif
!
RETURN
!
diff --git a/model/src/ww3_multi.F90 b/model/src/ww3_multi.F90
index 39a6b5bf3..e3101b7c2 100644
--- a/model/src/ww3_multi.F90
+++ b/model/src/ww3_multi.F90
@@ -91,6 +91,9 @@ PROGRAM W3MLTI
!/
USE WMMDATMD, ONLY: MDSI, MDSO, MDSS, MDST, MDSE, &
NMPROC, IMPROC, NMPSCR, NRGRD, ETIME
+#ifdef W3_OMPG
+ USE OMP_LIB
+#endif
!/
IMPLICIT NONE
!
@@ -144,6 +147,12 @@ PROGRAM W3MLTI
#ifdef W3_OMPH
IF ( IMPROC .EQ. NMPSCR ) WRITE (*,905) &
MPI_THREAD_FUNNELED, THRLEV
+#endif
+ !
+#ifdef W3_OMPG
+ IF( IMPROC .EQ. NMPSCR ) THEN
+ WRITE(*,906) omp_get_max_threads()
+ ENDIF
#endif
!
!/ ------------------------------------------------------------------- /
@@ -210,6 +219,10 @@ PROGRAM W3MLTI
905 FORMAT ( ' Hybrid MPI/OMP thread support level:'/ &
' Requested: ', I2/ &
' Provided: ', I2/ )
+#endif
+ !
+#ifdef W3_OMPG
+906 FORMAT ( ' OMP threading enabled. Number of threads: ', I3 / )
#endif
!
999 FORMAT(//' End of program '/ &
diff --git a/model/src/ww3_ounf.F90 b/model/src/ww3_ounf.F90
index 02fd0d6f8..a2ff83e26 100644
--- a/model/src/ww3_ounf.F90
+++ b/model/src/ww3_ounf.F90
@@ -66,6 +66,7 @@ PROGRAM W3OUNF
!/ 22-Mar-2021 : New coupling fields output ( version 7.12 )
!/ 02-Sep-2021 : Added coordinates attribute ( version 7.12 )
!/ 14-Feb-2023 : Added QKK output ( version 7.12 )
+ !/ 03-Mar-2024 : Added SKEW & EMBIAS output ( version 7.xx )
!/
!/ Copyright 2009-2013 National Weather Service (NWS),
!/ National Oceanic and Atmospheric Administration. All rights
@@ -193,7 +194,7 @@ PROGRAM W3OUNF
CFLTHMAX, CFLXYMAX, CFLKMAX, TAUICE, PHICE, &
STMAXE, STMAXD, HMAXE, HCMAXE, HMAXD, HCMAXD,&
P2SMS, EF, US3D, TH1M, STH1M, TH2M, STH2M, &
- WN, USSP, WBT, WNMEAN, QKK
+ WN, USSP, WBT, WNMEAN, QKK, SKEW, EMBIA1, EMBIA2
USE W3ODATMD, ONLY: NDSO, NDSE, SCREEN, NOGRP, NGRPP, IDOUT, &
UNDEF, FLOGRD, FNMPRE, NOSWLL, NOGE
!
@@ -1960,6 +1961,18 @@ SUBROUTINE W3EXNC ( NX, NY, IX1, IXN, IY1, IYN, NSEA, &
ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 6 ) THEN
CALL S2GRID(QKK, X1)
!
+ ! surface elevation skewness lambda_3,0,0
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 7 ) THEN
+ CALL S2GRID(SKEW, X1)
+ !
+ ! em bias param 1
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 8 ) THEN
+ CALL S2GRID(EMBIA1, X1)
+ !
+ ! em bias param 2
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 9 ) THEN
+ CALL S2GRID(EMBIA2, X1)
+ !
! Dynamic time step
ELSE IF ( IFI .EQ. 9 .AND. IFJ .EQ. 1 ) THEN
DO ISEA=1, NSEA
diff --git a/model/src/ww3_ounp.F90 b/model/src/ww3_ounp.F90
index c35ff6e98..a1533c73b 100644
--- a/model/src/ww3_ounp.F90
+++ b/model/src/ww3_ounp.F90
@@ -184,7 +184,7 @@ PROGRAM W3OUNP
USE W3ODATMD, ONLY: W3SETO, W3NOUT
USE W3ODATMD, ONLY: IAPROC, NAPROC, NAPERR, NAPOUT, DIMP
USE W3IOGRMD, ONLY: W3IOGR
- USE W3IOPOMD, ONLY: W3IOPO
+ USE W3IOPOMD
USE W3SERVMD, ONLY : ITRACE, NEXTLN, EXTCDE, STRSPLIT
#ifdef W3_S
USE W3SERVMD, ONLY : STRACE
@@ -387,7 +387,11 @@ PROGRAM W3OUNP
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! 3. Read general data and first fields from file
!
+#if W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
!
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,930)
DO I=1, NOPTS
@@ -604,7 +608,11 @@ PROGRAM W3OUNP
DO WHILE (DTEST.NE.0)
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
IF ( IOTEST .EQ. -1 ) THEN
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,949)
GOTO 888
@@ -1070,7 +1078,11 @@ PROGRAM W3OUNP
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
! reads TIME from out_pnt.ww3
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
IF ( IOTEST .EQ. -1 ) THEN
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,949)
GOTO 700
@@ -1215,7 +1227,11 @@ PROGRAM W3OUNP
! 7.3 Reinitiazes TIME (close open out_pnt.ww3) and TOUT to process a new bunch of stations
CLOSE(NDSOP) ! closes binary file out_pnt*
IPASS = 0 ! resets time counter for binary file out_pnt*
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
#ifdef W3_T
WRITE(NDSE,*) 'out_pnt* closed and reopened'
#endif
@@ -1228,7 +1244,11 @@ PROGRAM W3OUNP
DO WHILE (DTEST.NE.0)
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
IF ( IOTEST .EQ. -1 ) THEN
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,949)
GOTO 700
diff --git a/model/src/ww3_outf.F90 b/model/src/ww3_outf.F90
index 96f2751c8..590518037 100644
--- a/model/src/ww3_outf.F90
+++ b/model/src/ww3_outf.F90
@@ -160,6 +160,7 @@ PROGRAM W3OUTF
PHS, PTP, PLP, PDIR, PSI, PWS, PWST, PNR, &
PTM1, PT1, PT2, PEP, TAUOCX, TAUOCY, &
PTHP0, PQP, PSW, PPE, PGW, QP, QKK, &
+ SKEW, EMBIA1, EMBIA2, &
TAUOX, TAUOY, TAUWIX,BHD, &
TAUWIY, PHIAW, PHIOC, TUSX, TUSY, PRMS, TPMS,&
USSX, USSY, MSSX, MSSY, MSCX, MSCY, CHARN, &
@@ -2216,6 +2217,39 @@ SUBROUTINE W3EXGO ( NX, NY, NSEA )
CALL W3S2XY ( NSEA, NSEA, NX+1, NY, QKK, MAPSF, X1 )
ENDIF
!
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 7 ) THEN
+ FLONE = .TRUE.
+ FSC = 0.01
+ UNITS = '1'
+ ENAME = '.skw'
+ IF ( ITYPE .EQ. 4 ) THEN
+ XS1 = SKEW
+ ELSE
+ CALL W3S2XY ( NSEA, NSEA, NX+1, NY, SKEW, MAPSF, X1 )
+ ENDIF
+ !
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 8 ) THEN
+ FLONE = .TRUE.
+ FSC = 0.0001
+ UNITS = '1'
+ ENAME = '.emb'
+ IF ( ITYPE .EQ. 4 ) THEN
+ XS1 = EMBIA1
+ ELSE
+ CALL W3S2XY ( NSEA, NSEA, NX+1, NY, EMBIA1, MAPSF, X1 )
+ ENDIF
+ !
+ ELSE IF ( IFI .EQ. 8 .AND. IFJ .EQ. 9 ) THEN
+ FLONE = .TRUE.
+ FSC = 0.0001
+ UNITS = '1'
+ ENAME = '.emc'
+ IF ( ITYPE .EQ. 4 ) THEN
+ XS1 = EMBIA2
+ ELSE
+ CALL W3S2XY ( NSEA, NSEA, NX+1, NY, EMBIA2, MAPSF, X1 )
+ ENDIF
+ !
ELSE IF ( IFI .EQ. 9 .AND. IFJ .EQ. 1 ) THEN
FLONE = .TRUE.
FSC = 0.1
@@ -2433,7 +2467,7 @@ SUBROUTINE W3EXGO ( NX, NY, NSEA )
OPEN (NDSDAT,FILE=FNMPRE(:JJ)//FNAME,ERR=800, &
IOSTAT=IERR)
IF (FSC.LT.1E-4) THEN
- WRITE(FSCS,'(G7.1)') FSC
+ WRITE(FSCS,'(G8.1)') FSC
ELSE
WRITE(FSCS,'(F7.4)') FSC
END IF
diff --git a/model/src/ww3_outp.F90 b/model/src/ww3_outp.F90
index 6d750687a..d793783ca 100644
--- a/model/src/ww3_outp.F90
+++ b/model/src/ww3_outp.F90
@@ -208,13 +208,16 @@ PROGRAM W3OUTP
#endif
USE W3ODATMD, ONLY: W3SETO, W3NOUT
USE W3IOGRMD, ONLY: W3IOGR
+#ifdef W3_BIN2NC
+ USE W3IOPOMD, ONLY: W3IOPON, W3IOPON_READ, W3IOPON_WRITE
+#else
USE W3IOPOMD, ONLY: W3IOPO
+#endif
USE W3SERVMD, ONLY : ITRACE, NEXTLN, EXTCDE
#ifdef W3_S
USE W3SERVMD, ONLY : STRACE
#endif
USE W3TIMEMD, ONLY: STME21, TICK21, DSEC21
- !/
USE W3GDATMD
USE W3WDATMD, ONLY: TIME
USE W3ODATMD, ONLY: NDSE, NDST, NDSO, NOPTS, PTLOC, PTNME, &
@@ -359,7 +362,11 @@ PROGRAM W3OUTP
!--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! 3. Read general data and first fields from file
!
+#if W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
!
WRITE (NDSO,930)
DO I=1, NOPTS
@@ -457,7 +464,11 @@ PROGRAM W3OUTP
DO
CALL STME21 ( TIME , IDTIME )
WRITE (NDSO,948) IDTIME
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
IF ( IOTEST .EQ. -1 ) THEN
WRITE (NDSO,949)
GOTO 888
@@ -777,7 +788,11 @@ PROGRAM W3OUTP
DO
DTEST = DSEC21 ( TIME , TOUT )
IF ( DTEST .GT. 0. ) THEN
+#ifdef W3_BIN2NC
+ CALL W3IOPON ( 'READ', NDSOP, IOTEST )
+#else
CALL W3IOPO ( 'READ', NDSOP, IOTEST )
+#endif
IF ( IOTEST .EQ. -1 ) THEN
WRITE (NDSO,949)
EXIT
diff --git a/model/src/ww3_prnc.F90 b/model/src/ww3_prnc.F90
index e77bbd918..e107a1f43 100644
--- a/model/src/ww3_prnc.F90
+++ b/model/src/ww3_prnc.F90
@@ -766,6 +766,9 @@ PROGRAM W3PRNC
CALL STME21 ( TIMESTOP , IDTIME )
IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,2931) IDTIME
END IF
+ IF(CALTYPE .NE. 'standard') THEN
+ IF ( IAPROC .EQ. NAPOUT ) WRITE (NDSO,2932) CALTYPE
+ ENDIF
END IF
IF (.NOT. FLTIME) THEN
CALL STME21 ( TIMESHIFT , IDTIME )
@@ -797,11 +800,26 @@ PROGRAM W3PRNC
CALL CHECK_ERR(IRET)
IRET=NF90_GET_ATT(NCID,VARIDTMP,"calendar",CALENDAR)
IF ( IRET/=NF90_NOERR ) THEN
+ ! No calendar attribute - default to "standard"
WRITE(NDSE,1028)
- ELSE IF ((INDEX(CALENDAR, "standard").EQ.0) .AND. &
- (INDEX(CALENDAR, "gregorian").EQ.0)) THEN
- WRITE(NDSE,1029)
+ CALENDAR = "standard"
+ ELSE IF ((INDEX(CALENDAR, "standard") .GT. 0) .OR. &
+ (INDEX(CALENDAR, "gregorian") .GT. 0)) THEN
+ CALENDAR = "standard"
+ ELSE IF (INDEX(CALENDAR, "360_day") .GT. 0) THEN
+ CALENDAR = "360_day"
+ ELSE
+ ! Calendar attribute set, but not a recognised calendar.
+ WRITE(NDSE,1029) CALENDAR
+ CALL EXTCDE( 25 )
END IF
+
+ ! Check input calendar compatible with expected calendar
+ IF(CALENDAR .NE. CALTYPE) THEN
+ WRITE(NDSE,1027) CALTYPE, CALENDAR
+ CALL EXTCDE( 26 )
+ ENDIF
+
IRET=NF90_GET_ATT(NCID,VARIDTMP,"units",TIMEUNITS)
CALL CHECK_ERR(IRET)
CALL U2D(TIMEUNITS,REFDATE,IERR)
@@ -821,7 +839,7 @@ PROGRAM W3PRNC
END DO
IRET=NF90_GET_ATT(NCID,VARIDF(I),"_FillValue", FILLVALUE)
IF ( IRET/=NF90_NOERR ) THEN
- WRITE(NDSE,1027) TRIM(FIELDSNAME(I))
+ WRITE(NDSE,1026) TRIM(FIELDSNAME(I))
CALL EXTCDE ( 27 )
END IF
END DO
@@ -1059,7 +1077,7 @@ PROGRAM W3PRNC
! Manages the simple closure of the grid
!
IF (ICLO.EQ.ICLOSE_NONE) THEN
- IF (IX21(IX,1).LT.1.OR.IX21(IX,1).GT.NXI-1) WRITE(NDSO,1042) IX, IY, X, Y
+ IF (IX21(IX,1).LT.1.OR.IX21(IX,1).GT.NXI-1) WRITE(NDSO,1041) IX, X, Y
IX21(IX,1) = MAX ( 1 , MIN(IX21(IX,1),NXI-1) )
IX22(IX,1) = IX21(IX,1) + 1
ELSE
@@ -1067,7 +1085,7 @@ PROGRAM W3PRNC
IX22(IX,1) = MOD(IX21(IX,1),NXI)+1
END IF
IY21(IX,1) = 1 + INT((Y-Y0I)/SYI)
- IF (IY21(IX,1).LT.1.OR.IY21(IX,1).GT.NYI-1) WRITE(NDSO,1042) IX, IY, X, Y
+ IF (IY21(IX,1).LT.1.OR.IY21(IX,1).GT.NYI-1) WRITE(NDSO,1041) IX, X, Y
IY21(IX,1) = MAX ( 1 , MIN(IY21(IX,1),NYI-1) )
IY22(IX,1) = IY21(IX,1) + 1
!
@@ -2317,6 +2335,7 @@ PROGRAM W3PRNC
2930 FORMAT ( ' Field corrected for energy conservation.')
1931 FORMAT ( ' Start time : ',A)
2931 FORMAT ( ' Stop time : ',A)
+2932 FORMAT ( ' Calendar : ',A)
3931 FORMAT ( ' Shifted time : ',A)
932 FORMAT (/' Input grid dim. :',I9,3X,I5)
1933 FORMAT ( ' Longitude range :',2F8.2,' (deg)'/ &
@@ -2404,15 +2423,23 @@ PROGRAM W3PRNC
1011 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
' NO GRID SELECTED'/)
!
-1027 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
+1026 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
' _FillValue ATTRIBUTE NOT DEFINED FOR : ',A/)
- !
+ !
+1027 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
+ ' INCOMPATIBLE CALENDARS:' / &
+ ' MODEL CALENDAR : ', A / &
+ ' INPUT FILE CALENDAR : ', A /)
1028 FORMAT (/' *** WAVEWATCH III WARNING IN W3PRNC : '/ &
' calendar ATTRIBUTE NOT DEFINED'/ &
- ' IT MUST RESPECT STANDARD OR GREGORIAN CALENDAR')
-1029 FORMAT (/' *** WAVEWATCH III WARNING IN W3PRNC : '/ &
- ' CALENDAR ATTRIBUTE NOT MATCH'/ &
- ' IT MUST RESPECT STANDARD OR GREGORIAN CALENDAR')
+ ' DEFAULTING TO "standard" CALENDAR'/ &
+ ' INPUT FILE MUST RESPECT STANDARD/GREGORIAN CALENDAR')
+1029 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
+ ' UNKNOWN CALENDAR TYPE: ', A / &
+ ' "calendar" ATTRIBUTE MUST BE ONE OF: '/ &
+ ' - standard'/ &
+ ' - gregorian'/ &
+ ' - 360_day'/ )
1030 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
' ILLEGAL FIELD ID -->',A,'<--'/)
1031 FORMAT (/' *** WAVEWATCH III ERROR IN W3PRNC : '/ &
@@ -2438,6 +2465,9 @@ PROGRAM W3PRNC
' 2MS2 2MN2 2NK2 MNS2 MSN2 2SM2 3MSN2 ' &
' M4 MS4 MN4 M6 2MS6 2MN6'/)
!
+1041 FORMAT (/' *** WAVEWATCH-III WARNING W3PRNC : '/ &
+ ' GRID POINT ',I6,2F7.2,/ &
+ ' NOT COVERED BY INPUT GRID.'/)
1042 FORMAT (/' *** WAVEWATCH-III WARNING W3PRNC : '/ &
' GRID POINT ',2I6,2F7.2,/ &
' NOT COVERED BY INPUT GRID.'/)
diff --git a/model/src/ww3_shel.F90 b/model/src/ww3_shel.F90
index ee3464f44..4bb888b48 100644
--- a/model/src/ww3_shel.F90
+++ b/model/src/ww3_shel.F90
@@ -304,6 +304,10 @@ PROGRAM W3SHEL
#endif
!
USE W3NMLSHELMD
+
+#ifdef W3_OMPG
+ USE OMP_LIB
+#endif
IMPLICIT NONE
!
#ifdef W3_MPI
@@ -481,6 +485,7 @@ PROGRAM W3SHEL
#ifdef W3_OMPH
ENDIF
#endif
+
#ifdef W3_MPI
MPI_COMM = MPI_COMM_WORLD
#endif
@@ -583,6 +588,11 @@ PROGRAM W3SHEL
MPI_THREAD_FUNNELED, THRLEV
#endif
!
+#ifdef W3_OMPG
+ IF(IAPROC .EQ. NAPOUT) THEN
+ WRITE(NDSO, 906) omp_get_max_threads()
+ ENDIF
+#endif
!
! 1.b For WAVEWATCH III (See W3INIT)
@@ -2737,6 +2747,10 @@ PROGRAM W3SHEL
905 FORMAT ( ' Hybrid MPI/OMP thread support level:'/ &
' Requested: ', I2/ &
' Provided: ', I2/ )
+#endif
+ !
+#ifdef W3_OMPG
+906 FORMAT ( ' OMP threading enabled. Number of threads: ', I3 / )
#endif
920 FORMAT (/' Input fields : '/ &
' --------------------------------------------------')
diff --git a/model/tools/bash/ww3_ounf_inp2nml.sh b/model/tools/bash/ww3_ounf_inp2nml.sh
index e9a34d7b8..1edd05562 100755
--- a/model/tools/bash/ww3_ounf_inp2nml.sh
+++ b/model/tools/bash/ww3_ounf_inp2nml.sh
@@ -184,7 +184,7 @@ cat >> $nmlfile << EOF
! UST CHA CGE FAW TAW TWA WCC WCF WCH WCM FWS
! SXY TWO BHD FOC TUS USS P2S USF P2L TWI FIC USP TOC
! ABR UBR BED FBB TBB
-! MSS MSC WL02 AXT AYT AXY
+! MSS MSC MSD MCD QP QKK SKW EMB EMC
! DTD FC CFX CFD CFK
! U1 U2
!
diff --git a/model/tools/bash/ww3_shel_inp2nml.sh b/model/tools/bash/ww3_shel_inp2nml.sh
index 619002aa8..8ea336e13 100755
--- a/model/tools/bash/ww3_shel_inp2nml.sh
+++ b/model/tools/bash/ww3_shel_inp2nml.sh
@@ -970,6 +970,9 @@ cat >> $nmlfile << EOF
! F F 8 4 MSCD MCD Tail slope direction
! F F 8 5 QP QP Goda peakedness parameter
! F F 8 6 QKK QKK Wavenumber peakedness
+! F F 8 7 SKEW SKW Skewness of elevation for zero slopes
+! F F 8 8 EMBIA1 EMB Mean sea level at zero slopes / Hs
+! F F 8 9 EMBIA2 EMC Tracker bias for LRM least square altimetry
! -------------------------------------------------
! 9 Numerical diagnostics
! -------------------------------------------------
diff --git a/regtests/bin/matrix.base b/regtests/bin/matrix.base
index 97ae213f4..4b7e1e71a 100755
--- a/regtests/bin/matrix.base
+++ b/regtests/bin/matrix.base
@@ -180,6 +180,7 @@
if [ "$prop2D" = 'y' ]
then
echo ' ' >> matrix.body
+ echo "$rtst -s PR1_MPI_BIN2NC -w work_PR1_MPI_BIN2NC -f -p $mpi -n $np $ww3 ww3_tp2.2" >> matrix.body
echo "$rtst -s PR1_MPI -w work_PR1_MPI -f -p $mpi -n $np $ww3 ww3_tp2.1" >> matrix.body
echo "$rtst -s PR1_MPI -w work_PR1_MPI -f -p $mpi -n $np $ww3 ww3_tp2.2" >> matrix.body
echo "$rtst -s PR1_MPI -w work_PR1_MPI -f -p $mpi -n $np $ww3 ww3_tp2.3" >> matrix.body
@@ -918,6 +919,7 @@
echo "$rtst -g ST4_T702 -w work_T702 -i input_10ms -N $ww3 ww3_ts1" >> matrix.body
echo "$rtst -g ST4_T707 -w work_T707GQM -i input_10ms -N $ww3 ww3_ts1" >> matrix.body
echo "$rtst -g ST4_T713 -w work_T713GQM -i input_10ms -N $ww3 ww3_ts1" >> matrix.body
+ echo "$rtst -s ST4 -w work_ST4_CAP -i input_capcha -N $ww3 ww3_ts1" >> matrix.body
fi
# fetch limited growth, no switch sharing here
@@ -1955,6 +1957,7 @@
echo "$rtst -w work_IC4_M7 -i input_IC4_M7 $ww3 ww3_tic1.1" >> matrix.body
echo "$rtst -w work_IC4_M8 -i input_IC4_M8 $ww3 ww3_tic1.1" >> matrix.body
echo "$rtst -w work_IC4_M9 -i input_IC4_M9 $ww3 ww3_tic1.1" >> matrix.body
+ echo "$rtst -w work_IC4_M10 -i input_IC4_M10 $ww3 ww3_tic1.1" >> matrix.body
echo "$rtst -g 1000m -w work_IC5_M1 -i input_IC5_M1 $ww3 ww3_tic1.1" >> matrix.body
echo "$rtst -g 1000m -w work_IC5_M2 -i input_IC5_M2 $ww3 ww3_tic1.1" >> matrix.body
echo "$rtst -g 1000m -w work_IC5_M3 -i input_IC5_M3 $ww3 ww3_tic1.1" >> matrix.body
diff --git a/regtests/bin/matrix_cmake_ncep b/regtests/bin/matrix_cmake_ncep
index 7d0d26bec..1fa1a2d6f 100755
--- a/regtests/bin/matrix_cmake_ncep
+++ b/regtests/bin/matrix_cmake_ncep
@@ -22,28 +22,37 @@ usage ()
{
cat 2>&1 << EOF
- Usage: $myname model_dir
+ Usage: $myname model_dir compiler
Required:
model_dir : path to model dir of WW3 source
+ Optional:
+ compiler : intel (default) or gnu
EOF
}
-
# Get required arguments
if [ ! $# = 0 ]
then
main_dir="$1" ; shift
+ if [ ! $# = 0 ]
+ then
+ compiler="$1"; shift
+ else
+ compiler='intel'
+ fi
else
usage
exit 1
fi
+
+
# Convert main_dir to absolute path
main_dir="`cd $main_dir 1>/dev/null 2>&1 && pwd`"
# Module Versions from spack-stack that are common for all platforms
modnetcdfc='netcdf-c/4.9.2'
- modnetcdff='netcdf-fortran/4.6.0'
+ modnetcdff='netcdf-fortran/4.6.1'
modjasper='jasper/2.0.32'
modzlib='zlib/1.2.13'
modpng='libpng/1.6.37'
@@ -51,30 +60,71 @@ EOF
modbacio='bacio/2.4.1'
modg2='g2/3.4.5'
modw3emc='w3emc/2.10.0'
- modesmf='esmf/8.4.2'
+ modesmf='esmf/8.6.0'
modscotch='scotch/7.0.4'
# Set batchq queue, choose modules and other custom variables to fit system and
# to define headers etc (default to original version if empty)
ishera=`hostname | grep hfe`
- isorion=`hostname | grep Orion`
+ isorion=`hostname | grep orion`
+ ishercules=`hostname | grep hercules`
if [ $ishera ]
then
- # If no other h, assuming Hera
batchq='slurm'
- spackstackpath='/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-noavx512/install/modulefiles/Core'
- modcomp='stack-intel/2021.5.0'
- modmpi='stack-intel-oneapi-mpi/2021.5.1'
- metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/spack-stack/1.5.0/parmetis-4.0.3/install'
- modcmake='cmake/3.23.1'
+ if [ $compiler = "intel" ]
+ then
+ spackstackpath='/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core'
+ modcomp='stack-intel/2021.5.0'
+ modmpi='stack-intel-oneapi-mpi/2021.5.1'
+ metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hera/intel/spack-stack/1.6.0/parmetis-4.0.3/install'
+ modcmake='cmake/3.23.1'
+ elif [ $compiler = "gnu" ]
+ then
+ spackstackpath='/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core'
+ modcomp='stack-gcc/9.2.0'
+ modmpi='stack-openmpi/4.1.5'
+ metispath='/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/opt/hera/gnu/spack-stack/1.6.0/parmetis-4.0.3/install'
+ modcmake='cmake/3.23.1'
+ else
+ echo "Compiler $compiler not supported on hera"
+ exit 1
+ fi
elif [ $isorion ]
+ then
+ if [ $compiler = "intel" ]
+ then
+ batchq='slurm'
+ spackstackpath='/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env-rocky9/install/modulefiles/Core'
+ modcomp='stack-intel/2021.9.0'
+ modmpi='stack-intel-oneapi-mpi/2021.9.0'
+ metispath='/work/noaa/marine/Matthew.Masarik/waves/opt/orion/intel/spack-stack/1.6.0/parmetis-4.0.3/install'
+ modcmake='cmake/3.23.1'
+ else
+ echo "Compiler $compiler not supported on orion"
+ exit 1
+ fi
+ elif [ $ishercules ]
then
batchq='slurm'
- spackstackpath='/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core'
- modcomp='stack-intel/2022.0.2'
- modmpi='stack-intel-oneapi-mpi/2021.5.1'
- metispath='/work/noaa/marine/Matthew.Masarik/waves/opt/spack-stack/1.5.0/parmetis-4.0.3/install'
- modcmake='cmake/3.23.1'
+ if [ $compiler = "intel" ]
+ then
+ spackstackpath='/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core'
+ modcomp='stack-intel/2021.9.0'
+ modmpi='stack-intel-oneapi-mpi/2021.9.0'
+ metispath='/work/noaa/marine/Matthew.Masarik/waves/opt/hercules/intel/spack-stack/1.6.0/parmetis-4.0.3/install'
+ modcmake='cmake/3.23.1'
+ elif [ $compiler = "gnu" ]
+ then
+ spackstackpath='/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core'
+ spackstackpath2='/work/noaa/epic/role-epic/spack-stack/hercules/modulefiles'
+ modcomp='stack-gcc/12.2.0'
+ modmpi='stack-mvapich2/2.3.7'
+ metispath='/work/noaa/marine/Matthew.Masarik/waves/opt/hercules/gnu/spack-stack/1.6.0/parmetis-4.0.3/install'
+ modcmake='cmake/3.23.1'
+ else
+ echo "Compiler $compiler not supported on hercules"
+ exit 1
+ fi
else
batchq=
fi
@@ -105,10 +155,19 @@ EOF
echo '#SBATCH --exclusive' >> matrix.head
echo ' ' >> matrix.head
echo 'ulimit -s unlimited' >> matrix.head
- echo 'ulimit -c 0' >> matrix.head
- echo 'export KMP_STACKSIZE=2G' >> matrix.head
- echo 'export FI_OFI_RXM_BUFFER_SIZE=128000' >> matrix.head
- echo 'export FI_OFI_RXM_RX_SIZE=64000' >> matrix.head
+ elif [ $batchq = "slurm" ] && [ $ishercules ]
+ then
+ echo "#SBATCH -n ${np}" >> matrix.head
+ echo "##SBATCH --cpus-per-task=${nth}" >> matrix.head
+ echo '#SBATCH -q batch' >> matrix.head
+ echo '#SBATCH -t 08:00:00' >> matrix.head
+ echo '#SBATCH -A marine-cpu' >> matrix.head
+ echo '#SBATCH -J ww3_regtest' >> matrix.head
+ echo '#SBATCH -o matrix.out' >> matrix.head
+ echo '#SBATCH -p hercules' >> matrix.head
+ echo '#SBATCH --exclusive' >> matrix.head
+ echo ' ' >> matrix.head
+ echo 'ulimit -s unlimited' >> matrix.head
elif [ $batchq = "slurm" ]
then
echo "#SBATCH -n ${np}" >> matrix.head
@@ -133,13 +192,10 @@ EOF
# Netcdf, Parmetis and SCOTCH modules & variables
echo " module purge" >> matrix.head
- if [ ! -z $basemodcomp ]; then
- echo " module load $basemodcomp" >> matrix.head
- fi
- if [ ! -z $basemodmpi ]; then
- echo " module load $basemodmpi" >> matrix.head
+ echo " module use $spackstackpath" >> matrix.head
+ if [ ! -z $spackstackpath2 ]; then
+ echo " module use $spackstackpath2" >> matrix.head
fi
- echo " module use $spackstackpath" >> matrix.head
echo " module load $modcomp" >> matrix.head
echo " module load $modmpi" >> matrix.head
echo " module load $modcmake" >> matrix.head
diff --git a/regtests/bin/run_cmake_test b/regtests/bin/run_cmake_test
index 844f3e23e..07ade5a8b 100755
--- a/regtests/bin/run_cmake_test
+++ b/regtests/bin/run_cmake_test
@@ -435,25 +435,26 @@ then
echo "Switch file is $path_build/switch with switches:" >> $ofile
cat $path_build/switch >> $ofile
- cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install > $ofile 2>&1
+ cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install >> $ofile 2>&1
rc=$?
- if [[ $rc -ne 0 ]] ; then
+ if (( rc != 0 )); then
echo "Fatal error in cmake."
- echo "The build log is in $ofile"
- exit
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
- make -j 8 > $ofile 2>&1
+ make -j 8 VERBOSE=1 >> $ofile 2>&1
rc=$?
- if [[ $rc -ne 0 ]] ; then
+ if (( rc != 0 )); then
echo "Fatal error in make."
- echo "The build log is in $ofile"
- exit
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
- make install > $ofile 2>&1
- if [[ $rc -ne 0 ]] ; then
+ make install >> $ofile 2>&1
+ rc=$?
+ if (( rc != 0 )); then
echo "Fatal error in make install."
echo "The build log is in $ofile"
- exit
+ exit ${rc}
fi
cp $path_build/install/bin/* $path_e/
@@ -468,24 +469,26 @@ then
\cp -f $file_c $path_build/switch
echo "Switch file is $path_build/switch with switches:" >> $ofile
cat $path_build/switch >> $ofile
- cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install > $ofile 2>&1
+ cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install >> $ofile 2>&1
rc=$?
- if [[ $rc -ne 0 ]] ; then
+ if (( rc != 0 )); then
echo "Fatal error in cmake."
- echo "The build log is in $ofile"
- exit
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
- make -j 8 > $ofile 2>&1
- if [[ $rc -ne 0 ]] ; then
+ make -j 8 VERBOSE=1 >> $ofile 2>&1
+ rc=$?
+ if (( rc != 0 )); then
echo "Fatal error in make."
- echo "The build log is in $ofile"
- exit
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
- make install > $ofile 2>&1
- if [[ $rc -ne 0 ]] ; then
+ make install >> $ofile 2>&1
+ rc=$?
+ if (( rc != 0 )); then
echo "Fatal error in make install."
echo "The build log is in $ofile"
- exit
+ exit ${rc}
fi
path_e=$path_w/exe
cp $path_build/install/bin/ww3_shel $path_e/
@@ -507,24 +510,26 @@ else
fi
echo "Switch file is $path_build/switch with switches:" >> $ofile
cat $path_build/switch >> $ofile
- cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install > $ofile 2>&1
+ cmake $path_cmake ${CMAKE_OPTIONS} -DSWITCH=$path_build/switch -DCMAKE_INSTALL_PREFIX=install >> $ofile 2>&1
rc=$?
- if [[ $rc -ne 0 ]] ; then
+ if (( rc != 0 )); then
echo "Fatal error in cmake."
- echo "The build log is in $ofile"
- exit
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
- make -j 8 > $ofile 2>&1
- if [[ $rc -ne 0 ]] ; then
+ make -j 8 VERBOSE=1 >> $ofile 2>&1
+ rc=$?
+ if (( rc != 0 )); then
echo "Fatal error in make."
- echo "The build log is in $ofile"
- exit
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
- make install > $ofile 2>&1
- if [[ $rc -ne 0 ]] ; then
- echo "Fatal error in make install."
- echo "The build log is in $ofile"
- exit
+ make install >> $ofile 2>&1
+ rc=$?
+ if (( rc != 0 )); then
+ echo "Fatal error in make."
+ echo "The build log is in ${ofile}"
+ exit ${rc}
fi
cp $path_build/install/bin/* $path_e/
diff --git a/regtests/unittests/CMakeLists.txt b/regtests/unittests/CMakeLists.txt
index 69445bfb7..1d3d81f60 100644
--- a/regtests/unittests/CMakeLists.txt
+++ b/regtests/unittests/CMakeLists.txt
@@ -24,16 +24,25 @@ endfunction()
# Function to build and run a test.
function(unit_test name)
- add_executable(${name} ${name}.F90)
+ add_executable(${name} ${name}.F90 ww3_unittest_util.F90)
target_link_libraries(${name} PRIVATE ww3_lib)
add_test(NAME ${name} COMMAND ${name})
endfunction()
+# The binary file mod_def.ww3 is needed for testing. It's created by
+# the ww3_grid utility.
+#add_custom_target(create_mod_def TEST ../../bin/ww3_grid
+# COMMENT "Creating mod_def.ww3 file for testing")
+
# Copy test data files that are in the repo to the build directory.
copy_test_data(switch.io)
copy_test_data_2(ww3_grid.inp ww3_grid.inp)
# Build and run the tests.
unit_test(test_io_points_bin)
+unit_test(test_io)
+unit_test(test_io2)
+unit_test(test_io3)
+unit_test(test_io_restart_bin)
diff --git a/regtests/unittests/test_io.F90 b/regtests/unittests/test_io.F90
new file mode 100644
index 000000000..ebe4e2385
--- /dev/null
+++ b/regtests/unittests/test_io.F90
@@ -0,0 +1,117 @@
+! This is a test for model IO for WW3.
+!
+! Ed Hartnett 10/14/23
+program test_io
+ use w3iopomd
+ use w3gdatmd
+ use w3wdatmd
+ use w3odatmd
+ use w3iogrmd
+ use w3adatmd
+ implicit none
+
+ integer, target :: i, j, k, l
+ integer :: ndsop, iotest, imod, ndstst, ierr, ndsbul, ndsm
+ integer :: ndstrc, ntrace
+ real :: m2km
+ character*7 expected_ptnme
+ character*6 my_fmt
+ real :: expected_loc_1
+ integer :: write_test_file
+
+ print *, 'Testing WW3 netCDF point file code.'
+
+ ! These are mysterious but have to be called or else the IPASS
+ ! variable does not exist and w3iopo() crashes.
+ call w3nmod(1, 6, 6)
+ call w3setg(1, 6, 6)
+ call w3ndat(6, 6)
+ call w3setw(1, 6, 6)
+ call w3nout(6, 6)
+ call w3seto(1, 6, 6)
+
+ ndsm = 20
+ ndsop = 20
+ ndsbul = 0
+ ndstrc = 6
+ ntrace = 10
+ imod = 1
+
+ write (ndso,900)
+900 FORMAT (/15X,' *** WAVEWATCH III Point output post.*** '/ &
+ 15X,'==============================================='/)
+
+ ! Open the file with the output settings for WW3. It is not needed actually.
+ ! open(ndsi, file = 'ww3_outp.inp', status='old', iostat = ierr)
+ ! if (ierr .ne. 0) stop 10
+
+ ! Create a point output file needed for this test.
+ print *, 'Creating point output test file for this test...'
+ if (write_test_file() .ne. 0) stop 1
+
+ ! 2. Read model definition file.
+ CALL W3IOGR('READ', NDSM)
+ WRITE (NDSO,920) GNAME
+920 FORMAT (' Grid name : ',A/)
+
+ ! IF (FLAGLL) THEN
+ ! M2KM = 1.
+ ! ELSE
+ ! M2KM = 1.E-3
+ ! END IF
+
+ ! Read the file out_pnt.ww3 from the model/tests/data directory.
+ print *, 'OK!'
+ print *, 'Reading the point output test file for this test...'
+ call w3iopo('READ', ndsop, iotest)
+ if (iotest .ne. 0) stop 10
+ close(ndsop)
+
+ ! Make sure we got the values we expected.
+ if (nopts .ne. 11) stop 11
+ expected_loc_1 = 0.0
+ do i = 1, nopts
+ ! Check ptnme and ptloc arrays.
+ print *, ptnme(i), ptloc(1, i), ptloc(2, i)
+ if (i .lt. 10) then
+ my_fmt = '(a,i1)'
+ else
+ my_fmt = '(a,i2)'
+ endif
+ write(fmt = my_fmt, unit=expected_ptnme) 'Point', i
+ if (ptnme(i) .ne. expected_ptnme) stop 20
+ print *, expected_loc_1
+ if (ptloc(1, i) .ne. expected_loc_1) stop 21
+ expected_loc_1 = expected_loc_1 + 5000.0
+ if (ptloc(2, i) .ne. 0) stop 22
+ end do
+
+ print *, 'OK!'
+ print *, 'initializing some data...'
+ ipass2 = 0
+ do i = 1, nopts
+ do j = 1, nspec
+ spco(j, i) = 0.0
+ end do
+ end do
+
+ print *, 'OK!'
+ print *, 'testing writing the WW3 binary point file in netCDF...'
+
+ ! Write in netCDF.
+ call w3iopon('WRITE', ndsop, iotest, imod)
+ if (iotest .ne. 0) stop 100
+ print *, 'OK!'
+
+ print *, 'testing reading the WW3 binary point file in netCDF...'
+ ipass2 = 0
+ call w3iopon('READ', ndsop, iotest, imod)
+ print *, iotest
+ if (iotest .ne. 0) stop 100
+ print *, 'OK!'
+
+ print *, 'OK!'
+
+ print *, 'SUCCESS!'
+end program test_io
+
diff --git a/regtests/unittests/test_io2.F90 b/regtests/unittests/test_io2.F90
new file mode 100644
index 000000000..b7fe5092d
--- /dev/null
+++ b/regtests/unittests/test_io2.F90
@@ -0,0 +1,123 @@
+! This is a test for model IO for WW3.
+!
+! Ed Hartnett 10/14/23
+program test_io2
+ use w3iopomd
+ use w3gdatmd
+ use w3wdatmd
+ use w3odatmd
+ use w3iogrmd
+ use w3adatmd
+ implicit none
+
+ integer, target :: i, j, k, l
+ integer :: ndsop, iotest, imod, ndstst, ierr, ndsbul, ndsm
+ integer :: ndstrc, ntrace
+ real :: m2km
+ character*7 expected_ptnme
+ character*6 my_fmt
+ real :: expected_loc_1
+ integer :: write_test_file
+
+ print *, 'Testing WW3 netCDF point file code some more.'
+
+ ! These are mysterious but have to be called or else the IPASS
+ ! variable does not exist and w3iopo() crashes.
+ call w3nmod(1, 6, 6)
+ call w3setg(1, 6, 6)
+ call w3ndat(6, 6)
+ call w3setw(1, 6, 6)
+ call w3nout(6, 6)
+ call w3seto(1, 6, 6)
+
+ ndsm = 20
+ ndsop = 20
+ ndsbul = 0
+ ndstrc = 6
+ ntrace = 10
+ imod = 1
+
+ write (ndso,900)
+900 FORMAT (/15X,' *** WAVEWATCH III Point output post.*** '/ &
+ 15X,'==============================================='/)
+
+ ! Open the file with the output settings for WW3. It is not needed actually.
+ ! open(ndsi, file = 'ww3_outp.inp', status='old', iostat = ierr)
+ ! if (ierr .ne. 0) stop 10
+
+ ! Create a point output file needed for this test.
+ print *, 'Creating point output test file for this test...'
+ if (write_test_file() .ne. 0) stop 1
+
+ ! 2. Read model definition file.
+ CALL W3IOGR('READ', NDSM)
+ WRITE (NDSO,920) GNAME
+920 FORMAT (' Grid name : ',A/)
+
+ ! IF (FLAGLL) THEN
+ ! M2KM = 1.
+ ! ELSE
+ ! M2KM = 1.E-3
+ ! END IF
+
+ ! Read the file out_pnt.ww3 from the model/tests/data directory.
+ print *, 'OK!'
+ print *, 'Reading the point output test file for this test...'
+ call w3iopo('READ', ndsop, iotest)
+ if (iotest .ne. 0) stop 10
+ close(ndsop)
+
+ ! Make sure we got the values we expected.
+ if (nopts .ne. 11) stop 11
+ expected_loc_1 = 0.0
+ do i = 1, nopts
+ ! Check ptnme and ptloc arrays.
+ print *, ptnme(i), ptloc(1, i), ptloc(2, i)
+ if (i .lt. 10) then
+ my_fmt = '(a,i1)'
+ else
+ my_fmt = '(a,i2)'
+ endif
+ write(fmt = my_fmt, unit=expected_ptnme) 'Point', i
+ if (ptnme(i) .ne. expected_ptnme) stop 20
+ print *, expected_loc_1
+ if (ptloc(1, i) .ne. expected_loc_1) stop 21
+ expected_loc_1 = expected_loc_1 + 5000.0
+ if (ptloc(2, i) .ne. 0) stop 22
+ end do
+
+ print *, 'OK!'
+ print *, 'initializing some data...'
+ ipass2 = 0
+ do i = 1, nopts
+ do j = 1, nspec
+ spco(j, i) = 0.0
+ end do
+ end do
+
+ print *, 'OK!'
+ print *, 'testing writing the WW3 binary point file in netCDF...'
+
+ ! Write in netCDF.
+ ofiles(2) = 1
+ call w3iopon('WRITE', ndsop, iotest, imod)
+ if (iotest .ne. 0) stop 100
+ print *, 'OK!'
+
+ ! Another timestep in netCDF.
+ call w3iopon('WRITE', ndsop, iotest, imod)
+ if (iotest .ne. 0) stop 100
+ print *, 'OK!'
+
+ print *, 'testing reading the WW3 binary point file in netCDF...'
+ ipass2 = 0
+ call w3iopon('READ', ndsop, iotest)
+ print *, iotest
+ if (iotest .ne. 0) stop 100
+ print *, 'OK!'
+
+ print *, 'OK!'
+
+ print *, 'SUCCESS!'
+end program test_io2
+
diff --git a/regtests/unittests/test_io3.F90 b/regtests/unittests/test_io3.F90
new file mode 100644
index 000000000..b5f65849c
--- /dev/null
+++ b/regtests/unittests/test_io3.F90
@@ -0,0 +1,110 @@
+! This is a test for model IO for WW3.
+!
+! Ed Hartnett 10/14/23
+program test_io3
+ use w3iopomd
+ use w3gdatmd
+ use w3wdatmd
+ use w3odatmd
+ use w3iogrmd
+ use w3adatmd
+ implicit none
+
+ integer, target :: i, j, k, l
+ integer :: ndsop, iotest, imod, ndstst, ierr, ndsbul, ndsm
+ integer :: ndstrc, ntrace
+ real :: m2km
+ character*7 expected_ptnme
+ character*6 my_fmt
+ real :: expected_loc_1
+ integer :: write_test_file
+
+ print *, 'Testing WW3 netCDF point file code even more.'
+
+ ! These are mysterious but have to be called or else the IPASS
+ ! variable does not exist and w3iopo() crashes.
+ call w3nmod(1, 6, 6)
+ call w3setg(1, 6, 6)
+ call w3ndat(6, 6)
+ call w3setw(1, 6, 6)
+ call w3nout(6, 6)
+ call w3seto(1, 6, 6)
+
+ nth = 4
+ ndsm = 20
+ ndsop = 20
+ ndsbul = 0
+ ndstrc = 6
+ ntrace = 10
+ imod = 1
+
+ ! 2. Read model definition file.
+ CALL W3IOGR('READ', NDSM)
+ WRITE (NDSO,920) GNAME
+920 FORMAT (' Grid name : ',A/)
+
+ ! Create a point output file needed for this test.
+ print *, 'Creating point output test file for this test...'
+ if (write_test_file() .ne. 0) stop 1
+
+ ! Read the file out_pnt.ww3 from the model/tests/data directory.
+ ! print *, 'OK!'
+ ! print *, 'Reading the point output test file for this test...'
+ call w3iopo('READ', ndsop, iotest)
+ if (iotest .ne. 0) stop 10
+ close(ndsop)
+
+ ! ! Make sure we got the values we expected.
+ ! if (nopts .ne. 11) stop 11
+ ! expected_loc_1 = 0.0
+ ! do i = 1, nopts
+ ! ! Check ptnme and ptloc arrays.
+ ! print *, ptnme(i), ptloc(1, i), ptloc(2, i)
+ ! if (i .lt. 10) then
+ ! my_fmt = '(a,i1)'
+ ! else
+ ! my_fmt = '(a,i2)'
+ ! endif
+ ! write(fmt = my_fmt, unit=expected_ptnme) 'Point', i
+ ! if (ptnme(i) .ne. expected_ptnme) stop 20
+ ! print *, expected_loc_1
+ ! if (ptloc(1, i) .ne. expected_loc_1) stop 21
+ ! expected_loc_1 = expected_loc_1 + 5000.0
+ ! if (ptloc(2, i) .ne. 0) stop 22
+ ! end do
+
+ print *, 'OK!'
+ print *, 'initializing some data...'
+ ipass2 = 0
+ do i = 1, nopts
+ do j = 1, nspec
+ spco(j, i) = 0.0
+ end do
+ end do
+
+ print *, 'OK!'
+ print *, 'testing writing the WW3 binary point file in netCDF...'
+
+ ! ! Write in netCDF.
+ ! ofiles(2) = 1
+ ! call w3iopon('WRITE', ndsop, iotest, imod)
+ ! if (iotest .ne. 0) stop 100
+ ! print *, 'OK!'
+
+ ! ! Another timestep in netCDF.
+ ! call w3iopon('WRITE', ndsop, iotest, imod)
+ ! if (iotest .ne. 0) stop 100
+ ! print *, 'OK!'
+
+ print *, 'testing reading the WW3 binary point file in netCDF...'
+ ipass2 = 0
+ call w3iopon('READ', ndsop, iotest)
+ print *, iotest
+ if (iotest .ne. 0) stop 100
+ print *, 'OK!'
+
+ print *, 'OK!'
+
+ print *, 'SUCCESS!'
+end program test_io3
+
diff --git a/regtests/unittests/test_io_points_bin.F90 b/regtests/unittests/test_io_points_bin.F90
index 69c197bce..4093b24ba 100644
--- a/regtests/unittests/test_io_points_bin.F90
+++ b/regtests/unittests/test_io_points_bin.F90
@@ -79,74 +79,3 @@ program test_io_points_bin
print *, 'OK!'
print *, 'SUCCESS!'
end program test_io_points_bin
-
-integer function write_test_file()
- implicit none
-
- integer :: ntlu, nk, nth, nopts
- character(len=10), parameter :: veropt = '2021-04-06'
- character(len=31), parameter :: idstr = 'WAVEWATCH III POINT OUTPUT FILE'
- real :: ptloc(2,11) = reshape((/ 0., 0., 5000., 0., 10000., 0., 15000., 0., &
- 20000., 0., 25000., 0., 30000., 0., 35000., 0., 40000., 0., 45000., 0., 50000., 0. /), &
- (/ 2, 11 /))
- character*40 ptnme(11)
- integer :: time(2) = (/ 19680606, 0 /)
- integer :: nspec = 72
- integer :: iw(11) = (/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /)
- integer :: ii(11) = (/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /)
- integer :: il(11) = (/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /)
- real :: iceo(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
- real :: iceho(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
- real :: icefo(11) = (/ 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000. /)
- real :: dpo(11) = (/ 50., 50., 45., 40., 35., 30., 25., 20., 15., 10., 5. /)
- real :: wao(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
- real :: wdo(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
- real :: aso(11) = (/ -999.900024, -999.900024, -999.900024, -999.900024, -999.900024, &
- -999.900024, -999.900024, -999.900024, -999.900024, -999.900024, -999.900024 /)
- real :: cao(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
- real :: cdo(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
- character*13 :: grdid(11)
- real :: spco(72, 11)
- integer :: i, j
- integer :: ierr
-
- ! Initialize some values.
- ntlu = 21
- nk = 3
- nth = 24
- nopts = 11
- do i = 1, nopts
- if (i .le. 9) then
- write(ptnme(i), '(a,i1)') 'Point', i
- else
- write(ptnme(i), '(a,i2)') 'Point', i
- endif
- grdid(i) = 'ww3 '
- end do
-
- ! Open the file.
- open(ntlu, file="out_pnt.ww3", form="unformatted", status="replace", &
- action="write", convert="big_endian", iostat=ierr)
- if (ierr .ne. 0) stop 111
-
- ! Write our values.
- write (ntlu, iostat=ierr) idstr, veropt, nk, nth, nopts
- if (ierr .ne. 0) stop 112
- write (ntlu, iostat=ierr) ((ptloc(j,i),j=1,2),i=1,nopts), (ptnme(i),i=1,nopts)
- if (ierr .ne. 0) stop 113
- write (ntlu, iostat=ierr) time
- if (ierr .ne. 0) stop 114
- do i=1, nopts
- write (ntlu, iostat=ierr) iw(i), ii(i), il(i), dpo(i), wao(i), wdo(i), &
- aso(i), cao(i), cdo(i), iceo(i), iceho(i), &
- icefo(i), grdid(i), (spco(j,i),j=1,nspec)
- if (ierr .ne. 0) stop 115
- enddo
-
- ! Close the file.
- close(ntlu)
-
- ! We're done!
- write_test_file = 0
-end function write_test_file
-
diff --git a/regtests/unittests/test_io_restart_bin.F90 b/regtests/unittests/test_io_restart_bin.F90
new file mode 100644
index 000000000..026e8d3d2
--- /dev/null
+++ b/regtests/unittests/test_io_restart_bin.F90
@@ -0,0 +1,59 @@
+! This is a test for model IO for WW3. This tests the legacy (binary)
+! output of restart data, done by function W3IORS().
+!
+! Ed Hartnett 1/13/24
+program test_io_restart_bin
+ use w3iorsmd
+ use w3iopomd
+ use w3gdatmd
+ use w3wdatmd
+ use w3odatmd
+ use w3iogrmd
+ use w3adatmd
+ implicit none
+
+! integer, target :: i
+! integer :: ndsop, iotest, ndsbul, ndsm
+! integer :: ndstrc, ntrace
+! character*7 expected_ptnme
+! character*6 my_fmt
+! real :: expected_loc_1
+! integer :: ndsr = 11
+! real :: dumfpi = 99.9
+
+! print *, 'Testing WW3 binary restart file code.'
+
+! ! These are mysterious but have to be called or else the IPASS
+! ! variable does not exist and w3iopo() crashes.
+! call w3nmod(1, 6, 6)
+! call w3setg(1, 6, 6)
+! call w3ndat(6, 6)
+! call w3setw(1, 6, 6)
+! call w3nout(6, 6)
+! call w3seto(1, 6, 6)
+
+! ndsm = 20
+! ndsop = 20
+! ndsbul = 0
+! ndstrc = 6
+! ntrace = 10
+
+! write (ndso,900)
+! 900 FORMAT (/15X,' *** WAVEWATCH III Point output post.*** '/ &
+! 15X,'==============================================='/)
+
+! ! 2. Read model definition file.
+! CALL W3IOGR('READ', NDSM)
+! WRITE (NDSO,920) GNAME
+! 920 FORMAT (' Grid name : ',A/)
+
+! ! Read the file out_pnt.ww3 from the model/tests/data directory.
+! call w3iors('HOT', ndsr, dumfpi)
+! if (iotest .ne. 0) stop 10
+! close(ndsop)
+
+
+ print *, 'OK!'
+ print *, 'SUCCESS!'
+end program test_io_restart_bin
+
diff --git a/regtests/unittests/ww3_unittest_util.F90 b/regtests/unittests/ww3_unittest_util.F90
new file mode 100644
index 000000000..fe20ddb30
--- /dev/null
+++ b/regtests/unittests/ww3_unittest_util.F90
@@ -0,0 +1,75 @@
+! This is test code for the WW3 I/O unit tests.
+!
+! This file holds a function used by multiple tests.
+!
+! Ed Hartnett, 1/11/24
+integer function write_test_file()
+ implicit none
+
+ integer :: ntlu, nk, nth, nopts
+ character(len=10), parameter :: veropt = '2021-04-06'
+ character(len=31), parameter :: idstr = 'WAVEWATCH III POINT OUTPUT FILE'
+ real :: ptloc(2,11) = reshape((/ 0., 0., 5000., 0., 10000., 0., 15000., 0., &
+ 20000., 0., 25000., 0., 30000., 0., 35000., 0., 40000., 0., 45000., 0., 50000., 0. /), &
+ (/ 2, 11 /))
+ character*40 ptnme(11)
+ integer :: time(2) = (/ 19680606, 0 /)
+ integer :: nspec = 72
+ integer :: iw(11) = (/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /)
+ integer :: ii(11) = (/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /)
+ integer :: il(11) = (/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /)
+ real :: iceo(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
+ real :: iceho(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
+ real :: icefo(11) = (/ 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000., 1000. /)
+ real :: dpo(11) = (/ 50., 50., 45., 40., 35., 30., 25., 20., 15., 10., 5. /)
+ real :: wao(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
+ real :: wdo(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
+ real :: aso(11) = (/ -999.900024, -999.900024, -999.900024, -999.900024, -999.900024, &
+ -999.900024, -999.900024, -999.900024, -999.900024, -999.900024, -999.900024 /)
+ real :: cao(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
+ real :: cdo(11) = (/ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. /)
+ character*13 :: grdid(11)
+ real :: spco(72, 11)
+ integer :: i, j
+ integer :: ierr
+
+ ! Initialize some values.
+ ntlu = 21
+ nk = 3
+ nth = 24
+ nopts = 11
+ do i = 1, nopts
+ if (i .le. 9) then
+ write(ptnme(i), '(a,i1)') 'Point', i
+ else
+ write(ptnme(i), '(a,i2)') 'Point', i
+ endif
+ grdid(i) = 'ww3 '
+ end do
+
+ ! Open the file.
+ open(ntlu, file="out_pnt.ww3", form="unformatted", status="replace", &
+ action="write", convert="big_endian", iostat=ierr)
+ if (ierr .ne. 0) stop 111
+
+ ! Write our values.
+ write (ntlu, iostat=ierr) idstr, veropt, nk, nth, nopts
+ if (ierr .ne. 0) stop 112
+ write (ntlu, iostat=ierr) ((ptloc(j,i),j=1,2),i=1,nopts), (ptnme(i),i=1,nopts)
+ if (ierr .ne. 0) stop 113
+ write (ntlu, iostat=ierr) time
+ if (ierr .ne. 0) stop 114
+ do i=1, nopts
+ write (ntlu, iostat=ierr) iw(i), ii(i), il(i), dpo(i), wao(i), wdo(i), &
+ aso(i), cao(i), cdo(i), iceo(i), iceho(i), &
+ icefo(i), grdid(i), (spco(j,i),j=1,nspec)
+ if (ierr .ne. 0) stop 115
+ enddo
+
+ ! Close the file.
+ close(ntlu)
+
+ ! We're done!
+ write_test_file = 0
+end function write_test_file
+
diff --git a/regtests/ww3_tic1.1/info b/regtests/ww3_tic1.1/info
index 589317ea5..bb3c7e84a 100644
--- a/regtests/ww3_tic1.1/info
+++ b/regtests/ww3_tic1.1/info
@@ -54,6 +54,7 @@
# IC4METHOD = 8 - Meylan et al. (2018) ; Liu et al. (2020) #
# (NB: redundant with IC5+IC5VEMOD=3) #
# IC4METHOD = 9 - RYW (2021) ; Yu et al. (2022) #
+# IC4METHOD = 10 - Meylan et al. (2021) #
# IC5 = Choose from three different effective medium models #
# IC5VEMOD = 1 - Extended Fox and Squire model (EFS) #
# IC5VEMOD = 2 - Robinson and Palmer model (RP) #
@@ -101,6 +102,14 @@
# 'IC1' 19680606 000000 5.35E-6 #
# 'IC2' 19680606 000000 16.05E-6 #
# #
+# ------------> &SIC4 IC4METHOD = 10 / #
+# ...ICECOEF1, ICECOEF5 are required: #
+# T T Ice parameter 1 #
+# T T Ice parameter 5 #
+# ... #
+# 'IC1' 19680606 000000 0.2 #
+# 'IC5' 19680606 000000 0.459 #
+# #
# Reference (w/plots): Rogers and Orzech, NRL Memorandum Report (2013) #
# available from http://www7320.nrlssc.navy.mil/pubs.php #
# (This report only covers IC1 and IC2, not IC3, which is newer) #
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/namelists_1-D.nml b/regtests/ww3_tic1.1/input_IC4_M10/namelists_1-D.nml
new file mode 100644
index 000000000..53fac9fd0
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/namelists_1-D.nml
@@ -0,0 +1,2 @@
+&SIC4 IC4METHOD = 10 /
+END OF NAMELISTS
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/points.list b/regtests/ww3_tic1.1/input_IC4_M10/points.list
new file mode 100644
index 000000000..e2a0afe3d
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/points.list
@@ -0,0 +1,16 @@
+0.00 0. 'Point 1 '
+1.00E3 0. 'Point 2 '
+2.00E3 0. 'Point 3 '
+3.00E3 0. 'Point 4 '
+4.00E3 0. 'Point 5 '
+5.00E3 0. 'Point 6 '
+6.00E3 0. 'Point 7 '
+7.00E3 0. 'Point 8 '
+8.00E3 0. 'Point 9 '
+9.00E3 0. 'Point 10 '
+10.00E3 0. 'Point 11 '
+11.00E3 0. 'Point 12 '
+12.00E3 0. 'Point 13 '
+13.00E3 0. 'Point 14 '
+14.00E3 0. 'Point 15 '
+15.00E3 0. 'Point 16 '
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/switch b/regtests/ww3_tic1.1/input_IC4_M10/switch
new file mode 100644
index 000000000..31ef85bae
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/switch
@@ -0,0 +1 @@
+NOGRB SHRD PR3 UQ FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC4 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_grid.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_grid.inp
new file mode 100644
index 000000000..19e03a81c
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_grid.inp
@@ -0,0 +1,43 @@
+$ WAVEWATCH III Grid preprocessor input file
+$ ------------------------------------------
+ '1-D parameterized ice test '
+$
+$ 1.1 0.04118 25 24 0.0
+ 1.1 0.0418 31 36 5.0
+$
+ F T F F F T
+ 60. 60. 60. 60.
+$
+$ IC4METHOD determines calculation
+$ IC4METHOD = 1 - Wadhams et al. (1988)
+$ IC4METHOD = 2 - Meylan et al. (2014)
+$ IC4METHOD = 3 - Kohout & Meylan (2008) in Horvat & Tziperman (2015)
+$ IC4METHOD = 4 - Kohout et al. (2014)
+$ IC4METHOD = 5 - Simple ki step function
+$ IC4METHOD = 6 - Simple ki step function via namelist
+$ IC4METHOD = 7 - Doble et al. (GRL 2015)
+$ IC4METHOD = 8 - Meylan et al. (2018) ; Liu et al. (2020)
+$ IC4METHOD = 9 - RYW (2021) ; Yu et al. (2022)
+$ IC4M8 Fit to R21A L ChfM2=0.059
+$ IC4M10
+ &SIC4 IC4METHOD = 10 , IC4CN = 0.059/
+END OF NAMELISTS
+$
+ 'RECT' F 'NONE'
+ 156 3
+ 1.0E3 1.0E3 1.
+ -1.0E3 -1.0E3 1.
+$ dlim dmin file# scale layout# format# formatdescrip filetype# filenm
+ -0.1 0.1 401 -1.0 1 1 '(....)' 'NAME' '../input_IC1/depth1d.flat'
+$
+ 10 1 1 '(....)' 'PART' 'input'
+$
+$ First grid
+$
+ 2 2 F
+$
+ 0 0 F
+ 0 0 F
+ 0 0
+$
+ 0. 0. 0. 0. 0
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_grid.nml b/regtests/ww3_tic1.1/input_IC4_M10/ww3_grid.nml
new file mode 100644
index 000000000..e3f8dd58a
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_grid.nml
@@ -0,0 +1,81 @@
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - ww3_grid.nml - Grid pre-processing !
+! -------------------------------------------------------------------- !
+
+! -------------------------------------------------------------------- !
+! Define the spectrum parameterization via SPECTRUM_NML namelist
+! -------------------------------------------------------------------- !
+&SPECTRUM_NML
+ SPECTRUM%XFR = 1.1
+ SPECTRUM%FREQ1 = 0.0418
+ SPECTRUM%NK = 31
+ SPECTRUM%NTH = 36
+ SPECTRUM%THOFF = 5.0
+/
+
+! -------------------------------------------------------------------- !
+! Define the run parameterization via RUN_NML namelist
+! -------------------------------------------------------------------- !
+&RUN_NML
+ RUN%FLCX = T
+ RUN%FLSOU = T
+/
+
+! -------------------------------------------------------------------- !
+! Define the timesteps parameterization via TIMESTEPS_NML namelist
+! -------------------------------------------------------------------- !
+&TIMESTEPS_NML
+ TIMESTEPS%DTMAX = 60.
+ TIMESTEPS%DTXY = 60.
+ TIMESTEPS%DTKTH = 60.
+ TIMESTEPS%DTMIN = 60.
+/
+
+! -------------------------------------------------------------------- !
+! Define the grid to preprocess via GRID_NML namelist
+! -------------------------------------------------------------------- !
+&GRID_NML
+ GRID%NAME = '1-D parameterized ice test'
+ GRID%NML = '../input_IC4_M10/namelists_1-D.nml'
+ GRID%TYPE = 'RECT'
+ GRID%COORD = 'CART'
+ GRID%CLOS = 'NONE'
+ GRID%ZLIM = -0.1
+ GRID%DMIN = 0.1
+/
+
+! -------------------------------------------------------------------- !
+! Define the rectilinear grid type via RECT_NML namelist
+! -------------------------------------------------------------------- !
+&RECT_NML
+ RECT%NX = 156
+ RECT%NY = 3
+ RECT%SX = 1.0E3
+ RECT%SY = 1.0E3
+ RECT%X0 = -1.0E3
+ RECT%Y0 = -1.0E3
+/
+
+! -------------------------------------------------------------------- !
+! Define the depth to preprocess via DEPTH_NML namelist
+! -------------------------------------------------------------------- !
+&DEPTH_NML
+ DEPTH%SF = -1.0
+ DEPTH%FILENAME = '../input_IC1/depth1d.flat'
+/
+
+! -------------------------------------------------------------------- !
+! Define the input boundary points via INBND_COUNT_NML and
+! INBND_POINT_NML namelist
+! -------------------------------------------------------------------- !
+&INBND_COUNT_NML
+ INBND_COUNT%N_POINT = 1
+/
+
+&INBND_POINT_NML
+ INBND_POINT(1) = 2 2 F
+/
+
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - end of namelist !
+! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_ounf.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_ounf.inp
new file mode 100644
index 000000000..4104d759e
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_ounf.inp
@@ -0,0 +1,20 @@
+$ WAVEWATCH III Grid output post-processing (netcdf)
+$---------------------------------------------------
+ 19680606 000000 3600. 99
+N
+$ Options: DPT CUR WND DT WLV ICE HS L T02 T01 TM1 FP DIR SPR DP EF
+$ TH1M STH1M PHS PTP PLP PDIR PSP WSF TWS PNR UST CHA CGE FAW
+$ TAW TWA WCC WCF WCH WCM SXY TWO BHD FOC TUS USS P2S WN USF
+$ P2L ABR UBR BED FBB TBB MSS MSC DTD FCT CFX CFT CFK US1 US2
+DPT WLV HS DIR
+$
+ 3 4
+ 0 1 2
+ F
+ ww3.
+ 4
+ 1 999 1 999 3 2
+$
+$ -------------------------------------------------------------------- $
+$ End of input file $
+$ -------------------------------------------------------------------- $
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_ounf.nml b/regtests/ww3_tic1.1/input_IC4_M10/ww3_ounf.nml
new file mode 100644
index 000000000..46aa758fa
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_ounf.nml
@@ -0,0 +1,29 @@
+! -------------------------------------------------------------------- !
+! WAVEWATCH III ww3_ounf.nml - Grid output post-processing !
+! -------------------------------------------------------------------- !
+
+! -------------------------------------------------------------------- !
+! Define the output fields to postprocess via FIELD_NML namelist
+! -------------------------------------------------------------------- !
+&FIELD_NML
+ FIELD%TIMESTART = '19680606 000000'
+ FIELD%TIMESTRIDE = '3600.'
+ FIELD%TIMECOUNT = '99'
+ FIELD%TIMESPLIT = 4
+ FIELD%LIST = 'DPT WLV HS DIR'
+ FIELD%PARTITION = '0 1 2'
+ FIELD%SAMEFILE = F
+ FIELD%TYPE = 4
+/
+
+! -------------------------------------------------------------------- !
+! Define the content of the output file via FILE_NML namelist
+! -------------------------------------------------------------------- !
+&FILE_NML
+ FILE%IXN = 999
+ FILE%IYN = 999
+/
+
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - end of namelist !
+! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_outf.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outf.inp
new file mode 100644
index 000000000..2b4c6bca8
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outf.inp
@@ -0,0 +1,13 @@
+$ WAVEWATCH III Grid output post-processing
+$ -----------------------------------------
+ 19680606 000000 3600. 99
+N
+$ Options: DPT CUR WND DT WLV ICE HS L T02 T01 TM1 FP DIR SPR DP EF
+$ TH1M STH1M PHS PTP PLP PDIR PSP WSF TWS PNR UST CHA CGE FAW
+$ TAW TWA WCC WCF WCH WCM SXY TWO BHD FOC TUS USS P2S WN USF
+$ P2L ABR UBR BED FBB TBB MSS MSC DTD FCT CFX CFT CFK US1 US2
+DPT WLV HS DIR
+$
+ 3 0
+$
+ 1 999 1 999 1 1
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_spec.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_spec.inp
new file mode 100644
index 000000000..b500e0ca4
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_spec.inp
@@ -0,0 +1,19 @@
+$ WAVEWATCH III Point output post-processing
+$ ------------------------------------------
+ 19680606 120000 3600. 1
+$
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ -1
+$
+ 1
+ 2 -1. 0. 33 F
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_tab50.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_tab50.inp
new file mode 100644
index 000000000..826bd422d
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_tab50.inp
@@ -0,0 +1,19 @@
+$ WAVEWATCH III Point output post-processing
+$ ------------------------------------------
+ 19680606 000000 600. 9999
+$
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ -1
+$
+ 2
+ 2 50
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_tab51.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_tab51.inp
new file mode 100644
index 000000000..e54faed46
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_outp_tab51.inp
@@ -0,0 +1,10 @@
+$ WAVEWATCH III Point output post-processing
+$ ------------------------------------------
+ 19680606 000000 900. 49
+$
+$ 1
+ 11
+ -1
+$
+ 2
+ 2 51
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_prep_icecon.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_prep_icecon.inp
new file mode 100644
index 000000000..26a94221f
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_prep_icecon.inp
@@ -0,0 +1,38 @@
+$ -------------------------------------------------------------------- $
+$ WAVEWATCH III Field preprocessor input file $
+$ -------------------------------------------------------------------- $
+$ Mayor types of field and time flag
+$ Field types : IC1, IC2, IC3, IC4, IC5 => Ice parameters (5)
+$ MDN => Mud densities
+$ MTH => Mud thicknesses
+$ MVS => Mud viscosities
+$ ICE => Ice concentrations.
+$ LEV => Water levels.
+$ WND => Winds.
+$ WNS => Winds (including air-sea temp. dif.)
+$ CUR => Currents.
+$ Format types : AI Transfer field 'as is'.
+$ LL Field defined on longitude-latitude grid.
+$ F1 Arbitrary grid, longitude and latitude of
+$ each grid point given in separate file.
+$ F2 Like F1, composite of 2 fields.
+$ Time flag : If true, time is included in file.
+$ Header flag : If true, write header on "*.ww3" data file
+$
+ 'ICE' 'AI' T T
+$
+$ Additional time input ---------------------------------------------- $
+$ If time flag is .FALSE., give time of field in yyyymmdd hhmmss format.
+$
+$ 19680606 000000
+$
+$ Define data files -------------------------------------------------- $
+$ The first input line identifies the file format with FROM, IDLA and
+$ IDFM, the second (third) lines give the file unit number and name.
+$
+ 'NAME' 1 2 '(I10,1x,I10)' '(1000(F6.2))'
+ 2345 '../input_IC2_nondisp/icecon.156x3.txt'
+$
+$ -------------------------------------------------------------------- $
+$ End of input file $
+$ -------------------------------------------------------------------- $
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_shel.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_shel.inp
new file mode 100644
index 000000000..2be39573e
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_shel.inp
@@ -0,0 +1,69 @@
+$ WAVEWATCH III shell input file
+$ ------------------------------
+ T T Ice parameter 1
+ F F Ice parameter 2
+ F F Ice parameter 3
+ F F Ice parameter 4
+ T T Ice parameter 5
+ F F Mud parameter 1
+ F F Mud parameter 2
+ F F Mud parameter 3
+ F F Water levels
+ F F Currents
+ F F Winds
+ T F Ice concentrations
+ F F Atmospheric momentum
+ F F Air density
+ F Assimilation data : Mean parameters
+ F Assimilation data : 1-D spectra
+ F Assimilation data : 2-D spectra.
+$
+ 19680606 000000
+ 19680606 120000
+$
+ 1
+$
+ 19680606 000000 900 19680606 120000
+N
+$ Options: DPT CUR WND DT WLV ICE HS L T02 T01 TM1 FP DIR SPR DP EF
+$ TH1M STH1M PHS PTP PLP PDIR PSP WSF TWS PNR UST CHA CGE FAW
+$ TAW TWA WCC WCF WCH WCM SXY TWO BHD FOC TUS USS P2S WN USF
+$ P2L ABR UBR BED FBB TBB MSS MSC DTD FCT CFX CFT CFK US1 US2
+DPT HS ICE DIR EF
+ 19680606 000000 900 19680606 120000
+ 0.00 0. 'Point 1 '
+ 1.00E3 0. 'Point 2 '
+ 2.00E3 0. 'Point 3 '
+ 3.00E3 0. 'Point 4 '
+ 4.00E3 0. 'Point 5 '
+ 5.00E3 0. 'Point 6 '
+ 6.00E3 0. 'Point 7 '
+ 7.00E3 0. 'Point 8 '
+ 8.00E3 0. 'Point 9 '
+ 9.00E3 0. 'Point 10 '
+ 10.00E3 0. 'Point 11 '
+ 11.00E3 0. 'Point 12 '
+ 12.00E3 0. 'Point 13 '
+ 13.00E3 0. 'Point 14 '
+ 14.00E3 0. 'Point 15 '
+ 15.00E3 0. 'Point 16 '
+ 0. 0. 'STOPSTRING'
+ 19680606 000000 0 19680606 120000
+ 19680606 000000 0 19680606 120000
+ 19680606 000000 0 19680606 120000
+ 19680606 000000 0 19680606 120000
+$
+$ Testing of output through parameter list (C/TPAR) ------------------ $
+$ Time for output and field flags as in above output type 1.
+$
+$ 19680606 014500
+$ T T T T T T T T T T T T T T T T
+$
+$ Homogeneous field data --------------------------------------------- $
+$ constant case:
+$ Meylan et al. (2014) pg 5050 : a=2.12e-3 and b=4.59e-2
+ 'IC1' 19680606 000000 0.2
+ 'IC5' 19680606 000000 4.59E-2
+ 'STP'
+$
+$ -------------------------------------------------------------------- $
diff --git a/regtests/ww3_tic1.1/input_IC4_M10/ww3_strt.inp b/regtests/ww3_tic1.1/input_IC4_M10/ww3_strt.inp
new file mode 100644
index 000000000..49747e41a
--- /dev/null
+++ b/regtests/ww3_tic1.1/input_IC4_M10/ww3_strt.inp
@@ -0,0 +1,17 @@
+$ WAVEWATCH III Initial conditions input file
+$ -------------------------------------------
+ 2
+$ 0.1 0.0001 225. 12 0. -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 315. 12 0. -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 240. 2 0. -5.E3 0. 5.E3 1.0
+$ fp sip thm ncos xm six ym siy hmax
+$ 0.1 0.0001 270. 12 0. -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 270. 2 0. -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 300. 2 0. -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 135. 12 50.E3 -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 45. 12 50.E3 -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 120. 2 50.E3 -5.E3 0. 5.E3 1.0
+$ 0.1 0.0001 60. 2 50.E3 -5.E3 0. 5.E3 1.0
+$
+$ alpha fp thm gamma sigA sigB xm six ym siy
+ 0.0081 0.1 270.0 1.0 0.07 0.09 0. -5.E3 0. 5.E3
diff --git a/regtests/ww3_tp2.10/input/ww3_grid.nml b/regtests/ww3_tp2.10/input/ww3_grid.nml
index ee9ac10e4..26e0465dc 100644
--- a/regtests/ww3_tp2.10/input/ww3_grid.nml
+++ b/regtests/ww3_tp2.10/input/ww3_grid.nml
@@ -67,6 +67,13 @@
SMC%SUBTR%FILENAME = '../input/ErieObstr.dat'
/
+! -------------------------------------------------------------------- !
+! Scaling factor for depth input file
+! -------------------------------------------------------------------- !
+&DEPTH_NML
+ DEPTH%SF = -1.0
+/
+
! -------------------------------------------------------------------- !
! WAVEWATCH III - end of namelist !
! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_tp2.16/input/ww3_grid.nml b/regtests/ww3_tp2.16/input/ww3_grid.nml
index 19b0fdc05..c97e3126d 100644
--- a/regtests/ww3_tp2.16/input/ww3_grid.nml
+++ b/regtests/ww3_tp2.16/input/ww3_grid.nml
@@ -70,6 +70,13 @@
SMC%AJSID%FILENAME = '../input/A50AJSide.dat'
/
+! -------------------------------------------------------------------- !
+! Scaling factor for depth input file
+! -------------------------------------------------------------------- !
+&DEPTH_NML
+ DEPTH%SF = -1.0
+/
+
! -------------------------------------------------------------------- !
! WAVEWATCH III - end of namelist !
! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_tp2.2/input/switch_PR1_MPI_BIN2NC b/regtests/ww3_tp2.2/input/switch_PR1_MPI_BIN2NC
new file mode 100644
index 000000000..bb79e8549
--- /dev/null
+++ b/regtests/ww3_tp2.2/input/switch_PR1_MPI_BIN2NC
@@ -0,0 +1 @@
+NOGRB DIST MPI PR1 FLX2 LN0 ST0 NL0 BT0 DB0 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11 BIN2NC
diff --git a/regtests/ww3_ts1/input/ww3_ounf.inp b/regtests/ww3_ts1/input/ww3_ounf.inp
index 52a2dd2c6..0b89ef01e 100644
--- a/regtests/ww3_ts1/input/ww3_ounf.inp
+++ b/regtests/ww3_ts1/input/ww3_ounf.inp
@@ -11,7 +11,7 @@ $ file for a full documentation of field output options. Namelist type
$ selection is used here (for alternative F/T flags, see ww3_shel.inp).
$
N
- DPT WND ICE HS MSS MSD FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT
+ DPT WND ICE HS MSS MSD FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT SKW EMB EMC
$
$--------------------------------------------------------------------- $
$ NetCDF version [3,4] and variable type 4 [2 = SHORT, 3 = it depends , 4 = REAL]
diff --git a/regtests/ww3_ts1/input/ww3_ounf.nml b/regtests/ww3_ts1/input/ww3_ounf.nml
index fb0f02d3e..f9992f0ce 100644
--- a/regtests/ww3_ts1/input/ww3_ounf.nml
+++ b/regtests/ww3_ts1/input/ww3_ounf.nml
@@ -9,7 +9,7 @@
FIELD%TIMESTART = '19680101 120000'
FIELD%TIMESTRIDE = '10'
FIELD%TIMECOUNT = '8000'
- FIELD%LIST = 'DPT WND ICE HS MSS MSD FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT'
+ FIELD%LIST = 'DPT WND ICE HS MSS MSD FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT SKW EMB EMC'
FIELD%PARTITION = '0 1 2'
FIELD%TYPE = 4
/
diff --git a/regtests/ww3_ts1/input/ww3_shel.inp b/regtests/ww3_ts1/input/ww3_shel.inp
index fca96fb7e..5171bd9ab 100644
--- a/regtests/ww3_ts1/input/ww3_shel.inp
+++ b/regtests/ww3_ts1/input/ww3_shel.inp
@@ -19,7 +19,7 @@ $
$
N
$
-DPT WND MSS MSD ICE HS MSS FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT
+DPT WND MSS MSD ICE HS MSS FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT SKW EMB EMC
$
19680606 000000 60 19680618 000000
0.0 0.0 'The_point'
diff --git a/regtests/ww3_ts1/input/ww3_shel.nml b/regtests/ww3_ts1/input/ww3_shel.nml
index b4837d6e1..1ecf48c51 100644
--- a/regtests/ww3_ts1/input/ww3_shel.nml
+++ b/regtests/ww3_ts1/input/ww3_shel.nml
@@ -21,7 +21,7 @@
! Define the output types point parameters via OUTPUT_TYPE_NML namelist
! -------------------------------------------------------------------- !
&OUTPUT_TYPE_NML
- TYPE%FIELD%LIST = 'DPT WND MSS MSD ICE HS MSS FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT'
+ TYPE%FIELD%LIST = 'DPT WND MSS MSD ICE HS MSS FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT SKW EMB EMC'
TYPE%POINT%FILE = '../input/points.list'
/
diff --git a/regtests/ww3_ts1/input_capcha/namelists_CAPCHA.nml b/regtests/ww3_ts1/input_capcha/namelists_CAPCHA.nml
new file mode 100644
index 000000000..5a5c72657
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/namelists_CAPCHA.nml
@@ -0,0 +1,12 @@
+&SIN4
+ SINTABLE=0,
+ BETAMAX=1.35,
+ CAPCHA=1,
+ CHA0=0.0095,
+ SIGMAUCAP=5.0,
+ SINTAIL1=0.8,
+ TAUWBUG = 1,
+ UCAP=28.0
+/
+
+END OF NAMELISTS
diff --git a/regtests/ww3_ts1/input_capcha/switch_ST4 b/regtests/ww3_ts1/input_capcha/switch_ST4
new file mode 100644
index 000000000..c3b8938ee
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/switch_ST4
@@ -0,0 +1 @@
+NOGRB SHRD PR0 FLX0 LN1 ST4 NL1 BT1 DB1 TR0 BS0 IC0 IS0 REF0 WNT1 WNX1 CRT1 CRX1 O0 O1 O2 O3 O4 O5 O6 O7 O10 O11
diff --git a/regtests/ww3_ts1/input_capcha/ww3_grid.nml b/regtests/ww3_ts1/input_capcha/ww3_grid.nml
new file mode 100644
index 000000000..9b47a9123
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/ww3_grid.nml
@@ -0,0 +1,70 @@
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - ww3_grid.nml - Grid pre-processing !
+! -------------------------------------------------------------------- !
+
+! -------------------------------------------------------------------- !
+! Define the spectrum parameterization via SPECTRUM_NML namelist
+! -------------------------------------------------------------------- !
+&SPECTRUM_NML
+ SPECTRUM%XFR = 1.10
+ SPECTRUM%FREQ1 = 0.0485
+ SPECTRUM%NK = 36
+ SPECTRUM%NTH = 24
+/
+
+! -------------------------------------------------------------------- !
+! Define the run parameterization via RUN_NML namelist
+! -------------------------------------------------------------------- !
+&RUN_NML
+ RUN%FLSOU = T
+/
+
+! -------------------------------------------------------------------- !
+! Define the timesteps parameterization via TIMESTEPS_NML namelist
+! -------------------------------------------------------------------- !
+&TIMESTEPS_NML
+ TIMESTEPS%DTMAX = 900.
+ TIMESTEPS%DTXY = 900.
+ TIMESTEPS%DTKTH = 900.
+ TIMESTEPS%DTMIN = 15.
+/
+
+! -------------------------------------------------------------------- !
+! Define the grid to preprocess via GRID_NML namelist
+! -------------------------------------------------------------------- !
+&GRID_NML
+ GRID%NAME = 'HOMOGENEOUS SOURCE TERM TEST'
+ GRID%NML = '../input_capcha/namelists_CAPCHA.nml'
+ GRID%TYPE = 'RECT'
+ GRID%COORD = 'SPHE'
+ GRID%CLOS = 'NONE'
+ GRID%ZLIM = -5.
+ GRID%DMIN = 5.75
+/
+
+! -------------------------------------------------------------------- !
+! Define the rectilinear grid type via RECT_NML namelist
+! -------------------------------------------------------------------- !
+&RECT_NML
+ RECT%NX = 3
+ RECT%NY = 3
+ RECT%SX = 1.
+ RECT%SY = 1.
+ RECT%SF = 1.E-2
+ RECT%X0 = -1.
+ RECT%Y0 = -1.
+ RECT%SF0 = 1.E-2
+/
+
+! -------------------------------------------------------------------- !
+! Define the depth to preprocess via DEPTH_NML namelist
+! -------------------------------------------------------------------- !
+&DEPTH_NML
+ DEPTH%SF = -2500.
+ DEPTH%FILENAME = '../input/HOMOGENEOUS.depth'
+ DEPTH%IDLA = 3
+/
+
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - end of namelist !
+! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_ts1/input_capcha/ww3_ounf.nml b/regtests/ww3_ts1/input_capcha/ww3_ounf.nml
new file mode 100644
index 000000000..fb0f02d3e
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/ww3_ounf.nml
@@ -0,0 +1,29 @@
+! -------------------------------------------------------------------- !
+! WAVEWATCH III ww3_ounf.nml - Grid output post-processing !
+! -------------------------------------------------------------------- !
+
+! -------------------------------------------------------------------- !
+! Define the output fields to postprocess via FIELD_NML namelist
+! -------------------------------------------------------------------- !
+&FIELD_NML
+ FIELD%TIMESTART = '19680101 120000'
+ FIELD%TIMESTRIDE = '10'
+ FIELD%TIMECOUNT = '8000'
+ FIELD%LIST = 'DPT WND ICE HS MSS MSD FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT'
+ FIELD%PARTITION = '0 1 2'
+ FIELD%TYPE = 4
+/
+
+! -------------------------------------------------------------------- !
+! Define the content of the output file via FILE_NML namelist
+! -------------------------------------------------------------------- !
+&FILE_NML
+ FILE%IX0 = 2
+ FILE%IXN = 2
+ FILE%IY0 = 2
+ FILE%IYN = 2
+/
+
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - end of namelist !
+! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_ts1/input_capcha/ww3_ounp_spec.nml b/regtests/ww3_ts1/input_capcha/ww3_ounp_spec.nml
new file mode 100644
index 000000000..3e968f825
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/ww3_ounp_spec.nml
@@ -0,0 +1,47 @@
+! -------------------------------------------------------------------- !
+! WAVEWATCH III ww3_ounp.nml - Point output post-processing !
+! -------------------------------------------------------------------- !
+
+! -------------------------------------------------------------------- !
+! Define the output fields to postprocess via POINT_NML namelist
+! -------------------------------------------------------------------- !
+&POINT_NML
+ POINT%TIMESTART = '19680101 000000'
+ POINT%TIMESTRIDE = '3600.'
+ POINT%TIMECOUNT = '1000'
+ POINT%TIMESPLIT = 4
+ POINT%BUFFER = 100
+/
+
+! -------------------------------------------------------------------- !
+! Define the content of the output file via FILE_NML namelist
+! -------------------------------------------------------------------- !
+&FILE_NML
+/
+
+! -------------------------------------------------------------------- !
+! Define the type 0, inventory of file
+! -------------------------------------------------------------------- !
+
+
+! -------------------------------------------------------------------- !
+! Define the type 1, spectra via SPECTRA_NML namelist
+! -------------------------------------------------------------------- !
+&SPECTRA_NML
+/
+
+! -------------------------------------------------------------------- !
+! Define the type 2, mean parameter via PARAM_NML namelist
+! -------------------------------------------------------------------- !
+&PARAM_NML
+/
+
+! -------------------------------------------------------------------- !
+! Define the type 3, source terms via SOURCE_NML namelist
+! -------------------------------------------------------------------- !
+&SOURCE_NML
+/
+
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - end of namelist !
+! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_ts1/input_capcha/ww3_shel.nml b/regtests/ww3_ts1/input_capcha/ww3_shel.nml
new file mode 100644
index 000000000..884a8ede5
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/ww3_shel.nml
@@ -0,0 +1,78 @@
+! -------------------------------------------------------------------- !
+! WAVEWATCH III ww3_shel.nml - single-grid model !
+! -------------------------------------------------------------------- !
+
+
+! -------------------------------------------------------------------- !
+! Define top-level model parameters via DOMAIN_NML namelist
+! -------------------------------------------------------------------- !
+&DOMAIN_NML
+ DOMAIN%STOP = '19680607 120000'
+/
+
+! -------------------------------------------------------------------- !
+! Define each forcing via the INPUT_NML namelist
+! -------------------------------------------------------------------- !
+&INPUT_NML
+ INPUT%FORCING%WINDS = 'H'
+/
+
+! -------------------------------------------------------------------- !
+! Define the output types point parameters via OUTPUT_TYPE_NML namelist
+! -------------------------------------------------------------------- !
+&OUTPUT_TYPE_NML
+ TYPE%FIELD%LIST = 'DPT WND MSS MSD ICE HS MSS FAW WCC WCF WCH WCM FOC TAW CHA FWS WBT'
+ TYPE%POINT%FILE = '../input/points.list'
+/
+
+! -------------------------------------------------------------------- !
+! Define output dates via OUTPUT_DATE_NML namelist
+! -------------------------------------------------------------------- !
+&OUTPUT_DATE_NML
+ DATE%FIELD = '19680606 000000' '3600' '19680618 000000'
+ DATE%POINT = '19680606 000000' '60' '19680618 000000'
+/
+
+! -------------------------------------------------------------------- !
+! Define homogeneous input via HOMOG_COUNT_NML and HOMOG_INPUT_NML namelist
+! -------------------------------------------------------------------- !
+&HOMOG_COUNT_NML
+ !HOMOG_COUNT%N_CUR = 1
+ HOMOG_COUNT%N_WND = 5
+/
+
+&HOMOG_INPUT_NML
+ HOMOG_INPUT(1)%NAME = 'WND'
+ HOMOG_INPUT(2)%DATE = '19680606 000000'
+ HOMOG_INPUT(1)%VALUE1 = 5.
+ HOMOG_INPUT(1)%VALUE2 = 270.
+ HOMOG_INPUT(1)%VALUE3 = 0.
+
+ HOMOG_INPUT(2)%NAME = 'WND'
+ HOMOG_INPUT(2)%DATE = '19680606 060000'
+ HOMOG_INPUT(2)%VALUE1 = 10.
+ HOMOG_INPUT(2)%VALUE2 = 270.
+ HOMOG_INPUT(2)%VALUE3 = 0.
+
+ HOMOG_INPUT(3)%NAME = 'WND'
+ HOMOG_INPUT(3)%DATE = '19680606 180000'
+ HOMOG_INPUT(3)%VALUE1 = 30.
+ HOMOG_INPUT(3)%VALUE2 = 270.
+ HOMOG_INPUT(3)%VALUE3 = 0.
+
+ HOMOG_INPUT(4)%NAME = 'WND'
+ HOMOG_INPUT(4)%DATE = '19680607 000000'
+ HOMOG_INPUT(4)%VALUE1 = 2.
+ HOMOG_INPUT(4)%VALUE2 = 270.
+ HOMOG_INPUT(4)%VALUE3 = 0.
+
+ HOMOG_INPUT(5)%NAME = 'WND'
+ HOMOG_INPUT(5)%DATE = '19680607 120000'
+ HOMOG_INPUT(5)%VALUE1 = 0.
+ HOMOG_INPUT(5)%VALUE2 = 270.
+ HOMOG_INPUT(5)%VALUE3 = 0.
+/
+
+! -------------------------------------------------------------------- !
+! WAVEWATCH III - end of namelist !
+! -------------------------------------------------------------------- !
diff --git a/regtests/ww3_ts1/input_capcha/ww3_strt.inp b/regtests/ww3_ts1/input_capcha/ww3_strt.inp
new file mode 100644
index 000000000..d18f7cebd
--- /dev/null
+++ b/regtests/ww3_ts1/input_capcha/ww3_strt.inp
@@ -0,0 +1,7 @@
+$ WAVEWATCH III Initial conditions input file
+$ -------------------------------------------
+$ 2
+$ 0.0 0.30 270. 3.3 0. 0. 0. 1. 0. 1.
+$ 3
+ 5
+$
diff --git a/regtests/ww3_ufs1.1/input/switch_MPI_OMPH b/regtests/ww3_ufs1.1/input/switch_MPI_OMPH
index 8be0a29a5..eb4b41e90 100644
--- a/regtests/ww3_ufs1.1/input/switch_MPI_OMPH
+++ b/regtests/ww3_ufs1.1/input/switch_MPI_OMPH
@@ -1 +1 @@
-NCO NOGRB DIST MPI OMPG OMGH SCRIP SCRIPNC WRST PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
+NCO NOGRB DIST MPI OMPG OMPH SCRIP SCRIPNC WRST PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
diff --git a/regtests/ww3_ufs1.1/input_unstr/switch_PDLIB b/regtests/ww3_ufs1.1/input_unstr/switch_PDLIB
index ff569c11f..0927be62d 100644
--- a/regtests/ww3_ufs1.1/input_unstr/switch_PDLIB
+++ b/regtests/ww3_ufs1.1/input_unstr/switch_PDLIB
@@ -1 +1 @@
-PDLIB SCOTCH NOGRB DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD1 TR0 BS0 WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
+PDLIB SCOTCH NOGRB DIST MPI PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD1 TR0 BS0 WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0 BIN2NC
diff --git a/regtests/ww3_ufs1.2/input/switch_MPI_OMPH b/regtests/ww3_ufs1.2/input/switch_MPI_OMPH
index 8be0a29a5..eb4b41e90 100644
--- a/regtests/ww3_ufs1.2/input/switch_MPI_OMPH
+++ b/regtests/ww3_ufs1.2/input/switch_MPI_OMPH
@@ -1 +1 @@
-NCO NOGRB DIST MPI OMPG OMGH SCRIP SCRIPNC WRST PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
+NCO NOGRB DIST MPI OMPG OMPH SCRIP SCRIPNC WRST PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
diff --git a/regtests/ww3_ufs1.3/input/switch_MPI_OMPH b/regtests/ww3_ufs1.3/input/switch_MPI_OMPH
index 8be0a29a5..eb4b41e90 100644
--- a/regtests/ww3_ufs1.3/input/switch_MPI_OMPH
+++ b/regtests/ww3_ufs1.3/input/switch_MPI_OMPH
@@ -1 +1 @@
-NCO NOGRB DIST MPI OMPG OMGH SCRIP SCRIPNC WRST PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0
+NCO NOGRB DIST MPI OMPG OMPH SCRIP SCRIPNC WRST PR3 UQ FLX0 SEED ST4 STAB0 NL1 BT1 DB1 MLIM FLD2 TR0 BS0 RWND WNX1 WNT1 CRX1 CRT1 O0 O1 O2 O3 O4 O5 O6 O7 O14 O15 IC0 IS0 REF0