massive tarred grib files totally unacceptable


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers massive tarred grib files totally unacceptable
# 1  
Old 11-09-2010
massive tarred grib files totally unacceptable

Hi, I have 7 terabytes of tar files, one for every single day since 1980. Inside these tar files are GRIB files, each with 100+ variables. There's 8 GRIBs in each tar, corresponding to different times of the day. I need 6 friggin variables..., and it takes TWO WEEKS TO EXTRACT ALL THE TAR FILES (because I need those 6 variables for EVERYDAY). This is not cool. This is VERY not cool. Since the tar files aren't even compressed, I'm convinced there's a way to get the data without even extracting, even if everybody refuses to give up the info...

BUT... as a compromise, is it possible for me to extract ONLY those 6 variables I need and not EVERYTHING, only just to throw it away later? I'm basically wasting 2 weeks on this

(Disclaimer: I'm aware that this could've been solved BEFOREHAND, but my bosses don't have that kind of foresight..., and I'm not getting paid by the hour just to watch the program run for 2 weeks)
# 2  
Old 11-09-2010
1. Extract the all data you need just one time, and store it in a file.
2. If you run 14 simultaneous processes it will take just one day.
3. The format of tar is an established standard. Nobody is hiding it from you.
google for 'gnu coreutils' and download the source code. In the tarball is the source for tar itself.

The problem is this:
tar stands for 'tape archive'. To get to file #99 in a tar file you have to actually completely read though files 1 -> 98 first. There is no file metadata like on a hard drive that allows direct access. The same applies once you get to the file you want. You have to read thru the file itself until you get to a given record. You cannot "fast forward" to a given record or a given file.

Modify the program to run in as many separate processes as is possible on your system without overloading it. Each process opens one tar file, gets one data set, writes the "variables" to disk or even better to a database table.

So, you now have the six values for every day. And in one small file.

Do you know how to extract a given file? What command are you using to get the grib file from a tarball?
# 3  
Old 11-10-2010
Is the only contents of each tar archive the 8 GRIB files, or are there archive files to ignore ? I'm fishing for whether your script extracts files which you do not need to process.
# 4  
Old 03-21-2011
How to extract data from grib file

Hi,
I have downloaded the data from IPCC global weather data. How to extract the data for El Salvador region from the whole set of data and how to open the data or convert the data into a normal text file data or some other format.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Attach filename to wc results on massive number of files

Hello, I have massive number of big files that needed to be counted for the total number of lines (> 100x millions) each. I want the file name attached to the count results so that they are aligned nicely matching name and counts. I could do each file at a time, which will take hours to finish,... (8 Replies)
Discussion started by: yifangt
8 Replies

2. Shell Programming and Scripting

Totally new to shell scripting

lllll (34 Replies)
Discussion started by: risarose87
34 Replies

3. UNIX for Dummies Questions & Answers

Help with untarring multiple files from tarred directories and subdirectories

Hi, I want to untar all log files from following tarred directory hierarchy Log_files.tar.gz/subject*.tar.gz/project*/*.log It means there are subject1.tar.gz to subject9.tar.gz and in those tarred subect directories there are project1 - project5 directories and in those directories there... (2 Replies)
Discussion started by: rv_trojan
2 Replies

4. UNIX for Dummies Questions & Answers

Tarred files not being put on tape

Hi I normally backup to tape using the following command in Solaris 9 on SUN Enterprise 3500 server: tar cvf /dev/rmt/0n data but after a power cut, the server went down without being shutdown since the UPS failed. Now when I issue the tar command I get the root (/) being full looks like it... (6 Replies)
Discussion started by: rahmantanko
6 Replies

5. Shell Programming and Scripting

bash script for selecting grib files with cdo

hi, i am new with scripts and have a little problem. i have a file with dates in the form YYYYMMDD, in average about 40 days per year. now i shall cut those days with cdo selday from monthly files. the script shall look up the days, forward them to the cdo operator and write the new grib... (1 Reply)
Discussion started by: jumkae
1 Replies

6. UNIX for Dummies Questions & Answers

Totally brand new to CRON

hi there i am very new to the world of CRON. i would like to know from below the ground up how i can learn abouot cron. where the best tutorials lie. i have an assignment that requires i set up a cron job to download a price file. am i in control of where the price file is downloaded to? (eg to... (2 Replies)
Discussion started by: buzzby
2 Replies

7. AIX

Totally messed up

I have moved the etc/passwd file and we are now unable to get in to Unix - any suggestions? (2 Replies)
Discussion started by: vbagwell
2 Replies

8. UNIX for Dummies Questions & Answers

totally new to unix

I'm trying to write a script, named "worfo" which will read a file in and return, on the screen, the number of words in the file. Also, I am looking to do several extras with this script. I need to allow it to accept the option "-n" which will use all non-alpha characters to delimit words. Also,... (2 Replies)
Discussion started by: adawg1283
2 Replies

9. UNIX for Dummies Questions & Answers

Totally new unix user

Hi, ive just been given a HP UX c180 to play with, along with a few external hd`s, can anyone recommend me a good place to start learning unix please as i havent got a clue what im doing when it comes to unix. Either web links or book recomendations would be great. I would like to set it up with... (1 Reply)
Discussion started by: Leviathan40
1 Replies
Login or Register to Ask a Question