24 module fms_netcdf_domain_io_mod
36 integer,
parameter :: no_domain_decomposed_dimension = 0
37 integer,
parameter,
public :: max_num_domain_decomposed_dims = 10
38 integer,
parameter :: variable_not_found = 0
39 integer,
parameter :: default_domain_position = center
40 character(len=16),
parameter :: domain_pos_att =
"domain_position"
41 character(len=16),
parameter :: domain_axis_att_name =
"domain_axis"
42 character(len=16),
parameter :: x =
"x"
43 character(len=16),
parameter :: y =
"y"
50 character(len=nf90_max_name) :: varname
67 character(len=FMS_PATH_LEN) :: non_mangled_path
68 logical :: adjust_indices
120 character(len=*),
intent(in) :: name_
122 integer,
intent(in) :: size_
127 index_ = variable_not_found
140 character(len=*),
intent(in) :: name_
141 integer,
intent(in) :: position_
143 integer,
intent(inout) :: size_
149 call error(
"variable "//trim(name_)//
" already registered.")
153 if (size_ .gt.
size(array))
then
154 call error(
"number of domain decomposed variables exceeds limit.")
156 call string_copy(array(size_)%varname, name_)
157 array(size_)%pos = position_
166 character(len=*),
intent(in) :: name_
168 integer,
intent(in) :: size_
172 if (dpos .ne. variable_not_found)
then
173 dpos = array(dpos)%pos
187 character(len=*),
intent(in) :: variable_name
188 character(len=*),
intent(in) :: xory
191 logical,
intent(in),
optional :: broadcast
199 character(len=nf90_max_name),
dimension(:),
allocatable :: dim_names
204 index_ = no_domain_decomposed_dimension
205 if (fileobj%is_root)
then
207 allocate(dim_names(ndims))
217 call error(
"unrecognized xory flag value.")
219 do i = 1,
size(dim_names)
225 deallocate(dim_names)
227 if (
present(broadcast))
then
228 if (.not. broadcast)
then
232 call mpp_broadcast(index_, fileobj%io_root, pelist=fileobj%pelist)
239 xindex, yindex, xpos, ypos) &
240 result(is_decomposed)
243 character(len=*),
intent(in) :: variable_name
244 logical,
intent(in),
optional :: broadcast
249 integer,
intent(out),
optional :: xindex
251 integer,
intent(out),
optional :: yindex
253 integer,
intent(out),
optional :: xpos
254 integer,
intent(out),
optional :: ypos
255 logical :: is_decomposed
257 integer,
dimension(2) :: indices
259 character(len=nf90_max_name),
dimension(:),
allocatable :: dim_names
262 if (
present(xindex))
then
266 if (
present(yindex))
then
269 is_decomposed = (indices(1) .ne. no_domain_decomposed_dimension) .and. &
270 (indices(2) .ne. no_domain_decomposed_dimension)
271 if (is_decomposed)
then
272 if (.not.
present(xpos) .and. .not.
present(ypos))
then
276 allocate(dim_names(ndims))
279 if (
present(xpos))
then
282 if (
present(ypos))
then
285 deallocate(dim_names)
287 if (
present(xpos))
then
290 if (
present(ypos))
then
300 result(is_registered)
303 character(len=*),
intent(in) :: dimension_name
306 logical :: is_registered
310 is_registered = .false.
312 if (dpos .ne. variable_not_found)
then
313 is_registered = .true.
316 if (dpos .ne. variable_not_found) is_registered = .true.
323 function open_domain_file(fileobj, path, mode, domain, nc_format, is_restart, dont_add_res_to_filename, &
324 use_netcdf_mpi, use_collective)
result(success)
327 character(len=*),
intent(in) :: path
328 character(len=*),
intent(in) :: mode
331 type(
domain2d),
intent(in) :: domain
332 character(len=*),
intent(in),
optional :: nc_format
338 logical,
intent(in),
optional :: is_restart
341 logical,
intent(in),
optional :: dont_add_res_to_filename
342 logical,
intent(in),
optional :: use_netcdf_mpi
345 logical,
intent(in),
optional :: use_collective
349 integer,
dimension(2) :: io_layout
350 integer,
dimension(1) :: tile_id
351 character(len=FMS_PATH_LEN) :: combined_filepath
352 type(
domain2d),
pointer :: io_domain
353 character(len=FMS_PATH_LEN) :: distributed_filepath
354 integer :: pelist_size
355 integer,
dimension(:),
allocatable :: pelist
361 if (
present(use_netcdf_mpi))
then
362 if (use_netcdf_mpi)
then
363 if (
associated(io_domain))
then
364 call mpp_error(note,
"NetCDF MPI is enabled: ignoring I/O domain. Only one output file will be produced.")
367 fileobj%domain = domain
369 allocate(fileobj%xdims(max_num_domain_decomposed_dims))
371 allocate(fileobj%ydims(max_num_domain_decomposed_dims))
374 call string_copy(fileobj%non_mangled_path, path)
382 call string_copy(combined_filepath, path)
386 nc_format=
"netcdf4", &
387 is_restart=is_restart, &
388 dont_add_res_to_filename=dont_add_res_to_filename, &
390 use_collective=use_collective)
404 call string_copy(combined_filepath, path)
408 if (.not.
associated(io_domain))
then
409 call error(
"The domain associated with the file:"//trim(path)//
" does not have an io_domain.")
411 if (io_layout(1)*io_layout(2) .gt. 1)
then
415 call string_copy(distributed_filepath, combined_filepath)
420 allocate(pelist(pelist_size))
422 fileobj%adjust_indices = .true.
425 success =
netcdf_file_open(fileobj, distributed_filepath, mode, nc_format, pelist, &
426 is_restart, dont_add_res_to_filename)
429 if (.not.
string_compare(distributed_filepath, combined_filepath))
then
430 success2 =
netcdf_file_open(fileobj2, combined_filepath, mode, nc_format, pelist, &
431 is_restart, dont_add_res_to_filename)
433 call error(
"The domain decomposed file:"//trim(path)// &
434 &
" contains both combined (*.nc) and distributed files (*.nc.XXXX).")
438 success =
netcdf_file_open(fileobj, combined_filepath, mode, nc_format, pelist, &
439 is_restart, dont_add_res_to_filename)
441 if (success .and. (io_layout(1)*io_layout(2) .gt. 1)) fileobj%adjust_indices = .false.
444 if (.not. success)
then
450 call string_copy(fileobj%non_mangled_path, path)
451 fileobj%domain = domain
452 allocate(fileobj%xdims(max_num_domain_decomposed_dims))
454 allocate(fileobj%ydims(max_num_domain_decomposed_dims))
456 call string_copy(fileobj%non_mangled_path, path)
471 deallocate(fileobj%xdims)
473 deallocate(fileobj%ydims)
482 character(len=*),
intent(in) :: dim_name
483 character(len=*),
intent(in) :: xory
487 integer,
intent(in),
optional :: domain_position
490 type(
domain2d),
pointer :: io_domain
491 integer :: domain_size
494 dpos = default_domain_position
496 dpos = domain_position
501 if (fileobj%use_netcdf_mpi)
then
502 io_domain => fileobj%domain
508 if (dpos .ne. center .and. dpos .ne. east)
then
509 call error(
"Only domain_position=center or domain_position=EAST is supported for x dimensions."// &
510 &
" Fix your register_axis call for file:"&
511 &//trim(fileobj%path)//
" and dimension:"//trim(dim_name))
516 if (dpos .ne. center .and. dpos .ne. north)
then
517 call error(
"Only domain_position=center or domain_position=NORTH is supported for y dimensions."// &
518 &
" Fix your register_axis call for file:"&
519 &//trim(fileobj%path)//
" and dimension:"//trim(dim_name))
524 call error(
"The register_axis call for file:"//trim(fileobj%path)//
" and dimension:"//trim(dim_name)// &
525 &
" has an unrecognized xory flag value:"&
526 &//trim(xory)//
" only 'x' and 'y' are allowed.")
528 if (fileobj%is_readonly .or. (fileobj%mode_is_append .and.
dimension_exists(fileobj, dim_name)))
then
530 if (dim_size .lt. domain_size)
then
531 call error(
"dimension "//trim(dim_name)//
" in the file "//trim(fileobj%path)//
" is smaller than the size of" &
532 //
" the associated domain "//trim(xory)//
" axis.")
546 character(len=*),
intent(in) :: variable_name
548 type(
domain2d),
pointer :: io_domain
554 integer,
dimension(2) :: io_layout
559 if (io_layout(1) .eq. 1 .and. io_layout(2) .eq. 1)
return
560 if (fileobj%use_netcdf_mpi)
return
564 if (dpos .ne. variable_not_found)
then
565 dpos = fileobj%xdims(dpos)%pos
572 if (dpos .ne. variable_not_found)
then
573 dpos = fileobj%ydims(dpos)%pos
587 character(len=*),
intent(in) :: variable_name
588 character(len=*),
intent(in) :: variable_type
591 character(len=*),
dimension(:),
intent(in),
optional :: dimensions
592 integer,
intent(in),
optional :: chunksizes(:)
594 if (.not. fileobj%is_readonly)
then
596 if (
present(dimensions))
then
597 if (
size(dimensions) .eq. 1)
then
610 integer,
intent(in),
optional :: unlim_dim_level
613 character(len=32) :: chksum
614 logical :: is_decomposed
616 if (.not. fileobj%is_restart)
then
617 call error(
"file "//trim(fileobj%path)// &
618 &
" is not a restart file. You must set is_restart=.true. in your open_file call.")
622 do i = 1, fileobj%num_restart_vars
623 if (
associated(fileobj%restart_vars(i)%data2d))
then
625 fileobj%restart_vars(i)%data2d, is_decomposed)
626 if (is_decomposed)
then
628 "checksum", chksum(1:len(chksum)), str_len=len(chksum))
630 elseif (
associated(fileobj%restart_vars(i)%data3d))
then
632 fileobj%restart_vars(i)%data3d, is_decomposed)
633 if (is_decomposed)
then
635 "checksum", chksum(1:len(chksum)), str_len=len(chksum))
637 elseif (
associated(fileobj%restart_vars(i)%data4d))
then
639 fileobj%restart_vars(i)%data4d, is_decomposed)
640 if (is_decomposed)
then
642 "checksum", chksum(1:len(chksum)), str_len=len(chksum))
648 do i = 1, fileobj%num_restart_vars
649 if (
associated(fileobj%restart_vars(i)%data0d))
then
651 fileobj%restart_vars(i)%data0d, unlim_dim_level=unlim_dim_level)
652 elseif (
associated(fileobj%restart_vars(i)%data1d))
then
654 fileobj%restart_vars(i)%data1d, unlim_dim_level=unlim_dim_level)
655 elseif (
associated(fileobj%restart_vars(i)%data2d))
then
657 fileobj%restart_vars(i)%data2d, unlim_dim_level=unlim_dim_level)
658 elseif (
associated(fileobj%restart_vars(i)%data3d))
then
660 fileobj%restart_vars(i)%data3d, unlim_dim_level=unlim_dim_level)
661 elseif (
associated(fileobj%restart_vars(i)%data4d))
then
663 fileobj%restart_vars(i)%data4d, unlim_dim_level=unlim_dim_level)
665 call error(
"This routine only accepts data that is scalar, 1d 2d 3d or 4d."//&
666 " The data sent in has an unsupported dimensionality")
678 integer,
intent(in),
optional :: unlim_dim_level
679 logical,
intent(in),
optional :: ignore_checksum
682 character(len=32) :: chksum_in_file
683 character(len=32) :: chksum
684 logical :: chksum_ignore = .false.
686 logical :: is_decomposed
688 if (
PRESENT(ignore_checksum)) chksum_ignore = ignore_checksum
690 if (.not. fileobj%is_restart)
then
691 call error(
"file "//trim(fileobj%path)// &
692 &
" is not a restart file. You must set is_restart=.true. in your open_file call.")
694 do i = 1, fileobj%num_restart_vars
695 if (
associated(fileobj%restart_vars(i)%data0d))
then
697 fileobj%restart_vars(i)%data0d, unlim_dim_level=unlim_dim_level)
698 elseif (
associated(fileobj%restart_vars(i)%data1d))
then
700 fileobj%restart_vars(i)%data1d, unlim_dim_level=unlim_dim_level)
701 elseif (
associated(fileobj%restart_vars(i)%data2d))
then
703 fileobj%restart_vars(i)%data2d, unlim_dim_level=unlim_dim_level)
704 if (.not.chksum_ignore)
then
706 fileobj%restart_vars(i)%data2d, is_decomposed)
710 "checksum", chksum_in_file)
711 if (.not.
string_compare(trim(adjustl(chksum_in_file)), trim(adjustl(chksum))))
then
712 call error(
"The checksum in the file:"//trim(fileobj%path)//
" and variable:"// &
713 & trim(fileobj%restart_vars(i)%varname)// &
714 &
" does not match the checksum calculated from the data. file:"//trim(adjustl(chksum_in_file))//&
715 &
" from data:"//trim(adjustl(chksum)))
719 elseif (
associated(fileobj%restart_vars(i)%data3d))
then
721 fileobj%restart_vars(i)%data3d, unlim_dim_level=unlim_dim_level)
722 if (.not.chksum_ignore)
then
724 fileobj%restart_vars(i)%data3d, is_decomposed)
728 "checksum", chksum_in_file(1:len(chksum_in_file)))
729 if (.not.
string_compare(trim(adjustl(chksum_in_file)), trim(adjustl(chksum))))
then
730 call error(
"The checksum in the file:"//trim(fileobj%path)//
" and variable:"// &
731 & trim(fileobj%restart_vars(i)%varname)//&
732 &
" does not match the checksum calculated from the data. file:"//trim(adjustl(chksum_in_file))//&
733 &
" from data:"//trim(adjustl(chksum)))
737 elseif (
associated(fileobj%restart_vars(i)%data4d))
then
739 fileobj%restart_vars(i)%data4d, unlim_dim_level=unlim_dim_level)
740 if (.not.chksum_ignore)
then
742 fileobj%restart_vars(i)%data4d, is_decomposed)
746 "checksum", chksum_in_file)
747 if (.not.
string_compare(trim(adjustl(chksum_in_file)), trim(adjustl(chksum))))
then
748 call error(
"The checksum in the file:"//trim(fileobj%path)//
" and variable:"// &
749 & trim(fileobj%restart_vars(i)%varname)//&
750 &
" does not match the checksum calculated from the data. file:"//trim(adjustl(chksum_in_file))//&
751 &
" from data:"//trim(adjustl(chksum)))
756 call error(
"There is no data associated with the variable: "//trim(fileobj%restart_vars(i)%varname)//&
757 &
" and the file: "//trim(fileobj%path)//
". Check your register_restart_variable call")
767 character(len=*),
intent(in) :: dimname
768 integer,
dimension(:),
allocatable,
intent(inout) :: indices
770 type(
domain2d),
pointer :: io_domain
778 if (dpos .ne. variable_not_found)
then
779 dpos = fileobj%xdims(dpos)%pos
783 if (dpos .ne. variable_not_found)
then
784 dpos = fileobj%ydims(dpos)%pos
787 call error(
"get_compute_domain_dimension_indices: the input dimension:"//trim(dimname)// &
788 &
" is not domain decomposed.")
791 if (
allocated(indices))
then
794 allocate(indices(e-s+1))
804 isd, isc, xc_size, jsd, jsc, yc_size, &
805 buffer_includes_halos, extra_x_point, &
808 integer,
intent(in) :: data_xsize
809 integer,
intent(in) :: data_ysize
810 type(
domain2d),
intent(in) :: domain
811 integer,
intent(in) :: xpos
812 integer,
intent(in) :: ypos
813 integer,
intent(out) :: isd
814 integer,
intent(out) :: isc
815 integer,
intent(out) :: xc_size
816 integer,
intent(out) :: jsd
817 integer,
intent(out) :: jsc
818 integer,
intent(out) :: yc_size
819 logical,
intent(out) :: buffer_includes_halos
820 logical,
intent(out),
optional :: extra_x_point
821 logical,
intent(out),
optional :: extra_y_point
822 character(len=*),
intent(in),
optional :: msg
830 type(
domain2d),
pointer :: io_domain
842 if (
present(extra_x_point))
then
843 if ((xpos .eq. east) .and. (iec .ne. xmax))
then
844 extra_x_point = .true.
846 extra_x_point = .false.
853 if (
present(extra_y_point))
then
854 if ((ypos .eq. north) .and. (jec .ne. ymax))
then
855 extra_y_point = .true.
857 extra_y_point = .false.
861 buffer_includes_halos = (data_xsize .eq. xd_size) .and. (data_ysize .eq. yd_size)
862 if (.not. buffer_includes_halos .and. data_xsize .ne. xc_size .and. data_ysize &
864 print *,
"buffer_includes_halos:", buffer_includes_halos,
" data_xsize:", &
865 data_xsize,
" xc_size:", xc_size,
" data_ysize:", data_ysize,
" yc_size:", &
867 call error(trim(msg)//
" The data is not on the compute domain or the data domain")
877 character(len=*),
intent(in) :: dimname
878 integer,
intent(out) :: is
879 integer,
intent(out) :: ie
880 integer,
dimension(:),
allocatable,
intent(out),
optional :: indices
882 type(
domain2d),
pointer :: io_domain
888 if (dpos .ne. variable_not_found)
then
889 dpos = fileobj%xdims(dpos)%pos
893 if (dpos .ne. variable_not_found)
then
894 dpos = fileobj%ydims(dpos)%pos
897 call error(
"get_global_io_domain_indices: the dimension "//trim(dimname)//
" in the file: "//trim(fileobj%path)//&
898 &
" is not domain decomposed. Check your register_axis call")
904 if (
present(indices))
then
905 if(
allocated(indices))
then
906 call error(
"get_global_io_domain_indices: the variable indices should not be allocated.")
908 allocate(indices(ie-is+1))
920 character(len=*),
intent(out) :: grid_file
923 character(len=*),
intent(in) :: mosaic_file
924 type(
domain2d),
intent(in) :: domain
925 integer,
intent(in),
optional :: tile_count
931 integer,
dimension(:),
allocatable :: tile_id
935 if(
present(tile_count)) tile = tile_count
937 allocate(tile_id(ntileme))
941 call netcdf_read_data(fileobj,
"gridfiles", grid_file, corner=tile_id(tile))
942 grid_file =
'INPUT/'//trim(grid_file)
948 include
"register_domain_restart_variable.inc"
949 include
"domain_read.inc"
950 include
"domain_write.inc"
951 #include "compute_global_checksum.inc"
954 end module fms_netcdf_domain_io_mod
subroutine domain_read_0d(fileobj, variable_name, vdata, unlim_dim_level, corner)
I/O domain root reads in a domain decomposed variable at a specific unlimited dimension level and sca...
subroutine domain_write_3d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
Gather "compute" domain data on the I/O root rank and then have the I/O root write out the data that ...
subroutine register_domain_restart_variable_3d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine domain_write_4d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
Gather "compute" domain data on the I/O root rank and then have the I/O root write out the data that ...
subroutine register_domain_restart_variable_1d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine domain_write_1d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
Gather "compute" domain data on the I/O root rank and then have the I/O root write out the data that ...
subroutine domain_write_5d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
Gather "compute" domain data on the I/O root rank and then have the I/O root write out the data that ...
subroutine register_domain_restart_variable_5d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine domain_write_0d(fileobj, variable_name, vdata, unlim_dim_level, corner)
Gather "compute" domain data on the I/O root rank and then have the I/O root write out the data that ...
subroutine domain_write_2d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
Gather "compute" domain data on the I/O root rank and then have the I/O root write out the data that ...
subroutine domain_read_3d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
I/O domain root reads in a domain decomposed variable at a specific unlimited dimension level and sca...
subroutine register_domain_restart_variable_4d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine domain_read_1d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
I/O domain root reads in a domain decomposed variable at a specific unlimited dimension level and sca...
subroutine domain_read_2d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
I/O domain root reads in a domain decomposed variable at a specific unlimited dimension level and sca...
subroutine domain_read_4d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
I/O domain root reads in a domain decomposed variable at a specific unlimited dimension level and sca...
subroutine domain_read_5d(fileobj, variable_name, vdata, unlim_dim_level, corner, edge_lengths)
I/O domain root reads in a domain decomposed variable at a specific unlimited dimension level and sca...
subroutine register_domain_restart_variable_0d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine register_domain_restart_variable_2d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine, public io_domain_tile_filepath_mangle(dest, source, io_domain_tile_id)
Add the I/O domain tile id to an input filepath.
logical function, public string_compare(string1, string2, ignore_case)
Compare strings.
subroutine, public domain_tile_filepath_mangle(dest, source, domain_tile_id)
Add the domain tile id to an input filepath.
subroutine add_domain_attribute(fileobj, variable_name)
Add a "domain_decomposed" attribute to the axis variables because it is required by mppnccombine.
integer function get_domain_decomposed_dimension_index(fileobj, variable_name, xory, broadcast)
Given a variable, get the index of the "x" or "y" domain decomposed dimension.
integer function get_domain_decomposed_index(name_, array, size_)
Get the index of a domain decomposed dimension.
subroutine, public save_domain_restart(fileobj, unlim_dim_level)
Loop through registered restart variables and write them to a netcdf file.
logical function is_variable_domain_decomposed(fileobj, variable_name, broadcast, xindex, yindex, xpos, ypos)
Determine if a variable is "domain decomposed.".
logical function, public is_dimension_registered(fileobj, dimension_name)
Determine whether a domain-decomposed dimension has been registered to the file object.
subroutine domain_offsets(data_xsize, data_ysize, domain, xpos, ypos, isd, isc, xc_size, jsd, jsc, yc_size, buffer_includes_halos, extra_x_point, extra_y_point, msg)
Utility routine that retrieves domain indices.
subroutine, public get_global_io_domain_indices(fileobj, dimname, is, ie, indices)
Get starting/ending global indices of the I/O domain for a domain decomposed file.
subroutine, public register_domain_variable(fileobj, variable_name, variable_type, dimensions, chunksizes)
Add a domain decomposed variable.
subroutine, public get_mosaic_tile_grid(grid_file, mosaic_file, domain, tile_count)
Read a mosaic_file and get the grid filename for the current tile or for the tile specified.
subroutine, public register_domain_decomposed_dimension(fileobj, dim_name, xory, domain_position)
Add a dimension to a file associated with a two-dimensional domain.
logical function, public open_domain_file(fileobj, path, mode, domain, nc_format, is_restart, dont_add_res_to_filename, use_netcdf_mpi, use_collective)
Open a domain netcdf file.
subroutine, public close_domain_file(fileobj)
Close a domain netcdf file.
character(len=32) function compute_global_checksum_3d(fileobj, variable_name, variable_data, is_decomposed)
@briefs Calculates a variable's checksum across all ranks in the current pelist.
subroutine, public restore_domain_state(fileobj, unlim_dim_level, ignore_checksum)
Loop through registered restart variables and read them from a netcdf file.
character(len=32) function compute_global_checksum_4d(fileobj, variable_name, variable_data, is_decomposed)
@briefs Calculates a variable's checksum across all ranks in the current pelist.
subroutine append_domain_decomposed_dimension(name_, position_, array, size_)
Add a domain decomposed dimension to an array.
character(len=32) function compute_global_checksum_2d(fileobj, variable_name, variable_data, is_decomposed)
@briefs Calculates a variable's checksum across all ranks in the current pelist.
subroutine, public get_compute_domain_dimension_indices(fileobj, dimname, indices)
Return an array of compute domain indices.
integer function get_domain_position(name_, array, size_)
Given a domain decomposed dimension, get its domain position.
integer function mpp_get_domain_npes(domain)
Set user stack size.
integer function mpp_get_domain_tile_commid(domain)
Set user stack size.
integer function, dimension(size(domain%tile_id(:))) mpp_get_tile_id(domain)
Returns the tile_id on current pe.
logical function mpp_domain_is_symmetry(domain)
Set user stack size.
integer function mpp_get_current_ntile(domain)
Returns number of tile on current pe.
integer function mpp_get_ntile_count(domain)
Returns number of tiles in mosaic.
integer function, dimension(2) mpp_get_io_domain_layout(domain)
Set user stack size.
type(domain2d) function, pointer mpp_get_io_domain(domain)
Set user stack size.
These routines retrieve the axis specifications associated with the compute domains....
These routines retrieve the axis specifications associated with the data domains. The domain is a der...
These routines retrieve the axis specifications associated with the global domains....
Retrieve list of PEs associated with a domain decomposition. The 1D version of this call returns an a...
The domain2D type contains all the necessary information to define the global, compute and data domai...
Perform parallel broadcasts.
subroutine, public netcdf_file_close(fileobj)
Close a netcdf file.
subroutine, public netcdf_add_dimension(fileobj, dimension_name, dimension_length, is_compressed)
Add a dimension to a file.
integer function, public get_variable_num_dimensions(fileobj, variable_name, broadcast)
Get the number of dimensions a variable depends on.
subroutine, public get_dimension_size(fileobj, dimension_name, dim_size, broadcast)
Get the length of a dimension.
logical function, public dimension_exists(fileobj, dimension_name, broadcast)
Determine if a dimension exists.
logical function, public variable_att_exists(fileobj, variable_name, attribute_name, broadcast)
Determine if a variable's attribute exists.
subroutine, public get_variable_dimension_names(fileobj, variable_name, dim_names, broadcast)
Get the name of a variable's dimensions.
subroutine, public netcdf_add_variable(fileobj, variable_name, variable_type, dimensions, chunksizes)
Add a variable to a file.
logical function, public netcdf_file_open(fileobj, path, mode, nc_format, pelist, is_restart, dont_add_res_to_filename, tile_comm, use_collective)
Open a netcdf file.