[Met_help] Re: mode_analysis scripting question

wgallus at iastate.edu wgallus at iastate.edu
Tue Jul 1 10:25:16 MDT 2008


Thanks.  I was worried at first since I want to do things by forecast 
hour, so I would only used -lookin at first on the filenames with *06*in 
them, etc.  But I see the -fcst_lead 06 option seems to do what I need, so 
I think this is fine.

Bill

------------------------------------------------
|   William A. Gallus, Jr.                       |
|   Professor of Meteorology                     |
|   Professor-in-charge, Meteorology Program     |
|   3025 Agronomy                                |
|   Iowa State University                        |
|   515-294-2270                                 |
  ------------------------------------------------

On Tue, 1 Jul 2008, John Halley Gotway wrote:

> Bill,
>
> Good news.  You can use the -lookin path to specify a MODE output filename 
> ***OR*** directory that contains MODE output somewhere down in it.
>
> This is from the MODE-Analysis usage statement:
> "-lookin path" specifies a MODE file or a top-level directory containing MODE 
> files to be used (at least one required).
>
> So all you'll need to do is pass in the top-level directory that contains all 
> of your MODE output somewhere down beneath it.  MODE-Analysis should 
> recursively search all of the subdirectories and read  all of the files 
> ending in "_obj.txt" (that's the output file naming convention for the MODE 
> files).  So MODE-Analysis will read all of the data and perform the job you 
> specify.
>
> However, let me caution you that you'll need to make sure your filtering 
> parameters are set up properly.  Since you'll be reading ALL of the output 
> data at once, you'll probably want to specify the model name for the job 
> using the "-model" command line option - I assume that you'll want to only 
> look at objects from one model at a time.  Think about how else you'd like to 
> filter the data.
>
> Sorry that wasn't more clear about how "-lookin" path works.
>
> If you find that MODE-Analysis is running too slow because it's busy reading 
> all of that data in and then throwing most of it away anyway, you could try 
> using the MODE-Analysis configuration file instead.  In the configuration 
> file you'd define many jobs to be performed for that data set rather than 
> just one, like on the command line.  And it would make it so that the data is 
> only read in once - which would make it faster.
>
> Let me know if you have any questions.  And do be sure to keep using the 
> "-dump_row" option and keep verifying that it's doing what you expect it to 
> be doing.
>
> Thanks,
> John
>
> wgallus at iastate.edu wrote:
>> John,
>> 
>> I'm figuring out some stuff about mode_analysis and think I see a way to do 
>> stuff I need (like using -summary to determine the average AREA from all 
>> forecasted objects in the entire dataset).
>> 
>> But.... I'm runinng into a problem with creating the script to make this 
>> easy.  I was following scripts I had used with mode.  Basically, I need to 
>> have mode_analysis do the -lookin for all of my many cases and I didn't 
>> want to have to list all 72 filenames in the script.  I tried to use the 
>> following but it didn't like the syntax...
>> 
>> #! /bin/csh
>> set cc = 1
>> foreach date ( `cat dates2.txt` )
>> echo ${date}
>> /d1/johnhg/MET_releases/METv1.1beta5/bin/mode_analysis \
>>    -lookin ${date} \
>> @ cc = $cc + 1
>> end
>>    -summary -fcst -single -simple -matched \
>>    -column AREA \
>>    -dump_row area_summary_bycase.txt \
>>    -out      area_summary_bycase.out
>> 
>> 
>> 
>> It seems to me one problem is that I have to get all filenames to show up 
>> within the mode_analysis command/option lines, and it seems the foreach 
>> loop and extra stuff needed messes up mode_analysis.  Any ideas of how to 
>> do this without having to write the lookin line 72 times with the 72 
>> different filenames?
>> 
>> Bill
>> 
>> ------------------------------------------------
>> |   William A. Gallus, Jr.                       |
>> |   Professor of Meteorology                     |
>> |   Professor-in-charge, Meteorology Program     |
>> |   3025 Agronomy                                |
>> |   Iowa State University                        |
>> |   515-294-2270                                 |
>>  ------------------------------------------------
>


More information about the Met_help mailing list