[gradsusr] Convert multiple data to netcdf fromat

Jayakrishnan P.R prjayakrishnan at gmail.com
Tue Mar 17 23:49:56 EDT 2015


It is in Linux.....You have to save it in .sh form as file.sh. Then give
permission to the file in the terminal as chmod 777 file.sh. Then you can
run the file as ./file.sh. It will convert all the files one by one as a
batch file job.

Sincerely
***********************************************
Jayakrishnan.P.R
Project Scientist-C
National Centre for Medium Range Weather Forecasting
Earth System Science Organisation
Ministry of Earth Sciences
A-50, Sector 62, NOIDA -201 309, INDIA
Mob: 09496026547
Alternate Email: jkrishna at ncmrwf.gov.in

***********************************************

On Wed, Mar 18, 2015 at 12:23 AM, Tamara Maass <tmaass at uc.cl> wrote:

> Thank you so much for your answer.
>
> Is this script for Linux or i can do it on windows? I have to save it in
> .gs?
>
> Thank you
>
> Tamara
>
>
> 2015-03-17 0:47 GMT-04:00 Jayakrishnan P.R <prjayakrishnan at gmail.com>:
>
> You have to write a shell script for this thing. First of all the input
>> data or input folder should be in the name order like file1.ctl, file2.ctl
>> etc file n.ctl. Then you can convert the file by writing a for loop as below
>>
>> for i in {1..9};
>> do
>>
>> lats4d -i pratesfc$i.ctl -mxtimes 1220 -lat -37.33 -35.42 -lon -73.5
>> -69.75 -format netcdf -o pratesfc2$i
>> echo Converting file #######
>> done
>>
>>
>> Where pratesfc$i.ctl is the input file and it should be as pratesfc1.ctl,
>> pratesfc2.ctl etc so that we can read it using a for loop and convert
>> multiple files.
>>
>>
>>
>>
>> Sincerely
>> ***********************************************
>> Jayakrishnan.P.R
>> Project Scientist-C
>> National Centre for Medium Range Weather Forecasting
>> Earth System Science Organisation
>> Ministry of Earth Sciences
>> A-50, Sector 62, NOIDA -201 309, INDIA
>> Mob: 09496026547
>> Alternate Email: jkrishna at ncmrwf.gov.in
>>
>> ***********************************************
>>
>> On Mon, Mar 16, 2015 at 6:08 PM, Tamara Maass <tmaass at uc.cl> wrote:
>>
>>> Dear All,
>>>
>>>
>>> Could someone kindly assist, this is my first time using GRADS and GRIB
>>> data.
>>>
>>>
>>> I have multiple data in grib2 and I am trying to convert them in netcdf
>>> format. I am using Lats4d, I write this line and it´s work fine:
>>>
>>> *lats4d -i pratesfc.ctl -mxtimes 1220 -lat -37.33 -35.42 -lon -73.5 -69.75 -format netcdf -o pratesfc2*
>>>
>>> But i need to do it for many data. How can I do it? Can i do it from the
>>> command windows? I need to create a script?
>>>
>>>
>>> Any help greatly appreciated
>>>
>>>
>>> (I'm using the OpenGrADS grads-2.0.2.oga.2 superpack on Windows 7)
>>>
>>>
>>> Thanks & Regards,
>>>
>>>
>>>
>>> Tamara
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
> _______________________________________________
> 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/20150318/2a47e1a8/attachment.html 


More information about the gradsusr mailing list