Eight hour average ozone

Hi, how would I calculate daily maximum 8 hour average ozone?

I figured that CMAQ/TOOL/HR2DAY would be it. I tried to use File list format. It doesn’t seem to getting the end-time from the second file correctly and it fails to read any of 48 hour time period. Do I have to physically catenate files before calculating MDA8 value? Is there better alternative tool for this?

Thank you!

Hi Yosuke,

The hr2day program will calculate MDA8 ozone from multiple input files which contain hourly ozone. Can you provide your run script and log file so we can see the specific error that hr2day ran into? That would be helpful for diagnosing your issue. Thanks.

Wyat

The I/O API M3TOOLS program “m3tproc” is designed to compute various sorts of time aggregation (average, max, min, …) for I/O API files. See https://www.cmascenter.org/ioapi/documentation/all_versions/html/M3TPROC.html

Note that since I/O API Version 2.2 (May, 2002) the I/O API has supported lists of files (under a single logical name, e.g., setenv FOO FOO1,FOO2,FOO3,FOO4; setenv FOO1 …, etc.) so that you do not have to use an external program to concatenate multiple single-day files. See https://www.cmascenter.org/ioapi/documentation/all_versions/html/NEWSTUFF.html#ver22

Wyat, Thank you for help.

test_hr2day.csh
test_hr2day.log

The output have only one time step, fillvalue for all cells. Part of ndcump below.

data:

 TFLAG =
  2011192, 0 ;

 O3 =
  -9.999e+36, -9.999e+36, -9.999e+36, -9.999e+36, -9.999e+36, -9.999e+36,
    -9.999e+36, -9.999e+36, -9.999e+36, -9.999e+36, -9.999e+36, -9.999e+36,

Thank you for help.

Output has no timestep. I have complete log file pasted below. The program says that start time and end time is the same, that seems weird.

 File has start date&time  2011192:000000
 File has final date&time  2011192:000000
 File has       time step  010000

As I said, I am passing input files as file list, like below:

d=./SE52BENCH/multi_day/ref_output/cctm
export FILE0=$d/CCTM_ACONC_v52_intel17.0_SE52BENCH_20110711.nc
export FILE1=$d/CCTM_ACONC_v52_intel17.0_SE52BENCH_20110712.nc
export FILE2=$d/CCTM_ACONC_v52_intel17.0_SE52BENCH_20110713.nc
export FILE3=$d/CCTM_ACONC_v52_intel17.0_SE52BENCH_20110714.nc
export INFILE=LIST:FILE0,FILE1,FILE2,FILE3

test_m3tproc.sh
test_m3tproc.log

Hi Yosuke,

So try this.

In your runscript, specify the infiles as

setenv M3_INFILE1 $d/CCTM_ACONC_v52_intel17.0_SE52BENCH_20110711.nc
setenv M3_INFILE2 $d/CCTM_ACONC_v52_intel17.0_SE52BENCH_20110712.nc
etc.

You don’t need to use the list format you’re using. If you follow the structure of the example run script provided with hr2day, you should be good shape. Let me know if that works for you.

Wyat

Seems like CMAQ v5.3.b2 has the feature you have. Let me try the file. I was using v5.2.1.

Yes, the ability to handle multiple sequential input files was added as a new feature for hr2day in CMAQv5.3b2:

For older versions it was indeed necessary to concatenate the individual files with tools such as combine or m3xtract prior to running hr2day

Thank you all, it seems to be working now!

Glad to hear it’s working now.

I forgot that previous versions of hr2day did not handle multiple sequential input files. To use the older versions of the program, you would first need to concatenate your daily files into a single file multi-day file using a program like combine or m3xtract. Then you could point hr2day to that file. That would be an alternative solution.

Wyat

Just a quick relevant question related to hr2day discussed in this thread - does hr2day only operate on the bottom layer of CMAQ I/O API files? Is there an option to activate hr2day.exe on all layers of input file?

No, hr2day is not currently set up to compute daily metrics for any layers except the bottom layer.

But see:https://www.cmascenter.org/ioapi/documentation/all_versions/html/BUFFERED.html#list:

File-Set File Lists
Multiple files which have the same structure (type, dimensions, list of variables, time step), and which cover an extended time period may be opened under a single logical name by:
setenv FILE_1 <path name>
...
setenv FILE_N <path name>
setenv ANAME LIST:FILE_1,...,FILE_N

subject to the requirement that the value for ANAME has length at most 256 for I/O API 3.0 or earlier, and 65535 for 3.1 or later. In case of overlapping time step sequences, the rule is “first file wins,” i.e., if the data is available from the first file, FILE_1, use it; else if it is available from the second file, use that, and so on.