[gradsusr] Lats4d file convert limit

Arlindo da Silva dasilva at alum.mit.edu
Tue Apr 26 20:51:40 EDT 2011


On Tue, Apr 26, 2011 at 12:28 PM, Reena Patel <reenarp at gmail.com> wrote:

> Hello:
>
> I am trying to use lats4d to convert grib files to hdf format. I have
> a total of 99 files that need to be converted. I have attached the
> script I am using for conversion. Lats4d converts 31 files and exits.
> I restart from 32, and it converts the next 31 files. Is there a limit
> to the number of files it can convert at one time before restarting?
>
>
You are better off using lats4d.sh in a shell script for this; see attached.

    Arlindo

PS: On linux/unix/mac os x, enter "bash convert.sh"
      On windows, enter "bash convert.sh"; also make sure lats4d.sh is
      on your path.

---
#!/bin/bash
# Converts 99 files to hdf4 using lats4d.sh.
maxcount=99
count=1
while [ $count -le $maxcount ]; do
   printf -v cmd "lats4d.sh -i test%02d.ctl -format hdf4 -o hdf/test%02d"
$count $count
   $cmd
   count=$[$count+1]
done

-- 
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110426/0b89c4b8/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: convert.sh
Type: application/x-sh
Size: 234 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20110426/0b89c4b8/attachment-0003.sh 


More information about the gradsusr mailing list