Skip to content

Commit 5519a58

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fb_smc_gpuport
* origin/develop: Enable doxygen documentation in the cmake build system (NOAA-EMC#1281) Simplify MPI ifdefs in subroutine W3MPIO (NOAA-EMC#1266) Add depth scaling value to SMC regression tests. (NOAA-EMC#1264) Updates to NCEP regtests for Orion Rocky9 OS(NOAA-EMC#1263) Fix code stability issue in ww3_outp (NOAA-EMC#1258) Fix GNU regtest CI failure (NOAA-EMC#1253)
2 parents 0ec57ae + abc77b9 commit 5519a58

File tree

10 files changed

+98
-669
lines changed

10 files changed

+98
-669
lines changed

.github/workflows/regtest_gnu.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
spack
9292
~/.spack
9393
work_oasis3-mct
94-
key: spack2-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_gnu.yaml') }}
94+
key: spack-${{ runner.os }}-${{ env.cache_key }}-${{ hashFiles('ww3/model/ci/spack_gnu.yaml') }}
9595

9696
- name: build-ww3
9797
run: |
@@ -102,10 +102,10 @@ jobs:
102102
export CC=mpicc
103103
export FC=mpif90
104104
export OASISDIR=${GITHUB_WORKSPACE}/work_oasis3-mct
105-
# mkdir build && cd build
105+
# mkdir build && cd build
106106
export LD_LIBRARY_PATH="/home/runner/work/WW3/WW3/spack/var/spack/environments/ww3-gnu/.spack-env/view/:$LD_LIBRARY_PATH"
107-
# cmake -DSWITCH=${GITHUB_WORKSPACE}/ww3/regtests/unittests/data/switch.io -DCMAKE_BUILD_TYPE=Debug ..
108-
# make -j2 VERBOSE=1
107+
# cmake -DSWITCH=${GITHUB_WORKSPACE}/ww3/regtests/unittests/data/switch.io -DCMAKE_BUILD_TYPE=Debug ..
108+
# make -j2 VERBOSE=1
109109
cd ${GITHUB_WORKSPACE}/ww3
110110
ls -l
111111
${GITHUB_WORKSPACE}/ww3/model/bin/ww3_from_ftp.sh -k
@@ -116,18 +116,15 @@ jobs:
116116
cd work_PR1_MPI
117117
pwd
118118
ls -l
119-
ncdump -h out_pnt.ww3.nc > ncdump_out.txt
120-
cat ncdump_out.txt
121-
pwd
122-
cat ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt
123-
cmp ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt ncdump_out.txt
124-
119+
# ncdump -h out_pnt.ww3.nc > ncdump_out.txt
120+
# cat ncdump_out.txt
121+
# pwd
122+
# cat ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt
123+
# cmp ${GITHUB_WORKSPACE}/ww3/regtests/ww3_tp2.5/out_pnt_ncdump.txt ncdump_out.txt
124+
125125
- name: cache-data
126126
id: cache-data
127127
uses: actions/cache@v3
128128
with:
129129
path: ww3/ww3_from_ftp.v7.14.1.tar.gz
130130
key: ww3_from_ftp.v7.14.1
131-
132-
133-

CMakeLists.txt

+10-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ project(
1313

1414
get_directory_property(hasParent PARENT_DIRECTORY)
1515
if(hasParent)
16-
# Unset flags that come from Parent (ie UFS or other coupled build)
16+
# Unset flags that come from Parent (ie UFS or other coupled build)
1717
# for potential (-r8/-r4) conflict
1818
set(CMAKE_Fortran_FLAGS "")
1919
set(CMAKE_C_FLAGS "")
@@ -22,8 +22,9 @@ endif()
2222

2323
set(MULTI_ESMF OFF CACHE BOOL "Build ww3_multi_esmf library")
2424
set(NETCDF ON CACHE BOOL "Build NetCDF programs (requires NetCDF)")
25-
set(ENDIAN "BIG" CACHE STRING "Endianness of unformatted output files. Valid values are 'BIG', 'LITTLE', 'NATIVE'.")
25+
set(ENDIAN "BIG" CACHE STRING "Endianness of unformatted output files. Valid values are 'BIG', 'LITTLE', 'NATIVE'.")
2626
set(EXCLUDE_FIND "" CACHE STRING "Don't try and search for these libraries (assumd to be handled by the compiler/wrapper)")
27+
set(ENABLE_DOCS OFF CACHE BOOL "Enable building of doxygen generated documentation")
2728

2829
# make sure all "exclude_find" entries are lower case
2930
list(TRANSFORM EXCLUDE_FIND TOLOWER)
@@ -59,6 +60,13 @@ endif()
5960

6061
add_subdirectory(model)
6162

63+
# Turn on doxygen documentation
64+
if (ENABLE_DOCS)
65+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/docs/cmake")
66+
include(EnableDoxygen)
67+
add_subdirectory(docs)
68+
endif()
69+
6270
# Turn on unit testing.
6371
#include(CTest)
6472
#if(BUILD_TESTING)

docs/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EnableDoxygen(docs)

docs/Doxyfile.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PROJECT_LOGO =
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY = docs
61+
OUTPUT_DIRECTORY = @doc_output@
6262

6363
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and
@@ -829,7 +829,7 @@ WARN_LOGFILE =
829829
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
830830
# Note: If this tag is empty the current directory is searched.
831831

832-
INPUT = model/src
832+
INPUT = @src_input@
833833

834834
# This tag can be used to specify the character encoding of the source files
835835
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2285,7 +2285,7 @@ CLASS_DIAGRAMS = NO
22852285
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
22862286
# If left empty dia is assumed to be found in the default search path.
22872287

2288-
DIA_PATH =
2288+
DIA_PATH =
22892289

22902290
# If set to YES the inheritance and collaboration graphs will hide inheritance
22912291
# and usage relations if the target is undocumented or is not a class.

docs/cmake/EnableDoxygen.cmake

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Doxygen documentation- Matt Masarik 24-Jul-2024.
2+
function(EnableDoxygen outdir)
3+
find_package(Doxygen REQUIRED)
4+
if (NOT DOXYGEN_FOUND)
5+
add_custom_target(enable_docs
6+
COMMAND false
7+
COMMENT "Doxygen not found")
8+
return()
9+
endif()
10+
11+
set(src_input "${CMAKE_SOURCE_DIR}/model/src")
12+
set(doc_output "${CMAKE_BINARY_DIR}/${outdir}")
13+
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${outdir}/html)
14+
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in
15+
${CMAKE_BINARY_DIR}/${outdir}/Doxyfile @ONLY)
16+
set(DOXYGEN_GENERATE_HTML YES)
17+
set(DOXYGEN_QUIET YES)
18+
add_custom_target(enable_docs
19+
COMMAND
20+
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/${outdir}/Doxyfile
21+
WORKING_DIRECTORY
22+
${CMAKE_BINARY_DIR}/${outdir}
23+
COMMENT
24+
"Generate Doxygen HTML documentation")
25+
message("-- Doxygen HTML index page: "
26+
${CMAKE_BINARY_DIR}/${outdir}/html/index.html)
27+
endfunction()

model/src/w3bullmd.F90

+7-5
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ SUBROUTINE W3BULL &
268268
!
269269
CSVBLINE = BLANK2
270270
!
271+
IPG1 = 0
271272
IF (IOUT .EQ. 1) THEN
272-
IPG1 = 0
273273
DO IP=1, NPTAB
274274
HST(IP,1) = -99.9
275275
TPT(IP,1) = -99.9
@@ -286,10 +286,12 @@ SUBROUTINE W3BULL &
286286
!
287287
HSTOT = XPART(1,0)
288288
TP = XPART(2,0)
289-
HSP = XPART(1,1:NPART)
290-
TPP = XPART(2,1:NPART)
291-
WNP = TPI / XPART(3,1:NPART)
292-
DMP = MOD( XPART(4,1:NPART) + 180., 360.)
289+
DO IP=1, NPART
290+
HSP(IP) = XPART(1,IP)
291+
TPP(IP) = XPART(2,IP)
292+
WNP(IP) = TPI / XPART(3,IP)
293+
DMP(IP) = MOD( XPART(4,IP) + 180., 360.)
294+
ENDDO
293295

294296
NZERO = 0
295297
NZERO = COUNT( HSP <= BHSMIN .AND. HSP /= 0. )

0 commit comments

Comments
 (0)