Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

[netcdfgroup] How to define "count"?

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 do

I 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
  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: