Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new MODIS joint histograms #87

Merged
merged 13 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/containerized-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
75344f82d97187e351ed25a616fa1761 cosp2_output.um_global.gfortran.kgo.v003.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5194a0a17bc7eb5e9e95e8b8d8788953 cosp2_output.um_global.ifort.kgo.v003.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b9f700627457a1e7483d2150da3ef18d cosp2_output.um_global.ifx.kgo.v003.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dfe6a5f87e3e2e6a1399d067fa23e36d cosp2_output.um_global_model_levels.gfortran.kgo.v003.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7703e5395f4fff4961b97fe86621f996 cosp2_output_um.gfortran.kgo.v003.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0e75e4adac759d797d1264d76490fa9d cosp2_output_um.ifort.kgo.v003.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bcfb46c32c3f78df0771175a7a0b21b5 cosp2_output_um.ifx.kgo.v003.nc
100 changes: 98 additions & 2 deletions src/cosp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
!
! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand All @@ -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,&
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 :: &
Expand Down Expand Up @@ -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, &
Expand All @@ -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) = &
Expand Down Expand Up @@ -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(:,:,:)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)) &
Expand Down Expand Up @@ -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)) &
Expand Down Expand Up @@ -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)) &
Expand Down Expand Up @@ -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)) &
Expand Down Expand Up @@ -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)) &
Expand Down Expand Up @@ -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)) &
Expand Down
Loading