Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file is here to make CLion users' lives better, but it is not complete.
# One cannot build sipnet from this file. But, it does let CLion do a much
# better job with code analysis.

# As C files are added and/or removed, this file should be updated.

cmake_minimum_required(VERSION 3.30)
project(sipnet C)

set(CMAKE_C_STANDARD 23)

include_directories(src)
include_directories(src/common)
include_directories(src/sipnet)
include_directories(tests)
include_directories(tests/sipnet/test_events_infrastructure)
include_directories(tests/sipnet/test_events_types)
include_directories(tests/sipnet/test_bugfixes)
include_directories(tests/sipnet/test_sipnet_infrastructure)
include_directories(tests/utils)

add_compile_options(-Wall -Wpedantic -Werror)

add_library(commonlib
src/common/spatialParams.c
src/common/util.c
)

add_library(sipnetlib
src/sipnet/cli.c
src/sipnet/context.c
src/sipnet/events.c
src/sipnet/frontend.c
src/sipnet/outputItems.c
src/sipnet/runmean.c
src/sipnet/sipnet.c
)
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ LIB_DIR=./libs
LDFLAGS=-L$(LIB_DIR)

# Main executables
COMMON_CFILES:=util.c namelistInput.c modelParams.c
COMMON_CFILES:=util.c modelParams.c
COMMON_CFILES:=$(addprefix src/common/, $(COMMON_CFILES))
COMMON_OFILES=$(COMMON_CFILES:.c=.o)

SIPNET_CFILES:=sipnet.c frontend.c runmean.c outputItems.c events.c
SIPNET_CFILES:=sipnet.c frontend.c runmean.c outputItems.c events.c context.c cli.c
SIPNET_CFILES:=$(addprefix src/sipnet/, $(SIPNET_CFILES))
SIPNET_OFILES=$(SIPNET_CFILES:.c=.o)
SIPNET_LIBS=-lsipnet_common
Expand Down
20 changes: 20 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ SIPNET (Simplified Photosynthesis and Evapotranspiration Model) is an ecosystem
carbon and water dynamics. Originally developed for assimilation of eddy covariance flux data in forest ecosystems,
current development is focused on representing carbon balance and GHG fluxes and agricultural management practices.

## Quick Start

1. Clone the repository:
```bash
git clone https://github.com/PecanProject/sipnet.git
cd sipnet
```
2. Build the SIPNET executable:
```bash
make
```
3. Run a test simulation:
```bash
./src/sipnet -i tests/smoke/sipnet.in
```
4. Check the output:
```bash
cat tests/smoke/niwot.out
```

## Getting Started

### Installing
Expand Down
3 changes: 2 additions & 1 deletion src/common/exitCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ typedef enum {
EXIT_CODE_UNKNOWN_EVENT_TYPE_OR_PARAM = 4,
EXIT_CODE_INPUT_FILE_ERROR = 5,
EXIT_CODE_FILE_OPEN_OR_READ_ERROR = 6,
EXIT_CODE_INTERNAL_ERROR = 7
EXIT_CODE_INTERNAL_ERROR = 7,
EXIT_CODE_BAD_CLI_ARGUMENT = 8
} exit_code_t;

#endif
292 changes: 0 additions & 292 deletions src/common/namelistInput.c

This file was deleted.

Loading