Gunzip,grep and zip across folders in a subdirectory

I have a simple function that greps within a folder into files that are already gunzipped. This was already written for me so from my understanding fn=$1 specifies that it will look into any file in that folder that is gunzipped and the rest of the script greps the data its looking for and puts it into a new file with '_woodsmoke'.

#!/bin/bash
fn=$1
fn2=${fn}_woodsmoke
echo "processing file $fn"
grep "  47225" $fn > $fn2
grep "  82115" $fn >> $fn2
grep "  82123" $fn >> $fn2
grep "  82131" $fn >> $fn2
grep 61060202300000 $fn >> $fn2
grep 61060002300000 $fn >> $fn2

The problem is now I need to write something that greps across three different folders within a directory ( part1_3b , part2_eb , part3_scsdmd ). These 3 folders represent data in CA divided by 3 sections. The files in these folders ...although containing different data..have the same name which is why they aren't combined into 1 folder.

For every month of the year and 3 days of the week I have files written as such:

medsarea.201001sat.v008a.asc.gz
medsarea.201001sun.v008a.asc.gz
medsarea.201001wdy.v008a.asc.gz
.....
medsarea.201002sat.v008a.asc.gz
....

I need it to look across all 3 folders, gunzip & grep data for matching months and days of the week to produce one file per month per day of the week (36 files total) into preferentially a new sub-directory with medsarea.201001sat.v008a.asc_woodsmoke as an example of a Saturday in the first month...but I also need to make sure the original files get zipped back up at the end.

Any tips/pointers/ideas on how to go about this? I am new to shell scripting.

Thanks!

Are there always exactly 36 gzipped files in each of your three subdirectories?

Are the names of those 36 files in each of those three subdirectories always identical?

Is it important that lines containing each of the 5 patterns you are grepping from those files be grouped together, or is it OK to put data in the output file in the order in which those lines appear in the input files? If the order matters, is the output from the three different input files also required to be segregated, or can each input file be processed completely before processing the next input file?

There are more than 36 gzipped files in each folder

There are file names such as:

medsarea.201011sat.v008a.asc_1000m_regrid.gz 
medsarea.201011sat.v008a.asc_1000m_regrid2.gz

I don't need these particular gzipped files above I only want ones listed as:

medsarea.2010<month><day>.v008a.asc 

36 is the total number of output files I need to have across all three folders.
1/month x 3 days of the week

The names of the particular files that I want are identical across all 3 folders.

Order doesn't matter. These are codes that are grepping for source classification codes or emission inventory codes for a particular category of emissions. Its likely most files will contain both of the bottom two codes over the top 3.

Each input file can be processed completely to check for the codes listed before processing the next input file.

It is important the 3 identical files that represent a given month and a given day of the week be outputted to one file that contains any and all data with the particular codes listed. This would give a complete inventory of that month on that day for all of CA.

Thanks

This is untested:

for i in medsarea.2010{01..12}{sat,sun,wdy}.v008a.asc; do zgrep -E "47225|82115|82123|82131|61060202300000|61060002300000" part?_*/$i.gz >newdir/${i}_woodsmoke; done