From 5e354ccfc4c5b179c9739bda793fb34b6157ffb3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 20 Oct 2017 11:26:34 -0600 Subject: [PATCH] Reorganized --- driver/{src => }/obj/.gitignore | 0 driver/src/Makefile.v1.4 | 65 +++++---- driver/src/Makefile.v2 | 65 +++++---- driver/src/cosp_io.v1.4.f90 | 12 +- {src/obj => obj}/.gitignore | 0 src/Makefile | 41 +++--- src/MakefilewRTTOV | 127 ------------------ src/README | 11 +- src/{ => cosp}/cosp.F90 | 0 src/{ => cosp}/cosp_config.F90 | 0 src/{ => cosp}/cosp_stats.F90 | 0 .../MISR_simulator/MISR_simulator.F90 | 0 .../MODIS_simulator/modis_simulator.F90 | 0 src/{ => cosp}/simulator/README | 0 .../simulator/actsim/lidar_simulator.F90 | 0 .../simulator/cosp_calipso_interface.F90 | 0 .../simulator/cosp_cloudsat_interface.F90 | 0 .../simulator/cosp_isccp_interface.F90 | 0 .../simulator/cosp_misr_interface.F90 | 0 .../simulator/cosp_modis_interface.F90 | 0 .../simulator/cosp_parasol_interface.F90 | 0 .../simulator/cosp_rttov_interface.F90 | 0 .../simulator/cosp_rttov_interfaceSTUB.F90 | 0 .../simulator/icarus-scops-4.1-bsd/README | 0 .../simulator/icarus-scops-4.1-bsd/icarus.F90 | 0 .../simulator/icarus-scops-4.1-bsd/license | 0 src/{ => cosp}/simulator/parasol/parasol.F90 | 0 .../simulator/quickbeam/quickbeam.F90 | 0 src/{ => cosp}/simulator/rttov/cosp_rttov.F90 | 0 .../simulator/rttov/cosp_rttov11.F90 | 0 .../simulator/rttov/cosp_rttovSTUB.F90 | 0 .../hooks}/cosp_errorHandling.F90 | 0 subsample_and_optics/README | 10 ++ {src => subsample_and_optics}/optics/README | 0 .../optics/cosp_optics.F90 | 0 .../optics/cosp_utils.F90 | 110 --------------- .../optics/quickbeam_optics}/array_lib.F90 | 0 .../optics/quickbeam_optics}/math_lib.F90 | 0 .../optics/quickbeam_optics}/mrgrnk.F90 | 0 .../optics/quickbeam_optics}/optics_lib.F90 | 0 .../quickbeam_optics}/quickbeam_optics.F90 | 0 {src => subsample_and_optics}/subcol/README | 0 .../subcol/prec_scops.F90 | 0 .../subcol}/rng/mo_rng.F90 | 0 .../subcol/scops.F90 | 0 45 files changed, 102 insertions(+), 339 deletions(-) rename driver/{src => }/obj/.gitignore (100%) rename {src/obj => obj}/.gitignore (100%) delete mode 100644 src/MakefilewRTTOV rename src/{ => cosp}/cosp.F90 (100%) rename src/{ => cosp}/cosp_config.F90 (100%) rename src/{ => cosp}/cosp_stats.F90 (100%) rename src/{ => cosp}/simulator/MISR_simulator/MISR_simulator.F90 (100%) rename src/{ => cosp}/simulator/MODIS_simulator/modis_simulator.F90 (100%) rename src/{ => cosp}/simulator/README (100%) rename src/{ => cosp}/simulator/actsim/lidar_simulator.F90 (100%) rename src/{ => cosp}/simulator/cosp_calipso_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_cloudsat_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_isccp_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_misr_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_modis_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_parasol_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_rttov_interface.F90 (100%) rename src/{ => cosp}/simulator/cosp_rttov_interfaceSTUB.F90 (100%) rename src/{ => cosp}/simulator/icarus-scops-4.1-bsd/README (100%) rename src/{ => cosp}/simulator/icarus-scops-4.1-bsd/icarus.F90 (100%) rename src/{ => cosp}/simulator/icarus-scops-4.1-bsd/license (100%) rename src/{ => cosp}/simulator/parasol/parasol.F90 (100%) rename src/{ => cosp}/simulator/quickbeam/quickbeam.F90 (100%) rename src/{ => cosp}/simulator/rttov/cosp_rttov.F90 (100%) rename src/{ => cosp}/simulator/rttov/cosp_rttov11.F90 (100%) rename src/{ => cosp}/simulator/rttov/cosp_rttovSTUB.F90 (100%) rename {cosp-interface => src/hooks}/cosp_errorHandling.F90 (100%) create mode 100644 subsample_and_optics/README rename {src => subsample_and_optics}/optics/README (100%) rename {src => subsample_and_optics}/optics/cosp_optics.F90 (100%) rename {src => subsample_and_optics}/optics/cosp_utils.F90 (51%) rename {src/optics => subsample_and_optics/optics/quickbeam_optics}/array_lib.F90 (100%) rename {src/optics => subsample_and_optics/optics/quickbeam_optics}/math_lib.F90 (100%) rename {src/optics => subsample_and_optics/optics/quickbeam_optics}/mrgrnk.F90 (100%) rename {src/optics => subsample_and_optics/optics/quickbeam_optics}/optics_lib.F90 (100%) rename {src/optics => subsample_and_optics/optics/quickbeam_optics}/quickbeam_optics.F90 (100%) rename {src => subsample_and_optics}/subcol/README (100%) rename {src => subsample_and_optics}/subcol/prec_scops.F90 (100%) rename {src => subsample_and_optics/subcol}/rng/mo_rng.F90 (100%) rename {src => subsample_and_optics}/subcol/scops.F90 (100%) diff --git a/driver/src/obj/.gitignore b/driver/obj/.gitignore similarity index 100% rename from driver/src/obj/.gitignore rename to driver/obj/.gitignore diff --git a/driver/src/Makefile.v1.4 b/driver/src/Makefile.v1.4 index e0b407d472..8b243987c2 100644 --- a/driver/src/Makefile.v1.4 +++ b/driver/src/Makefile.v1.4 @@ -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) @@ -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 \ @@ -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} \ @@ -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 @@ -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) $< diff --git a/driver/src/Makefile.v2 b/driver/src/Makefile.v2 index dfa4aea230..a5f8f0b612 100644 --- a/driver/src/Makefile.v2 +++ b/driver/src/Makefile.v2 @@ -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) @@ -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 \ @@ -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} \ @@ -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) $< \ No newline at end of file +optics_lib.o : $(HOME_PATH)/subsample_and_optics/optics/quickbeam_optics/optics_lib.F90 + $(F90) $(F90FLAGS) -c -I $(OBJ_PATH) $< diff --git a/driver/src/cosp_io.v1.4.f90 b/driver/src/cosp_io.v1.4.f90 index b13dd3ad35..c49b1dac08 100644 --- a/driver/src/cosp_io.v1.4.f90 +++ b/driver/src/cosp_io.v1.4.f90 @@ -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, & @@ -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) diff --git a/src/obj/.gitignore b/obj/.gitignore similarity index 100% rename from src/obj/.gitignore rename to obj/.gitignore diff --git a/src/Makefile b/src/Makefile index c2e7176b0b..4587c7cd0c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 $< diff --git a/src/MakefilewRTTOV b/src/MakefilewRTTOV deleted file mode 100644 index f8e820d0c4..0000000000 --- a/src/MakefilewRTTOV +++ /dev/null @@ -1,127 +0,0 @@ -.SUFFIXES : .F .f .c .o .a .f90 .f95 .F90 -######################################################################## -# COSP Makefile -######################################################################## -# Compiler and flags -# Intel (ifort) -F90 = ifort -F90FLAGS = -O3 #-fpp#-pg # -traceback -check bounds -F90_LIB = /usr/local/ifort - -# Portland Group (pgf90) -#F90 = pgf90 -#F90FLAGS = -Mpreprocess -O0 -g -#F90_LIB = /usr/local/pgf90 - -SRC_PATH = src/ -OBJ_PATH = obj/ - -# Libraries -INC = /usr/local/include -LIB = /usr/local/lib -# Simulator directories -SIM_PATH = simulator -RT_PATH = $(SIM_PATH)/rttov -RS_PATH = $(SIM_PATH)/quickbeam -CS_PATH = $(SIM_PATH)/actsim -LLNL_PATH = $(SIM_PATH)/llnl -ISCCP_PATH = $(SIM_PATH)/icarus-scops-4.1-bsd -MISR_PATH = $(SIM_PATH)/MISR_simulator -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 - -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_interface.o \ - cosp_rttov11.o cosp_parasol_interface.o - -%.o: $(SIM_PATH)/%.F90 - @echo $(F90) $(F90FLAGS) -c $< - $(F90) $(F90FLAGS) -c $< - @echo "-----------------------------" - -%.o: %.F90 - @echo $(F90) $(F90FLAGS) -c $< - $(F90) $(F90FLAGS) -c $< - @echo "-----------------------------" - -# Dependencies -cosp.o : cosp_kinds.o cosp_modis_interface.o cosp_constants.o \ - cosp_rttov_interface.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_rttov11.o cosp_rttov_interface.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 -cosp_calipso_interface.o : cosp_kinds.o lidar_simulator.o -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_interface.o : cosp_kinds.o cosp_config.o cosp_rttov11.o -cosp_parasol_interface.o : cosp_kinds.o -cosp_rttov11.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 -icarus.o : cosp_kinds.o cosp_constants.o cosp_stats.o -parasol.o : cosp_kinds.o cosp_config.o cosp_constants.o - -install: - make -f MakefilewRTTOV - mv *.mod *.o $(OBJ_PATH) -clean: - rm -f $(OBJ_PATH)*.mod $(OBJ_PATH)*.o fort.* *.mod *.o - -icarus.o : $(ISCCP_PATH)/icarus.F90 - $(F90) $(F90FLAGS) -c $< - -quickbeam.o: $(RS_PATH)/quickbeam.F90 - $(F90) $(F90FLAGS) -c $< - -MISR_simulator.o : $(MISR_PATH)/MISR_simulator.F90 - $(F90) $(F90FLAGS) -c $< - -modis_simulator.o : $(MODIS_PATH)/modis_simulator.F90 - $(F90) $(F90FLAGS) -c $< - -cosp_rttov_interface.o : simulator/cosp_rttov_interface.F90 - $(F90) $(F90FLAGS) -c -I $(RTTOV_INC_PATH) -I $(RTTOV_MOD_PATH) $< - -cosp_rttov11.o : $(RT_PATH)/cosp_rttov11.F90 - $(F90) $(F90FLAGS) -c -I $(RTTOV_INC_PATH) -I $(RTTOV_MOD_PATH) $< - -lidar_simulator.o : $(CS_PATH)/lidar_simulator.F90 - $(F90) $(F90FLAGS) -c $< - -parasol.o : $(PARASOL_PATH)/parasol.F90 - $(F90) $(F90FLAGS) -c $< - -cosp_constants.o : hooks/cosp_constants.F90 - $(F90) $(F90FLAGS) -c $< - -cosp_kinds.o : hooks/cosp_kinds.F90 - $(F90) $(F90FLAGS) -c $< - -mo_rng.o : rng/mo_rng.F90 - $(F90) $(F90FLAGS) -c $< - -cosp_config.o : cosp_config.F90 - $(F90) $(F90FLAGS) -c $< - -cosp.o : cosp.F90 - $(F90) $(F90FLAGS) -c $< - -cosp_stats.o : cosp_stats.F90 - $(F90) $(F90FLAGS) -c $< diff --git a/src/README b/src/README index 2dac7e4fab..aee1436ad8 100644 --- a/src/README +++ b/src/README @@ -7,6 +7,7 @@ This directory contains version 2.0 of the Cloud Feedback Model Intercomparison Observational Simulator Package (COSP2) Directory contents: +cosp/ cosp.f90: Contains the following subroutines and derived types: *) type(cosp_grid_inputs) - COSP inputs directly from model state *) type(cosp_inputs) - COSP inputs derived from model state (optics) @@ -18,14 +19,6 @@ cosp_config.F90: Configuration information needed by the host model and COSP (e.g. joint-histogram bin boundaries) cosp_stats.F90: Contains statistical subroutines used by multiple simulators (e.g. Joint-histogram computation) - -Subdirectories: -simulators/: Contains the instrument simulators, along with interfaces between COSP and each - of the individual instrument simulators. -rng/: Contains sample code to generate random numbers. -optics/: Contains sample code for computing the derived optical fields from the model - state. In the examples provided with COSP2, these routines are called within the - subsample_and_optics hooks/: Contains information (e.g. physical constants) shared thourghout all of COSP2. -subcol/: Contains sample code used to generate sub-columns (SCOPS and PREC_SCOPS). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file diff --git a/src/cosp.F90 b/src/cosp/cosp.F90 similarity index 100% rename from src/cosp.F90 rename to src/cosp/cosp.F90 diff --git a/src/cosp_config.F90 b/src/cosp/cosp_config.F90 similarity index 100% rename from src/cosp_config.F90 rename to src/cosp/cosp_config.F90 diff --git a/src/cosp_stats.F90 b/src/cosp/cosp_stats.F90 similarity index 100% rename from src/cosp_stats.F90 rename to src/cosp/cosp_stats.F90 diff --git a/src/simulator/MISR_simulator/MISR_simulator.F90 b/src/cosp/simulator/MISR_simulator/MISR_simulator.F90 similarity index 100% rename from src/simulator/MISR_simulator/MISR_simulator.F90 rename to src/cosp/simulator/MISR_simulator/MISR_simulator.F90 diff --git a/src/simulator/MODIS_simulator/modis_simulator.F90 b/src/cosp/simulator/MODIS_simulator/modis_simulator.F90 similarity index 100% rename from src/simulator/MODIS_simulator/modis_simulator.F90 rename to src/cosp/simulator/MODIS_simulator/modis_simulator.F90 diff --git a/src/simulator/README b/src/cosp/simulator/README similarity index 100% rename from src/simulator/README rename to src/cosp/simulator/README diff --git a/src/simulator/actsim/lidar_simulator.F90 b/src/cosp/simulator/actsim/lidar_simulator.F90 similarity index 100% rename from src/simulator/actsim/lidar_simulator.F90 rename to src/cosp/simulator/actsim/lidar_simulator.F90 diff --git a/src/simulator/cosp_calipso_interface.F90 b/src/cosp/simulator/cosp_calipso_interface.F90 similarity index 100% rename from src/simulator/cosp_calipso_interface.F90 rename to src/cosp/simulator/cosp_calipso_interface.F90 diff --git a/src/simulator/cosp_cloudsat_interface.F90 b/src/cosp/simulator/cosp_cloudsat_interface.F90 similarity index 100% rename from src/simulator/cosp_cloudsat_interface.F90 rename to src/cosp/simulator/cosp_cloudsat_interface.F90 diff --git a/src/simulator/cosp_isccp_interface.F90 b/src/cosp/simulator/cosp_isccp_interface.F90 similarity index 100% rename from src/simulator/cosp_isccp_interface.F90 rename to src/cosp/simulator/cosp_isccp_interface.F90 diff --git a/src/simulator/cosp_misr_interface.F90 b/src/cosp/simulator/cosp_misr_interface.F90 similarity index 100% rename from src/simulator/cosp_misr_interface.F90 rename to src/cosp/simulator/cosp_misr_interface.F90 diff --git a/src/simulator/cosp_modis_interface.F90 b/src/cosp/simulator/cosp_modis_interface.F90 similarity index 100% rename from src/simulator/cosp_modis_interface.F90 rename to src/cosp/simulator/cosp_modis_interface.F90 diff --git a/src/simulator/cosp_parasol_interface.F90 b/src/cosp/simulator/cosp_parasol_interface.F90 similarity index 100% rename from src/simulator/cosp_parasol_interface.F90 rename to src/cosp/simulator/cosp_parasol_interface.F90 diff --git a/src/simulator/cosp_rttov_interface.F90 b/src/cosp/simulator/cosp_rttov_interface.F90 similarity index 100% rename from src/simulator/cosp_rttov_interface.F90 rename to src/cosp/simulator/cosp_rttov_interface.F90 diff --git a/src/simulator/cosp_rttov_interfaceSTUB.F90 b/src/cosp/simulator/cosp_rttov_interfaceSTUB.F90 similarity index 100% rename from src/simulator/cosp_rttov_interfaceSTUB.F90 rename to src/cosp/simulator/cosp_rttov_interfaceSTUB.F90 diff --git a/src/simulator/icarus-scops-4.1-bsd/README b/src/cosp/simulator/icarus-scops-4.1-bsd/README similarity index 100% rename from src/simulator/icarus-scops-4.1-bsd/README rename to src/cosp/simulator/icarus-scops-4.1-bsd/README diff --git a/src/simulator/icarus-scops-4.1-bsd/icarus.F90 b/src/cosp/simulator/icarus-scops-4.1-bsd/icarus.F90 similarity index 100% rename from src/simulator/icarus-scops-4.1-bsd/icarus.F90 rename to src/cosp/simulator/icarus-scops-4.1-bsd/icarus.F90 diff --git a/src/simulator/icarus-scops-4.1-bsd/license b/src/cosp/simulator/icarus-scops-4.1-bsd/license similarity index 100% rename from src/simulator/icarus-scops-4.1-bsd/license rename to src/cosp/simulator/icarus-scops-4.1-bsd/license diff --git a/src/simulator/parasol/parasol.F90 b/src/cosp/simulator/parasol/parasol.F90 similarity index 100% rename from src/simulator/parasol/parasol.F90 rename to src/cosp/simulator/parasol/parasol.F90 diff --git a/src/simulator/quickbeam/quickbeam.F90 b/src/cosp/simulator/quickbeam/quickbeam.F90 similarity index 100% rename from src/simulator/quickbeam/quickbeam.F90 rename to src/cosp/simulator/quickbeam/quickbeam.F90 diff --git a/src/simulator/rttov/cosp_rttov.F90 b/src/cosp/simulator/rttov/cosp_rttov.F90 similarity index 100% rename from src/simulator/rttov/cosp_rttov.F90 rename to src/cosp/simulator/rttov/cosp_rttov.F90 diff --git a/src/simulator/rttov/cosp_rttov11.F90 b/src/cosp/simulator/rttov/cosp_rttov11.F90 similarity index 100% rename from src/simulator/rttov/cosp_rttov11.F90 rename to src/cosp/simulator/rttov/cosp_rttov11.F90 diff --git a/src/simulator/rttov/cosp_rttovSTUB.F90 b/src/cosp/simulator/rttov/cosp_rttovSTUB.F90 similarity index 100% rename from src/simulator/rttov/cosp_rttovSTUB.F90 rename to src/cosp/simulator/rttov/cosp_rttovSTUB.F90 diff --git a/cosp-interface/cosp_errorHandling.F90 b/src/hooks/cosp_errorHandling.F90 similarity index 100% rename from cosp-interface/cosp_errorHandling.F90 rename to src/hooks/cosp_errorHandling.F90 diff --git a/subsample_and_optics/README b/subsample_and_optics/README new file mode 100644 index 0000000000..69cc87fa84 --- /dev/null +++ b/subsample_and_optics/README @@ -0,0 +1,10 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Written by Dustin Swales (dustin.swales@noaa.gov) 2017 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +Contents: +optics/: Contains subroutines and functions to compute optical fields. These fields are inputs + into COSP2. +subcol/: Contains subroutines and functions to generate subcolumns (SCOPS). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file diff --git a/src/optics/README b/subsample_and_optics/optics/README similarity index 100% rename from src/optics/README rename to subsample_and_optics/optics/README diff --git a/src/optics/cosp_optics.F90 b/subsample_and_optics/optics/cosp_optics.F90 similarity index 100% rename from src/optics/cosp_optics.F90 rename to subsample_and_optics/optics/cosp_optics.F90 diff --git a/src/optics/cosp_utils.F90 b/subsample_and_optics/optics/cosp_utils.F90 similarity index 51% rename from src/optics/cosp_utils.F90 rename to subsample_and_optics/optics/cosp_utils.F90 index a4aa1ab912..98c26cd5be 100644 --- a/src/optics/cosp_utils.F90 +++ b/subsample_and_optics/optics/cosp_utils.F90 @@ -36,11 +36,7 @@ MODULE MOD_COSP_UTILS USE MOD_COSP_CONFIG IMPLICIT NONE - INTERFACE COSP_CHECK_INPUT - MODULE PROCEDURE COSP_CHECK_INPUT_1D,COSP_CHECK_INPUT_2D,COSP_CHECK_INPUT_3D - END INTERFACE CONTAINS - !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !------------------- SUBROUTINE COSP_PRECIP_MXRATIO -------------- !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -89,111 +85,5 @@ SUBROUTINE COSP_PRECIP_MXRATIO(Npoints,Nlevels,Ncolumns,p,T,prec_frac,prec_type, endif END SUBROUTINE COSP_PRECIP_MXRATIO -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -!----------------- SUBROUTINES COSP_CHECK_INPUT_1D --------------- -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - SUBROUTINE COSP_CHECK_INPUT_1D(vname,x,min_val,max_val) - character(len=*) :: vname - real(wp),intent(inout) :: x(:) - real(wp),intent(in),optional :: min_val,max_val - logical :: l_min,l_max - character(len=128) :: pro_name='COSP_CHECK_INPUT_1D' - - l_min=.false. - l_max=.false. - - if (present(min_val)) then -! if (x < min_val) x = min_val - if (any(x < min_val)) then - l_min = .true. - where (x < min_val) - x = min_val - end where - endif - endif - if (present(max_val)) then -! if (x > max_val) x = max_val - if (any(x > max_val)) then - l_max = .true. - where (x > max_val) - x = max_val - end where - endif - endif - - if (l_min) print *,'----- WARNING: '//trim(pro_name)//': minimum value of '//trim(vname)//' set to: ',min_val - if (l_max) print *,'----- WARNING: '//trim(pro_name)//': maximum value of '//trim(vname)//' set to: ',max_val - END SUBROUTINE COSP_CHECK_INPUT_1D -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -!----------------- SUBROUTINES COSP_CHECK_INPUT_2D --------------- -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - SUBROUTINE COSP_CHECK_INPUT_2D(vname,x,min_val,max_val) - character(len=*) :: vname - real(wp),intent(inout) :: x(:,:) - real(wp),intent(in),optional :: min_val,max_val - logical :: l_min,l_max - character(len=128) :: pro_name='COSP_CHECK_INPUT_2D' - - l_min=.false. - l_max=.false. - - if (present(min_val)) then -! if (x < min_val) x = min_val - if (any(x < min_val)) then - l_min = .true. - where (x < min_val) - x = min_val - end where - endif - endif - if (present(max_val)) then -! if (x > max_val) x = max_val - if (any(x > max_val)) then - l_max = .true. - where (x > max_val) - x = max_val - end where - endif - endif - - if (l_min) print *,'----- WARNING: '//trim(pro_name)//': minimum value of '//trim(vname)//' set to: ',min_val - if (l_max) print *,'----- WARNING: '//trim(pro_name)//': maximum value of '//trim(vname)//' set to: ',max_val - END SUBROUTINE COSP_CHECK_INPUT_2D -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -!----------------- SUBROUTINES COSP_CHECK_INPUT_3D --------------- -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - SUBROUTINE COSP_CHECK_INPUT_3D(vname,x,min_val,max_val) - character(len=*) :: vname - real(wp),intent(inout) :: x(:,:,:) - real(wp),intent(in),optional :: min_val,max_val - logical :: l_min,l_max - character(len=128) :: pro_name='COSP_CHECK_INPUT_3D' - - l_min=.false. - l_max=.false. - - if (present(min_val)) then -! if (x < min_val) x = min_val - if (any(x < min_val)) then - l_min = .true. - where (x < min_val) - x = min_val - end where - endif - endif - if (present(max_val)) then -! if (x > max_val) x = max_val - if (any(x > max_val)) then - l_max = .true. - where (x > max_val) - x = max_val - end where - endif - endif - - if (l_min) print *,'----- WARNING: '//trim(pro_name)//': minimum value of '//trim(vname)//' set to: ',min_val - if (l_max) print *,'----- WARNING: '//trim(pro_name)//': maximum value of '//trim(vname)//' set to: ',max_val - END SUBROUTINE COSP_CHECK_INPUT_3D - END MODULE MOD_COSP_UTILS diff --git a/src/optics/array_lib.F90 b/subsample_and_optics/optics/quickbeam_optics/array_lib.F90 similarity index 100% rename from src/optics/array_lib.F90 rename to subsample_and_optics/optics/quickbeam_optics/array_lib.F90 diff --git a/src/optics/math_lib.F90 b/subsample_and_optics/optics/quickbeam_optics/math_lib.F90 similarity index 100% rename from src/optics/math_lib.F90 rename to subsample_and_optics/optics/quickbeam_optics/math_lib.F90 diff --git a/src/optics/mrgrnk.F90 b/subsample_and_optics/optics/quickbeam_optics/mrgrnk.F90 similarity index 100% rename from src/optics/mrgrnk.F90 rename to subsample_and_optics/optics/quickbeam_optics/mrgrnk.F90 diff --git a/src/optics/optics_lib.F90 b/subsample_and_optics/optics/quickbeam_optics/optics_lib.F90 similarity index 100% rename from src/optics/optics_lib.F90 rename to subsample_and_optics/optics/quickbeam_optics/optics_lib.F90 diff --git a/src/optics/quickbeam_optics.F90 b/subsample_and_optics/optics/quickbeam_optics/quickbeam_optics.F90 similarity index 100% rename from src/optics/quickbeam_optics.F90 rename to subsample_and_optics/optics/quickbeam_optics/quickbeam_optics.F90 diff --git a/src/subcol/README b/subsample_and_optics/subcol/README similarity index 100% rename from src/subcol/README rename to subsample_and_optics/subcol/README diff --git a/src/subcol/prec_scops.F90 b/subsample_and_optics/subcol/prec_scops.F90 similarity index 100% rename from src/subcol/prec_scops.F90 rename to subsample_and_optics/subcol/prec_scops.F90 diff --git a/src/rng/mo_rng.F90 b/subsample_and_optics/subcol/rng/mo_rng.F90 similarity index 100% rename from src/rng/mo_rng.F90 rename to subsample_and_optics/subcol/rng/mo_rng.F90 diff --git a/src/subcol/scops.F90 b/subsample_and_optics/subcol/scops.F90 similarity index 100% rename from src/subcol/scops.F90 rename to subsample_and_optics/subcol/scops.F90