Skip to content

Console Output

+ diff --exclude=.git --exclude=version_clubb_core.txt --exclude=version_silhs.txt -r clubb clubb_release
diff '--exclude=.git' '--exclude=version_clubb_core.txt' '--exclude=version_silhs.txt' -r clubb/utilities/sens_matrix/create_figs.py clubb_release/utilities/sens_matrix/create_figs.py
49,87d48
<     # Remove selected metrics from plots
<     maskMetricsNames =   (metricsNames == 'PRECT_GLB') | (metricsNames == 'LWCF_GLB') \
<                        | (metricsNames == 'SWCF_LBA')  | (metricsNames == 'SWCF_EP') \
<                        | (metricsNames == 'SWCF_WP')   | (metricsNames == 'SWCF_NP') \
<                        | (metricsNames == 'SWCF_VOCAL') | (metricsNames == 'SWCF_HAWAII') \
<                        | (metricsNames == 'SWCF_SP') | (metricsNames == 'SWCF_GLB')
< 
<     maskParamsNames =    (paramsNames == 'clubb_c_k10') | (paramsNames == 'clubb_altitude_threshold') \
<                        | (paramsNames == 'clubb_c_invrs_tau_shear') | (paramsNames == 'clubb_c_invrs_tau_bkgnd') \
<                        | (paramsNames == 'clubb_c_invrs_tau_n2_wp2') | (paramsNames == 'clubb_c_invrs_tau_n2_wp2') \
<                        | (paramsNames == 'clubb_c_invrs_tau_n2')
< 
<     maskMetricsParamsNames = np.outer(maskMetricsNames,maskParamsNames)
< 
<     #    #maskMetricsNames = np.logical_not(maskMetricsNames)  # get rid of named elements
<     # Apply mask
<     metricsNamesMasked = np.ma.masked_array(metricsNames, maskMetricsNames).compressed()
<     paramsNamesMasked = np.ma.masked_array(paramsNames, maskParamsNames).compressed()
<     #    normMetricValsColMasked = np.ma.masked_array(normMetricValsCol, maskMetricsNames).compressed()
<     #    normMetricValsColMasked = normMetricValsColMasked[np.newaxis].T # turn into column array
<     #    defaultBiasesColMasked = np.ma.masked_array(defaultBiasesCol, maskMetricsNames).compressed()
<     #    defaultBiasesColMasked = defaultBiasesColMasked[np.newaxis].T
<     normMetricValsColMasked = normMetricValsCol[~maskMetricsNames]
<     defaultBiasesColMasked = defaultBiasesCol[~maskMetricsNames]
<     normlzdSensMatrixPolyMasked = normlzdSensMatrixPoly[~maskMetricsNames].T[~maskParamsNames].T
<     normlzdLinplusSensMatrixPolyMasked = normlzdLinplusSensMatrixPoly[~maskMetricsNames].T[~maskParamsNames].T
< 
<     metricsWeightsMasked = metricsWeights[~maskMetricsNames]
< 
<     obsMetricValsColMasked = obsMetricValsCol[~maskMetricsNames]
<     normlzdCurvMatrixMasked = normlzdCurvMatrix[~maskMetricsNames].T[~maskParamsNames].T
<     normlzdConstMatrixMasked = normlzdConstMatrix[~maskMetricsNames].T[~maskParamsNames].T
<     normlzdOrdDparamsMinMasked = normlzdOrdDparamsMin[~maskMetricsNames].T[~maskParamsNames].T
<     normlzdOrdDparamsMaxMasked = normlzdOrdDparamsMax[~maskMetricsNames].T[~maskParamsNames].T
< 
<     magParamValsRowMasked = magParamValsRow.T[~maskParamsNames].T
< 
<     sensNcFilenamesMasked = np.ma.masked_array(sensNcFilenames, maskParamsNames).compressed()
<     sensNcFilenamesExtMasked = np.ma.masked_array(sensNcFilenamesExt, maskParamsNames).compressed()
98,104d58
< #    threeDotFig = \
< #        createThreeDotFig(metricsNames, paramsNames, transformedParamsNames,
< #                          metricsWeights, obsMetricValsCol, normMetricValsCol, magParamValsRow,
< #                          normlzdCurvMatrix, normlzdSensMatrixPoly, normlzdConstMatrix,
< #                          normlzdOrdDparamsMin, normlzdOrdDparamsMax,
< #                          sensNcFilenames, sensNcFilenamesExt, defaultNcFilename)
< 
106,110c60,64
<         createThreeDotFig(metricsNamesMasked, paramsNamesMasked, transformedParamsNames,
<                           metricsWeightsMasked, obsMetricValsColMasked, normMetricValsColMasked, magParamValsRowMasked,
<                           normlzdCurvMatrixMasked, normlzdSensMatrixPolyMasked, normlzdConstMatrixMasked,
<                           normlzdOrdDparamsMinMasked, normlzdOrdDparamsMaxMasked,
<                           sensNcFilenamesMasked, sensNcFilenamesExtMasked, defaultNcFilename)
---
>         createThreeDotFig(metricsNames, paramsNames, transformedParamsNames,
>                                metricsWeights, obsMetricValsCol, normMetricValsCol, magParamValsRow,
>                                normlzdCurvMatrix, normlzdSensMatrixPoly, normlzdConstMatrix,
>                                normlzdOrdDparamsMin, normlzdOrdDparamsMax,
>                                sensNcFilenames, sensNcFilenamesExt, defaultNcFilename)
277,278c231,241
< 
< 
---
>     maskMetricsNames = np.logical_or(metricsNames[:] == 'PRECT_GLB', metricsNames[:] == 'LWCF_GLB')
> #    #maskMetricsNames = np.logical_not(maskMetricsNames)  # get rid of named elements
>     # Apply mask
>     metricsNamesMasked = np.ma.masked_array(metricsNames, maskMetricsNames).compressed()
> #    normMetricValsColMasked = np.ma.masked_array(normMetricValsCol, maskMetricsNames).compressed()
> #    normMetricValsColMasked = normMetricValsColMasked[np.newaxis].T # turn into column array
> #    defaultBiasesColMasked = np.ma.masked_array(defaultBiasesCol, maskMetricsNames).compressed()
> #    defaultBiasesColMasked = defaultBiasesColMasked[np.newaxis].T
>     normMetricValsColMasked = normMetricValsCol[~maskMetricsNames]
>     defaultBiasesColMasked = defaultBiasesCol[~maskMetricsNames]
>     normlzdSensMatrixPolyMasked = normlzdSensMatrixPoly[~maskMetricsNames]
285c248
<     createDpMin2PtFig( normlzdLinplusSensMatrixPolyMasked, defaultBiasesColMasked,
---
>     createDpMin2PtFig( normlzdSensMatrixPolyMasked, defaultBiasesColMasked,
520,523c483,486
<                       metricsWeights, obsMetricValsCol, normMetricValsCol, magParamValsRow,
<                       normlzdCurvMatrix, normlzdSensMatrixPoly, normlzdConstMatrix,
<                       normlzdOrdDparamsMin, normlzdOrdDparamsMax,
<                       sens1NcFilenames, sens2NcFilenames, defaultNcFilename):
---
>                                metricsWeights, obsMetricValsCol, normMetricValsCol, magParamValsRow,
>                                normlzdCurvMatrix, normlzdSensMatrixPoly, normlzdConstMatrix,
>                                normlzdOrdDparamsMin, normlzdOrdDparamsMax,
>                                sens1NcFilenames, sens2NcFilenames, defaultNcFilename):
545,547c508,510
< #    if ( len(paramsNames) != len(sens1NcFilenames)   ):
< #        print("Number of parameters must equal number of netcdf files.")
< #        quit()
---
>     if ( len(paramsNames) != len(sens1NcFilenames)   ):
>         print("Number of parameters must equal number of netcdf files.")
>         quit()
604c567
<                                marker=dict(color='black', size=16)),
---
>                                marker=dict(color='black', size=5)),
625c588
<                                line=dict(color='blue', width=4)),
---
>                                line=dict(color='blue', width=2)),
638c601
<                                line=dict(color='red', width=4)),
---
>                                line=dict(color='red', width=2)),
648,649c611
<                                          title_font_size=36,
<                                          #font=dict(size=50),
---
>                                          #title_font_size=8,
658d619
<                                          title_font_size=36
662,663c623
<                 threeDotFig.update_yaxes(title_text=metricsNames[arrayRow], row=arrayRow+1, col=arrayCol+1,
<                                          title_font_size=36)
---
>                 threeDotFig.update_yaxes(title_text=metricsNames[arrayRow], row=arrayRow+1, col=arrayCol+1)
1035c995
<     title_text='Minimum size of parameter perturbation between 2 metrics',
---
>     title_text='dpMin between 2 metrics (i.e., rows of sens matrix)',