29 module fms_netcdf_domain_io_mod
41 integer,
parameter :: no_domain_decomposed_dimension = 0
42 integer,
parameter,
public :: max_num_domain_decomposed_dims = 10
43 integer,
parameter :: variable_not_found = 0
44 integer,
parameter :: default_domain_position = center
45 character(len=16),
parameter :: domain_pos_att =
"domain_position"
46 character(len=16),
parameter :: domain_axis_att_name =
"domain_axis"
47 character(len=16),
parameter :: x =
"x"
48 character(len=16),
parameter :: y =
"y"
55 character(len=nf90_max_name) :: varname
82 character(len=FMS_PATH_LEN) :: non_mangled_path
83 logical :: adjust_indices
135 character(len=*),
intent(in) :: name_
137 integer,
intent(in) :: size_
142 index_ = variable_not_found
155 character(len=*),
intent(in) :: name_
156 integer,
intent(in) :: position_
158 integer,
intent(inout) :: size_
164 call error(
"variable "//trim(name_)//
" already registered.")
168 if (size_ .gt.
size(array))
then
169 call error(
"number of domain decomposed variables exceeds limit.")
171 call string_copy(array(size_)%varname, name_)
172 array(size_)%pos = position_
181 character(len=*),
intent(in) :: name_
183 integer,
intent(in) :: size_
187 if (dpos .ne. variable_not_found)
then
188 dpos = array(dpos)%pos
202 character(len=*),
intent(in) :: variable_name
203 character(len=*),
intent(in) :: xory
206 logical,
intent(in),
optional :: broadcast
214 character(len=nf90_max_name),
dimension(:),
allocatable :: dim_names
219 index_ = no_domain_decomposed_dimension
220 if (fileobj%is_root)
then
222 allocate(dim_names(ndims))
232 call error(
"unrecognized xory flag value.")
234 do i = 1,
size(dim_names)
240 deallocate(dim_names)
242 if (
present(broadcast))
then
243 if (.not. broadcast)
then
247 call mpp_broadcast(index_, fileobj%io_root, pelist=fileobj%pelist)
254 xindex, yindex, xpos, ypos) &
255 result(is_decomposed)
258 character(len=*),
intent(in) :: variable_name
259 logical,
intent(in),
optional :: broadcast
264 integer,
intent(out),
optional :: xindex
266 integer,
intent(out),
optional :: yindex
268 integer,
intent(out),
optional :: xpos
269 integer,
intent(out),
optional :: ypos
270 logical :: is_decomposed
272 integer,
dimension(2) :: indices
274 character(len=nf90_max_name),
dimension(:),
allocatable :: dim_names
277 if (
present(xindex))
then
281 if (
present(yindex))
then
284 is_decomposed = (indices(1) .ne. no_domain_decomposed_dimension) .and. &
285 (indices(2) .ne. no_domain_decomposed_dimension)
286 if (is_decomposed)
then
287 if (.not.
present(xpos) .and. .not.
present(ypos))
then
291 allocate(dim_names(ndims))
294 if (
present(xpos))
then
297 if (
present(ypos))
then
300 deallocate(dim_names)
302 if (
present(xpos))
then
305 if (
present(ypos))
then
315 result(is_registered)
318 character(len=*),
intent(in) :: dimension_name
321 logical :: is_registered
325 is_registered = .false.
327 if (dpos .ne. variable_not_found)
then
328 is_registered = .true.
331 if (dpos .ne. variable_not_found) is_registered = .true.
338 function open_domain_file(fileobj, path, mode, domain, nc_format, is_restart, dont_add_res_to_filename, &
339 use_netcdf_mpi, use_collective)
result(success)
342 character(len=*),
intent(in) :: path
343 character(len=*),
intent(in) :: mode
346 type(
domain2d),
intent(in) :: domain
347 character(len=*),
intent(in),
optional :: nc_format
353 logical,
intent(in),
optional :: is_restart
356 logical,
intent(in),
optional :: dont_add_res_to_filename
357 logical,
intent(in),
optional :: use_netcdf_mpi
360 logical,
intent(in),
optional :: use_collective
364 integer,
dimension(2) :: io_layout
365 integer,
dimension(1) :: tile_id
366 character(len=FMS_PATH_LEN) :: combined_filepath
367 type(
domain2d),
pointer :: io_domain
368 character(len=FMS_PATH_LEN) :: distributed_filepath
369 integer :: pelist_size
370 integer,
dimension(:),
allocatable :: pelist
376 if (
present(use_netcdf_mpi))
then
377 if (use_netcdf_mpi)
then
378 if (
associated(io_domain))
then
379 call mpp_error(note,
"NetCDF MPI is enabled: ignoring I/O domain. Only one output file will be produced.")
382 fileobj%domain = domain
384 allocate(fileobj%xdims(max_num_domain_decomposed_dims))
386 allocate(fileobj%ydims(max_num_domain_decomposed_dims))
389 call string_copy(fileobj%non_mangled_path, path)
397 call string_copy(combined_filepath, path)
401 nc_format=
"netcdf4", &
402 is_restart=is_restart, &
403 dont_add_res_to_filename=dont_add_res_to_filename, &
405 use_collective=use_collective)
419 call string_copy(combined_filepath, path)
423 if (.not.
associated(io_domain))
then
424 call error(
"The domain associated with the file:"//trim(path)//
" does not have an io_domain.")
426 if (io_layout(1)*io_layout(2) .gt. 1)
then
430 call string_copy(distributed_filepath, combined_filepath)
435 allocate(pelist(pelist_size))
437 fileobj%adjust_indices = .true.
440 success =
netcdf_file_open(fileobj, distributed_filepath, mode, nc_format, pelist, &
441 is_restart, dont_add_res_to_filename)
444 if (.not.
string_compare(distributed_filepath, combined_filepath))
then
445 success2 =
netcdf_file_open(fileobj2, combined_filepath, mode, nc_format, pelist, &
446 is_restart, dont_add_res_to_filename)
448 call error(
"The domain decomposed file:"//trim(path)// &
449 &
" contains both combined (*.nc) and distributed files (*.nc.XXXX).")
453 success =
netcdf_file_open(fileobj, combined_filepath, mode, nc_format, pelist, &
454 is_restart, dont_add_res_to_filename)
456 if (success .and. (io_layout(1)*io_layout(2) .gt. 1)) fileobj%adjust_indices = .false.
459 if (.not. success)
then
465 call string_copy(fileobj%non_mangled_path, path)
466 fileobj%domain = domain
467 allocate(fileobj%xdims(max_num_domain_decomposed_dims))
469 allocate(fileobj%ydims(max_num_domain_decomposed_dims))
471 call string_copy(fileobj%non_mangled_path, path)
486 deallocate(fileobj%xdims)
488 deallocate(fileobj%ydims)
497 character(len=*),
intent(in) :: dim_name
498 character(len=*),
intent(in) :: xory
502 integer,
intent(in),
optional :: domain_position
505 type(
domain2d),
pointer :: io_domain
506 integer :: domain_size
509 dpos = default_domain_position
511 dpos = domain_position
516 if (fileobj%use_netcdf_mpi)
then
517 io_domain => fileobj%domain
523 if (dpos .ne. center .and. dpos .ne. east)
then
524 call error(
"Only domain_position=center or domain_position=EAST is supported for x dimensions."// &
525 &
" Fix your register_axis call for file:"&
526 &//trim(fileobj%path)//
" and dimension:"//trim(dim_name))
531 if (dpos .ne. center .and. dpos .ne. north)
then
532 call error(
"Only domain_position=center or domain_position=NORTH is supported for y dimensions."// &
533 &
" Fix your register_axis call for file:"&
534 &//trim(fileobj%path)//
" and dimension:"//trim(dim_name))
539 call error(
"The register_axis call for file:"//trim(fileobj%path)//
" and dimension:"//trim(dim_name)// &
540 &
" has an unrecognized xory flag value:"&
541 &//trim(xory)//
" only 'x' and 'y' are allowed.")
543 if (fileobj%is_readonly .or. (fileobj%mode_is_append .and.
dimension_exists(fileobj, dim_name)))
then
545 if (dim_size .lt. domain_size)
then
546 call error(
"dimension "//trim(dim_name)//
" in the file "//trim(fileobj%path)//
" is smaller than the size of" &
547 //
" the associated domain "//trim(xory)//
" axis.")
561 character(len=*),
intent(in) :: variable_name
563 type(
domain2d),
pointer :: io_domain
569 integer,
dimension(2) :: io_layout
574 if (io_layout(1) .eq. 1 .and. io_layout(2) .eq. 1)
return
575 if (fileobj%use_netcdf_mpi)
return
579 if (dpos .ne. variable_not_found)
then
580 dpos = fileobj%xdims(dpos)%pos
587 if (dpos .ne. variable_not_found)
then
588 dpos = fileobj%ydims(dpos)%pos
602 character(len=*),
intent(in) :: variable_name
603 character(len=*),
intent(in) :: variable_type
606 character(len=*),
dimension(:),
intent(in),
optional :: dimensions
607 integer,
intent(in),
optional :: chunksizes(:)
609 if (.not. fileobj%is_readonly)
then
611 if (
present(dimensions))
then
612 if (
size(dimensions) .eq. 1)
then
625 integer,
intent(in),
optional :: unlim_dim_level
628 character(len=32) :: chksum
629 logical :: is_decomposed
631 if (.not. fileobj%is_restart)
then
632 call error(
"file "//trim(fileobj%path)// &
633 &
" is not a restart file. You must set is_restart=.true. in your open_file call.")
637 do i = 1, fileobj%num_restart_vars
638 if (
associated(fileobj%restart_vars(i)%data2d))
then
640 fileobj%restart_vars(i)%data2d, is_decomposed)
641 if (is_decomposed)
then
643 "checksum", chksum(1:len(chksum)), str_len=len(chksum))
645 elseif (
associated(fileobj%restart_vars(i)%data3d))
then
647 fileobj%restart_vars(i)%data3d, is_decomposed)
648 if (is_decomposed)
then
650 "checksum", chksum(1:len(chksum)), str_len=len(chksum))
652 elseif (
associated(fileobj%restart_vars(i)%data4d))
then
654 fileobj%restart_vars(i)%data4d, is_decomposed)
655 if (is_decomposed)
then
657 "checksum", chksum(1:len(chksum)), str_len=len(chksum))
663 do i = 1, fileobj%num_restart_vars
664 if (
associated(fileobj%restart_vars(i)%data0d))
then
666 fileobj%restart_vars(i)%data0d, unlim_dim_level=unlim_dim_level)
667 elseif (
associated(fileobj%restart_vars(i)%data1d))
then
669 fileobj%restart_vars(i)%data1d, unlim_dim_level=unlim_dim_level)
670 elseif (
associated(fileobj%restart_vars(i)%data2d))
then
672 fileobj%restart_vars(i)%data2d, unlim_dim_level=unlim_dim_level)
673 elseif (
associated(fileobj%restart_vars(i)%data3d))
then
675 fileobj%restart_vars(i)%data3d, unlim_dim_level=unlim_dim_level)
676 elseif (
associated(fileobj%restart_vars(i)%data4d))
then
678 fileobj%restart_vars(i)%data4d, unlim_dim_level=unlim_dim_level)
680 call error(
"This routine only accepts data that is scalar, 1d 2d 3d or 4d."//&
681 " The data sent in has an unsupported dimensionality")
693 integer,
intent(in),
optional :: unlim_dim_level
694 logical,
intent(in),
optional :: ignore_checksum
697 character(len=32) :: chksum_in_file
698 character(len=32) :: chksum
699 logical :: chksum_ignore = .false.
701 logical :: is_decomposed
703 if (
PRESENT(ignore_checksum)) chksum_ignore = ignore_checksum
705 if (.not. fileobj%is_restart)
then
706 call error(
"file "//trim(fileobj%path)// &
707 &
" is not a restart file. You must set is_restart=.true. in your open_file call.")
709 do i = 1, fileobj%num_restart_vars
710 if (
associated(fileobj%restart_vars(i)%data0d))
then
712 fileobj%restart_vars(i)%data0d, unlim_dim_level=unlim_dim_level)
713 elseif (
associated(fileobj%restart_vars(i)%data1d))
then
715 fileobj%restart_vars(i)%data1d, unlim_dim_level=unlim_dim_level)
716 elseif (
associated(fileobj%restart_vars(i)%data2d))
then
718 fileobj%restart_vars(i)%data2d, unlim_dim_level=unlim_dim_level)
719 if (.not.chksum_ignore)
then
721 fileobj%restart_vars(i)%data2d, is_decomposed)
725 "checksum", chksum_in_file)
726 if (.not.
string_compare(trim(adjustl(chksum_in_file)), trim(adjustl(chksum))))
then
727 call error(
"The checksum in the file:"//trim(fileobj%path)//
" and variable:"// &
728 & trim(fileobj%restart_vars(i)%varname)// &
729 &
" does not match the checksum calculated from the data. file:"//trim(adjustl(chksum_in_file))//&
730 &
" from data:"//trim(adjustl(chksum)))
734 elseif (
associated(fileobj%restart_vars(i)%data3d))
then
736 fileobj%restart_vars(i)%data3d, unlim_dim_level=unlim_dim_level)
737 if (.not.chksum_ignore)
then
739 fileobj%restart_vars(i)%data3d, is_decomposed)
743 "checksum", chksum_in_file(1:len(chksum_in_file)))
744 if (.not.
string_compare(trim(adjustl(chksum_in_file)), trim(adjustl(chksum))))
then
745 call error(
"The checksum in the file:"//trim(fileobj%path)//
" and variable:"// &
746 & trim(fileobj%restart_vars(i)%varname)//&
747 &
" does not match the checksum calculated from the data. file:"//trim(adjustl(chksum_in_file))//&
748 &
" from data:"//trim(adjustl(chksum)))
752 elseif (
associated(fileobj%restart_vars(i)%data4d))
then
754 fileobj%restart_vars(i)%data4d, unlim_dim_level=unlim_dim_level)
755 if (.not.chksum_ignore)
then
757 fileobj%restart_vars(i)%data4d, is_decomposed)
761 "checksum", chksum_in_file)
762 if (.not.
string_compare(trim(adjustl(chksum_in_file)), trim(adjustl(chksum))))
then
763 call error(
"The checksum in the file:"//trim(fileobj%path)//
" and variable:"// &
764 & trim(fileobj%restart_vars(i)%varname)//&
765 &
" does not match the checksum calculated from the data. file:"//trim(adjustl(chksum_in_file))//&
766 &
" from data:"//trim(adjustl(chksum)))
771 call error(
"There is no data associated with the variable: "//trim(fileobj%restart_vars(i)%varname)//&
772 &
" and the file: "//trim(fileobj%path)//
". Check your register_restart_variable call")
782 character(len=*),
intent(in) :: dimname
783 integer,
dimension(:),
allocatable,
intent(inout) :: indices
785 type(
domain2d),
pointer :: io_domain
793 if (dpos .ne. variable_not_found)
then
794 dpos = fileobj%xdims(dpos)%pos
798 if (dpos .ne. variable_not_found)
then
799 dpos = fileobj%ydims(dpos)%pos
802 call error(
"get_compute_domain_dimension_indices: the input dimension:"//trim(dimname)// &
803 &
" is not domain decomposed.")
806 if (
allocated(indices))
then
809 allocate(indices(e-s+1))
819 isd, isc, xc_size, jsd, jsc, yc_size, &
820 buffer_includes_halos, extra_x_point, &
823 integer,
intent(in) :: data_xsize
824 integer,
intent(in) :: data_ysize
825 type(
domain2d),
intent(in) :: domain
826 integer,
intent(in) :: xpos
827 integer,
intent(in) :: ypos
828 integer,
intent(out) :: isd
829 integer,
intent(out) :: isc
830 integer,
intent(out) :: xc_size
831 integer,
intent(out) :: jsd
832 integer,
intent(out) :: jsc
833 integer,
intent(out) :: yc_size
834 logical,
intent(out) :: buffer_includes_halos
835 logical,
intent(out),
optional :: extra_x_point
836 logical,
intent(out),
optional :: extra_y_point
837 character(len=*),
intent(in),
optional :: msg
845 type(
domain2d),
pointer :: io_domain
857 if (
present(extra_x_point))
then
858 if ((xpos .eq. east) .and. (iec .ne. xmax))
then
859 extra_x_point = .true.
861 extra_x_point = .false.
868 if (
present(extra_y_point))
then
869 if ((ypos .eq. north) .and. (jec .ne. ymax))
then
870 extra_y_point = .true.
872 extra_y_point = .false.
876 buffer_includes_halos = (data_xsize .eq. xd_size) .and. (data_ysize .eq. yd_size)
877 if (.not. buffer_includes_halos .and. data_xsize .ne. xc_size .and. data_ysize &
879 print *,
"buffer_includes_halos:", buffer_includes_halos,
" data_xsize:", &
880 data_xsize,
" xc_size:", xc_size,
" data_ysize:", data_ysize,
" yc_size:", &
882 call error(trim(msg)//
" The data is not on the compute domain or the data domain")
892 character(len=*),
intent(in) :: dimname
893 integer,
intent(out) :: is
894 integer,
intent(out) :: ie
895 integer,
dimension(:),
allocatable,
intent(out),
optional :: indices
897 type(
domain2d),
pointer :: io_domain
903 if (dpos .ne. variable_not_found)
then
904 dpos = fileobj%xdims(dpos)%pos
908 if (dpos .ne. variable_not_found)
then
909 dpos = fileobj%ydims(dpos)%pos
912 call error(
"get_global_io_domain_indices: the dimension "//trim(dimname)//
" in the file: "//trim(fileobj%path)//&
913 &
" is not domain decomposed. Check your register_axis call")
919 if (
present(indices))
then
920 if(
allocated(indices))
then
921 call error(
"get_global_io_domain_indices: the variable indices should not be allocated.")
923 allocate(indices(ie-is+1))
935 character(len=*),
intent(out) :: grid_file
938 character(len=*),
intent(in) :: mosaic_file
939 type(
domain2d),
intent(in) :: domain
940 integer,
intent(in),
optional :: tile_count
946 integer,
dimension(:),
allocatable :: tile_id
950 if(
present(tile_count)) tile = tile_count
952 allocate(tile_id(ntileme))
956 call netcdf_read_data(fileobj,
"gridfiles", grid_file, corner=tile_id(tile))
957 grid_file =
'INPUT/'//trim(grid_file)
963 include
"register_domain_restart_variable.inc"
964 include
"domain_read.inc"
965 include
"domain_write.inc"
966 #include "compute_global_checksum.inc"
969 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.
Type to represent a netCDF file when on a domain decomposed standard rectangular grid....
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.
Type to represent a netCDF file. Can be used with multiple cores but only the root pe will perform an...