Skip to content

Commit

Permalink
Reorganized
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Oct 20, 2017
1 parent e4add60 commit 5e354cc
Show file tree
Hide file tree
Showing 45 changed files with 102 additions and 339 deletions.
File renamed without changes.
65 changes: 32 additions & 33 deletions driver/src/Makefile.v1.4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
########################################################################
# Intel (ifort)
F90 = ifort
F90FLAGS = -O3 #-fpp -traceback
F90FLAGS = -O3 -traceback
F90_LIB = /usr/local/ifort
F90_LIB = /scratch/bmcinnes/usr/local/ifort
# Portland Group (pgf90)
Expand All @@ -25,22 +25,21 @@ UUID_LIB = $(F90_LIB)/lib
UUID_INC = $(F90_LIB)/include

# COSP source directory
SRC_F90 = /home/dswales/Projects/COSP/COSPv2.0/src
OBJ_PATH = ${SRC_F90}/obj
HOME_PATH = /home/dswales/Projects/COSP/COSPv2.0
SRC_F90 = ${HOME_PATH}/src
OBJ_PATH = ${HOME_PATH}/obj
PROG = cosp_test_v1.4

# COSPv1.4 model interface directory
COSP_INTERFACE_F90 = /home/dswales/Projects/COSP/COSPv2.0/cosp-interface
PROG = cosp_test_v1.4
COSP_INTERFACE_F90 = ${HOME_PATH}/cosp-interface

# RTTOV setup
RTTOV_PATH = /Projects/Clouds/dswales/RTTOV/rttov_11.3
RTTOV_LIB_PATH = $(RTTOV_PATH)/lib
RTTOV_INC_PATH = $(RTTOV_PATH)/include
RTTOV_MOD_PATH = $(RTTOV_PATH)/mod
RTTOV_LIBS = -lrttov11_mw_scatt -lrttov11_brdf_atlas -lrttov11_emis_atlas \
-lrttov11_other -lrttov11_parallel -lrttov11_coef_io \
-lrttov11_main

RTTOV_PATH =
RTTOV_LIB_PATH =
RTTOV_INC_PATH =
RTTOV_MOD_PATH =
RTTOV_LIBS =

# Object files
OBJS = $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_constants.o \
$(OBJ_PATH)/cosp_cloudsat_interface.o $(OBJ_PATH)/cosp_config.o \
Expand All @@ -51,15 +50,15 @@ OBJS = $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_constants.o \
$(OBJ_PATH)/MISR_simulator.o $(OBJ_PATH)/cosp_modis_interface.o \
$(OBJ_PATH)/modis_simulator.o $(OBJ_PATH)/cosp_rttov_interfaceSTUB.o \
$(OBJ_PATH)/cosp_rttovSTUB.o $(OBJ_PATH)/cosp_parasol_interface.o \
mo_rng.o scops.o cosp_utils.o mrgrnk.o \
cosp_interface_v1p4.o cosp_io.v1.4.o prec_scops.o math_lib.o optics_lib.o \
cosp_optics.o array_lib.o quickbeam_optics.o cosp_errorHandling.o
mo_rng.o scops.o cosp_utils.o mrgrnk.o cosp_interface_v1p4.o \
cosp_io.v1.4.o prec_scops.o math_lib.o optics_lib.o cosp_optics.o \
array_lib.o quickbeam_optics.o cosp_errorHandling.o
all: $(PROG)
mv *.mod *.o obj/
mv *.mod *.o ../obj/
$(PROG): $(OBJS)
$(F90) $(F90FLAGS) $(PROG).f90 $(OBJS) \
-L${CMOR_LIB} -L. -lcmor -I$(CMOR_INC) \
-I$(NCDF_INC) -L${NCDF_LIB} -lnetcdff -lnetcdf -L{LIB} -lnetcdf \
-I$(NCDF_INC) -L${NCDF_LIB} -lnetcdff -lnetcdf -L${LIB} -lnetcdf \
-L${RTTOV_LIB_PATH} $(RTTOV_LIBS) \
-I$(OBJ_PATH) \
-L${UDUNITS_LIB} -Wl,-rpath=${UDUNITS_LIB} -ludunits2 -lexpat -I${UDUNITS_INC} \
Expand Down Expand Up @@ -90,13 +89,13 @@ prec_scops.o : $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_config.o
cosp_optics.o : $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_constants.o

clean_objs:
rm -f $(OBJ_PATH) *.mod *.o
rm -f ../obj/*

clean_all:
rm -f $(PROG) $(OBJ_PATH)/*.o $(OBJ_PATH)/*.mod *.o *.mod fort.* obj/*
rm -f $(PROG) $(OBJ_PATH)/*.o $(OBJ_PATH)/*.mod fort.* ../obj/*.o ../obj/*.mod

clean:
rm -f $(PROG) *.o *.mod fort.*
rm -f $(PROG) fort.* ../obj/*.o ../obj/*.mod

cosp:
make -C ../../src/ install
Expand All @@ -108,38 +107,38 @@ install:
cosp_io.v1.4.o: cosp_io.v1.4.f90
$(F90) $(F90FLAGS) -c -I$(CMOR_INC) -I$(OBJ_PATH) $<

mo_rng.o : $(SRC_F90)/rng/mo_rng.F90
mo_rng.o : $(HOME_PATH)/subsample_and_optics/subcol/rng/mo_rng.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

scops.o : $(SRC_F90)/subcol/scops.F90
scops.o : $(HOME_PATH)/subsample_and_optics/subcol/scops.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

prec_scops.o : $(SRC_F90)/subcol/prec_scops.F90
prec_scops.o : $(HOME_PATH)/subsample_and_optics/subcol/prec_scops.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

cosp_utils.o : $(SRC_F90)/optics/cosp_utils.F90
cosp_utils.o : $(HOME_PATH)/subsample_and_optics/optics/cosp_utils.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

cosp_interface_v1p4.o : $(COSP_INTERFACE_F90)/cosp_interface_v1p4.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

cosp_errorHandling.o : $(COSP_INTERFACE_F90)/cosp_errorHandling.F90
cosp_errorHandling.o : $(SRC_F90)/hooks/cosp_errorHandling.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<
quickbeam_optics.o : $(SRC_F90)/optics/quickbeam_optics.F90

quickbeam_optics.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/quickbeam_optics.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

cosp_optics.o : $(SRC_F90)/optics/cosp_optics.F90
cosp_optics.o : $(HOME_PATH)/subsample_and_optics/optics/cosp_optics.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

array_lib.o : $(SRC_F90)/optics/array_lib.F90
array_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/array_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

math_lib.o : $(SRC_F90)/optics/math_lib.F90
math_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/math_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

mrgrnk.o : $(SRC_F90)/optics/mrgrnk.F90
mrgrnk.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/mrgrnk.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

optics_lib.o : $(SRC_F90)/optics/optics_lib.F90
optics_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/optics_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<
65 changes: 32 additions & 33 deletions driver/src/Makefile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
########################################################################
# Intel (ifort)
F90 = ifort
F90FLAGS = -O3 -traceback#-fpp -traceback #-check all
F90FLAGS = -O3 -traceback
F90_LIB = /usr/local/ifort
F90_LIB = /scratch/bmcinnes/usr/local/ifort
# Portland Group (pgf90)
Expand All @@ -29,19 +29,18 @@ UUID_LIB = $(F90_LIB)/lib
UUID_INC = $(F90_LIB)/include

# COSP source directory
SRC_F90 = /home/dswales/Projects/COSP/COSPv2.0/src
OBJ_PATH = ${SRC_F90}/obj
PROG = cosp_test_v2.0
COSP_INTERFACE_F90 = /home/dswales/Projects/COSP/COSPv2.0/cosp-interface
HOME_PATH = /home/dswales/Projects/COSP/COSPv2.0
SRC_F90 = ${HOME_PATH}/src
OBJ_PATH = ${HOME_PATH}/obj
PROG = cosp_test_v2.0

# RTTOV setup
RTTOV_PATH = /Projects/Clouds/dswales/RTTOV/rttov_11.3
RTTOV_LIB_PATH = $(RTTOV_PATH)/lib
RTTOV_INC_PATH = $(RTTOV_PATH)/include
RTTOV_MOD_PATH = $(RTTOV_PATH)/mod
RTTOV_LIBS = -lrttov11_mw_scatt -lrttov11_brdf_atlas -lrttov11_emis_atlas \
-lrttov11_other -lrttov11_parallel -lrttov11_coef_io \
-lrttov11_main
RTTOV_PATH =
RTTOV_LIB_PATH =
RTTOV_INC_PATH =
RTTOV_MOD_PATH =
RTTOV_LIBS =

# Object files
OBJS = $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_constants.o \
$(OBJ_PATH)/cosp_cloudsat_interface.o $(OBJ_PATH)/cosp_config.o \
Expand All @@ -55,14 +54,14 @@ OBJS = $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_constants.o
$(OBJ_PATH)/cosp_parasol_interface.o mo_rng.o scops.o cosp_utils.o \
cosp_io.v2.o cosp_errorHandling.o mrgrnk.o prec_scops.o array_lib.o \
quickbeam_optics.o math_lib.o optics_lib.o

all: $(PROG)
mv *.mod *.o obj/
mv *.mod *.o ../obj/

$(PROG): $(OBJS)
$(F90) $(F90FLAGS) $(PROG).f90 $(OBJS) \
-L${CMOR_LIB} -L. -lcmor -I$(CMOR_INC) \
-I$(NCDF_INC) -L${NCDF_LIB} -lnetcdff -lnetcdf -L{LIB} -lnetcdf \
-I$(NCDF_INC) -L${NCDF_LIB} -lnetcdff -lnetcdf -L${LIB} -lnetcdf \
-L${RTTOV_LIB_PATH} $(RTTOV_LIBS) \
-I$(OBJ_PATH) \
-L${UDUNITS_LIB} -Wl,-rpath=${UDUNITS_LIB} -ludunits2 -lexpat -I${UDUNITS_INC} \
Expand All @@ -89,49 +88,49 @@ prec_scops.o : $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_config.o
cosp_optics.o : $(OBJ_PATH)/cosp_kinds.o $(OBJ_PATH)/cosp_constants.o

clean_objs:
rm -f $(OBJ_PATH) *.mod *.o
rm -f ../obj/*

clean_all:
rm -f $(PROG) $(OBJ_PATH)/*.o $(OBJ_PATH)/*.mod *.o *.mod fort.* obj/*
rm -f $(PROG) $(OBJ_PATH)/*.o $(OBJ_PATH)/*.mod fort.* ../obj/*.o ../obj/*.mod

clean:
rm -f $(PROG) *.o *.mod fort.* obj/*
rm -f $(PROG) fort.* ../obj/*.o ../obj/*.mod

cosp:
make -C ../../src/ install

mo_rng.o : $(SRC_F90)/rng/mo_rng.F90
mo_rng.o : $(HOME_PATH)/subsample_and_optics/subcol/rng/mo_rng.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

scops.o : $(SRC_F90)/subcol/scops.F90
scops.o : $(HOME_PATH)/subsample_and_optics/subcol/scops.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

prec_scops.o : $(SRC_F90)/subcol/prec_scops.F90
prec_scops.o : $(HOME_PATH)/subsample_and_optics/subcol/prec_scops.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<
cosp_utils.o : $(SRC_F90)/optics/cosp_utils.F90

cosp_utils.o : $(HOME_PATH)/subsample_and_optics/optics/cosp_utils.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

cosp_io.v2.o: cosp_io.v2.f90
$(F90) $(F90FLAGS) -c -I$(CMOR_INC) -I$(OBJ_PATH) $<

cosp_errorHandling.o : $(COSP_INTERFACE_F90)/cosp_errorHandling.F90
cosp_errorHandling.o : $(SRC_F90)/hooks/cosp_errorHandling.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<
quickbeam_optics.o : $(SRC_F90)/optics/quickbeam_optics.F90

cosp_optics.o : $(HOME_PATH)/subsample_and_optics/optics/cosp_optics.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

cosp_optics.o : $(SRC_F90)/optics/cosp_optics.F90
quickbeam_optics.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/quickbeam_optics.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

array_lib.o : $(SRC_F90)/optics/array_lib.F90
array_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/array_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

math_lib.o : $(SRC_F90)/optics/math_lib.F90
math_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/math_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

mrgrnk.o : $(SRC_F90)/optics/mrgrnk.F90
mrgrnk.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/mrgrnk.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<

optics_lib.o : $(SRC_F90)/optics/optics_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<
optics_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/optics_lib.F90
$(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $<
12 changes: 7 additions & 5 deletions driver/src/cosp_io.v1.4.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MODULE MOD_COSP_IO
LIDAR_NTEMP,LIDAR_PHASE_TEMP,LIDAR_PHASE_TEMP_BNDS,misr_histHgtCenters,&
misr_histHgtEdges,numMISRHgtBins,PARASOL_NREFL,SR_BINS, &
isccp_histTauEdges,isccp_histPresEdges,PARASOL_SZA, &
isccp_histPresCenters,isccp_histTauCenters
isccp_histPresCenters,isccp_histTauCenters,calipso_histBsct
USE MOD_COSP_INTERFACE_v1p4, ONLY: cosp_gridbox,cosp_sgradar,cosp_radarstats, &
cosp_sglidar,cosp_lidarstats,cosp_isccp,cosp_misr, &
cosp_modis,cosp_rttov,cosp_vgrid,cosp_subgrid, &
Expand Down Expand Up @@ -955,11 +955,13 @@ SUBROUTINE NC_CMOR_INIT(cmor_nl,wmode,cfg,vgrid,gb,sg,sglidar,&
vgrid_bounds(2,i) = vgrid%zu(i)
enddo
! Lidar scattering ratio bounds (They are output by cosp_cfad_sr->diag_lidar in lmd_ipsl_stats.f90)
sratio_bounds(2,:) = stlidar%srbval(:) ! srbval contains the upper limits from lmd_ipsl_stats.f90
sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1)
sratio_bounds(1,1) = 0.0
sratio_bounds(2,SR_BINS) = 1.e5 ! This matches with Chepfer et al., JGR, 2009. However, it is not consistent
!sratio_bounds(2,:) = stlidar%srbval(:) ! srbval contains the upper limits from lmd_ipsl_stats.f90
!sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1)
!sratio_bounds(1,1) = 0.0
!sratio_bounds(2,SR_BINS) = 1.e5 ! This matches with Chepfer et al., JGR, 2009. However, it is not consistent
! with the upper limit in lmd_ipsl_stats.f90, which is LIDAR_UNDEF-1=998.999
sratio_bounds(2,:) = calipso_histBsct(2:SR_BINS+1)
sratio_bounds(1,:) = calipso_histBsct(1:SR_BINS)
! Lat lon axes
if (geomode == 2) then
lon_ax = gb%longitude(1:Nlon)
Expand Down
File renamed without changes.
41 changes: 19 additions & 22 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ F90_LIB = /usr/local/ifort
#F90FLAGS = -Mpreprocess -O0 -g
#F90_LIB = /usr/local/pgf90

SRC_PATH = src/
OBJ_PATH = obj/
OBJ_PATH = ../obj/

# Libraries
INC = /usr/local/include
LIB = /usr/local/lib
# Simulator directories
SIM_PATH = simulator
SIM_PATH = cosp/simulator
RT_PATH = $(SIM_PATH)/rttov
RS_PATH = $(SIM_PATH)/quickbeam
CS_PATH = $(SIM_PATH)/actsim
Expand All @@ -31,19 +30,17 @@ MODIS_PATH = $(SIM_PATH)/MODIS_simulator
PARASOL_PATH = $(SIM_PATH)/parasol

# RTTOV setup
RTTOV_PATH = /Projects/Clouds/dswales/RTTOV/rttov_11.3
RTTOV_LIB_PATH = $(RTTOV_PATH)/lib
RTTOV_INC_PATH = $(RTTOV_PATH)/include
RTTOV_MOD_PATH = $(RTTOV_PATH)/mod
RTTOV_LIBS = -lrttov11_mw_scatt -lrttov11_brdf_atlas -lrttov11_emis_atlas \
-lrttov11_other -lrttov11_parallel -lrttov11_coef_io \
-lrttov11_main
RTTOV_PATH =
RTTOV_LIB_PATH =
RTTOV_INC_PATH =
RTTOV_MOD_PATH =
RTTOV_LIBS =

OBJS = cosp_kinds.o cosp_constants.o cosp_cloudsat_interface.o cosp_config.o \
prec_scops.o cosp.o cosp_stats.o quickbeam.o parasol.o \
lidar_simulator.o icarus.o cosp_calipso_interface.o \
cosp_isccp_interface.o cosp_misr_interface.o MISR_simulator.o \
cosp_modis_interface.o modis_simulator.o cosp_rttov_interfaceSTUB.o \
cosp_modis_interface.o modis_simulator.o cosp_rttov_interfaceSTUB.o \
cosp_rttovSTUB.o cosp_parasol_interface.o

%.o: $(SIM_PATH)/%.F90
Expand All @@ -57,10 +54,10 @@ OBJS = cosp_kinds.o cosp_constants.o cosp_cloudsat_interface.o cosp_config.o \
@echo "-----------------------------"

# Dependencies
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.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 \
quickbeam.o MISR_simulator.o lidar_simulator.o parasol.o icarus.o
cosp_config.o : cosp_kinds.o
cosp_stats.o : cosp_kinds.o cosp_config.o
Expand All @@ -69,9 +66,9 @@ cosp_cloudsat_interface.o : cosp_kinds.o cosp_config.o quickbeam.o
cosp_isccp_interface.o : cosp_kinds.o icarus.o
cosp_misr_interface.o : cosp_kinds.o
cosp_modis_interface.o : cosp_kinds.o cosp_config.o modis_simulator.o
cosp_rttov_interfaceSTUB.o : cosp_kinds.o cosp_config.o cosp_rttovSTUB.o
cosp_rttov_interfaceSTUB.o: cosp_kinds.o cosp_config.o cosp_rttovSTUB.o
cosp_parasol_interface.o : cosp_kinds.o
cosp_rttovSTUB.o : cosp_kinds.o cosp_config.o cosp_constants.o
cosp_rttovSTUB.o : cosp_kinds.o cosp_config.o cosp_constants.o
MISR_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
modis_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
lidar_simulator.o : cosp_kinds.o cosp_config.o cosp_stats.o
Expand All @@ -96,7 +93,7 @@ MISR_simulator.o : $(MISR_PATH)/MISR_simulator.F90
modis_simulator.o : $(MODIS_PATH)/modis_simulator.F90
$(F90) $(F90FLAGS) -c $<

cosp_rttov_interfaceSTUB.o : simulator/cosp_rttov_interfaceSTUB.F90
cosp_rttov_interfaceSTUB.o : cosp/simulator/cosp_rttov_interfaceSTUB.F90
$(F90) $(F90FLAGS) -c -I $(RTTOV_INC_PATH) -I $(RTTOV_MOD_PATH) $<

cosp_rttovSTUB.o : $(RT_PATH)/cosp_rttovSTUB.F90
Expand All @@ -114,14 +111,14 @@ cosp_constants.o : hooks/cosp_constants.F90
cosp_kinds.o : hooks/cosp_kinds.F90
$(F90) $(F90FLAGS) -c $<

mo_rng.o : rng/mo_rng.F90
mo_rng.o : subcol/rng/mo_rng.F90
$(F90) $(F90FLAGS) -c $<

cosp_config.o : cosp_config.F90
cosp_config.o : cosp/cosp_config.F90
$(F90) $(F90FLAGS) -c $<

cosp.o : cosp.F90
cosp.o : cosp/cosp.F90
$(F90) $(F90FLAGS) -c $<

cosp_stats.o : cosp_stats.F90
cosp_stats.o : cosp/cosp_stats.F90
$(F90) $(F90FLAGS) -c $<
Loading

0 comments on commit 5e354cc

Please sign in to comment.