Hi Fereshteh, > i have one netCDF file which includes different variables: level,long, lat, > time and *Temp*. *Temp* is 4 dimensions (192*92*1*1460) in 1460 time steps > which include one year data *(365 (day)*4(time in day)=1460).* now i want > to separate this netCDF file to 12 months. > > Would you please guide me how i can do this. If there is any way such as > any m file i become appreciate to receive it. You can probably find a way to do this by scripting existing netCDF utility programs from one of these freely available software packages: NCO (netCDF Operators) http://nco.sourceforge.net/ NCL (NCAR Command Language) http://www.ncl.ucar.edu/ CDO (Climate Data Operators) https://code.zmaw.de/projects/cdo If you know Python, another software package with sophisticated built-in time handling for climate data is: netcdf4-python http://code.google.com/p/netcdf4-python/ It's also possible to do what you want with netCDF library calls in a C or Fortran program, but I think using one of the packages above would be simpler. These packages support more sophisticated analysis capabilities than the netCDF I/O libraries or the basic netCDF utilities (ncdump, nccopy, ncgen), so learning about one of them would be useful in future analyses of netCDF data ... Also these software packages have helpful online forums or mailing lists. Some other user may have already done something similar to what you want to do. For example: NCO Help Forum: https://sourceforge.net/p/nco/discussion/9830 NCL mailing lists: http://www.ncl.ucar.edu/Support/email_lists.shtml Good luck in finding a simple way to split your yearly file into monthly files ... --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: RKE-155992 Department: Support netCDF Priority: Normal Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.