NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
You would need to have start = (/ 1, 1, 1, is, it/) Or just write the whole thing and eliminate is: do it = 1,tstep count = (/NCOLS, NROWS, NLAYS, Nspecies, 1/) start = (/ 1, 1, 1, 1, it/) call nc_check(nf90_put_var( & chk_ncid, & nc_data_varid, & data, & start=start, & count=count ) ) end doIs there a reason not to split the Nspecies into separate variables, each with dims of (Ncols,Nrows,Nlays) (except for being more work to set up)? The separate data become more accessible that way.
-- Ted On Jul 29, 2009, at 3:58 PM, H.Dang wrote:
Hello~I need to write a portion of data to a netCDF file after every timestep. The code that I write is like this:real data(Ncols,Nrows,Nlays,Nspecies) integer :: start(5),count(5) do it = 1,tstep do is = 7,Nspecies count = (/NCOLS, NROWS, NLAYS, 1, 1/) start = (/ 1, 1, 1, 1, it/) call nc_check(nf90_put_var( & chk_ncid, & nc_data_varid, & data(:,:,:,is), & start=start, & count=count ) ) end do end doI was just wondering how should I set "count", is "count = (/NCOLS, NROWS, NLAYS, 1, 1/)" okay or not? especially the last two entries, can I set them both as "1"?Thank you! -- Cordially, Hongyan _______________________________________________ netcdfgroup mailing list netcdfgroup@xxxxxxxxxxxxxxxx For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
netcdfgroup
archives: