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.
Hello, I was just wondering if you could find obvious mistakes in below code that I read an NC file. Code: DO nc_S = 1, N_GC_SPC call nc_chk1_rd1(bg_ncid,GC_SPC(nc_s), chk1_CGRID, nc_s, nstep_nreps) ENDDO The subroutine is: 28 subroutine nc_chk1_rd1(chk_ncid, nc_data_name, chk1_data, N_ic, nstep_nreps) 29 30 use netcdf 31 use nc_adj_module 32 USE GRID_CONF 33 USE CGRID_SPCS 34 USE KPP_Integrator 35 36 implicit none 37 38 integer :: chk_ncid 39 character*16 nc_data_name 40 real, intent(out) :: chk1_data(:,:,:,:) 41 integer :: N_ic,nstep_nreps 42 integer :: start1(4), count1(4) 43 integer :: nc_data_varid 44 45 start1 = (/ 1, 1, 1, nstep_nreps /) 46 count1 = (/ NCOLS, NROWS, NLAYS, 1 /) 47 48 call nc_check( nf90_inq_varid(chk_ncid, nc_data_name, nc_data_varid)) 49 call nc_check( nf90_get_var(chk_ncid, nc_data_varid & 50 , chk1_data(:,:,:,N_ic), start1, count1 )) 51 52 endsubroutine nc_chk1_rd1 The program is running now, but I'm just afraid I can miss something in the code. I'm especially worring about the data transfer of the variable in red color. Please let me know if you think is okay. Any comments welcome! -- Cordially, Hongyan 鸿雁
netcdfgroup
archives: