Giter Club home page Giter Club logo

mpp's Introduction

MPP

License DOI Build Status Code Coverage

Multi-Physics Problem (MPP) library is a standalone library that solves biophysics problems relevant to global land surface models (LSMs).

Installation

Requirements

  • Mac
  • Git
  • C and Fortran compiler
  • CMake
  • PETSc
  • Message Passing Interface

Installation instructions

Install PETSc

  1. Clone PETSc and check out the supported version.
cd <directory-of-choice>
git clone https://bitbucket.org/petsc/petsc petsc
cd petsc
git checkout v3.16.2
  1. Configure PETSc. (Detailed PETSc installation instructions are available here)

2.1. Set PETSc installation location and architecture

export PETSC_DIR=$PWD
export PETSC_ARCH=<user-defined>

2.2. Set compilers

# Set compilers
export CC=<Parallel-C-compiler>
export CXX=<Parallel-C++-compiler>
export FC=<Parallel-Fortran-compiler>
export MPIEXCE=<Path-to-mpiexec>
export BLAS_DIR=<Path-to-BLAS-dir>

On Mac OS X, one can set BLAS_DIR to /System/Library/Frameworks/Accelerate.framework/Versions/Current/Accelerate

2.3. Run configure

./configure \
--with-cc=$CC   \
--with-cxx=$CXX \
--with-fc=$FC \
--with-mpiexec=$MPIEXEC \
--with-blas-lapack-lib=$BLAS_DIR
  1. Build PETSc
make PETSC_DIR=$PETSC_DIR PETSC_ARCH=$PETSC_ARCH all
  1. Test PETSc installation
make PETSC_DIR=$PETSC_DIR PETSC_ARCH=$PETSC_ARCH test

Install MPP

  1. Clone MPP repository from github.com.
cd <directory-of-choice>
git clone https://github.com/MPP-LSM/MPP
  1. Configure MPP
cd MPP
make CC=$CC CXX=$CXX FC=$FC config
  1. Build MPP (add SKIP_PETSC_TESTS=yes if building on a node that cannot run tests)
make CC=$CC CXX=$CXX FC=$FC install
  1. Run MPP tests
make CC=$CC CXX=$CXX FC=$FC test

Publication

Bisht, G., Riley, W. J., Hammond, G. E., and Lorenzetti, D. M., Development and evaluation of a variably saturated flow model in the global E3SM Land Model (ELM) version 1.0, Geosci. Model Dev., 11, 4085-4102, https://doi.org/10.5194/gmd-11-4085-2018, 2018

Bisht, G., & Riley, W. J. (2019). Development and verification of a numerical library for solving global terrestrial multi‐physics problems. Journal of Advances in Modeling Earth Systems, 11. https://doi.org/10.1029/2018MS001560

mpp's People

Contributors

bishtg avatar bishtgautam avatar rtmills avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mpp's Issues

Errors on Ubuntu

Encountered following error when testing on Ubuntu:

  • Compiler error during installation. MPI library was installed via PETSc.
  • Segmentation fault in thermal_mms test due to uninitialized variable.

Consolidate subroutines in ThermalEnthalpySoilAux

The following subroutines should be consolidated:

ThermalEnthalpySoilAuxSetHeatCap
ThermalEnthalpySoilAuxSetThermalCondWet
ThermalEnthalpySoilAuxSetThermalCondDry
ThermalEnthalpySoilAuxSetThermalAlpha
ThermalEnthalpySoilAuxSetSoilDensity

Account of derivative of thermal conductivity w.r.t. Pressure

Derivative of thermal conductivity at the interface w.r.t. to up/down pressure needs
to be accounted for in the jacobian computation

dtherm_dP_up   = (dist_up*therm_cond_dn/therm_cond_up) * therm_cond_ave_over_dist/(dist_up*therm_cond_dn + dist_dn*therm_cond_up) * dsat_dP_up
dtherm_dP_dn   = (dist_up*therm_cond_up/therm_cond_dn) * therm_cond_ave_over_dist/(dist_up*therm_cond_dn + dist_dn*therm_cond_up) * dsat_dP_dn

Update FETCH-2 SPAC problem

Add following command line options:

  • Ability to prescribe ET, soil BC, and output filename
  • Ability to simulate following mesh configurations:
    • Mesh for an oak tree with top-soil soil layer as BC,
    • Mesh for a pine tree with top-soil soil layer as BC,
    • Mesh for an oak and pine tree with top-soil soil layer as BC,

Improve code related to setting up of coupling variables

  • Remove MPPGovEqnSetInternalCouplingVars() and MPPGovEqnSetCouplingVars() as procedures

  • Rename MPPGovEqnAddCouplingCondition() to MPPGovEqnAddBoundaryCouplingCondition

  • Rename MPPGovEqnSetCouplingVars() to MPPGovEqnSetBoundaryCouplingVars

  • Rename MPPGovEqnSetBothCouplingVars() to MPPGovEqnSetCouplingVars()

Add support for setting up mesh for common configurations

Add subroutine to set up a mesh for few default configurations so as to avoid code repetition
(e.g. vsfm_sy1991_problem.F90#L267, vsfm_celia1990_problem.F90#L171)

  • Mesh configuration 1:
    • domain extent in x, y, and z direction
    • nx, ny, nz
    • internal connection type: x-only, y-only, z-only, or in all three directions.
  • Mesh configuration 2:
    • min and max in x, y, and z
    • nx, ny, nz
    • internal connection type: x-only, y-only, z-only, or in all three directions.

Add new subroutines in MultiPhysicsProbThermal that can set properties individually

Presently MPPThermalSetSoils() is defined as:

  subroutine MPPThermalSetSoils(thermal_mpp, begc, &
                           endc,               &
                           thermal_filter,                 &
                           thermal_lun_type,               &
                           thermal_watsat,                 &
                           thermal_csol,                   &
                           thermal_tkmg,                   &
                           thermal_tkdry                   &
                           )

sets all properties of soils is set at once.

Add new subroutine(s) that:

  • Set properties one at a time.
  • Set properties for internal, boundary, and source-sink auxiliary variables.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.