Skip to content

Commit

Permalink
Merge pull request #764 from PCMDI/new_error_function
Browse files Browse the repository at this point in the history
New error function and resolved compiler warnings
  • Loading branch information
mauzey1 authored Dec 19, 2024
2 parents 1c2e08c + e9369e9 commit 906e37b
Show file tree
Hide file tree
Showing 21 changed files with 2,681 additions and 2,688 deletions.
31 changes: 18 additions & 13 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,27 @@ backup: clean
@echo "Full backup tar file created : $$TGZNAME")
test: cmor test_C @TEST_FORTRAN@ test_python test_cmip6_cv
@echo "All C, Fortran, and Python tests passed successfully"
test_a_C:
@echo "${OK_COLOR}Testing ${TEST_NAME} ${NO_COLOR}"
@rm -f test_bin/${TEST_NAME}
@@CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/${TEST_NAME}.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/${TEST_NAME}
@./test_bin/${TEST_NAME}
test_C: cmor
mkdir -p test_bin
rm -f test_bin/ipcc_test_code ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/ipcc_test_code.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/ipcc_test_code @VERB@; ./test_bin/ipcc_test_code @VERB@
rm -f test_bin/test_singletons ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_singletons.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_singletons @VERB@; ./test_bin/test_singletons @VERB@
rm -f test_bin/test_grid ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_grid.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_bin/test_grid @LDFLAGS@ @VERB@; ./test_bin/test_grid @VERB@;
rm -f test_bin/test_grid_unstructured ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_grid_unstructured_fabi.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_bin/test_grid_unstructured @LDFLAGS@ @VERB@; ./test_bin/test_grid_unstructured @VERB@;
rm -f test_bin/test_grid_unstructured_3d ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_grid_unstructured_3d_fabi.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ -o test_bin/test_grid_unstructured_3d @LDFLAGS@ @VERB@; ./test_bin/test_grid_unstructured_3d @VERB@;
rm -f test_bin/test_cat_unique ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_unit_cat_unique.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_unit_cat_unique @VERB@; ./test_bin/test_unit_cat_unique @VERB@;
rm -f test_bin/test_cmor_append_associated ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_append_associated.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_cmor_append_associated @VERB@; ./test_bin/test_cmor_append_associated @VERB@;
rm -f test_bin/test_cmor_append_associated_point ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_append_associated_point.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_cmor_append_associated_point @VERB@; ./test_bin/test_cmor_append_associated_point @VERB@;
rm -f test_bin/test_cmor_singleton_and_generic ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_singleton_and_generic.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_cmor_singleton_and_generic @VERB@; ./test_bin/test_cmor_singleton_and_generic @VERB@;
rm -f test_bin/test_cmor_nwdFracLut ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_nwdFracLut.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_cmor_nwdFracLut @VERB@; ./test_bin/test_cmor_nwdFracLut @VERB@;
rm -f test_bin/test_cmor_depth_coord_half ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_cmor_depth_coord_half.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_cmor_depth_coord_half @VERB@; ./test_bin/test_cmor_depth_coord_half @VERB@;
rm -f test_bin/test_sdepth1_float ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_sdepth1_float.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_sdepth1_float @VERB@; ./test_bin/test_sdepth1_float @VERB@;
env TEST_NAME=ipcc_test_code make test_a_C
env TEST_NAME=test_singletons make test_a_C
env TEST_NAME=test_grid make test_a_C
env TEST_NAME=test_cmor_grid_unstructured_fabi make test_a_C
env TEST_NAME=test_cmor_grid_unstructured_3d_fabi make test_a_C
env TEST_NAME=test_unit_cat_unique make test_a_C
env TEST_NAME=test_cmor_append_associated make test_a_C
env TEST_NAME=test_cmor_append_associated_point make test_a_C
env TEST_NAME=test_cmor_singleton_and_generic make test_a_C
env TEST_NAME=test_cmor_nwdFracLut make test_a_C
env TEST_NAME=test_cmor_depth_coord_half make test_a_C
env TEST_NAME=test_sdepth1_float make test_a_C
ifeq ($(UNAME), Linux)
rm -f test_bin/test_lots_of_variables ; @CC@ @CFLAGS@ @USERCFLAGS@ @CPPFLAGS@ Test/test_lots_of_variables.c -L@prefix@/lib -I@prefix@/include -L. -lcmor @NCCFLAGS@ @NCLDFLAGS@ @UDUNITS2LDFLAGS@ @UDUNITS2FLAGS@ @JSONCLDFLAGS@ @JSONCFLAGS@ @UUIDLDFLAGS@ @UUIDFLAGS@ @LDFLAGS@ -o test_bin/test_lots_of_variables @VERB@; ./test_bin/test_lots_of_variables @VERB@;
env TEST_NAME=test_lots_of_variables make test_a_C
# do something Linux-y
endif
python:
Expand Down
2 changes: 1 addition & 1 deletion Src/cdTime/timeArith.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ CdDivDelTime(double begEtm, double endEtm, CdDeltaTime delTime, CdTimeType timeT
range = (ehtime.month - bhtime.month);
if(range < 0) range += 12;
}
*nDel = abs(range)/delMonths;
*nDel = labs(range)/delMonths;
break;
case CdWeek: case CdDay: case CdHour: case CdMinute: case CdSecond:
delHours *= (double)delTime.count;
Expand Down
Loading

0 comments on commit 906e37b

Please sign in to comment.