# Bizarre calculation of MD8A in VERDI

**URL:** <https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186>\
**Category:** VERDI\
**Created:** [June 20, 2023, 10:49pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186 "2023-06-20T22:49:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [June 20, 2023, 10:49pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/1 "2023-06-20T22:49:31Z")

</div>

Hello!  
I am trying to verify the maximum daily 8 hour average (MD8A) calculation for a CAMx output file (july 13 2017). My domain does not include buffer cells. I am using VERDI version 2.4.1  
When I calculate MD8A directly from the CAMx netcdf output outside of VERDI, I calculate a MD8A that matches the MD8A value from AMET for that same grid cell.  
When I calculate MD8A using the “maxiumum\_8hour\_average” stats feature in VERDI, the result shown is displaced by 1 col, 1 row. I’ve attached this image showing my analysis and comparison to VERDI:

 ![Screenshot 2023-06-20 151816](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/d/dac54f36b01fb5422034e9f6c76226a1daea1480.png)

My target monitor is in grid cell [69,78] (verified in ArcGIS). I’ve labeled my target grid cell [69,78] on the VERDI screen grab on the left. The MD8A that I calculate outside of VERDI is on the right - a screen grab from excel. Note that the MD8A calculated in excel from the CAMx netcdf for cell 69,78 matches the MD8A in VERDI for the cell 70,79.

I checked the hourly O3 values in VERDI and in my CAMx netcdf: the hourly O3 values are the exact same for the cell 69,78. Is something strange happening in VERDI when the MD8A calculation occurs? I found this in the VERDI manual, which seems like a straightforward MD8A calculation.  
`* MAXIMUM_8HOUR_MEAN: Ma (M1, M2, ..., Mn-8) where Mi = mean(var(i,j,k,t(i)), var(i,j,k,t(i)+1), var(i,j,k,t(i+2)), ...,var(i,j,k,t(i+8)), for i = 1..n-8`

When I try to probe my domain for the MD8A at cell [1,1] (the southwest corner), VERDI will not produce any results. But if I probe at 2,2 and greater, it will show the MD8A.

Is there a difference occurring due to the consideration of buffer cells, perhaps? My domain does not include buffer cells.  
Thanks for your help!

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [June 22, 2023, 5:16pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/2 "2023-06-22T17:16:14Z")

</div>

Hi Lexi,

Thank you for reporting this issue.

Our developers tried reproducing this finding using the CAMx files in our repo. Could you please share the CAMx file you are using?

You can either put it on a google drive, and share the link, or I can find another way for you to transfer it to us.

Thanks,

Liz

---

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [June 23, 2023, 6:58pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/3 "2023-06-23T18:58:16Z")

</div>

Here is our file: [CAMx.SIP\_WF4\_1\_33kn2023OSATnoctrlv1.20170713.avrg.grd02.nc - Google Drive](https://drive.google.com/file/d/1UZZM1scPLil3YXFf5R5OmNrp7SUKyxWw/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [July 27, 2023, 5:00pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/4 "2023-07-27T17:00:18Z")

</div>

Hi - following up to see if the developers found anything! Thanks

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [July 27, 2023, 9:38pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/5 "2023-07-27T21:38:12Z")

</div>

Hi Lexi,

My apologies for the late response. We added a new issue for this on the VERDI github repo, but a solution has not been implemented yet.

> <https://github.com/CEMPD/VERDI/issues/325>
>
> \*\*Describe the bug\*\*
> This issue was first reported on CMAS forum by a user unde…r this link 
> https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186
> 
> \*\*To Reproduce\*\*
> Steps to reproduce the behavior:
> 1. Launch VERDI GUI
> 2. Load testing CAMx dataset:
> "CAMx.SIP\_WF4\_1\_33kn2023OSATnoctrlv1.20170713.avrg.grd02.nc" from /work/MOD3APP/verdi/VERDI\_2.1.4\_testing\_files
> 3. Select "O3(ppmv)" from variables list of the above model data and click "Tile Plot"
> 4. Click on Controls \>\> Set Row and Column Ranges to set the columns as 40-60 and rows as 60-80 and turn on the grid lines
> 5. Select "maximum\_8hour\_mean" from "Stats" drop-down menu
> 6. Click on Controls \>\> Probe to read the MD8A values from the color map
> 
> \*\*Expected behavior\*\*
> VERDI can display the calculated maximum daily 8 hour averages (MD8A) correctly for CAMx output file.  
> 
> \*\*Screenshots\*\*
> If applicable, add screenshots to help explain your problem.
> The screenshot below showed that there is a mismatch between the color in the grid cell (50,64) and the probed value at the lower left corner.
> \*\*the color map showed that the grid cell's value is between 0.048-0.057, but the probed value is 0.006\*\*
> !\[reported\_issue\_on\_CMAS\_3\_user\_data\_on\_VERDI\_2 1 3\_edited\](https://github.com/CEMPD/VERDI/assets/73186639/442693a5-8499-47c0-acb7-20ea7058a8f4)

LIz

---

<div class="post-metadata">

**Author:** ![lexiewilson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/lexiewilson/32/2018_2.png) [@lexiewilson](https://forum.cmascenter.org/u/lexiewilson)\
**Post date:** [September 23, 2024, 10:42pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/6 "2024-09-23T22:42:04Z")

</div>

Hello!  
I recently downloaded VERDI 2.1.5 and found a few issues:

 ![verdi_screenshot](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/7/7f79ac61e43954f4841f8fb7e41ce844d4e2ced2.png)

When I calculated MD8A in VERDI using the Stats pulldown, I get the answer I expect (yay!). However, the probing tool still seems to be off by one cell up and over. When I try to probe the cell 69,78 in the image above, VERDI produces a time series for cell 70, 79. Note also the cell row and column IDs in the lower left hand corner and lower right hand corner do not agree when hovering over the same cell.

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [September 25, 2024, 7:18pm UTC](https://forum.cmascenter.org/t/bizarre-calculation-of-md8a-in-verdi/4186/7 "2024-09-25T19:18:40Z")

</div>

Hi Lexi,

We hope to have a new release of VERDI that will fix this issue.

Thanks, Liz
