thunderman Posted September 23, 2011 Share Posted September 23, 2011 I am working on a personal programming project to come up with a "best guess" on precipitation type that I can include on the web with my live weather station data. I am going to use live weather station data from my personal weather station and hourly RUC BUFKIT data for the thermal profile aloft. Unfortunately, BUFKIT data fields are dynamic in size, which makes it extremely difficult to read in using traditional FORTRAN format statements. I am thinking that I may have to use a PHP script to pull the data that I need from BUFKIT files and write them to another file that I can that i can easily give to a FORTRAN program. Example BUFKIT file for reference: ftp://ftp.meteo.psu.edu/pub/bufkit/RUC/00/ruc_woo.buf Thnaks in advance! Link to comment Share on other sites More sharing options...
dryslotted Posted September 23, 2011 Share Posted September 23, 2011 Just curious, why does it have to be FORTRAN? If you worked with a language that supported dynamic arrays or string serialization, you would not have this limitation...They stopped teaching FORTRAN by the time I got into the CS curriculum, so I honestly have no idea what is supported... Link to comment Share on other sites More sharing options...
thunderman Posted September 23, 2011 Author Share Posted September 23, 2011 It doesn't have to be FORTRAN, it's just what I am most comfortable with. I don't have that much experience using other languages for this kind of file processing, but somebody knows an easy way to do this in PHP or Ruby then i would be more than open to doing it that way. FORTRAN is still very much used in our field because it has been optimized for computational efficiency (i.e. weather models lol). I had to take a FORTRAN class and an IDL class as part of my required curriculum. IDL can handle the task above with no issues and in about 2 lines of code, but unfortunately it's not free Link to comment Share on other sites More sharing options...
Ed Lizard Posted September 23, 2011 Share Posted September 23, 2011 The smart red taggers don't do much OT posting*. I'd post your original post in the main weather forum. *Ellinwood is smart, but he hangs here trying to develop mod skills. He will be a mod someday. Link to comment Share on other sites More sharing options...
thunderman Posted September 23, 2011 Author Share Posted September 23, 2011 Yeah it would fit better over there, I just went here by default as I have gotten programming help from here before but it was never weather related so I posted it OT. Can a mod or admin move this to the general WX side so that I do not create double posts? Thanks! Link to comment Share on other sites More sharing options...
dryslotted Posted September 23, 2011 Share Posted September 23, 2011 It doesn't have to be FORTRAN, it's just what I am most comfortable with. I don't have that much experience using other languages for this kind of file processing, but somebody knows an easy way to do this in PHP or Ruby then i would be more than open to doing it that way. FORTRAN is still very much used in our field because it has been optimized for computational efficiency (i.e. weather models lol). I had to take a FORTRAN class and an IDL class as part of my required curriculum. IDL can handle the task above with no issues and in about 2 lines of code, but unfortunately it's not free I haven't worked with BUFKIT data personally, and I am blocked from the FTP sites at work, but this page below may help if you have some skills with PHP. It is documentation, but there is some good member contributed sample code for different file types and circumstances as well. If I have time to look at this tonight, I will update (unless someone swoops in with a better answer)... http://php.net/manual/en/function.file.php Link to comment Share on other sites More sharing options...
thunderman Posted September 23, 2011 Author Share Posted September 23, 2011 I think i may have found a work around for this using Ruby. I'll post back for sure later tonight if it works and will include the script to do it in case anyone else needs to do this in the future. Stay tuned... Link to comment Share on other sites More sharing options...
baroclinic_instability Posted September 23, 2011 Share Posted September 23, 2011 Yeah it would fit better over there, I just went here by default as I have gotten programming help from here before but it was never weather related so I posted it OT. Can a mod or admin move this to the general WX side so that I do not create double posts? Thanks! Moved, I was wondering why this as in OT. Link to comment Share on other sites More sharing options...
thunderman Posted September 23, 2011 Author Share Posted September 23, 2011 Moved, I was wondering why this as in OT. Thanks! Link to comment Share on other sites More sharing options...
heavy_wx Posted September 24, 2011 Share Posted September 24, 2011 I wrote a java program that reads BUFKIT profile data and creates a 3d array with time, height and field as the dimensions. It was pretty straightforward, just a matter of parsing the text from the bufkit file into the array. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.