From 9542fc4b8194c3ddbf054aff075b3df464847151 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Wed, 8 May 2024 15:45:44 +0000 Subject: [PATCH] add cmake things for bin2nc switch --- model/src/CMakeLists.txt | 5 ++--- model/src/cmake/switches.json | 10 ++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) 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/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",