Skip to content

Commit

Permalink
Added back in COSP1.4 wrapper example. Cleaned up python testing scri…
Browse files Browse the repository at this point in the history
…pt. Moved some stuff around.
  • Loading branch information
Dustin Swales committed Feb 1, 2018
1 parent 944ba6a commit b4923da
Show file tree
Hide file tree
Showing 25 changed files with 435 additions and 383 deletions.
18 changes: 15 additions & 3 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ VPATH = $(SRC_PATH):$(HOOKS):$(SIM_PATH):$(RT_PATH):$(RS_PATH):$(CS_PATH):$(ISCC
SUBCOLS = ../subsample_and_optics_example
VPATH += $(SUBCOLS)/optics:$(SUBCOLS)/optics/quickbeam_optics:$(SUBCOLS)/subcol:$(SUBCOLS)/subcol/rng

# COSP1.4 wrapper around COSP2
COSP1WRAPPER = ../cosp-1.4-interface
VPATH += $(COSP1WRAPPER)

# Standalone driver
# Replace directory with ../driver/src-cmor to exercise CMOR-compatible offline driver
DRIVER = ../driver/src
Expand Down Expand Up @@ -67,19 +71,22 @@ clean:
driver:
make cosp2_test
mv cosp2_test ../driver/run

driver_COSP1.4:
make cosp1_test
mv cosp1_test ../driver/run

# Dependencies for libary
cosp.o : cosp_kinds.o cosp_modis_interface.o cosp_constants.o \
cosp_rttov_interfaceSTUB.o cosp_misr_interface.o cosp_isccp_interface.o \
cosp_calipso_interface.o cosp_cloudsat_interface.o cosp_stats.o \
cosp_parasol_interface.o cosp_rttovSTUB.o cosp_rttov_interfaceSTUB.o \
cosp_parasol_interface.o cosp_rttovSTUB.o cosp_rttov_interfaceSTUB.o \
quickbeam.o MISR_simulator.o lidar_simulator.o parasol.o icarus.o
cosp_constants.o : cosp_kinds.o
cosp_config.o : cosp_kinds.o
cosp_errorHandling.o : cosp_kinds.o
cosp_stats.o : cosp_kinds.o cosp_config.o
cosp_isccp_interface.o : cosp_kinds.o icarus.o
icarus.o : cosp_kinds.o cosp_constants.o cosp_stats.o
icarus.o : cosp_kinds.o cosp_constants.o cosp_stats.o
cosp_misr_interface.o : cosp_kinds.o
MISR_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
cosp_modis_interface.o : cosp_kinds.o cosp_config.o modis_simulator.o
Expand Down Expand Up @@ -113,3 +120,8 @@ mo_rng.o : cosp_kinds.o
cosp2_io.o : cosp_kinds.o cosp_config.o cosp.o
cosp2_test.o : cosp2_io.o libcosp.a libsubcol.a
cosp2_test : cosp2_test.o cosp2_io.o

# Offline driver
cosp_interface_v1p4.o : cosp_kinds.o libcosp.a libsubcol.a
cosp1_test.o : cosp2_io.o cosp_interface_v1p4.o
cosp1_test : cosp1_test.o cosp2_io.o cosp_interface_v1p4.o
2 changes: 1 addition & 1 deletion build/Makefile.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
F90 = ifort
F90FLAGS = -O3

F90_LIB = /scratch/bmcinnes/usr/local/ifort
F90_LIB = /usr/local/ifort
NC_INC = -I$(F90_LIB)/include
NC_LIB = -L$(F90_LIB)/lib
CMOR_INC =
Expand Down
374 changes: 0 additions & 374 deletions cosp-1.4-interface/cosp1_test.f90

This file was deleted.

415 changes: 415 additions & 0 deletions driver/src/cosp1_test.f90

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions testing/test_cosp2Imp.py → driver/test_cosp2Imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# NAME TYPE DESCRIPTION
# dataRef string COSP output file (Reference) OR COSP output directory (if using --cmor)
# data string COSP output file OR COSP output directory (if using --cmor)
# -zeroThresh float error threshold(optional)
# --zeroThresh float error threshold(optional)
# --cmor string using cmor compliant output? (optional)
#
##########################################################################################
Expand All @@ -54,7 +54,7 @@
help='COSP2 input file (reference)')
parser.add_argument('data',metavar='COSP2_data',type=str,nargs=1,
help='COSP2 input file')
parser.add_argument('-zeroThresh',nargs='?',type=float,
parser.add_argument('--zeroThresh',nargs='?',type=float,
default=0.00001,help='Error tolerance threshold')
parser.add_argument('--cmor',type=str,nargs=1,default='None', help='CMOR data format (1D or 2D)')
args = parser.parse_args()
Expand All @@ -69,8 +69,7 @@
##########################################################################################
# A) Standard output.
##########################################################################################
if (args.cmor == None):

if (args.cmor == 'None'):
# Input filenames
fileRef = ''.join(args.dataRef)
fileIN = ''.join(args.data)
Expand Down Expand Up @@ -126,7 +125,7 @@
##########################################################################################
# B) CMOR compliant output
##########################################################################################
if (args.cmor != None):
if (args.cmor != 'None'):
dirOUT = ''.join(args.data)
dirREF = ''.join(args.dataRef)
dataset = ''.join(args.cmor)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b4923da

Please sign in to comment.