[Met_help] PB2NC config file

John Halley Gotway johnhg at rap.ucar.edu
Wed Jan 6 16:09:12 MST 2010


Ruifang,

Thanks for the heads up.  After downloading METv2.0, I'd suggest
retrieving the latest set of patches for METv2.0 from:
http://www.dtcenter.org/met/users/support/known_issues/METv2.0/index.php

Just follow the instructions at the top of that page to get all of them.

However, I checked the patched version of the that file "read_grib.cc" and
found that it does contain the first fix you listed below but does NOT
contain the second.  I also checked our devleopment version of that file
and it does contain both fixes.

So here's what I'd recommend:
(1) Untar METv2.0.
(2) Retrieve the latest set of patches and untar them in the top-level
METv2.0 directory.
(3) Copy over that version of "read_grib.cc" I sent you a while back.
(4) Build MET.

Sorry that this is such a hassle, but rest assured that these fixes will
be included in all future released versions of MET.

Thanks,
John

> John,
> I installed METv2.0 last year and it was moved one week ago since /ptmp
> was
> so full. Yesterday I downloaded  METv2.0 and reinstalled on bluefire. I
> run
> point_stat too and get error:
>
> *** Running POINT_STAT on WRF OUTPUT ***
> ***          UGRD                ***
> GSL_RNG_TYPE=mt19937
> GSL_RNG_SEED=1666342218
> Forecast File:
> /ptmp/lir/test/data/2009_t8_15km/verify_met2.0/gsi/wpp/2007081512/postprd/wrfprs_d01.000
> Climatology File: none
> Configuration File: ./config/PointStatConfig.UGRD
> Observation File:
> /ptmp/lir/test/data/2009_t8_15km/verify_met2.0/ob_nc/2007081512/ob.nc
>
> ----------------------------------------
>
> Reading records for UGRD/P1000.
> For UGRD/P1000 found 1 forecast levels and 0 climatology levels.
>
>
> ERROR: is_grid_relative() -> Unsupported grid type value: ^A
>
> I got this error last year and you gave me attached read_grib.cc. So I
> recompile using this read_grib.cc and point_stat works well now.
>
> I differ read_grib.cc in released METv2.0 with one that you attached to
> me,
> here is the difference:
>
> /ptmp/lir/wrf/METv2.0/lib/vx_met_util% diff read_grib.cc read_grib.cc.org
> 846,847c846
> <    init_ut = mdyhms_to_unix(r.pds->month, r.pds->day,
> <                             r.pds->year + (r.pds->century - 1)*100,
> ---
>>    init_ut = mdyhms_to_unix(r.pds->month, r.pds->day, r.pds->year +
>> 2000,
> 1314,1317d1312
> <    }
> <    // Mercator
> <    else if(r.gds->type == 1) {
> <       res_flag = r.gds->grid_type.mercator.res_flag;
>
> Just let you know it,
>
> Thanks,
> Ruifang
>
> On Wed, Jul 15, 2009 at 6:20 AM, John Halley Gotway
> <johnhg at rap.ucar.edu>wrote:
>
>> Ruifang,
>>
>> It was in METv2.0 that we added support for Mercator projections into
>> MET.
>>  And it looks like we missed a change we needed to make in one spot
>> that's
>> casing the error message you're seeing.  I'm
>> surprised we hadn't heard about this yet, but I don't think that the
>> Mercator projection is used very frequently.
>>
>> This bug has an easy fix, just adding a few lines to one file.  I'm
>> wondering though, what version of MET are you running?  That comment
>> "FUTURE
>> WORK: ADD SUPPORT FOR THE MERCATOR PROJECTION"
>> shouldn't exist anywhere in the METv2.0 source code.  It was in METv1.1.
>>
>> In order to use Mercator projection, you'll need to use METv2.0.  And to
>> fix this bug, you'll need to replace the file
>> "METv2.0/lib/vx_met_util/read_grid.cc" with the version that's attached.
>>  So
>> please try updating that file, rebuilding MET, and rerunning.  And
>> please
>> let me know if that fixes your problem.  If so, I'll post that fix to
>> the
>> MET website.
>>
>> Thanks for finding this issue.
>>
>> Thanks,
>> John
>>
>> Ruifang Li wrote:
>> > John,
>> > I get this error when I run point_stat tool:
>> >
>> > *** Running POINT_STAT on WRF OUTPUT ***
>> > ***          UGRD                ***
>> > GSL_RNG_TYPE=mt19937
>> > GSL_RNG_SEED=1666342218
>> > Forecast File:
>> >
>> /ptmp/lir/test/data/2009_t8_15km/verify_met2.0/gsi/wpp/2007081512/postprd/wrfprs_d01.000
>> > Climatology File: none
>> > Configuration File: ./config/PointStatConfig.UGRD
>> > Observation File:
>> > /ptmp/lir/test/data/2009_t8_15km/verify_met2.0/ob_nc/2007081512/ob.nc
>> >
>> > ----------------------------------------
>> >
>> > Reading records for UGRD/P1000.
>> > For UGRD/P1000 found 1 forecast levels and 0 climatology levels.
>> >
>> >
>> > ERROR: is_grid_relative() -> Unsupported grid type value: ^A
>> >
>> >
>> > But point_stat works well with TMP. I looked at code read_grib.cc and
>> found
>> > out
>> >
>> > // FUTURE WORK: ADD SUPPORT FOR THE MERCATOR PROJECTION
>> >
>> >    //
>> >    // Mercator Projection Grid
>> >    //
>> >
>> > else if(r.gds->type == 1) {
>> >
>> >       cerr << "\n\nERROR: read_gds() -> "
>> >            << "Mercator grid type " << (int) r.gds->type
>> >            << " not currently supported.\n\n"
>> >            << flush;
>> >       exit(1);
>> >    }
>> >
>> > My wrf forecast use Mercator projection, It looks like that I can not
>> do
>> U,
>> > V, WIND using MET2.0, right?
>> > Are there other ways that I can try?
>> >
>> > Thanks,
>> > Ruifang
>> >
>> >
>> > On Tue, Jul 14, 2009 at 10:18 AM, John Halley Gotway <
>> johnhg at rap.ucar.edu>wrote:
>> >
>> >> Ruifang,
>> >>
>> >> Sorry about that, I forgot the attachment.  It's attached now.
>> >>
>> >> You're right that you could use a polyline to define the masking
>> region
>> for
>> >> the observations you'd like to retain.  But to answer you question,
>> does
>> >> G181 = CAR.poly?  I'd say the answer is NO.
>> >>
>> >> Look in the file "METv2.0/data/poly/ncep_vx_regions.pdf", at the
>> region
>> >> marked "CAR".  I'm sure that doesn't line up exactly with NCEP Grid
>> 181,
>> >> although I can't find a plot of Grid 181 right now.
>> >>
>> >> You can do the masking with a grid or a polyline, whichever you
>> prefer.
>> >>
>> >> Thanks,
>> >> John
>> >>
>> >> Ruifang Li wrote:
>> >>> John,
>> >>> Thanks for quick reply.
>> >>> One more question, If I define these variables in the config file
>> >>>
>> >>> mask_grid=" "
>> >>> maks_poly="MET_BASE/data/poly/CAR.poly"
>> >>>
>> >>> Is it as same as
>> >>>
>> >>> mask_grid="G181 "
>> >>> maks_poly=" "
>> >>>
>> >>> By the way, I could not see your attached file.
>> >>>
>> >>> Thanks again,
>> >>> Ruifang
>> >>>
>> >>>
>> >>> On Tue, Jul 14, 2009 at 6:37 AM, John Halley Gotway <
>> johnhg at rap.ucar.edu
>> >>> wrote:
>> >>>
>> >>>> Hello,
>> >>>>
>> >>>> You raise a good point.  Here's the webpage from which we
>> originally
>> >>>> extracted the grid definitions:
>> >>>> http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html
>> >>>>
>> >>>> I see that the information on there was updated on 9/15/2008, and
>> that
>> >> the
>> >>>> changes are listed in red, including the addition of grid #181.
>> This
>> >> will
>> >>>> require some code changes to grab all of these
>> >>>> updated grid definitions.  In the meantime, I've modified the file
>> >>>> "METv2.0/lib/vx_data_grids/grid_defs.f" to add NCEP Grid 181 to the
>> list
>> >> of
>> >>>> definitions.  Please try replacing your original version
>> >>>> of the file with the attached one, and then recompile MET being
>> sure
>> to
>> >> do
>> >>>> a "make clean" first.  Please let me know if you have any troubles
>> using
>> >>>> grid #181 after recompiling.
>> >>>>
>> >>>> When I get a chance sometime over the next month, I'll update that
>> file
>> >>>> "METv2.0/lib/vx_data_grids/grid_defs.f" with all of the changes and
>> post
>> >> it
>> >>>> to the MET website.
>> >>>>
>> >>>> Thanks for raising this issue!
>> >>>>
>> >>>> John Halley Gotway
>> >>>> johnhg at ucar.edu
>> >>>>
>> >>>> Ruifang Li wrote:
>> >>>>> Hi, John,
>> >>>>> I have a question about  variable mask_grid = "G212" in the
>> default
>> >>>> config
>> >>>>> file of PB2NC. I tried to use mask_grid = "G181"
>> >>>>> for Caribean domain and it says:
>> >>>>> ERROR: process_config_file() -> the mask_grid requested "G181" is
>> not
>> >>>>> defined.
>> >>>>>
>> >>>>> But G212 does work.
>> >>>>>
>> >>>>> How to use mask_grid = "G181"
>> >>>>>
>> >>>>> Thanks,
>> >>>>>
>> >>>>>
>> >>>>>
>> >> ------------------------------------------------------------------------
>> >>>>> _______________________________________________
>> >>>>> Met_help mailing list
>> >>>>> Met_help at mailman.ucar.edu
>> >>>>> http://mailman.ucar.edu/mailman/listinfo/met_help
>> >>>
>> >>>
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Met_help mailing list
>> > Met_help at mailman.ucar.edu
>> > http://mailman.ucar.edu/mailman/listinfo/met_help
>>
>
>
>
> --
> Ruifang
>
> Mesoscale & Microscale Meteorology Division
> Phone: 303-497-8938
> Office:  FL3-3085
> Email:  lir at ucar.edu
>




More information about the Met_help mailing list