v0.14.0
Loading...
Searching...
No Matches
Functions | Variables
climate_model.cpp File Reference
#include <MoFEM.hpp>
#include <MethodForForceScaling.hpp>
#include <DirichletBC.hpp>
#include <Projection10NodeCoordsOnField.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <moab/AdaptiveKDTree.hpp>
#include <spa.h>
#include <time.h>
#include <moab/Skinner.hpp>
#include <GenericClimateModel.hpp>
#include <GroundSurfaceTemerature.hpp>
#include <boost/program_options.hpp>
#include <iostream>
#include <fstream>
#include <iterator>
#include <boost/iostreams/tee.hpp>
#include <boost/iostreams/stream.hpp>
#include <CrudeClimateModel.hpp>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Variables

static char help []
 

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 60 of file climate_model.cpp.

60 {
61
62 MoFEM::Core::Initialize(&argc,&argv,(char *)0,help);
63
64 try {
65
66 PetscBool flg;
67 PetscScalar nb_days;
68 CHKERR PetscOptionsGetScalar(PETSC_NULL,"-my_nb_days",&nb_days,&flg);
69 if(flg != PETSC_TRUE) {
70 nb_days = 365;
71 }
72 PetscScalar time_step;
73 CHKERR PetscOptionsGetScalar(PETSC_NULL,"-my_step_size",&time_step,&flg);
74 if(flg != PETSC_TRUE) {
75 time_step = 0.2; // 5th part of day
76 }
77
78 CrudeClimateModel time_data("parameters.in");
79 CHKERR time_data.testCode(60*60*24*nb_days,60*60*24*time_step);
80
82
84 return 0;
85}
static char help[]
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:72
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:112

Variable Documentation

◆ help

char help[]
static
Initial value:
=
"-nb_days [days]\n"
"-my_step_size [days]\n\n"

Definition at line 56 of file climate_model.cpp.