Commit 463e96e3ec4ab114a75d1c63336c46eb0e494133
1 parent
98760ae1
Exists in
master
and in
112 other branches
before merge
Showing
3 changed files
with
21 additions
and
14 deletions
Show diff stats
.gitignore
... | ... | @@ -5,11 +5,17 @@ generic_data/Param/*.xml |
5 | 5 | generic_data/RemoteData/ |
6 | 6 | generic_data/Statistics/ |
7 | 7 | generic_data/newKernelDDBase/ |
8 | +generic_data/ParamTemplate/ | |
8 | 9 | generic_data/ParamInfo/*.xml |
9 | -js/lib/ext | |
10 | -help/simu/simu* | |
10 | +js/lib/ext/ | |
11 | +help/simu | |
12 | +help/auto | |
13 | +php/bin | |
14 | +*~ | |
15 | +logs/* | |
16 | + | |
17 | +# Ignore these files to safely work on a configured local project: | |
11 | 18 | desktop.php |
12 | 19 | php/my_config.php |
13 | 20 | DD.res |
14 | -logs/* | |
15 | -*~ | |
21 | + | |
... | ... |
php/src/Makefile
1 | -INC = -I/usr/include -I/usr/local/include -I/usr/local/cdf/include -I/usr/local/cef/include -I/home/budnik/AMDANEW/DDLIB/include | |
2 | -LIB = -L/usr/lib -L/usr/local/lib -L/usr/local/cdf/lib -L/usr/local/cef/lib -L/home/budnik/AMDANEW/DDLIB/lib | |
3 | -CFLAGS = -ggdb -DLINUX -march=i686 -fPIC -Dlinux -D_REENTRANT -malign-double | |
1 | +INC = -I/usr/include -I/usr/local/include -I${CDF_DIR}/include -I${CEF_DIR}/include -I${DD_INCLUDE} | |
2 | +LIB = -L/usr/lib64 -L/usr/local/lib64 -L${CDF_DIR}/lib -L${CEF_DIR}/lib -L${DD_LIB} | |
3 | +CFLAGS = -ggdb -DLINUX -m64 -march=core2 -fPIC -Dlinux -D_REENTRANT -malign-double | |
4 | 4 | CC = gcc |
5 | 5 | |
6 | 6 | EXE = nctimestring2double nctimeinfo getncvars ncvarinfo \ |
7 | 7 | cefstartstop cefvarinfo cefinfo cefsampling ceftimeinfo \ |
8 | 8 | cdfinfo cdfvarinfo cdfstartstopfromdata cdfsamplingfromdata |
9 | 9 | |
10 | -lib: $(EXE) | |
10 | +lib: ${EXE} | |
11 | 11 | |
12 | 12 | nctimestring2double: nctimestring2double.o |
13 | - ${CC} -o nctimestring2double nctimestring2double.o ${LIB} -lDD -lnetcdf | |
13 | + ${CC} -o nctimestring2double nctimestring2double.o ${LIB} -lDDClientLibC -lnetcdf | |
14 | 14 | |
15 | 15 | nctimestring2double.o: nctimestring2double.c |
16 | 16 | ${CC} ${CFLAGS} -c nctimestring2double.c ${INC} |
... | ... | @@ -88,11 +88,12 @@ cdfsamplingfromdata.o: cdfsamplingfromdata.c |
88 | 88 | ${CC} ${CFLAGS} -c cdfsamplingfromdata.c ${INC} |
89 | 89 | |
90 | 90 | install: |
91 | - cp $(EXE) ../bin | |
91 | + install -d -m a+rx,ug+w ${IHM_DIR}/php/bin | |
92 | + cp ${EXE} ${IHM_DIR}/php/bin | |
92 | 93 | |
93 | 94 | clean: |
94 | 95 | tag="*.o ${EXE}";\ |
95 | - for file in $$tag; do \ | |
96 | + for file in $$tag; do \ | |
96 | 97 | echo $$file; rm -f $$file;\ |
97 | 98 | done |
98 | - find -name \*~ -delete | |
99 | 99 | \ No newline at end of file |
100 | + find -name \*~ -delete | |
... | ... |
php/src/nctimeinfo.c
... | ... | @@ -55,7 +55,7 @@ main(int argc, char **argv) |
55 | 55 | |
56 | 56 | for (i = 0; i < 2; i++) { |
57 | 57 | sampling = time_double[i+1] - time_double[i]; |
58 | - if (sampling < sampling_min) sampling_min = sampling; | |
58 | + if (sampling < sampling_min && sampling > 0.0) sampling_min = sampling; | |
59 | 59 | } |
60 | 60 | |
61 | 61 | printf("%lf:", time_double[0]); |
... | ... | @@ -69,7 +69,7 @@ main(int argc, char **argv) |
69 | 69 | |
70 | 70 | for (i = 0; i < 2; i++) { |
71 | 71 | sampling = time_double[i+1] - time_double[i]; |
72 | - if (sampling < sampling_min) sampling_min = sampling; | |
72 | + if (sampling < sampling_min && sampling > 0.0) sampling_min = sampling; | |
73 | 73 | } |
74 | 74 | |
75 | 75 | printf("%lf", sampling_min); |
... | ... |