OK...never mind about the last problem...my apologies for bothering you. I got PCP_Combine to run, but there is definitely something wrong with the copygb-converted GRIB file, because I am not getting all of the northern hemisphere when I use NCView to look at the resulting .nc file...it should produce a 91 by 360 pole-centered grid...instead it produces a 65X65 square centered on Italy (roughly) that only reveals most of Europe and north Africa (and the Middle East).<br>
<br>The precip data looks odd too...3-hourly values with little areas of 5+ inches...hard to fathom that.<br><br><div><span class="gmail_quote">On 3/15/10, <b class="gmail_sendername">Matthew Souders</b> <<a href="mailto:matt.souders@gmail.com">matt.souders@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
I'm probably missing something ridiculously obvious, but I am trying to run a quick experiment using a GFS .grb file I acquired today. I ran the copygb utility on grid 003 GFS global domain (gave it the following command: copygb -xg 27 gfs_3_20100313_0000_003.grb gfs_27_20100313_0000_003.grb), and that may or may have worked properly (it produced a file, but the size of that file was an order of magnitude smaller...which I don't think is right...and it gave me a handful of messages about remaining memory being allocated to some file called polatev0.f)...but I decided to see what it looked like by running the PCP_Combine utility...I got into the METv2.0 main directory and issued this command:<br>
<br>bin/pcp_combine \ -sum 20100313_030000 3 20100313_030000 3 \ <a href="http://test_ncfile_gfs.nc" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">test_ncfile_gfs.nc</a><br><br>I only have a single time step in my .grb, so all this should do is add up one time step and re-output the data in .nc format.<br>
<br>It's giving me this error though:<br><br>ERROR: process_sum_args() -> The init_time and valid_time command line arguments must be in the form YYYYMMDD_HHMMSS<br><br>What confuses me...is that my arguments ARE in that format. Not sure why it's giving me that error. Any ideas?<div>
<span class="e" id="q_12763c7ef97065fe_1"><br><br><div><span class="gmail_quote">On 3/12/10, <b class="gmail_sendername">John Halley Gotway</b> <<a href="mailto:johnhg@ucar.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">johnhg@ucar.edu</a>> wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
Matt,<br><br> Yeah, polar stereographic is fine. Actually, *northern* polar stereographic is currently supported in MET - not southern yet for some reason. You just need to figure out what to put in the NetCDF<br> header to define it. If you can get your hands on a GRIB file, you could run it through the copygb tool to interpolate it a polar stereographic projection. Then run it through the PCP-Combine tool<br>
(the operation you do with PCP-Combine doesn't really matter). And then look at the NetCDF output file.<br><br> Just let me know if you get stuck anywhere.<br><br><br> John<br><br><br> Matthew Souders wrote:<br> > Boy...it seems like no matter what alley I drive down, there's an acme anvil<br>
> rigged to fall on my head. I should change my last name to Coyote.<br> ><br> > In all seriousness, I do appreciate you going through the various tools and<br> > ideas with me...at this point...I am thinking it would be a less painful<br>
> task to change map projection of my data BEFORE I try to create the netCDF<br> > than it would be to convert it later. I al going to have to write some kind<br> > of MATLAB script to convert every piece of data I have to a projection I can<br>
> use...at which point I can then convert to netCDF and read the thing into<br> > MODE, I assume? Will MODE recognize a netCDF file in a polar stereographic<br> > projection?<br> ><br> > On 3/12/10, John Halley Gotway <<a href="mailto:johnhg@ucar.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">johnhg@ucar.edu</a>> wrote:<br>
>> Matt,<br> >><br> >> Here's a link regarding that:<br> >> <a href="http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#grib" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#grib</a><br>
>><br> >> Converting GRIB to NetCDF is pretty easy. The tool "ncl_convert2nc" does<br> >> it for you. Going the other way is much more difficult. And really, I've<br> >> never done it before.<br>
>><br> >><br> >> John<br> >><br> >> Matthew Souders wrote:<br> >>> Unfortunately, I have not used NCL before. Given my time limmitations in<br> >>> completely this analysis, I am thinking that will be<br>
>> impractical. regular<br> >>> lat/lon doesn't really work because I have to split the grid in half and<br> >>> then track objects that straddle the divide somehow...which causes lots<br> >> of<br>
>>> problems. There is software out there that can convert a netCDF to a<br> >> GRIB,<br> >>> isn't there? I seem to recall that being out there in some form.<br> >>><br> >>> On 3/12/10, John Halley Gotway <<a href="mailto:johnhg@ucar.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">johnhg@ucar.edu</a>> wrote:<br>
>>>> Matt,<br> >>>><br> >>>> There is no general tool for regridding NetCDF files from one grid to<br> >>>> another. You may be able to write an NCL (NCAR Command Language) script<br>
>> to<br> >>>> do so, but there's a learning curve if you haven't<br> >>>> used NCL before.<br> >>>><br> >>>><br> >>>> John<br> >>>><br>
>>>><br> >>>> Matthew Souders wrote:<br> >>>>> One reason I started down the long and scary road of trying to create<br> >>>> GRIB<br> >>>>> files was to gain access to the copygb utility in order to convert my<br>
>>>>> regular lat/lon grid to polar stereographic without too much<br> >>>> hardship. Is<br> >>>>> there a way to convert a netCDF file in regular lat/lon to polar<br> >>>>> stereographic simply?<br>
>>>>><br> >>>>> It does seem like using netCDF is a better way to go...I believe even<br> >>>> MATLAB<br> >>>>> (my main dta interface tool) has a netCDF writer...it definitely has<br>
>> (and<br> >>>> I<br> >>>>> use) a netCDF reader. But I need to figure out how to change map<br> >>>>> projections and how exactly to set up the netCDF file so that MODE can<br>
>>>>> understand it.<br> >>>>><br> >>>>> I will take a look at the output from P2P_Combine...that file<br> >> definitely<br> >>>>> created successfully when I ran the test script...I can see it in my<br>
>>>>> directory.<br> >>>>><br> >>>>> On 3/12/10, John Halley Gotway <<a href="mailto:johnhg@ucar.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">johnhg@ucar.edu</a>> wrote:<br>
>>>>>> Matt,<br> >>>>>><br> >>>>>> Creating a GRIB file is a rather ambitious task I have never actually<br> >>>> done<br> >>>>>> myself. If I were in your position, I'd actually reformat your binary<br>
>>>> data<br> >>>>>> into a NetCDF file that looks like the output of<br> >>>>>> the PCP-Combine tool. MODE can read either GRIB data or the NetCDF<br> >>>> output<br>
>>>>>> of PCP-Combine. There are a lot more utilities out there for writing<br> >>>> NetCDF<br> >>>>>> files than there are for writing GRIB files.<br> >>>>>><br>
>>>>>> Use the "ncdump" utility to view the NetCDF output from PCP-Combine in<br> >>>> the<br> >>>>>> "METv2.0/out/pcp_combine" directory. These files are created when you<br>
>>>> run<br> >>>>>> the test script included with MET. And just<br> >>>>>> mimick the file structure with your data.<br> >>>>>><br> >>>>>> If you choose to go that route, you'll probably need some help<br>
>> choosing<br> >>>> the<br> >>>>>> variable name and setting up the grid definition information in NetCDF<br> >>>>>> header. We're working on expanding our support for<br>
>>>>>> NetCDF files for the next release of MET. They're a lot easier to<br> >> work<br> >>>>>> with than GRIB files are.<br> >>>>>><br> >>>>>> Let me know how you plan to proceed and what other questions you have.<br>
>>>>>><br> >>>>>> Thanks,<br> >>>>>><br> >>>>>> John<br> >>>>>><br> >>>>>><br> >>>>>> Matthew Souders wrote:<br>
>>>>>>> Hello John,<br> >>>>>>><br> >>>>>>> This is Matthew Souders (Stony Brook University) - I apologize for<br> >>>> taking<br> >>>>>> up<br>
>>>>>>> a bit more of your time, but I am running into some trouble getting<br> >>>> data<br> >>>>>>> read into MODE for which I thought you might have a solution on hand<br>
>> to<br> >>>>>>> help. My basic data is a single variable on a 2.5 by 2.5 degree<br> >>>> regular<br> >>>>>>> lat/lon grid in fortran direct access BINARY format. I have been<br>
>>>> trying<br> >>>>>> to<br> >>>>>>> get it intelligibly read into GRIB format (the form MODE needs) for a<br> >>>>>> month<br> >>>>>>> now using Wesley Ebusizaki's gribw utility; however, you need a<br>
>> rather<br> >>>>>>> significant background in C scripting to rewrite his basic code and<br> >>>> make<br> >>>>>>> proper use of the PDS file writer. As I understand it...MODE needs<br>
>>>> this<br> >>>>>> PDS<br> >>>>>>> file to operate properly. I can create a GRIB using the default PDS<br> >>>>>> file,<br> >>>>>>> but that doesn't accurately describe the data in the GRIB.<br>
>>>>>>><br> >>>>>>> I tried e-mail Wesley on this matter but he is understandably<br> >> extremely<br> >>>>>> busy<br> >>>>>>> and limits support to installation and debugging issues. He<br>
>> basically<br> >>>>>> just<br> >>>>>>> directed me to the GRIB standard release. I was wondering if you had<br> >>>> any<br> >>>>>>> experience getting binary data read into MODE or if you knew someone<br>
>>>> who<br> >>>>>>> might be able to help?<br> >>>>>>><br> >>>>>>> I also would like to know how exactly the MODE tool uses the PDS<br> >>>> file? I<br>
>>>>>>> ask because I am trying to figure out how picky it is w/r/t what is<br> >> in<br> >>>>>> the<br> >>>>>>> PDS file vs. what is in the actual GRIB file.<br>
>>>>>>><br> >>>>>>> Thanks in advance for your time.<br> >>>>>>><br> >>>>>>> Matt Souders.<br> >>>>>>><br> ><br>
</blockquote></div><br></span></div></blockquote></div><br>