Skip to content

Commit 84e5952

Browse files
committed
New fire index for Spitfire and various bug fixes
1 parent dd656f7 commit 84e5952

209 files changed

Lines changed: 6070 additions & 1357 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
core
4747
core.*
4848
vgcore.*
49+
core-*
4950

5051
# input files
5152
*.dat
@@ -143,4 +144,7 @@ bin/soil2cdf
143144
bin/txt2clm
144145
bin/txt2grid
145146
bin/water_use_input
146-
147+
bin/cdf2bin
148+
bin/cvrtclm
149+
bin/manage2js
150+
bin/headersize

COPYRIGHT

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Copyright (C) 2007-2017 Potsdam Institute for Climate Impact Research
2-
3-
The LPJmL4 Model Code is free software: you can redistribute it and/or modify it
4-
under the terms of the GNU Affero Public License as published by the Free
5-
Software Foundation, either version 3 of the License, or (at your option) any
6-
later version. VelocityConversion is distributed in the hope that it will be
7-
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
8-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero Public
9-
License for more details. You should have received a copy of the GNU Affero
10-
Public License along with this program. If not, see
11-
http://www.gnu.org/licenses/.
12-
1+
Copyright (C) 2007-2017 Potsdam Institute for Climate Impact Research
2+
3+
The LPJmL4 Model Code is free software: you can redistribute it and/or modify it
4+
under the terms of the GNU Affero Public License as published by the Free
5+
Software Foundation, either version 3 of the License, or (at your option) any
6+
later version. LPJmL4 is distributed in the hope that it will be
7+
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
8+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero Public
9+
License for more details. You should have received a copy of the GNU Affero
10+
Public License along with this program. If not, see
11+
http://www.gnu.org/licenses/.
12+

INSTALL

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
| | | _ \ | |_ __ ___ | |
33
| | | |_) | | | '_ ` _ \| |
44
| |___| __/ |_| | | | | | | |___
5-
|_____|_| \___/|_| |_| |_|_____| Version 4.0.001
5+
|_____|_| \___/|_| |_| |_|_____| Version 4.0.002
66

77

8-
Installation of LPJmL C Version 4.0.001
8+
Installation of LPJmL C Version 4.0.002
99
=======================================
1010

1111
Installation for Unix-like systems
@@ -28,7 +28,7 @@ cd lpjml
2828

2929
untar source and data files
3030

31-
gzip -cd lpjml-4.0.001.tar.gz|tar -xf -
31+
gzip -cd lpjml-4.0.002.tar.gz|tar -xf -
3232
gzip -cd cru.tar.gz|tar -xf -
3333

3434
Directory tree after extracting the tar files:
@@ -128,16 +128,6 @@ Makefile.cluster2015 - Intel C-compiler and Intel MPI on HLRS2015 cluster at PIK
128128
Makefile.mpich - GNU C-Compiler and MPI Chameleon settings
129129
Makefile.win32 - Windows settings (used by configure.bat)
130130

131-
We are interested in learning how much and where LPJmL is used.
132-
For that we have included a call-home function in configure.sh and in the Makefile.
133-
For technical reasons, we only track the execution of configure.sh and model builds using the makefiles, not model runs.
134-
No personal data is recorded that could be used to identify users,
135-
only the country in which the scripts/Makefiles are executed and the repository source
136-
(PIK gitlab open source repository, PIK's internal gitlab repository, PIK's internal SVN repository).
137-
You can find the usage statistics online at https://goo.gl/#analytics/goo.gl/DYv3KW/all_time.
138-
If you don't want to contribute to the usage statistics, please run configure.sh with the option -nofeedback
139-
or disable the option directly in src/Makefile.
140-
141131
Compilation flags
142132

143133
Compilation of LPJmL is customized by definition of macros in the LPJFLAGS

Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#################################################################################
1616

1717
include Makefile.inc
18-
ifdef CALLHOME
19-
CH:=$(shell wget https://goo.gl/DYv3KW --header="User-Agent: Mozilla/5.0 (LPJmL 4.0.001 internal gitlab make; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080219 Navigator/9.0.0.6" -O /dev/null)
20-
endif
18+
2119
INC = include
2220

2321
HDRS = $(INC)/buffer.h $(INC)/cell.h $(INC)/climate.h $(INC)/conf.h\
@@ -98,7 +96,7 @@ clean:
9896
(cd src && $(MAKE) clean)
9997

10098
tar:
101-
tar -cf lpjml-4.0.001.tar $(FILES) src/Makefile src/*.c\
99+
tar -cf lpjml-4.0.002.tar $(FILES) src/Makefile src/*.c\
102100
src/climate/Makefile src/climate/*.c\
103101
man/man1/*.1 man/man3/*.3 man/man5/*.5 man/whatis\
104102
man/man1/Makefile man/man3/Makefile man/man5/Makefile man/Makefile\
@@ -113,10 +111,10 @@ tar:
113111
src/pnet/Makefile REFERENCES COPYRIGHT src/utils/*.c src/utils/Makefile\
114112
src/spitfire/Makefile src/spitfire/*.c src/netcdf/Makefile src/netcdf/*.c\
115113
src/cpl/Makefile src/cpl/*.c
116-
gzip -f lpjml-4.0.001.tar
114+
gzip -f lpjml-4.0.002.tar
117115

118116
zipfile:
119-
zip -l lpjml-4.0.001.zip $(FILES) src/Makefile src/*.c\
117+
zip -l lpjml-4.0.002.zip $(FILES) src/Makefile src/*.c\
120118
src/climate/Makefile src/climate/*.c config/* man/* man/man1/*.1\
121119
man/man3/*.3 man/man5/*.5\
122120
src/crop/*.c src/crop/Makefile src/grass/*.c src/grass/Makefile\

bin/lpjsubmit_slurm

Lines changed: 108 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
## Intel MPI. ##
88
## ##
99
## Usage: lpjsubmit [-class c] [-group g] [-wtime time] [-blocking n] ##
10-
## [-o output] [-e error] [-q] [-nocheck] ntask ##
11-
## [LPJargs...] ##
10+
## [-o output] [-e error] [-q] [-nocheck] [-norun] ##
11+
## ntask [LPJargs...] ##
1212
## ##
1313
## (C) Potsdam Institute for Climate Impact Research (PIK), see COPYRIGHT file ##
1414
## authors, and contributors see AUTHORS file ##
@@ -18,116 +18,116 @@
1818
## ##
1919
#################################################################################
2020

21-
if [ $# -lt 1 ]
22-
then
23-
echo >&2 Error: Number of tasks missing
24-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
25-
exit 1
26-
fi
27-
2821
if [ "$LPJROOT" = "" ]
2922
then
3023
echo >&2 Error: environment variable LPJROOT is not set
3124
echo >&2 "Set by export LPJROOT=<path to lpjml directory>"
3225
exit 1
3326
fi
3427

35-
if [ $1 = "-class" ]
36-
then
37-
if [ $# -lt 2 ]
38-
then
39-
echo >&2 Error: class missing
40-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
41-
exit 1
42-
fi
43-
shift 1
44-
class=$1
45-
shift 1
46-
else
47-
class=short
48-
fi
49-
if [ $1 = "-group" ]
50-
then
51-
if [ $# -lt 2 ]
52-
then
53-
echo >&2 Error: group missing
54-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
55-
exit 1
56-
fi
57-
shift 1
58-
group=$1
59-
shift 1
60-
else
61-
group=""
62-
fi
63-
28+
class=short
29+
group=""
6430
wtime=""
65-
if [ $1 = "-wtime" ]
66-
then
67-
if [ $# -lt 2 ]
68-
then
69-
echo >&2 Error: wall clock time missing
70-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
71-
exit 1
72-
fi
73-
shift 1
74-
wtime=$1
75-
shift 1
76-
fi
7731
blocking="unlimited"
78-
if [ $1 = "-blocking" ]
79-
then
80-
if [ $# -lt 2 ]
81-
then
82-
echo >&2 Error: blocking factor missing
83-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
84-
exit 1
85-
fi
86-
shift 1
87-
blocking=$1
88-
shift 1
89-
fi
9032
output="lpjml.%j.out"
91-
if [ $1 = "-o" ]
92-
then
93-
if [ $# -lt 2 ]
94-
then
95-
echo >&2 Error: output filename missing
96-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
97-
exit 1
98-
fi
99-
shift 1
100-
output=$1
101-
shift 1
102-
fi
10333
error="lpjml.%j.err"
104-
if [ $1 = "-e" ]
105-
then
106-
if [ $# -lt 2 ]
107-
then
108-
echo >&2 Error: error filename missing
109-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
110-
exit 1
111-
fi
112-
shift 1
113-
error=$1
114-
shift 1
115-
fi
34+
norun=0
35+
36+
while(( "$#" )); do
37+
case "$1" in
38+
-class)
39+
if [ $# -lt 2 ]
40+
then
41+
echo >&2 Error: class missing
42+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
43+
exit 1
44+
fi
45+
shift 1
46+
class=$1
47+
shift 1
48+
;;
49+
-group)
50+
if [ $# -lt 2 ]
51+
then
52+
echo >&2 Error: group missing
53+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
54+
exit 1
55+
fi
56+
shift 1
57+
group=$1
58+
shift 1
59+
;;
60+
-wtime)
61+
if [ $# -lt 2 ]
62+
then
63+
echo >&2 Error: wall clock time missing
64+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
65+
exit 1
66+
fi
67+
shift 1
68+
wtime=$1
69+
shift 1
70+
;;
71+
-blocking)
72+
if [ $# -lt 2 ]
73+
then
74+
echo >&2 Error: blocking factor missing
75+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
76+
exit 1
77+
fi
78+
shift 1
79+
blocking=$1
80+
shift 1
81+
;;
82+
-o)
83+
if [ $# -lt 2 ]
84+
then
85+
echo >&2 Error: output filename missing
86+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
87+
exit 1
88+
fi
89+
shift 1
90+
output=$1
91+
shift 1
92+
;;
93+
-e)
94+
if [ $# -lt 2 ]
95+
then
96+
echo >&2 Error: error filename missing
97+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
98+
exit 1
99+
fi
100+
shift 1
101+
error=$1
102+
shift 1
103+
;;
104+
-q)
105+
shift 1
106+
quiet="-Q"
107+
;;
108+
-nocheck)
109+
shift 1
110+
nocheck="-nocheck"
111+
;;
112+
-norun)
113+
shift 1
114+
norun=1
115+
;;
116+
-*)
117+
echo >&2 Invalid option $1
118+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
119+
exit 1
120+
;;
121+
*)
122+
break
123+
;;
124+
esac
125+
done
116126

117-
if [ $1 = "-q" ]
118-
then
119-
shift 1
120-
quiet="-Q"
121-
fi
122-
if [ $1 = "-nocheck" ]
123-
then
124-
shift 1
125-
nocheck="-nocheck"
126-
fi
127127
if [ $# -lt 1 ]
128128
then
129129
echo >&2 Error: Number of tasks missing
130-
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] ntasks [args ...]
130+
echo >&2 Usage: $0 [-class c] [-group g] [-wtime time] [-blocking n] [-o output] [-e error] [-q] [-nocheck] [-norun] ntasks [args ...]
131131
exit 1
132132
fi
133133

@@ -141,7 +141,7 @@ if $LPJROOT/bin/lpjcheck $quiet $nocheck $args ;
141141
then
142142
# yes, create SLURM job control file
143143
cat <<EOF >slurm.jcf
144-
#!/bin/bash
144+
#!/bin/bash
145145
###############################################################################
146146
## ##
147147
## s l u r m . j c f ##
@@ -154,7 +154,7 @@ then
154154
## Created: $(date +"%d.%m.%Y") ##
155155
## ##
156156
###############################################################################
157-
157+
158158
#SBATCH --ntasks=$ntask
159159
#SBATCH --qos=$class
160160
#SBATCH --signal=15@180
@@ -194,15 +194,18 @@ srun --propagate \$LPJROOT/bin/lpjml $args
194194
rc=\$? # save return code of srun
195195
exit \$rc # exit with return code
196196
EOF
197-
# submit job
198-
if sbatch $quiet slurm.jcf ;
197+
if [ "$norun" = "0" ]
199198
then
200-
if [ "$quiet" != "-Q" ]
199+
# submit job
200+
if sbatch $quiet slurm.jcf ;
201201
then
202-
squeue -u $(whoami)
202+
if [ "$quiet" != "-Q" ]
203+
then
204+
squeue -u $(whoami)
205+
fi
206+
else
207+
exit 1
203208
fi
204-
else
205-
exit 1
206209
fi
207210
else
208211
echo >&2 "Error in LPJ configuration, job not submitted"

config/Makefile.cluster2015

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
CC = mpiicc
1919
OPTFLAGS= -g -O3 -ipo -xCORE-AVX2 -no-prec-div -no-inline-max-total-size -no-inline-max-size
2020
DEBUGFLAGS = -g
21+
CHECKFLAGS = -g -check-pointers=rw
2122
LPJFLAGS= -DUSE_RAND48 -DUSE_MPI -DSAFE -DWITH_FPE -DSTORECLIMATE -DUSE_NETCDF -DUSE_UDUNITS -DUSE_JSON #-DDAILY_ESTABLISHMENT
2223
WFLAG = -Wall -w3
2324
NETCDF_INC = -I$(NETCDF_CROOT)/include -I$(UDUNITSROOT)/include

config/Makefile.intel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
CC = icc
1717
DEBUGFLAGS = -g
18+
CHECKFLAGS = -g -check-pointers=rw
1819
OPTFLAGS= -O3 -ipo -xSSE4.1 -no-prec-div -no-inline-max-total-size -no-inline-max-size
1920
WFLAG = -Wall -w3
2021
LPJFLAGS = -DUSE_RAND48 -DSAFE -DWITH_FPE -DSTORECLIMATE -DUSE_NETCDF -DUSE_UDUNITS -DUSE_JSON

0 commit comments

Comments
 (0)