[Met_help] Re: ncmod_gallus script - question (fwd)
John Halley Gotway
johnhg at rap.ucar.edu
Wed Jul 30 10:59:09 MDT 2008
Bill,
Both Randy and Dave Ahijevych would be good resources for advice on running the MODE-Analysis tool. Randy wrote the code, and Dave's run it extensively. I'll write to let them know you may have
questions.
Also, in case you haven't seen it yet, here's the MODE-Analysis section of the MET Online Tutorial: http://www.dtcenter.org/met/users/support/online_tutorial/mode_analysis/index.php
John
wgallus at iastate.edu wrote:
> John,
>
> This seems to work. I had to get used to the fact I had to specify
> "caps" and not "obs" for the stage 4 data, since it apparently has the
> same naming convention as the forecasts. Thus I used "caps" for both
> the forecast and obs (where I previously would have used "fcst" on one
> and "obs" on the other). But, it seems like things worked, doing this.
>
> Sorry to hear you'll be gone much of the time I'm there. I'll see if I
> can think of all issues that will arise beforehand, but I doubt it! The
> most likely areas where I may encounter problems will be with
> mode_analysis, since I expect to use it heavily on both the data from my
> visit last August, and these new files.
>
> Bill
>
> ------------------------------------------------
> | William A. Gallus, Jr. |
> | Professor of Meteorology |
> | Professor-in-charge, Meteorology Program |
> | 3025 Agronomy |
> | Iowa State University |
> | 515-294-2270 |
> ------------------------------------------------
>
> On Wed, 30 Jul 2008, John Halley Gotway wrote:
>
>> Bill,
>>
>> Yeah, there wouldn't be anywhere to change it in the config file. All
>> of the timing information should be contained in the input files
>> themselves and MODE reads it from there.
>>
>> I've adjusted the code to account for the timing differences for the
>> CAPS files in /d2/gallus/4km.
>>
>> On the command line for ncmod_gallus you must specify either "fcst",
>> "obs", or (NEW) "caps". The selection tells the tool how to parse the
>> timing information from the history attribute of the precip variable.
>>
>> The following assumptions are made:
>> - All accumulation times are 6 hours.
>>
>> For CAPS:
>> - Parse the year, month, and day (YYYYMMDD) from the history attribute
>> and add 21 hours to get the initialization time.
>> - Parse the forecast hour from the history attribute as the integer
>> following the last underscore.
>>
>> For FCST:
>> - Parse the year, month, and day (YYYYMMDD) from the history attribute
>> and add 0 hours to get the initialization time.
>> - Parse the forecast hour from the history attribute as the integer
>> following the last underscore.
>>
>> For OBS:
>> - Parse the year, day of year, and hour (YYDOYHH) from the history
>> attribute for the initialization time.
>> - The forecast hour should always be 0, meaning that the init time =
>> the valid time.
>>
>> Try out the version in /d1/johnhg/ncmod_gallus and let me know if you
>> find any other problems. I've added print statements to dump out the
>> file timing info so you can verify that the tools in parsing the time
>> as you expect. Just remember to specify "caps" on the command line to
>> tell it how to interpret the timing info.
>>
>> John
>>
>>
>> wgallus at iastate.edu wrote:
>>> John,
>>>
>>> This seems to work OK, but I did notice one problem, and I'm not sure
>>> where the fix would need to be made. These are the 4km CAPS runs
>>> that were done for the NOAA HazWx Testbed in 2007. Thus, they
>>> initialized at 21 UTC. The MODE output seems to assume they were
>>> initialized at 00z, and this is not only one error, but it actually
>>> means it thinks the time periods are one day earlier than they are.
>>>
>>> Thus, a file named 20070527_ST406_09.dat.nc actually refers to the
>>> 6hr accumulation ending at forecast hour 09, from a run initialized
>>> at 21z on 5/27. Thus, the valid period is 00-06 UTC on 5/28. MODE
>>> is listing the valid time in the .ps file as 9z on 5/27. I thought
>>> maybe I need to change something in the config file, but I don't see
>>> a spot in there to set iniitial time.
>>>
>>> Bill
>>>
>>> ------------------------------------------------
>>> | William A. Gallus, Jr. |
>>> | Professor of Meteorology |
>>> | Professor-in-charge, Meteorology Program |
>>> | 3025 Agronomy |
>>> | Iowa State University |
>>> | 515-294-2270 |
>>> ------------------------------------------------
>>>
>>> On Tue, 29 Jul 2008, John Halley Gotway wrote:
>>>
>>>> Bill,
>>>>
>>>> OK, try the version of ncmod_gallus in /d1/johnhg/ncmod_gallus.
>>>>
>>>> I'm just looking at the first dimension in the NetCDF file. If it's
>>>> 169 I'm using the original grid definition. If it's 99, I'm using
>>>> the new one.
>>>>
>>>> Let me know how it goes.
>>>>
>>>> And please keep in mind that MET requires the forecast and
>>>> observation files to be on the same grid for the Grid-Stat and MODE
>>>> tools.
>>>>
>>>> I'll be out of town for 10 days starting Monday, so if you need help
>>>> setting anything up, please let me know by Friday. But Randy should
>>>> be here to answer any questions that come up.
>>>>
>>>> Good luck.
>>>>
>>>> John
>>>>
>>>> wgallus at iastate.edu wrote:
>>>>> My grad student who produced the data gives some info below. He
>>>>> didn't know what r_km would be. It seems to me it might be the
>>>>> radius of the earth, or something?
>>>>>
>>>>> Bill
>>>>>
>>>>> ------------------------------------------------
>>>>> | William A. Gallus, Jr. |
>>>>> | Professor of Meteorology |
>>>>> | Professor-in-charge, Meteorology Program |
>>>>> | 3025 Agronomy |
>>>>> | Iowa State University |
>>>>> | 515-294-2270 |
>>>>> ------------------------------------------------
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> Date: Tue, 29 Jul 2008 16:07:20 -0500 (CDT)
>>>>> From: Adam Clark <clar0614 at iastate.edu>
>>>>> To: wgallus at iastate.edu
>>>>> Subject: Re: ncmod_gallus script - question (fwd)
>>>>>
>>>>> The stuff below:
>>>>>
>>>>> // Set up the Lambert Conformal data for the grid to be used
>>>>> LambertData lc_data = {
>>>>> "gallus", // name
>>>>> 42.0, // secant lat 1
>>>>> 42.0, // secant lat 2
>>>>> 34.821, // lower-left lat
>>>>> 104.924, // lower-left lon
>>>>> 95.0, // lcen
>>>>> 10.379, // d_km
>>>>> 6367.47, // r_km
>>>>> 169, // nx
>>>>> 149 // ny
>>>>> };
>>>>>
>>>>> should be changed to:
>>>>>
>>>>> 40.5, // secant lat 1
>>>>> 40.5, // secant lat 2
>>>>> 31.9, // lower-left lat
>>>>> 106.50, // lower-left lon
>>>>> 97.0, // lcen
>>>>> 20.000, // d_km
>>>>> ??????, // r_km
>>>>> 99, // nx
>>>>> 92 // ny
>>>>> };
>>>>>
>>>>>
>>>>> The only thing I don't know is the "r_km" variable. Maybe John
>>>>> would know what that would be based on the other variables??
>>>>>
>>>>> I got most of the info above from the GrADS .ctl file I have to
>>>>> read the 4 and 20-km data. The line in the .ctl file defining the
>>>>> grid is:
>>>>>
>>>>> pdef 99 92 lcc 31.900 -106.50 1.000 1.000 40.500 40.500 -97.000
>>>>> 20000.000 20000.000
>>>>>
>>>>> Hope that helps!
>>>>>
>>>>> Adam
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, 29 Jul 2008, wgallus at iastate.edu wrote:
>>>>>
>>>>>> Adam,
>>>>>>
>>>>>> I tried to run the code to convert things to the type of nc file
>>>>>> that MODE could use this morning, and didn't realize the script
>>>>>> had been hardwired for the 15 km runs last year. See the email
>>>>>> below. Can you provide all the info that would be valid for your
>>>>>> 20 km ensemble datasets?
>>>>>>
>>>>>> Bill
>>>>>>
>>>>>> ------------------------------------------------
>>>>>> | William A. Gallus, Jr. |
>>>>>> | Professor of Meteorology |
>>>>>> | Professor-in-charge, Meteorology Program |
>>>>>> | 3025 Agronomy |
>>>>>> | Iowa State University |
>>>>>> | 515-294-2270 |
>>>>>> ------------------------------------------------
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> Date: Tue, 29 Jul 2008 14:02:46 -0600
>>>>>> From: John Halley Gotway <johnhg at rap.ucar.edu>
>>>>>> To: wgallus at iastate.edu
>>>>>> Subject: Re: ncmod_gallus script - question
>>>>>>
>>>>>> Bill,
>>>>>>
>>>>>> I was able to find that file. I had been looking in /d1 and
>>>>>> forgot all about /d2.
>>>>>>
>>>>>> Anyway, yes it is "hardwired" in there. The previous data we were
>>>>>> using resided on 169x149 Lambert Conformal grid defined below:
>>>>>>
>>>>>> // Set up the Lambert Conformal data for the grid to be used
>>>>>> LambertData lc_data = {
>>>>>> "gallus", // name
>>>>>> 42.0, // secant lat 1
>>>>>> 42.0, // secant lat 2
>>>>>> 34.821, // lower-left lat
>>>>>> 104.924, // lower-left lon
>>>>>> 95.0, // lcen
>>>>>> 10.379, // d_km
>>>>>> 6367.47, // r_km
>>>>>> 169, // nx
>>>>>> 149 // ny
>>>>>> };
>>>>>>
>>>>>> The data in this new file resides on a grid that's 99x92. We'll
>>>>>> need to figure out the grid definition for this data and add it
>>>>>> into the tool. Any ideas how this grid should be defined?
>>>>>>
>>>>>> John
>>>>>>
>>>>>>
>>>>>> wgallus at iastate.edu wrote:
>>>>>>> It is on ebony in /d2/gallus/4km.
>>>>>>>
>>>>>>> Let me know if you can't find it there and I can email it.
>>>>>>>
>>>>>>> Bill
>>>>>>>
>>>>>>> ------------------------------------------------
>>>>>>> | William A. Gallus, Jr. |
>>>>>>> | Professor of Meteorology |
>>>>>>> | Professor-in-charge, Meteorology Program |
>>>>>>> | 3025 Agronomy |
>>>>>>> | Iowa State University |
>>>>>>> | 515-294-2270 |
>>>>>>> ------------------------------------------------
>>>>>>>
>>>>>>> On Tue, 29 Jul 2008, John Halley Gotway wrote:
>>>>>>>
>>>>>>> > Bill,
>>>>>>> > > Could you please send me that file: 20070502_p106_27.dat.nc
>>>>>>> > > Or let me know if it's sitting on one of the DTC machines.
>>>>>>> > > And I'll try running the tool to see what needs to be adjusted.
>>>>>>> > > John
>>>>>>> > > wgallus at iastate.edu wrote:
>>>>>>> > > John,
>>>>>>> > > > > I'm getting ready for my DTC visit the next 2 weeks, and
>>>>>>> tried to run > > the ncmod_gallus script you created for me, but
>>>>>>> this time, for some new > > output from 4 km CAPS runs, that is
>>>>>>> on a 20 km grid. I believe I have > > the output in the same .nc
>>>>>>> format as the output I used last year, > > except the dimensions
>>>>>>> of the grid are different. In any event, when I > > tried to run
>>>>>>> ncmod_gallus on the data, I got this error...
>>>>>>> > > > > Reading input netCDF file: ../4km/20070502_p106_27.dat.nc
>>>>>>> > > ncvarget: ncid 3; varid 2: Start+count exceeds dimension bound
>>>>>>> > > > > Is your ncmod_gallus script hardwired for the dimensions
>>>>>>> of the grid I > > had been using previously? If so, I guess
>>>>>>> I'll need an adjusted > > version that I can use now for these
>>>>>>> other datasets.
>>>>>>> > > > > 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