Project

General

Profile

Bug #126

SZA in zoom regions

Added by Philippe Le Sager over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
chemistry
Start date:
01/13/2014
Due date:
% Done:

100%


Description

Comparison of J(NO2) ("Comparison of JNO2 values in zoomed TM5 run between global and regional domains" by Jason Williams) describes a bug found in v4 of TM5-chem, namely a corrupted solar zenith angle in the zoom region.

The first figure indicates that the problem is along latitudes, and not longitudes.

test.tar (417 KB) Maarten Krol, 01/14/2014 09:59 AM

williams_Jvalue_bugfix_2014.pdf - Report on fixing and testing the SZA bug in zoomed region (236 KB) Jason Williams, 02/05/2014 10:56 AM

jstat_zoom_r5037.pdf (165 KB) Philippe Le Sager, 02/18/2014 02:54 PM

History

#1 Updated by Maarten Krol over 7 years ago

Philippe Le Sager wrote:

Comparison of J(NO2) ("Comparison of JNO2 values in zoomed TM5 run between global and regional domains" by Jason Williams) describes a bug found in v4 of TM5-chem, namely a corrupted solar zenith angle in the zoom region.

The first figure indicates that the problem is along latitudes, and not longitudes.

I wrote a different implementation, and tested it (Maarten).

#2 Updated by Maarten Krol over 7 years ago

Philippe Le Sager wrote:

Comparison of J(NO2) ("Comparison of JNO2 values in zoomed TM5 run between global and regional domains" by Jason Williams) describes a bug found in v4 of TM5-chem, namely a corrupted solar zenith angle in the zoom region.

The first figure indicates that the problem is along latitudes, and not longitudes.

The test.tar files contains a new and tested implementation.

#3 Updated by Philippe Le Sager over 7 years ago

  • % Done changed from 0 to 50

Maarten Krol wrote:

The test.tar files contains a new and tested implementation.

Maarten's approach seems to work alright. But there is probably no need for such an overhaul.

Indeed, I found that the computation of the latitudes in DAYSIM (http://dev.knmi.nl/projects/tm5/repository/revisions/5037/diff/proj/chem/base/trunk/src/photolysis.F90) routine was totally wrong. It assumed that the region covers the entire [-90,+90] latitude range:

dlat=pi/jm(region)
do j=jsr(region),jer(region)
   lat(j) =  -0.5*pi + dlat*(real(j)-0.5)
enddo

The simple and correct way to get them is:

use meteodata, only : lli
...
lat  = lli(region)%lat   

To see how bad this is, a quick test gave the following latitudes, from the old and new methods, for three regions:

0:--> first  half : 2006/01/01  0:00 - 2006/01/01  0:15

region 3 - eur050x025 from N40. to N58.
---------------------------------------   
lat-old  = xxx xxx xxx xxx -78.75 -76.25 -73.75 -71.25 ....  71.25 73.75 76.25 78.75 xxx xxx xxx xxx  

lat-new= 40.125 40.375 40.625 40.875 41.125 .... 56.625 56.875 57.125 57.375 57.625 57.875

region 2 - eur100x100 from N12. to N66.
---------------------------------------
lat-old  = xxx xxx -81.667 -78.333 -75.00 -71.667 -68.333 -65.0 .... 75.0 78.333 81.667 xxx xxx

lat-new  = 12.50 13.50 14.50 15.50 16.50 ....61.50 62.50 63.50 64.50 65.50

region 1 - glb300x200
---------------------
lat-old  = -89. -87. -85. -83. .... 83. 85. 87. 89.
lat-new  = -89. -87. -85. -83. .... 83. 85. 87. 89.


It shows that only the global region was correctly handled. Since Jason's first plot suggests an error in the latitudinal direction only, it is likely that
this errorneous latitudes were the problem. We just need to double-check SZA.

In any case, this is a bug and the fix has been committed, see revision r5037.

#4 Updated by Jason Williams over 7 years ago

The solution provided Philippe has now been tested in the benchmark 4 version. There is a significant improvement in the latitudinal variability in solar zenith angle in the zoom region due to the bug fix. Hoewvwe, comparison of the resulting zonal daily means JNO2 and JO3 values between 3x2 and 1x1 zoom domains shows that non-negligible differences till exist. Comparing the tagged tracer for stratospheric O3 shows that mixing ratios are too low above the zoomed region. A short summary is provided in the attachment.

#5 Updated by Philippe Le Sager over 7 years ago

Philippe Le Sager wrote:

In any case, this is a bug and the fix has been committed, see revision r5037.

I did two one-day (1/1/2006) simulations with r5037: one glb3x2 with zoom regions, and one glb1x1.
The attached file compares SZA, O3S, J(NO2) and J(NO3). Each row of plots shows the glb3x2, the 1x1 zoom region, and the glb1x1 (in that order).

No significant differences are found.

#6 Updated by Philippe Le Sager over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF