CFMIP / COSPv2.0

COSP - The CFMIP (Cloud Feedbacks Model Intercomparison Project) Observation Simulator Package
42 stars 40 forks source link

new MODIS joint histograms #87

Closed caseywall7926 closed 6 months ago

caseywall7926 commented 6 months ago

We have written code to compute four new joint histogram diagnostics with the MODIS simulator:

(1) CTP vs. COT histogram for ice-topped clouds (2) CTP vs. COT histogram for liquid-topped clouds (3) CWP vs. CER histogram for ice-topped clouds (4) CWP vs. CER histogram for liquid-topped clouds

(CTP: cloud-top pressure; COT: cloud optical thickness; CWP: cloud water path; CER: cloud particle size)

The joint histograms match the MODIS observational dataset described by Pincus et al. 2023 (https://doi.org/10.5194/essd-15-2483-2023).

Also, the edges of the histogram bins have been changed slightly from their original versions to match the histogram bins in the Pincus et al. 2023 observational dataset. Five changes were made: (1) The upper bound of the largest COT bin has been changed from 10000 to 150 (2) The upper bound of the largest CTP bin has been changed from 10000 hPa to 1100 hPa (3) The lower bound of the smallest CER bin for liquid-topped clouds has been changed from 0 microns to 4 microns (4) One of the CER bin edges has been changed from 13 microns to 12.5 microns (5) The lower bound of the smallest CER bin for ice-topped clouds has been changed from 0 microns to 5 microns

This causes minor changes in the MODIS joint histograms with CTP, COT, or CER as a dimension. It also affects the ISCCP and MISR joint histograms that have COT as a dimension because the same COT bins are used in those simulators.

We have run the following test on the global data:

python compare_to_kgo.py data/outputs/UKMO/cosp2_output.um_global.gfortran.kgo.002.nc data/outputs/UKMO/cosp2_output.um_global.nc

The result of the test is as follows: Summary statistics Variable N AvgDiff MinDiff MaxDiff StDev tau7 1 5.0000e+00 5.0000e+00 5.0000e+00 0.0000e+00 tau7_bnds 1 -9.9850e+04 -9.9850e+04 -9.9850e+04 0.0000e+00 pres7 1 -8.0500e+04 -8.0500e+04 -8.0500e+04 0.0000e+00 pres7_bnds 1 1.0000e+04 1.0000e+04 1.0000e+04 0.0000e+00 clisccp 27 -6.6667e+00 -2.0000e+01 -5.0000e+00 3.6004e+00 clMISR 29 -6.2069e+00 -2.0000e+01 -5.0000e+00 3.3874e+00 clmodis 28 -6.4286e+00 -2.0000e+01 -5.0000e+00 3.4993e+00 modis_Optical_Thickness_vs_ReffICE 322 -4.1925e+00 -7.5000e+01 7.0000e+01 1.4806e+01 REICE_MODIS 3 -7.5000e-06 -2.0000e-05 2.5000e-06 9.3541e-06 modis_Optical_Thickness_vs_ReffLIQ 170 -4.7059e-01 -1.0000e+02 1.0000e+02 2.1180e+01 RELIQ_MODIS 3 5.0000e-07 -2.5000e-07 2.0000e-06 1.0607e-06

All of these variables are expected to change because of the five changes in the histogram bin edges mentioned above. No other variables are affected by the code modifications.

klein21 commented 6 months ago

Hello Casey,

Thanks for all of your effort on the MODIS simulator.

I am wondering if changes (1) and (2) are really necessary. I am not a fan of changing the answers (even in a minor way) to the ISCCP simulator without good reason. I recognize that COSP has only one set of pressure/tau bin boundaries for all the simulators, which potentially cause a problem.

Said another way, if changes (1) and (2) were not made, would the comparison to MODIS be invalidated? I believe that the MODIS simulator has used these bin boundaries in prior versions, so I was not aware that this change is needed for MODIS.

Robert may have an opinion on this.

Best,

Steve

klein21 commented 6 months ago

One small additional point... in GCMs it wouldn't surprise me if tau > 150 sometimes, and I wouldn't want to omit those clouds from the histogram.

RobertPincus commented 6 months ago

Given the conditions on Earth I guess changes 1 and 2 will have no practical effect, i.e. the histograms produced will be the same with either set of limits. So the question is whether the MODIS simulator should match the current MODIS data or agree with the other simulators in COSP... I might be inclined to chose consistency within COSP but could be convinced either way.

caseywall7926 commented 6 months ago

Hi Steve and Robert,

I changed the CTP and COT bins back to their original values in the latest commit. Now only the CER bins differ from their original values. The CER bin edges, in units of microns, are:

Bold indicates values that were changed. The new bins match the observational data from Pincus et al. 2023.

We have re-run the following global test: python compare_to_kgo.py data/outputs/UKMO/cosp2_output.um_global.gfortran.kgo.002.nc data/outputs/UKMO/cosp2_output.um_global.nc

The output is as follows: Variable N AvgDiff MinDiff MaxDiff StDev modis_Optical_Thickness_vs_ReffICE 310 -4.0645e+00 -7.5000e+01 7.0000e+01 1.5051e+01 REICE_MODIS 3 -7.5000e-06 -2.0000e-05 2.5000e-06 9.3541e-06 modis_Optical_Thickness_vs_ReffLIQ 156 0.0000e+00 -1.0000e+02 1.0000e+02 2.2065e+01 RELIQ_MODIS 3 5.0000e-07 -2.5000e-07 2.0000e-06 1.0607e-06

These variables are expected to change because of the changes that were made to the CER histogram bins. No other variables are affected.

klein21 commented 6 months ago

Thank you Casey!

alejandrobodas commented 6 months ago

@caseywall7926 thanks for this change. The CI tests were broken, but we've fixed them now. Please can you merge the recent changes to the master branch into your branch so that we can get the information from the CI tests?

caseywall7926 commented 6 months ago

@alejandrobodas thanks for fixing the CI tests. We have merged the recent changes into our branch.

alejandrobodas commented 6 months ago

Hi @caseywall7926 , since this PR changes the outputs the review process is a bit more complex. We have another PR (#86) that changes the results, so we'll have to do two sequential updates to the known good outputs (KGOs). This https://github.com/CFMIP/COSPv2.0/pull/86#issuecomment-2014692875 summarizes the steps that you'll need follow to go through the review process. Thanks!

caseywall7926 commented 6 months ago

Hi @alejandrobodas , I downloaded the file "outputs.gfortran-12.UKMO.tgz" and plotted the two histogram variables that have changed as a result of the code modifications in this PR (MODIS joint histogram of cloud optical depth vs. particle size for liquid-topped clouds and MODIS joint histogram of cloud optical depth vs. particle size for ice-topped clouds). The other two variables that have changed according to the tests mentioned in previous posts are "REICE_MODIS" and "REICE_MODIS". These are just the bin midpoints for particle size for the histograms, so I have not plotted them.

I've attached plots of the global-mean joint histograms from output of the original COSP code and output from the COSP code with the modifications made in this pull request. These can be seen in the attached pdf.

I think the histograms look as expected. If you agree, then can you please let me know what the next steps are? figure_comparisons.pdf

alejandrobodas commented 6 months ago

Hi @caseywall7926 , that looks go to me. The branch https://github.com/CFMIP/COSPv2.0/tree/kgo_v003 points to the new good outputs. If you incorporate those changes into your branch then the continuous integration tests should pass (assuming I haven't made a mistake).

caseywall7926 commented 6 months ago

Hi @alejandrobodas , I believe that I incorporated your changes. Can you please let me know if there is something else I need to do? Thank you.

alejandrobodas commented 6 months ago

@caseywall7926 , all looks good to me. Since you have discussed the changes with @klein21 and @RobertPincus , I believe this is ready to be merged. Thanks for your contribution!

caseywall7926 commented 6 months ago

Great. Thank you!