[gradsusr] extracting problem

Kishore Ragi kishoreragi at gmail.com
Tue Aug 29 08:12:48 EDT 2017


Hi,

You can use cdo to extract data from th large file.

use the following command

cdo selyear,2010,2011,2012,etc inputfile.nc outfile.nc

or if you want to stick to grads and want to extract few years, here are
the steps you should take

sdfopen yourfile.nc
set t x y
define var=var
set sdfwrite subset.nc
sdfwrite var

where x and y are initial and final timestep you want in your required
subset file.

This clearly shows that the former process is much easier. If I were you, I
would use cdo to accomplish as I am bit lazy.

Cheers,
Kishore


*PhD student in climate science,*

*National Institute of Technology, Rourkela,*

*India- 769008*





*Phone: +91-8908671881http://www.researchgate.net/profile/Kishore_Ragi
<http://www.researchgate.net/profile/Kishore_Ragi>https://in.linkedin.com/in/kishoreragi
<https://in.linkedin.com/in/kishoreragi>*

On Tue, Aug 29, 2017 at 5:24 PM, Sanjukta Rani Padhi <
sanjuktapadhi87 at gmail.com> wrote:

> Hi All,
> I am new in Grads. I want to know how to extract some years from a .nc
> file having some large no of years.
> thanks
>
> _______________________________________________
> 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/20170829/f8339c5b/attachment.html 


More information about the gradsusr mailing list