-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interface for NOAH-MP Landsurface model (#1835)
* Add inital interface for NOAH-M * Update NOAH module and the corresponding FindNetCDF cmake recipe * Initial interface for NOAH LSM * Initial interface for NOAH-MP land surface model * Add linker options * Updates to cmake configuration to include NOAH * Update CMakeLists and move Fortran linkage to Noah-MP: * Update .gitmodules * Updates to NOAH-MP interface * Saving some interface work * udpate gitmodules * checkpoint changes for merge * Update Noah-MP submodules to resolve cmake errors * Resolve style errors * Update gmake interface for noahmp and add a dev test
- Loading branch information
1 parent
dda9720
commit 4cd3ddd
Showing
14 changed files
with
205 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set(erf_exe_name erf_noahmp) | ||
add_executable(${erf_exe_name} "") | ||
include(${CMAKE_SOURCE_DIR}/CMake/BuildERFExe.cmake) | ||
build_erf_exe(${erf_exe_name}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# AMReX | ||
COMP = gnu | ||
PRECISION = DOUBLE | ||
|
||
# Profiling | ||
PROFILE = FALSE | ||
TINY_PROFILE = FALSE | ||
COMM_PROFILE = FALSE | ||
TRACE_PROFILE = FALSE | ||
MEM_PROFILE = FALSE | ||
USE_GPROF = FALSE | ||
|
||
# Performance | ||
USE_MPI = TRUE | ||
USE_OMP = FALSE | ||
|
||
USE_CUDA = FALSE | ||
USE_HIP = FALSE | ||
USE_SYCL = FALSE | ||
|
||
# Debugging | ||
DEBUG = FALSE | ||
|
||
# Land model | ||
USE_NETCDF = TRUE | ||
USE_NOAH = TRUE | ||
|
||
# GNU Make | ||
Bpack := ./Make.package | ||
Blocs := . | ||
ERF_HOME := ../../.. | ||
ERF_PROBLEM_DIR = $(ERF_HOME)/Exec/ABL | ||
include $(ERF_HOME)/Exec/Make.ERF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef NOAH_H | ||
#define NOAH_H | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <memory> | ||
|
||
#include <AMReX_FArrayBox.H> | ||
#include <AMReX_Geometry.H> | ||
#include <AMReX_MultiFabUtil.H> | ||
|
||
#include <ERF_NullSurf.H> | ||
#include <ERF_Constants.H> | ||
#include <ERF_IndexDefines.H> | ||
#include <ERF_DataStruct.H> | ||
|
||
// External include from the noahmp library | ||
#include <NoahmpIO.H> | ||
|
||
class NOAH : public NullSurf { | ||
public: | ||
// Constructor | ||
NOAH () {} | ||
|
||
// Destructor | ||
virtual ~NOAH () = default; | ||
|
||
// Initialize data structures | ||
void | ||
Init (const amrex::MultiFab& cons_in, | ||
const amrex::Geometry& geom, | ||
const amrex::Real& dt) override; | ||
|
||
|
||
private: | ||
|
||
// C++ variable for NoahmpIO struct | ||
NoahmpIO_struct noahmpio; | ||
|
||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
#include<iostream> | ||
|
||
#include <AMReX_Print.H> | ||
#include <ERF_NOAH.H> | ||
|
||
using namespace amrex; | ||
|
||
/* Initialize lsm data structures */ | ||
void | ||
NOAH::Init (const MultiFab& cons_in, | ||
const Geometry& geom, | ||
const Real& dt) | ||
{ | ||
// Initialize Noahmp IO | ||
amrex::Print() << "Initializing Noahmp IO" << std::endl; | ||
|
||
/* | ||
* noahmpio.xstart = 1; | ||
* noahmpio.xend = 4; | ||
* noahmpio.ystart = 1; | ||
* noahmpio.yend = 2; | ||
* | ||
*/ | ||
|
||
NoahmpIOVarInitDefault(&noahmpio); | ||
NoahmpInitMain(&noahmpio); | ||
|
||
amrex::Print() << "Noahmp IO Initialized" << std::endl; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CEXE_sources += ERF_NOAH.cpp | ||
CEXE_headers += ERF_NOAH.H |