diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 00d947b90b..3fc5f4df7b 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -12,20 +12,20 @@ jobs: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1TpXY-vXkwAnym9nNjzUxt1q_8c8T7X8T - gdkgo2: https://docs.google.com/uc?export=download&id=1ic-2B3dIx1kIoi-Nd1ndLbLAe_LIWDGP + gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L + gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=19N7wXou-2Zv0oVAnwn4Ucs8Ghr-C0SMt - gdkgo2: https://docs.google.com/uc?export=download&id=1EUO6C_v0rq0NMXkLGqZDKX99kknnMRQN + gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ + gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v002 + - kgo_version: v003 container: image: ${{ matrix.image }} env: diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 94ec231412..b1e7d98890 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -41,7 +41,7 @@ jobs: python-version: [3.11] include: - compiler_short_name: gfortran - - kgo_version: v002 + - kgo_version: v003 defaults: run: shell: bash -el {0} @@ -53,9 +53,9 @@ jobs: ATOL: 0.0 RTOL: 0.0 KGO_VERSION: ${{ matrix.kgo_version }} - GDKGO1: https://docs.google.com/uc?export=download&id=11dKcIL3EQr7s6jbo4f9GsoW0SufesGbq - GDKGO2: https://docs.google.com/uc?export=download&id=1s5Ha6Hqnv_hWbRUs8KQpJ4Lxy8uvJDar - GDKGO3: https://docs.google.com/uc?export=download&id=1kY1lRgzd0UhDiQef2u-VgTQql_iut3U2 + GDKGO1: https://docs.google.com/uc?export=download&id=1oQBJGFg0F8k-LhRGsCYn-qWzmMMVfQ6K + GDKGO2: https://docs.google.com/uc?export=download&id=1b7qwJWqDzoZGcIP0qyUprTV_LErCGpT6 + GDKGO3: https://docs.google.com/uc?export=download&id=1NvTo3bYaGpz-FUpZ4jta_kRzA04xTCsn F90_SHORT_NAME: ${{ matrix.compiler_short_name }} # Sequence of tasks that will be executed as part of the job steps: diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.gfortran.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.gfortran.kgo.v003.nc.md5 new file mode 100644 index 0000000000..9b03f9ddf6 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.gfortran.kgo.v003.nc.md5 @@ -0,0 +1 @@ +75344f82d97187e351ed25a616fa1761 cosp2_output.um_global.gfortran.kgo.v003.nc diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v003.nc.md5 new file mode 100644 index 0000000000..0a1bf885bd --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v003.nc.md5 @@ -0,0 +1 @@ +5194a0a17bc7eb5e9e95e8b8d8788953 cosp2_output.um_global.ifort.kgo.v003.nc diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v003.nc.md5 new file mode 100644 index 0000000000..f47c68fbbf --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v003.nc.md5 @@ -0,0 +1 @@ +b9f700627457a1e7483d2150da3ef18d cosp2_output.um_global.ifx.kgo.v003.nc diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global_model_levels.gfortran.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global_model_levels.gfortran.kgo.v003.nc.md5 new file mode 100644 index 0000000000..1e55085a05 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global_model_levels.gfortran.kgo.v003.nc.md5 @@ -0,0 +1 @@ +dfe6a5f87e3e2e6a1399d067fa23e36d cosp2_output.um_global_model_levels.gfortran.kgo.v003.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.gfortran.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.gfortran.kgo.v003.nc.md5 new file mode 100644 index 0000000000..940ac332e4 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.gfortran.kgo.v003.nc.md5 @@ -0,0 +1 @@ +7703e5395f4fff4961b97fe86621f996 cosp2_output_um.gfortran.kgo.v003.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v003.nc.md5 new file mode 100644 index 0000000000..66dedd8212 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v003.nc.md5 @@ -0,0 +1 @@ +0e75e4adac759d797d1264d76490fa9d cosp2_output_um.ifort.kgo.v003.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v003.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v003.nc.md5 new file mode 100644 index 0000000000..2eefcd1d2c --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v003.nc.md5 @@ -0,0 +1 @@ +bcfb46c32c3f78df0771175a7a0b21b5 cosp2_output_um.ifx.kgo.v003.nc diff --git a/src/cosp.F90 b/src/cosp.F90 index a1bcf9896f..8d522708c1 100755 --- a/src/cosp.F90 +++ b/src/cosp.F90 @@ -31,6 +31,7 @@ ! Mar 2018- R. Guzman - Added OPAQ diagnostics and GLID simulator ! Apr 2018- R. Guzman - Added ATLID simulator ! Nov 2018- T. Michibata - Added CloudSat+MODIS Warmrain Diagnostics +! Mar 2024- C. Wall - Added MODIS joint-histogram diagnostics ! ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -45,6 +46,7 @@ MODULE MOD_COSP CFODD_NDBZE, CFODD_NICOD, & numMODISTauBins,numMODISPresBins, & numMODISReffIceBins,numMODISReffLiqBins, & + numMODISLWPBins,numMODISIWPBins, & numISCCPTauBins,numISCCPPresBins,numMISRTauBins,& ntau,modis_histTau,tau_binBounds, & modis_histTauEdges,tau_binEdges,nCloudsatPrecipClass,& @@ -290,6 +292,12 @@ MODULE MOD_COSP modis_Optical_Thickness_vs_ReffICE => null(), & ! Tau/ReffICE joint histogram modis_Optical_Thickness_vs_ReffLIQ => null() ! Tau/ReffLIQ joint histogram + real(wp),pointer,dimension(:,:,:) :: & + modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq => null(), & ! Tau/Pressure Liq joint histogram + modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice => null(), & ! Tau/Pressure Ice joint histogram + modis_LWP_vs_ReffLIQ => null(), & ! LWP/ReffLIQ joint histogram + modis_IWP_vs_ReffICE => null() ! IWP/ReffICE joint histogram + ! RTTOV outputs real(wp),pointer :: & rttov_tbs(:,:) => null() ! Brightness Temperature @@ -379,6 +387,8 @@ function COSP_SIMULATOR(cospIN,cospgridIN,cospOUT,start_idx,stop_idx,debug) grLidar532_beta_mol,atlid_beta_mol REAL(WP), dimension(:,:,:),allocatable :: & modisJointHistogram,modisJointHistogramIce,modisJointHistogramLiq, & + modisJointHistogram_CtpCodLiq,modisJointHistogram_CtpCodIce, & + modisJointHistogram_LwpRefLiq,modisJointHistogram_IwpRefIce, & calipso_beta_tot,calipso_betaperp_tot, cloudsatDBZe,parasolPix_refl, & grLidar532_beta_tot,atlid_beta_tot,cloudsatZe_non real(wp),dimension(:),allocatable,target :: & @@ -1309,7 +1319,12 @@ function COSP_SIMULATOR(cospIN,cospgridIN,cospOUT,start_idx,stop_idx,debug) modisMeanIceWaterPath(modisIN%nSunlit), & modisJointHistogram(modisIN%nSunlit,numMODISTauBins,numMODISPresBins),& modisJointHistogramIce(modisIN%nSunlit,numModisTauBins,numMODISReffIceBins),& - modisJointHistogramLiq(modisIN%nSunlit,numModisTauBins,numMODISReffLiqBins)) + modisJointHistogramLiq(modisIN%nSunlit,numModisTauBins,numMODISReffLiqBins),& + modisJointHistogram_CtpCodLiq(modisIN%nSunlit,numMODISTauBins,numMODISPresBins),& + modisJointHistogram_CtpCodIce(modisIN%nSunlit,numMODISTauBins,numMODISPresBins),& + modisJointHistogram_LwpRefLiq(modisIN%nSunlit,numMODISLWPBins,numMODISReffLiqBins), & + modisJointHistogram_IwpRefIce(modisIN%nSunlit,numMODISIWPBins,numMODISReffIceBins) & + ) ! Call simulator call modis_column(modisIN%nSunlit, modisIN%Ncolumns,modisRetrievedPhase, & modisRetrievedCloudTopPressure,modisRetrievedTau, & @@ -1320,7 +1335,12 @@ function COSP_SIMULATOR(cospIN,cospgridIN,cospOUT,start_idx,stop_idx,debug) modisMeanSizeLiquid, modisMeanSizeIce, & modisMeanCloudTopPressure, modisMeanLiquidWaterPath, & modisMeanIceWaterPath, modisJointHistogram, & - modisJointHistogramIce,modisJointHistogramLiq) + modisJointHistogramIce,modisJointHistogramLiq, & + modisJointHistogram_CtpCodLiq, & + modisJointHistogram_CtpCodIce, & + modisJointHistogram_LwpRefLiq, & + modisJointHistogram_IwpRefIce & + ) ! Store data (if requested) if (associated(cospOUT%modis_Cloud_Fraction_Total_Mean)) then cospOUT%modis_Cloud_Fraction_Total_Mean(ij+int(modisIN%sunlit(:))-1) = & @@ -1397,6 +1417,30 @@ function COSP_SIMULATOR(cospIN,cospgridIN,cospOUT,start_idx,stop_idx,debug) cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij:ik,:,:) = & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(ij:ik,:,numMODISPresBins:1:-1) endif + + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) then + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(ij+ & + int(modisIN%sunlit(:))-1, 1:numModisTauBins, :) = modisJointHistogram_CtpCodLiq(:, :, :) + ! Reorder pressure bins in joint histogram to go from surface to TOA + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(ij:ik,:,:) = & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(ij:ik,:,numMODISPresBins:1:-1) + endif + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) then + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(ij+ & + int(modisIN%sunlit(:))-1, 1:numModisTauBins, :) = modisJointHistogram_CtpCodIce(:, :, :) + ! Reorder pressure bins in joint histogram to go from surface to TOA + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(ij:ik,:,:) = & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(ij:ik,:,numMODISPresBins:1:-1) + endif + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) then + cospOUT%modis_LWP_vs_ReffLIQ(ij+int(modisIN%sunlit(:))-1, 1:numMODISLWPBins,:) = & + modisJointHistogram_LwpRefLiq(:,:,:) + endif + if (associated(cospOUT%modis_IWP_vs_ReffICE)) then + cospOUT%modis_IWP_vs_ReffICE(ij+int(modisIN%sunlit(:))-1, 1:numMODISIWPBins,:) = & + modisJointHistogram_IwpRefIce(:,:,:) + endif + if (associated(cospOUT%modis_Optical_Thickness_vs_ReffIce)) then cospOUT%modis_Optical_Thickness_vs_ReffIce(ij+int(modisIN%sunlit(:))-1, 1:numMODISTauBins,:) = & modisJointHistogramIce(:,:,:) @@ -1507,6 +1551,10 @@ function COSP_SIMULATOR(cospIN,cospgridIN,cospOUT,start_idx,stop_idx,debug) if (allocated(modisMeanLiquidWaterPath)) deallocate(modisMeanLiquidWaterPath) if (allocated(modisMeanIceWaterPath)) deallocate(modisMeanIceWaterPath) if (allocated(modisJointHistogram)) deallocate(modisJointHistogram) + if (allocated(modisJointHistogram_CtpCodLiq)) deallocate(modisJointHistogram_CtpCodLiq) + if (allocated(modisJointHistogram_CtpCodIce)) deallocate(modisJointHistogram_CtpCodIce) + if (allocated(modisJointHistogram_LwpRefLiq)) deallocate(modisJointHistogram_LwpRefLiq) + if (allocated(modisJointHistogram_IwpRefIce)) deallocate(modisJointHistogram_IwpRefIce) if (allocated(modisJointHistogramIce)) deallocate(modisJointHistogramIce) if (allocated(modisJointHistogramLiq)) deallocate(modisJointHistogramLiq) if (allocated(isccp_boxttop)) deallocate(isccp_boxttop) @@ -2431,6 +2479,14 @@ subroutine cosp_errorCheck(cospgridIN, cospIN, Lisccp_subcolumn, Lisccp_column, cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) & + cospOUT%modis_LWP_vs_ReffLIQ(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_IWP_vs_ReffICE)) & + cospOUT%modis_IWP_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & @@ -2630,6 +2686,14 @@ subroutine cosp_errorCheck(cospgridIN, cospIN, Lisccp_subcolumn, Lisccp_column, cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) & + cospOUT%modis_LWP_vs_ReffLIQ(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_IWP_vs_ReffICE)) & + cospOUT%modis_IWP_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & @@ -2770,6 +2834,14 @@ subroutine cosp_errorCheck(cospgridIN, cospIN, Lisccp_subcolumn, Lisccp_column, cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) & + cospOUT%modis_LWP_vs_ReffLIQ(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_IWP_vs_ReffICE)) & + cospOUT%modis_IWP_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & @@ -3090,6 +3162,14 @@ subroutine cosp_errorCheck(cospgridIN, cospIN, Lisccp_subcolumn, Lisccp_column, cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) & + cospOUT%modis_LWP_vs_ReffLIQ(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_IWP_vs_ReffICE)) & + cospOUT%modis_IWP_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & @@ -3155,6 +3235,14 @@ subroutine cosp_errorCheck(cospgridIN, cospIN, Lisccp_subcolumn, Lisccp_column, cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) & + cospOUT%modis_LWP_vs_ReffLIQ(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_IWP_vs_ReffICE)) & + cospOUT%modis_IWP_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & @@ -3201,6 +3289,14 @@ subroutine cosp_errorCheck(cospgridIN, cospIN, Lisccp_subcolumn, Lisccp_column, cospOUT%modis_Ice_Water_Path_Mean(:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure)) & cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Liq(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice)) & + cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure_Ice(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_LWP_vs_ReffLIQ)) & + cospOUT%modis_LWP_vs_ReffLIQ(:,:,:) = R_UNDEF + if (associated(cospOUT%modis_IWP_vs_ReffICE)) & + cospOUT%modis_IWP_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffICE)) & cospOUT%modis_Optical_Thickness_vs_ReffICE(:,:,:) = R_UNDEF if (associated(cospOUT%modis_Optical_Thickness_vs_ReffLIQ)) & diff --git a/src/cosp_config.F90 b/src/cosp_config.F90 index 8e15567d75..c1a4d573d0 100755 --- a/src/cosp_config.F90 +++ b/src/cosp_config.F90 @@ -39,6 +39,7 @@ ! Mar 2018 - R. Guzman - Added LIDAR_NTYPE for the OPAQ diagnostics ! Apr 2018 - R. Guzman - Added parameters for GROUND LIDAR and ATLID simulators ! Nov 2018 - T. Michibata - Added CloudSat+MODIS Warmrain Diagnostics +! Mar 2024 - C. Wall - Added MODIS joint-histogram diagnostics ! ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -128,14 +129,15 @@ MODULE MOD_COSP_CONFIG ! Liquid and Ice particle bins for MODIS joint histogram of optical-depth and particle ! size + ! Bin edges match Pincus et al. 2023 observational data (doi:10.5194/essd-15-2483-2023) integer :: i,j integer,parameter :: & - nReffLiq = 6, & ! Number of bins for tau/ReffLiq joint-histogram - nReffIce = 6 ! Number of bins for tau/ReffICE joint-histogram + nReffLiq = 6, & ! Number of ReffLiq bins for tau/ReffLiq and LWP/ReffLiq joint-histogram + nReffIce = 6 ! Number of ReffIce bins for tau/ReffICE and IWP/ReffIce joint-histogram real(wp),parameter,dimension(nReffLiq+1) :: & - reffLIQ_binBounds = (/0., 8e-6, 1.0e-5, 1.3e-5, 1.5e-5, 2.0e-5, 3.0e-5/) + reffLIQ_binBounds = (/4.0e-6, 8e-6, 1.0e-5, 1.25e-5, 1.5e-5, 2.0e-5, 3.0e-5/) real(wp),parameter,dimension(nReffIce+1) :: & - reffICE_binBounds = (/0., 1.0e-5, 2.0e-5, 3.0e-5, 4.0e-5, 6.0e-5, 9.0e-5/) + reffICE_binBounds = (/5.0e-6, 1.0e-5, 2.0e-5, 3.0e-5, 4.0e-5, 5.0e-5, 6.0e-5/) real(wp),parameter,dimension(2,nReffICE) :: & reffICE_binEdges = reshape(source=(/reffICE_binBounds(1),((reffICE_binBounds(k), & l=1,2),k=2,nReffICE),reffICE_binBounds(nReffICE+1)/), & @@ -149,6 +151,27 @@ MODULE MOD_COSP_CONFIG real(wp),parameter,dimension(nReffLIQ) :: & reffLIQ_binCenters = (reffLIQ_binEdges(1,:)+reffLIQ_binEdges(2,:))/2._wp + ! LWP and IWP bins for MODIS joint histogram of (1) LWP and droplet size + ! and (2) IWP and particle size + integer, parameter :: & + nLWP = 7, & ! Number of bins for LWP/ReffLiq joint-histogram + nIWP = 7 ! Number of bins for IWP/ReffIce joint-histogram + real(wp),parameter,dimension(nLWP+1) :: & + LWP_binBounds = (/0., 0.01, 0.03, 0.06, 0.10, 0.15, 0.25, 20.0/) ! kg/m2 + real(wp),parameter,dimension(nIWP+1) :: & + IWP_binBounds = (/0., 0.02, 0.05, 0.10, 0.20, 0.40, 1.00, 20.0/) ! kg/m2 + real(wp),parameter,dimension(2,nLWP) :: & + LWP_binEdges = reshape(source=(/LWP_binBounds(1),((LWP_binBounds(k), & + l=1,2),k=2,nLWP),LWP_binBounds(nLWP+1)/), & + shape = (/2,nLWP/)) + real(wp),parameter,dimension(2,nIWP) :: & + IWP_binEdges = reshape(source=(/IWP_binBounds(1),((IWP_binBounds(k), & + l=1,2),k=2,nIWP),IWP_binBounds(nIWP+1)/), & + shape = (/2,nIWP/)) + real(wp),parameter,dimension(nLWP) :: & + LWP_binCenters = (LWP_binEdges(1,:)+LWP_binEdges(2,:))/2._wp + real(wp),parameter,dimension(nIWP) :: & + IWP_binCenters = (IWP_binEdges(1,:)+IWP_binEdges(2,:))/2._wp ! #################################################################################### ! Constants used by RTTOV. ! #################################################################################### @@ -268,6 +291,28 @@ MODULE MOD_COSP_CONFIG modis_histReffLiqCenters = reffLIQ_binCenters ! Effective radius bin centers real(wp),parameter,dimension(2,nReffLiq) :: & modis_histReffLiqEdges = reffLIQ_binEdges ! Effective radius bin edges + ! #################################################################################### + ! MODIS simulator LWP/ReffLIQ and IWP/ReffIce joint-histogram information + ! #################################################################################### + ! Liquid + integer,parameter :: & + numMODISLWPBins = nLWP ! Number of bins for joint-histogram + real(wp),parameter,dimension(nLWP+1) :: & + modis_histLWP = LWP_binBounds ! LWP bin boundaries + real(wp),parameter,dimension(nLWP) :: & + modis_histLWPCenters = LWP_binCenters ! LWP bin centers + real(wp),parameter,dimension(2,nLWP) :: & + modis_histLWPEdges = LWP_binEdges ! LWP bin edges + + ! Ice + integer,parameter :: & + numMODISIWPBins = nIWP ! Number of bins for joint-histogram + real(wp),parameter,dimension(nIWP+1) :: & + modis_histIWP = IWP_binBounds ! IWP bin boundaries + real(wp),parameter,dimension(nIWP) :: & + modis_histIWPCenters = IWP_binCenters ! IWP bin centers + real(wp),parameter,dimension(2,nIWP) :: & + modis_histIWPEdges = IWP_binEdges ! IWP bin edges ! #################################################################################### ! CLOUDSAT reflectivity histogram information diff --git a/src/simulator/MODIS_simulator/modis_simulator.F90 b/src/simulator/MODIS_simulator/modis_simulator.F90 index 684c5897ac..974c017243 100644 --- a/src/simulator/MODIS_simulator/modis_simulator.F90 +++ b/src/simulator/MODIS_simulator/modis_simulator.F90 @@ -55,7 +55,9 @@ module mod_modis_sim USE MOD_COSP_CONFIG, only: R_UNDEF,modis_histTau,modis_histPres,numMODISTauBins, & numMODISPresBins,numMODISReffIceBins,numMODISReffLiqBins, & - modis_histReffIce,modis_histReffLiq + modis_histReffIce,modis_histReffLiq, & + modis_histLWP,modis_histIWP, & + numMODISLWPBins,numMODISIWPBins USE COSP_KINDS, ONLY: wp use MOD_COSP_STATS, ONLY: hist2D @@ -241,7 +243,11 @@ subroutine modis_column(nPoints,nSubCols,phase, cloud_top_pressure, optical_thic Optical_Thickness_Total_MeanLog10, Optical_Thickness_Water_MeanLog10, Optical_Thickness_Ice_MeanLog10,& Cloud_Particle_Size_Water_Mean, Cloud_Particle_Size_Ice_Mean, Cloud_Top_Pressure_Total_Mean, & Liquid_Water_Path_Mean, Ice_Water_Path_Mean, & - Optical_Thickness_vs_Cloud_Top_Pressure,Optical_Thickness_vs_ReffIce,Optical_Thickness_vs_ReffLiq) + Optical_Thickness_vs_Cloud_Top_Pressure,Optical_Thickness_vs_ReffIce,Optical_Thickness_vs_ReffLiq, & + Optical_Thickness_vs_Cloud_Top_Pressure_Liq, & + Optical_Thickness_vs_Cloud_Top_Pressure_Ice, & + LWP_vs_ReffLiq, IWP_vs_ReffIce & + ) ! INPUTS integer,intent(in) :: & @@ -274,7 +280,13 @@ subroutine modis_column(nPoints,nSubCols,phase, cloud_top_pressure, optical_thic Liquid_Water_Path_Mean, & ! Ice_Water_Path_Mean ! real(wp),intent(inout),dimension(nPoints,numMODISTauBins,numMODISPresBins) :: & - Optical_Thickness_vs_Cloud_Top_Pressure + Optical_Thickness_vs_Cloud_Top_Pressure, & + Optical_Thickness_vs_Cloud_Top_Pressure_Liq, & + Optical_Thickness_vs_Cloud_Top_Pressure_Ice + real(wp),intent(inout),dimension(nPoints,numMODISLWPBins,numMODISReffLiqBins) :: & + LWP_vs_ReffLiq + real(wp),intent(inout),dimension(nPoints,numMODISIWPBins,numMODISReffIceBins) :: & + IWP_vs_ReffIce real(wp),intent(inout),dimension(nPoints,numMODISTauBins,numMODISReffIceBins) :: & Optical_Thickness_vs_ReffIce real(wp),intent(inout),dimension(nPoints,numMODISTauBins,numMODISReffLiqBins) :: & @@ -290,7 +302,8 @@ subroutine modis_column(nPoints,nSubCols,phase, cloud_top_pressure, optical_thic iceCloudMask, & validRetrievalMask real(wp),dimension(nPoints,nSubCols) :: & - tauWRK,ctpWRK,reffIceWRK,reffLiqWRK + tauWRK,ctpWRK,reffIceWRK,reffLiqWRK, & + tauLiqWRK,tauIceWRK,lwpWRK,iwpWRK ! ######################################################################################## ! Include only those pixels with successful retrievals in the statistics @@ -379,18 +392,44 @@ subroutine modis_column(nPoints,nSubCols,phase, cloud_top_pressure, optical_thic ctpWRK(1:nPoints,1:nSubCols) = cloud_top_pressure(1:nPoints,1:nSubCols) reffIceWRK(1:nPoints,1:nSubCols) = merge(particle_size,R_UNDEF,iceCloudMask) reffLiqWRK(1:nPoints,1:nSubCols) = merge(particle_size,R_UNDEF,waterCloudMask) + tauLiqWRK(1:nPoints,1:nSubCols) = merge(optical_thickness,R_UNDEF,waterCloudMask) + tauIceWRK(1:nPoints,1:nSubCols) = merge(optical_thickness,R_UNDEF,iceCloudMask) + lwpWRK(1:nPoints,1:nSubCols) = merge(LWP_conversion*particle_size*optical_thickness,R_UNDEF,waterCloudMask) + iwpWRK(1:nPoints,1:nSubCols) = merge(LWP_conversion*ice_density*particle_size*optical_thickness,R_UNDEF,iceCloudMask) do j=1,nPoints ! Fill clear and optically thin subcolumns with fill where(.not. cloudMask(j,1:nSubCols)) tauWRK(j,1:nSubCols) = -999._wp ctpWRK(j,1:nSubCols) = -999._wp + tauLiqWRK(j,1:nSubCols) = -999._wp + tauIceWRK(j,1:nSubCols) = -999._wp + lwpWRK(j,1:nSubCols) = -999._wp + iwpWRK(j,1:nSubCols) = -999._wp endwhere ! Joint histogram of tau/CTP call hist2D(tauWRK(j,1:nSubCols),ctpWRK(j,1:nSubCols),nSubCols,& modis_histTau,numMODISTauBins,& modis_histPres,numMODISPresBins,& Optical_Thickness_vs_Cloud_Top_Pressure(j,1:numMODISTauBins,1:numMODISPresBins)) + ! Joint histogram of tau/CTP for Liquid clouds + call hist2D(tauLiqWRK(j,1:nSubCols),ctpWRK(j,1:nSubCols),nSubCols,& + modis_histTau,numMODISTauBins,& + modis_histPres,numMODISPresBins,& + Optical_Thickness_vs_Cloud_Top_Pressure_Liq(j,1:numMODISTauBins,1:numMODISPresBins)) + ! Joint histogram of tau/CTP for Ice clouds + call hist2D(tauIceWRK(j,1:nSubCols),ctpWRK(j,1:nSubCols),nSubCols,& + modis_histTau,numMODISTauBins,& + modis_histPres,numMODISPresBins,& + Optical_Thickness_vs_Cloud_Top_Pressure_Ice(j,1:numMODISTauBins,1:numMODISPresBins)) + ! Joint histogram of LWP/ReffLiq + call hist2D(lwpWRK(j,1:nSubCols),reffLiqWRK(j,1:nSubCols),nSubCols, & + modis_histLWP,numMODISLWPBins,modis_histReffLiq, & + numMODISReffLiqBins, LWP_vs_ReffLiq(j,1:numMODISLWPBins,1:numMODISReffLiqBins)) + ! Joint histogram of IWP/ReffIce + call hist2D(iwpWRK(j,1:nSubCols),reffIceWRK(j,1:nSubCols),nSubCols, & + modis_histIWP,numMODISIWPBins,modis_histReffIce, & + numMODISReffIceBins, IWP_vs_ReffIce(j,1:numMODISIWPBins,1:numMODISReffIceBins)) ! Joint histogram of tau/ReffICE call hist2D(tauWRK(j,1:nSubCols),reffIceWrk(j,1:nSubCols),nSubCols, & modis_histTau,numMODISTauBins,modis_histReffIce, & @@ -403,6 +442,14 @@ subroutine modis_column(nPoints,nSubCols,phase, cloud_top_pressure, optical_thic enddo Optical_Thickness_vs_Cloud_Top_Pressure(1:nPoints,1:numMODISTauBins,1:numMODISPresBins) = & Optical_Thickness_vs_Cloud_Top_Pressure(1:nPoints,1:numMODISTauBins,1:numMODISPresBins)/nSubCols + Optical_Thickness_vs_Cloud_Top_Pressure_Liq(1:nPoints,1:numMODISTauBins,1:numMODISPresBins) = & + Optical_Thickness_vs_Cloud_Top_Pressure_Liq(1:nPoints,1:numMODISTauBins,1:numMODISPresBins)/nSubCols + Optical_Thickness_vs_Cloud_Top_Pressure_Ice(1:nPoints,1:numMODISTauBins,1:numMODISPresBins) = & + Optical_Thickness_vs_Cloud_Top_Pressure_Ice(1:nPoints,1:numMODISTauBins,1:numMODISPresBins)/nSubCols + LWP_vs_ReffLiq(1:nPoints,1:numMODISLWPBins,1:numMODISReffLiqBins) = & + LWP_vs_ReffLiq(1:nPoints,1:numMODISLWPBins,1:numMODISReffLiqBins)/nSubCols + IWP_vs_ReffIce(1:nPoints,1:numMODISIWPBins,1:numMODISReffIceBins) = & + IWP_vs_ReffIce(1:nPoints,1:numMODISIWPBins,1:numMODISReffIceBins)/nSubCols Optical_Thickness_vs_ReffIce(1:nPoints,1:numMODISTauBins,1:numMODISReffIceBins) = & Optical_Thickness_vs_ReffIce(1:nPoints,1:numMODISTauBins,1:numMODISReffIceBins)/nSubCols Optical_Thickness_vs_ReffLiq(1:nPoints,1:numMODISTauBins,1:numMODISReffLiqBins) = & @@ -412,6 +459,12 @@ subroutine modis_column(nPoints,nSubCols,phase, cloud_top_pressure, optical_thic ! Unit conversion where(Optical_Thickness_vs_Cloud_Top_Pressure /= R_UNDEF) & Optical_Thickness_vs_Cloud_Top_Pressure = Optical_Thickness_vs_Cloud_Top_Pressure*100._wp + where(Optical_Thickness_vs_Cloud_Top_Pressure_Liq /= R_UNDEF) & + Optical_Thickness_vs_Cloud_Top_Pressure_Liq = Optical_Thickness_vs_Cloud_Top_Pressure_Liq*100._wp + where(Optical_Thickness_vs_Cloud_Top_Pressure_Ice /= R_UNDEF) & + Optical_Thickness_vs_Cloud_Top_Pressure_Ice = Optical_Thickness_vs_Cloud_Top_Pressure_Ice*100._wp + where(LWP_vs_ReffLiq /= R_UNDEF) LWP_vs_ReffLiq = LWP_vs_ReffLiq*100._wp + where(IWP_vs_ReffIce /= R_UNDEF) IWP_vs_ReffIce = IWP_vs_ReffIce*100._wp where(Optical_Thickness_vs_ReffIce /= R_UNDEF) Optical_Thickness_vs_ReffIce = Optical_Thickness_vs_ReffIce*100._wp where(Optical_Thickness_vs_ReffLiq /= R_UNDEF) Optical_Thickness_vs_ReffLiq = Optical_Thickness_vs_ReffLiq*100._wp where(Cloud_Fraction_Total_Mean /= R_UNDEF) Cloud_Fraction_Total_Mean = Cloud_Fraction_Total_Mean*100._wp