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

shyno susan john shynosusanjohn1994 at gmail.com
Fri Mar 9 10:25:10 CET 2018


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]]



More information about the R-help mailing list