25 module fms_io_utils_mod
26 use,
intrinsic :: iso_fortran_env, only: error_unit
34 mpp_get_ug_domain_ntiles, mpp_get_ug_domain_tile_id
40 character(len=32),
save :: filename_appendix =
''
72 character(len=128) :: string
73 type(char_linked_list),
pointer :: head => null()
185 subroutine error(mesg)
187 character(len=*),
intent(in) :: mesg
199 character(len=*),
intent(in) :: path
203 inquire(file=trim(path), exist=exists)
212 if (omp_get_level() .gt. 0)
then
213 call error(
"this routine is not thread-safe. Please do not" &
214 //
" call it in an OpenMP threaded region.")
224 character(len=*),
intent(in) :: string1
225 character(len=*),
intent(in) :: string2
226 logical,
intent(in),
optional :: ignore_case
229 if (len_trim(string1) .ne. len_trim(string2))
then
233 if (
present(ignore_case))
then
234 if (ignore_case)
then
235 same = trim(lowercase(string1)) .eq. trim(lowercase(string2))
239 same = trim(string1) .eq. trim(string2)
249 character(len=*),
intent(in) :: string
250 logical,
intent(in),
optional :: ignore_case
257 do while(
associated(p))
271 character(len=*),
intent(in) :: string
279 if (
associated(list))
then
281 do while (
associated(p%head))
299 do while (
associated(p))
313 character(len=*),
intent(in) :: string
314 logical :: has_string
321 i = index(trim(string),
".tile", back=.true.)
329 if (verify(string(i:i),
".") .eq. 0 .and. j .ne. i)
then
333 elseif (verify(string(i:i),
"0123456789") .ne. 0)
then
346 character(len=*),
intent(inout) :: dest
347 character(len=*),
intent(in) :: source
348 integer,
intent(in) :: domain_tile_id
353 call error(
"The file "//trim(source)//
" has a domain tile id (tileX) added. Check your open_file call")
355 i = index(trim(source),
".nc", back=.true.)
357 call error(
"The file "//trim(source)//
" does not contain .nc. Check your open_file call")
359 write(dest,
'(a,i0,a)') source(1:i-1)//
".tile", &
360 domain_tile_id, source(i:len_trim(source))
369 character(len=*),
intent(in) :: string
370 logical :: has_string
376 i = index(trim(string),
".nc.", back=.true.)
381 if (verify(string(i:i),
"0123456789") .ne. 0)
then
394 character(len=*),
intent(inout) :: dest
395 character(len=*),
intent(in) :: source
396 integer,
intent(in) :: io_domain_tile_id
399 call error(
"The file "//trim(source)// &
400 &
" has already had a domain tile id (.nc.XXXX) added. Check your open_file call.")
402 write(dest,
'(a,i4.4)') trim(source)//
".", io_domain_tile_id
411 character(len=*),
intent(in) :: string
412 logical :: has_string
414 has_string = index(trim(string),
".res.", back=.true.) .ne. 0
421 character(len=*),
intent(inout) :: dest
422 character(len=*),
intent(in) :: source
431 i = index(trim(source),
".tile", back=.true.)
433 i = index(trim(source),
".nc", back=.true.)
435 call error(
"The file "//trim(source)//
" does not contain .nc. Check your open_file call")
438 call string_copy(dest, source(1:i-1)//
".res"//source(i:len_trim(source)))
443 logical,
intent(in) :: flag
444 character(len=*),
intent(in),
optional :: fname
447 if (
present(fname))
then
448 call mpp_error(fatal,
"Error occured while opening file "//trim(fname))
450 call mpp_error(fatal,
"Error occured while opening file.")
457 subroutine ascii_read(ascii_filename, ascii_var, num_lines, max_length)
458 character(len=*),
intent(in) :: ascii_filename
459 character(len=:),
dimension(:),
allocatable,
intent(out) :: ascii_var
462 integer,
optional,
intent(out) :: num_lines
463 integer,
optional,
intent(out) :: max_length
464 integer,
dimension(2) :: lines_and_length
465 if(
allocated(ascii_var))
deallocate(ascii_var)
467 allocate(
character(len=lines_and_length(2))::ascii_var(lines_and_length(1)))
469 if(
present(num_lines)) num_lines = lines_and_length(1)
470 if(
present(max_length)) max_length = lines_and_length(2)
476 character(len=*),
intent(in) :: mask_table
477 logical,
intent(out) :: maskmap(:,:)
478 character(len=*),
intent(in) :: modelname
480 integer :: nmask, layout(2)
481 integer,
allocatable :: mask_list(:,:)
482 character(len=:),
dimension(:),
allocatable :: mask_table_contents
483 integer :: iocheck, n, stdoutunit, offset
484 character(len=128) :: record
489 call ascii_read(mask_table, mask_table_contents)
490 if(
mpp_pe() == mpp_root_pe() )
then
491 read(mask_table_contents(1), fmt=*, iostat=iocheck) nmask
492 if (iocheck > 0)
then
493 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error in reading nmask from file variable")
494 elseif (iocheck < 0)
then
495 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error: nmask not completely read from file variable")
497 write(stdoutunit,*)
"parse_mask_table: Number of domain regions masked in ", trim(modelname),
" = ", nmask
500 read(mask_table_contents(2), fmt=*, iostat=iocheck) layout
501 if (iocheck > 0)
then
502 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error in reading layout from file variable")
503 elseif (iocheck < 0)
then
504 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error: layout not completely read from file variable")
506 if( (layout(1) .NE.
size(maskmap,1)) .OR. (layout(2) .NE.
size(maskmap,2)) )
then
507 write(stdoutunit,*)
"layout=", layout,
", size(maskmap) = ",
size(maskmap,1),
size(maskmap,2)
508 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): layout in file "//trim(mask_table)// &
509 "does not match size of maskmap for "//trim(modelname))
513 .NE.
"fms2_io(parse_mask_table_2d): mpp_npes() layout(1)*layout(2) - nmask for "//trim(modelname))
521 allocate(mask_list(nmask,2))
523 if(
mpp_pe() == mpp_root_pe() )
then
526 do while (offset + n <
size(mask_table_contents)+1)
527 read(mask_table_contents(n+offset),
'(a)',iostat=iocheck) record
528 if (iocheck > 0)
then
529 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error in reading record from file variable")
530 elseif (iocheck < 0)
then
531 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error: record not completely read from file variable")
533 if (record(1:1) ==
'#')
then
536 elseif (record(1:10) ==
' ')
then
542 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): number of mask_list entry "// &
543 "is greater than nmask in file "//trim(mask_table) )
545 read(record,*,iostat=iocheck) mask_list(n,1), mask_list(n,2)
546 if (iocheck > 0)
then
547 call mpp_error(fatal,
"fms2_io(parse_mask_table_2d): Error in reading mask_list from record variable")
548 elseif (iocheck < 0)
then
550 &
"fms2_io(parse_mask_table_2d): Error: mask_list not completely read from record variable")
555 if( n .NE. nmask)
call mpp_error(fatal, &
556 "fms2_io(parse_mask_table_2d): number of mask_list entry does not match nmask in file "//trim(mask_table))
561 maskmap(mask_list(n,1),mask_list(n,2)) = .false.
564 deallocate(mask_list, mask_table_contents)
572 character(len=*),
intent(in) :: mask_table
573 logical,
intent(out) :: maskmap(:,:,:)
574 character(len=*),
intent(in) :: modelname
576 integer :: nmask, layout(2)
577 integer,
allocatable :: mask_list(:,:)
578 character(len=:),
dimension(:),
allocatable :: mask_table_contents
579 integer :: iocheck, n, stdoutunit, ntiles, offset
580 character(len=128) :: record
585 call ascii_read(mask_table, mask_table_contents)
586 if(
mpp_pe() == mpp_root_pe() )
then
587 read(mask_table_contents(1), fmt=*, iostat=iocheck) nmask
588 if (iocheck > 0)
then
589 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error in reading nmask from file variable")
590 elseif (iocheck < 0)
then
591 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error: nmask not completely read from file variable")
593 write(stdoutunit,*)
"parse_mask_table: Number of domain regions masked in ", trim(modelname),
" = ", nmask
596 read(mask_table_contents(2), fmt=*, iostat=iocheck) layout(1), layout(2), ntiles
597 if (iocheck > 0)
then
598 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error in reading layout from file variable")
599 elseif (iocheck < 0)
then
600 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error: layout not completely read from file variable")
602 if( (layout(1) .NE.
size(maskmap,1)) .OR. (layout(2) .NE.
size(maskmap,2)) )
then
603 write(stdoutunit,*)
"layout=", layout,
", size(maskmap) = ",
size(maskmap,1),
size(maskmap,2)
604 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): layout in file "//trim(mask_table)// &
605 "does not match size of maskmap for "//trim(modelname))
607 if( ntiles .NE.
size(maskmap,3) )
then
608 write(stdoutunit,*)
"ntiles=", ntiles,
", size(maskmap,3) = ",
size(maskmap,3)
609 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): ntiles in file "//trim(mask_table)// &
610 "does not match size of maskmap for "//trim(modelname))
613 if(
mpp_npes() .NE. layout(1)*layout(2)*ntiles - nmask )
then
614 print*,
"layout=", layout, nmask,
mpp_npes()
616 .NE.
"fms2_io(parse_mask_table_3d): mpp_npes() layout(1)*layout(2) - nmask for "//trim(modelname))
625 allocate(mask_list(nmask,3))
627 if(
mpp_pe() == mpp_root_pe() )
then
630 do while (offset + n <
size(mask_table_contents)+1)
631 read(mask_table_contents(n+offset),
'(a)',iostat=iocheck) record
632 if (iocheck > 0)
then
633 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error in reading record from file variable")
634 elseif (iocheck < 0)
then
635 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error: record not completely read from file variable")
637 if (record(1:1) ==
'#')
then
640 elseif (record(1:10) ==
' ')
then
646 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): number of mask_list entry "// &
647 "is greater than nmask in file "//trim(mask_table) )
649 read(record,*,iostat=iocheck) mask_list(n,1), mask_list(n,2), mask_list(n,3)
650 if (iocheck > 0)
then
651 call mpp_error(fatal,
"fms2_io(parse_mask_table_3d): Error in reading mask_list from record variable")
652 elseif (iocheck < 0)
then
654 &
"fms2_io(parse_mask_table_3d): Error: mask_list not completely read from record variable")
659 if( n .NE. nmask)
call mpp_error(fatal, &
660 "fms2_io(parse_mask_table_3d): number of mask_list entry does not match nmask in file "//trim(mask_table))
666 maskmap(mask_list(n,1),mask_list(n,2),mask_list(n,3)) = .false.
668 deallocate(mask_list, mask_table_contents)
674 character(len=*),
intent(in) :: file_in
675 character(len=*),
intent(out) :: file_out
676 logical,
intent(in) :: is_no_domain
678 type(
domain2d),
intent(in),
optional,
target :: domain
679 integer,
intent(in),
optional :: tile_count
681 character(len=FMS_FILE_LEN) :: basefile
682 character(len=6) :: tilename
683 character(len=2) :: my_tile_str
684 integer :: lens, ntiles, ntileMe, tile, my_tile_id
685 integer,
dimension(:),
allocatable :: tile_id
686 type(
domain2d),
pointer,
save :: d_ptr =>null()
687 logical :: domain_exist
689 if(index(file_in,
'.nc', back=.true.)==0)
then
690 basefile = trim(file_in)
692 lens = len_trim(file_in)
693 if(file_in(lens-2:lens) .NE.
'.nc')
call mpp_error(fatal, &
694 'get_mosaic_tile_file_sg: .nc should be at the end of file '//trim(file_in))
695 basefile = file_in(1:lens-3)
701 domain_exist = .false.
702 if(
PRESENT(domain))
then
703 domain_exist = .true.
708 if(domain_exist)
then
710 allocate(tile_id(ntileme))
713 if(
present(tile_count)) tile = tile_count
714 my_tile_id = tile_id(tile)
717 if(ntiles > 1 .or. my_tile_id > 1 )
then
718 write(my_tile_str,
'(I0)') my_tile_id
719 tilename =
'tile'//trim(my_tile_str)
720 if(index(basefile,
'.'//trim(tilename),back=.true.) == 0)
then
721 basefile = trim(basefile)//
'.'//trim(tilename);
724 if(
allocated(tile_id))
deallocate(tile_id)
726 file_out = trim(basefile)//
'.nc'
735 character(len=*),
intent(in) :: file_in
736 character(len=*),
intent(out) :: file_out
737 type(
domainug),
intent(in),
optional :: domain
739 character(len=FMS_FILE_LEN) :: basefile
740 character(len=6) :: tilename
741 character(len=2) :: my_tile_str
742 integer :: lens, ntiles, my_tile_id
744 if(index(file_in,
'.nc', back=.true.)==0)
then
745 basefile = trim(file_in)
747 lens = len_trim(file_in)
748 if(file_in(lens-2:lens) .NE.
'.nc')
call mpp_error(fatal, &
749 'fms_io_mod: .nc should be at the end of file '//trim(file_in))
750 basefile = file_in(1:lens-3)
756 if(
PRESENT(domain))
then
757 ntiles = mpp_get_ug_domain_ntiles(domain)
758 my_tile_id = mpp_get_ug_domain_tile_id(domain)
761 if(ntiles > 1 .or. my_tile_id > 1 )
then
762 write(my_tile_str,
'(I0)') my_tile_id
763 tilename =
'tile'//trim(my_tile_str)
764 if(index(basefile,
'.'//trim(tilename),back=.true.) == 0)
then
765 basefile = trim(basefile)//
'.'//trim(tilename);
769 file_out = trim(basefile)//
'.nc'
775 character(len=*) ,
intent(out) :: string_out
777 string_out = trim(filename_appendix)
784 filename_appendix =
''
791 character(len=*) ,
intent(in) :: string_in
794 if (len_trim(filename_appendix) > 0)
then
795 call error(
"Set_filename_appendix: The filename appendix has already be set " &
796 //
"call 'nullify_filename_appendix' first")
799 filename_appendix = trim(string_in)
805 character(len=*) ,
intent(in) :: name_in
806 character(len=*),
intent(inout) :: name_out
811 length = len_trim(name_in)
812 name_out = name_in(1:length)
814 if(len_trim(filename_appendix) > 0)
then
817 i = index(trim(name_in),
".tile", back=.true.)
818 name_out = name_in(1:i-1) //
'.'//trim(filename_appendix)//name_in(i:length)
823 i = index(trim(name_in),
".nc", back=.true.)
825 name_out = name_in(1:i-1)//
'.'//trim(filename_appendix)//name_in(i:length)
828 name_out = name_in(1:length) //
'.'//trim(filename_appendix)
834 include
"array_utils.inc"
835 include
"array_utils_char.inc"
836 include
"get_data_type_string.inc"
839 end module fms_io_utils_mod
subroutine allocate_array_r8_kind_1d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine get_data_type_string_4d(sdata, type_string)
Return a string describing the input data's type.
subroutine put_array_section_i8_kind_2d(section, array, s, c)
Put a section of an array into a larger array.
subroutine put_array_section_r8_kind_4d(section, array, s, c)
Put a section of an array into a larger array.
subroutine allocate_array_char_5d(buf, sizes, initialize)
Allocate character arrays using an input array of sizes.
subroutine put_array_section_i4_kind_2d(section, array, s, c)
Put a section of an array into a larger array.
subroutine put_array_section_i4_kind_1d(section, array, s, c)
Put a section of an array into a larger array.
subroutine, public get_instance_filename(name_in, name_out)
Adds the filename_appendix to name_in and sets it as name_out.
subroutine allocate_array_char_3d(buf, sizes, initialize)
Allocate character arrays using an input array of sizes.
subroutine get_array_section_i8_kind_4d(section, array, s, c)
Get a section of larger array.
logical function has_io_domain_tile_string(string)
Determine if the "I/O domain tile string" (.nc.xxxx) exists in the input filename.
subroutine get_array_section_r4_kind_3d(section, array, s, c)
Get a section of larger array.
subroutine, public ascii_read(ascii_filename, ascii_var, num_lines, max_length)
Read the ascii text from filename ascii_filenameinto string array ascii_var
subroutine get_mosaic_tile_file_ug(file_in, file_out, domain)
Determine tile_file for unstructured grid based on filename and current tile on mpp_domain (this is m...
subroutine get_array_section_r8_kind_1d(section, array, s, c)
Get a section of larger array.
subroutine get_array_section_i8_kind_3d(section, array, s, c)
Get a section of larger array.
subroutine allocate_array_i8_kind_2d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine put_array_section_i4_kind_3d(section, array, s, c)
Put a section of an array into a larger array.
subroutine, public restart_filepath_mangle(dest, source)
Add ".res" to an input file path.
subroutine put_array_section_r8_kind_2d(section, array, s, c)
Put a section of an array into a larger array.
subroutine put_array_section_r8_kind_3d(section, array, s, c)
Put a section of an array into a larger array.
subroutine get_array_section_i8_kind_5d(section, array, s, c)
Get a section of larger array.
subroutine get_data_type_string_5d(sdata, type_string)
Return a string describing the input data's type.
subroutine get_array_section_r4_kind_1d(section, array, s, c)
Get a section of larger array.
logical function, public file_exists(path)
Determine if a file exists.
subroutine put_array_section_i8_kind_1d(section, array, s, c)
Put a section of an array into a larger array.
subroutine put_array_section_i8_kind_5d(section, array, s, c)
Put a section of an array into a larger array.
subroutine allocate_array_r4_kind_3d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_i8_kind_1d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine parse_mask_table_2d(mask_table, maskmap, modelname)
Populate 2D maskmap from mask_table given a model.
subroutine allocate_array_r8_kind_4d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_r8_kind_3d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine, public open_check(flag, fname)
logical function has_restart_string(string)
Determine if the "restart string" (.res.) exists in the input filename.
subroutine, public nullify_filename_appendix()
Clears the filename_appendix module 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.
subroutine allocate_array_i8_kind_5d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_i4_kind_2d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine, public get_filename_appendix(string_out)
Writes filename appendix to "string_out".
subroutine allocate_array_r4_kind_1d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine, public set_filename_appendix(string_in)
Save "string_in" as a module variable that will added to the filename of the restart files.
subroutine get_array_section_r8_kind_5d(section, array, s, c)
Get a section of larger array.
logical function, public string_compare(string1, string2, ignore_case)
Compare strings.
subroutine get_data_type_string_1d(sdata, type_string)
Return a string describing the input data's type.
subroutine put_array_section_r4_kind_5d(section, array, s, c)
Put a section of an array into a larger array.
subroutine allocate_array_char_4d(buf, sizes, initialize)
Allocate character arrays using an input array of sizes.
subroutine allocate_array_r8_kind_5d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_r4_kind_4d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine get_array_section_i4_kind_5d(section, array, s, c)
Get a section of larger array.
subroutine allocate_array_char_6d(buf, sizes, initialize)
Allocate character arrays using an input array of sizes.
subroutine get_array_section_i4_kind_3d(section, array, s, c)
Get a section of larger array.
subroutine allocate_array_r4_kind_2d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_i4_kind_4d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine put_array_section_i8_kind_4d(section, array, s, c)
Put a section of an array into a larger array.
subroutine allocate_array_i4_kind_3d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine put_array_section_r4_kind_3d(section, array, s, c)
Put a section of an array into a larger array.
subroutine parse_mask_table_3d(mask_table, maskmap, modelname)
Populate 3D maskmap from mask_table given a model.
subroutine get_mosaic_tile_file_sg(file_in, file_out, is_no_domain, domain, tile_count)
Determine tile_file for structured grid based on filename and current tile on mpp_domain (this is mos...
subroutine get_data_type_string_0d(sdata, type_string)
Return a string describing the input data's type.
subroutine get_array_section_i8_kind_1d(section, array, s, c)
Get a section of larger array.
subroutine get_array_section_r4_kind_4d(section, array, s, c)
Get a section of larger array.
subroutine put_array_section_r8_kind_1d(section, array, s, c)
Put a section of an array into a larger array.
subroutine get_array_section_i4_kind_2d(section, array, s, c)
Get a section of larger array.
subroutine get_data_type_string_3d(sdata, type_string)
Return a string describing the input data's type.
subroutine get_array_section_r8_kind_2d(section, array, s, c)
Get a section of larger array.
subroutine, public destroy_list(list)
Deallocate all nodes on a character linked list.
subroutine get_array_section_r8_kind_4d(section, array, s, c)
Get a section of larger array.
logical function has_domain_tile_string(string)
Determine if the "domain tile string" (.tilex.) exists in the input filename.
subroutine allocate_array_i8_kind_3d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine get_data_type_string_2d(sdata, type_string)
Return a string describing the input data's type.
subroutine put_array_section_i4_kind_5d(section, array, s, c)
Put a section of an array into a larger array.
subroutine get_array_section_i4_kind_4d(section, array, s, c)
Get a section of larger array.
subroutine, public append_to_list(list, string)
Add node to character linked list.
subroutine put_array_section_i4_kind_4d(section, array, s, c)
Put a section of an array into a larger array.
subroutine, public openmp_thread_trap()
Catch OpenMP parallel machines.
subroutine allocate_array_i4_kind_5d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_char_1d(buf, sizes, initialize)
Allocate character arrays using an input array of sizes.
subroutine allocate_array_r4_kind_5d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_i4_kind_1d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine put_array_section_r8_kind_5d(section, array, s, c)
Put a section of an array into a larger array.
subroutine get_array_section_i4_kind_1d(section, array, s, c)
Get a section of larger array.
subroutine put_array_section_i8_kind_3d(section, array, s, c)
Put a section of an array into a larger array.
subroutine get_array_section_i8_kind_2d(section, array, s, c)
Get a section of larger array.
subroutine put_array_section_r4_kind_1d(section, array, s, c)
Put a section of an array into a larger array.
subroutine allocate_array_i8_kind_4d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine put_array_section_r4_kind_4d(section, array, s, c)
Put a section of an array into a larger array.
subroutine allocate_array_r8_kind_2d(buf, sizes)
Allocate arrays using an input array of sizes.
subroutine allocate_array_char_2d(buf, sizes, initialize)
Allocate character arrays using an input array of sizes.
subroutine, public domain_tile_filepath_mangle(dest, source, domain_tile_id)
Add the domain tile id to an input filepath.
logical function, public is_in_list(list, string, ignore_case)
Determine if a string exists in a character linked list.
subroutine get_array_section_r4_kind_2d(section, array, s, c)
Get a section of larger array.
subroutine get_array_section_r8_kind_3d(section, array, s, c)
Get a section of larger array.
subroutine get_array_section_r4_kind_5d(section, array, s, c)
Get a section of larger array.
subroutine put_array_section_r4_kind_2d(section, array, s, c)
Put a section of an array into a larger array.
A linked list of strings.
subroutine, public string_copy(dest, source, check_for_null)
Safely copy a string from one buffer to another.
integer function, dimension(size(domain%tile_id(:))) mpp_get_tile_id(domain)
Returns the tile_id on current pe.
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.
The domain2D type contains all the necessary information to define the global, compute and data domai...
Domain information for managing data on unstructured grids.
integer function stdout()
This function returns the current standard fortran unit numbers for output.
subroutine read_ascii_file(FILENAME, LENGTH, Content, PELIST)
Reads any ascii file into a character array and broadcasts it to the non-root mpi-tasks....
integer function mpp_npes()
Returns processor count for current pelist.
integer function, dimension(2) get_ascii_file_num_lines_and_length(FILENAME, PELIST)
Function to determine the maximum line length and number of lines from an ascii file.
integer function mpp_pe()
Returns processor ID.
Perform parallel broadcasts.