[gradsusr] gxout print

Jeff Lake admin at michiganwxsystem.com
Thu Dec 6 07:45:01 EST 2012


Jeff,
Thanks for the assistance on this, I decided to stay the way I was going
and modified the mySQL query I was using and came up with 9,500 data points
across the CONUS instead of 75,000.
The resulting calculations only takes 1.5 minutes for the entire model run.
If I wasn't under a project deadline, I would keep hammering at the 
GrADS ASCII method.
Maybe after I get this project launched, I'll come back and try to 
figure out what it was I had wrong.

I was still getting no output either to the terminal or to the text file

-Jeff Lake
MichiganWxSystem.com
AllisonHouse.com
TheWeatherCenter.net
GRLevelXStuff.com

On 12/4/2012 22:07, Jeff Duda wrote:
> Alright, I think I see one problem with your Grads code.  set prnopts 
> is only effective when gxout print is used.  When you use gxout 
> fwrite, your data are being written to a binary file called dls.txt 
> rather than an ascii file called dls.txt.  Try changing the graphics 
> output to print and see if you get the results you are looking for.
>
> Jeff
>
> On Tue, Dec 4, 2012 at 8:41 PM, Jeff Lake <admin at michiganwxsystem.com 
> <mailto:admin at michiganwxsystem.com>> wrote:
>
>     here is what is in my template
>
>     'open rap_mesoan.bin.ctl'
>
>
>     'define u900=ugrdprs(lev=900)'
>     'define u500=ugrdprs(lev=500)'
>
>     'define v900=vgrdprs(lev=900)'
>     'define v500=vgrdprs(lev=500)'
>
>     'define dls = mag(abs(u500-ugrd10m),abs(v500-vgrd10m))'
>     'define lls = mag(abs(u900-ugrd10m),abs(v900-vgrd10m))'
>
>
>
>     'clear'
>     'set gxout fwrite'
>     'set prnopts %g 1 8'
>     'set fwrite dls.txt'
>     'd dls'
>
>
>
>     -Jeff Lake
>     MichiganWxSystem.com
>     AllisonHouse.com
>     TheWeatherCenter.net
>     GRLevelXStuff.com
>
>     On 12/4/2012 21:15, Jeff Duda wrote:
>>     So where in this series of steps does the Grads part fit in?
>>      What fields are you trying to print to a file?
>>
>>     Jeff
>>
>>     On Tue, Dec 4, 2012 at 6:57 PM, Jeff Lake
>>     <admin at michiganwxsystem.com <mailto:admin at michiganwxsystem.com>>
>>     wrote:
>>
>>         Jeff,
>>         I'll explain what I'm doing now, and my hopes further on..
>>         as of now..
>>         I am using wgrib2 to extract 4 perimeter's from the 13km RAP
>>         and dump to csv
>>         I then import to MySQL, and utilize php to run severe
>>         formula's to give me the bulk shear at 0-1 km and 0-6km
>>         problem is .. using php its painfully slow (75,000 data
>>         points ~12minutes)
>>         Was hoping I could get GrADS to do the calculations for me
>>         and output the final to csv or text
>>
>>         -Jeff Lake
>>         MichiganWxSystem.com
>>         AllisonHouse.com
>>         TheWeatherCenter.net
>>         GRLevelXStuff.com
>>
>>         On 12/4/2012 19:04, Jeff Duda wrote:
>>>         Jeff,
>>>         fprintf.gs <http://fprintf.gs> can be found here:
>>>         http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file
>>>
>>>         What data are you using?  Are you sure the data array itself
>>>         is not undefined values or all zeros?
>>>
>>>         Jeff
>>>
>>>         On Tue, Dec 4, 2012 at 5:45 PM, Jeff Lake
>>>         <admin at michiganwxsystem.com
>>>         <mailto:admin at michiganwxsystem.com>> wrote:
>>>
>>>             I am getting zero output .. except .
>>>
>>>             Config: v2.0.2 little-endian readline printim grib2
>>>             netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile
>>>             Issue 'q config' command for more detailed configuration
>>>             information
>>>             GX Package Initialization: Size = 11 8.5
>>>             Running in Batch mode
>>>             Command line history in /usr/local/ldm/.grads.log
>>>             Notice: Implied interpolation for file rap_mesoan.bin.ctl
>>>              Interpolation will be performed on any data displayed
>>>             from this file
>>>             Warning from LOG:  Data has 62765 values <= zero
>>>                                These were set to the undefined value
>>>             No hardcopy metafile open
>>>             GX package terminated
>>>
>>>
>>>             fprintf.gs <http://fprintf.gs> ??
>>>
>>>             -Jeff Lake
>>>             MichiganWxSystem.com
>>>             AllisonHouse.com
>>>             TheWeatherCenter.net
>>>             GRLevelXStuff.com
>>>
>>>             On 12/4/2012 10:04, Jeff Duda wrote:
>>>>             What's going wrong with it?
>>>>
>>>>             I usually use fprintf.gs <http://fprintf.gs> when I
>>>>             want to write to a text file.
>>>>
>>>>             Jeff Duda
>>>>
>>>>             On Tue, Dec 4, 2012 at 8:29 AM, Jeff Lake
>>>>             <admin at michiganwxsystem.com
>>>>             <mailto:admin at michiganwxsystem.com>> wrote:
>>>>
>>>>                 Greetings,
>>>>                 I have been trying, unsuccessfully, to write an
>>>>                 ascii file ..
>>>>                 here is what I have in the template
>>>>
>>>>                 'clear'
>>>>                 'set mpproj latlon'
>>>>                 'set gxout print'
>>>>                 'set prnopts %g 8 1'
>>>>                 'set sdfwrite dls_XXX.txt'
>>>>                 'd dls'
>>>>
>>>>                 This is my first attempt at writing to an ascii file ..
>>>>                 so any pointers would be appreciated
>>>>                 using 2.0.2
>>>>
>>>>                 -- 
>>>>                 -Jeff Lake
>>>>                 MichiganWxSystem.com
>>>>                 AllisonHouse.com
>>>>                 TheWeatherCenter.net
>>>>                 GRLevelXStuff.com
>>>>
>>>>
>>>>                 _______________________________________________
>>>>                 gradsusr mailing list
>>>>                 gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>>>                 http://gradsusr.org/mailman/listinfo/gradsusr
>>>>
>>>>
>>>>
>>>>
>>>>             -- 
>>>>             Jeff Duda
>>>>             Graduate research assistant
>>>>             University of Oklahoma School of Meteorology
>>>>             Center for Analysis and Prediction of Storms
>>>>
>>>>
>>>>
>>>>             _______________________________________________
>>>>             gradsusr mailing list
>>>>             gradsusr at gradsusr.org  <mailto:gradsusr at gradsusr.org>
>>>>             http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>>             _______________________________________________
>>>             gradsusr mailing list
>>>             gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>>             http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>>
>>>
>>>         -- 
>>>         Jeff Duda
>>>         Graduate research assistant
>>>         University of Oklahoma School of Meteorology
>>>         Center for Analysis and Prediction of Storms
>>>
>>>
>>>
>>>         _______________________________________________
>>>         gradsusr mailing list
>>>         gradsusr at gradsusr.org  <mailto:gradsusr at gradsusr.org>
>>>         http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>>         _______________________________________________
>>         gradsusr mailing list
>>         gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>>         http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>>
>>
>>     -- 
>>     Jeff Duda
>>     Graduate research assistant
>>     University of Oklahoma School of Meteorology
>>     Center for Analysis and Prediction of Storms
>>
>>
>>
>>     _______________________________________________
>>     gradsusr mailing list
>>     gradsusr at gradsusr.org  <mailto:gradsusr at gradsusr.org>
>>     http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>     _______________________________________________
>     gradsusr mailing list
>     gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>     http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
>
> -- 
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20121206/101e4cc6/attachment-0003.html 


More information about the gradsusr mailing list