For Extracting gridded netcdf data into output files where each file representing the individual grid

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

For Extracting gridded netcdf data into output files where each file representing the individual grid

shyno susan john
Hi,

I have to calculate Extemes, for that I wrote a script for extracting IMD
Tmax data for one year. I need to get output files where each file
representing the individual grid with daily values.Since, my data is of
0.5*0.5 resolution, I need to get 3721(61*61=3721) output files. But, I am
only getting 3482 output files.

I think the problem is with naming the output files using paste command,

The loop part I had done is as follows:

 for (i in 1:length(ny)){

  for (j in 1:length(nx)){

        for (l in 1:365){


write.csv(list(t_array[i,j,]),paste(i,j,".csv",sep=""),row.names=T)
      }}}

I am looking forward for your suggestions......

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.