9 use ncdc_data_mpi,
only: nc_diag_cat_data_pass, nc_diag_cat_data_commit
18 use netcdf,
only: nf90_inq_libvers, nf90_create, nf90_close, &
19 nf90_netcdf4, nf90_clobber
28 character(len=300) :: info_str
30 real(r_double) :: start_time, stop_time
41 call mpi_comm_rank(mpi_comm_world, cur_proc, ierr)
44 call mpi_comm_size(mpi_comm_world, num_procs, ierr)
47 call ncdc_error(
"At least 2 processors are required to use MPI features.")
50 call ncdc_warning(
"3 processors or more is needed to best use MPI features.")
53 call ncdc_info(
"Using MPI for faster concatenation.")
56 call ncdc_info(
'Initializing netcdf layer library, version ' // trim(nf90_inq_libvers()) //
'...')
67 if (cur_proc == 0)
then 76 call cpu_time(start_time)
78 call cpu_time(stop_time)
80 write (info_str,
"(A, F0.3, A)")
"Metadata read took ", stop_time - start_time,
" seconds!" 84 if (cur_proc == 0)
then 89 print *,
"MAIN: trigger data pass!" 92 call cpu_time(start_time)
94 call cpu_time(stop_time)
96 write (info_str,
"(A, F0.3, A)")
"Data preallocation took ", stop_time - start_time,
" seconds!" 102 call cpu_time(start_time)
104 call cpu_time(stop_time)
106 write (info_str,
"(A, F0.3, A)")
"Data read took ", stop_time - start_time,
" seconds!" 110 if (cur_proc == 0)
then 112 call cpu_time(start_time)
114 call cpu_time(stop_time)
116 write (info_str,
"(A, F0.3, A)")
"Data commit took ", stop_time - start_time,
" seconds!" 123 call ncdc_info(
"All data queued, letting NetCDF take over (and actually write)!")
125 call cpu_time(start_time)
127 call cpu_time(stop_time)
129 write (info_str,
"(A, F0.3, A)")
"Final data write took ", stop_time - start_time,
" seconds!" 134 call mpi_finalize(ierr)
character(len=10000000) output_file
subroutine nc_diag_cat_process_args
integer(i_long) ncid_output
subroutine ncdc_error(err)
subroutine ncdc_info(ifo)
subroutine ncdc_warning(warn)
subroutine ncdc_check(status)
subroutine nc_diag_cat_data_commit
integer, parameter, public r_double
subroutine nc_diag_cat_data_pass