24 module fms_io_utils_mod
 
   25 use, 
intrinsic :: iso_fortran_env, only: error_unit
 
   33                            mpp_get_ug_domain_ntiles, mpp_get_ug_domain_tile_id
 
   39 character(len=32), 
save :: filename_appendix = 
'' 
   71   character(len=128) :: string
 
   72   type(char_linked_list), 
pointer :: head => null()
 
  184 subroutine error(mesg)
 
  186   character(len=*), 
intent(in) :: mesg
 
  198   character(len=*), 
intent(in) :: path
 
  202   inquire(file=trim(path), exist=exists)
 
  211     if (omp_get_level() .gt. 0) 
then 
  212       call error(
"this routine is not thread-safe.  Please do not" &
 
  213                  //
" call it in an OpenMP threaded region.")
 
  223   character(len=*), 
intent(in) :: string1
 
  224   character(len=*), 
intent(in) :: string2
 
  225   logical,
intent(in), 
optional :: ignore_case
 
  228   if (len_trim(string1) .ne. len_trim(string2)) 
then 
  232   if (
present(ignore_case)) 
then 
  233     if (ignore_case) 
then 
  234       same = trim(lowercase(string1)) .eq. trim(lowercase(string2))
 
  238   same = trim(string1) .eq. trim(string2)
 
  248   character(len=*), 
intent(in) :: string
 
  249   logical, 
intent(in), 
optional :: ignore_case
 
  256   do while(
associated(p))
 
  270   character(len=*), 
intent(in) :: string
 
  278   if (
associated(list)) 
then 
  280     do while (
associated(p%head))
 
  298   do while (
associated(p))
 
  312   character(len=*), 
intent(in) :: string
 
  313   logical :: has_string
 
  320   i = index(trim(string), 
".tile", back=.true.)
 
  328       if (verify(string(i:i), 
".") .eq. 0 .and. j .ne. i) 
then 
  332       elseif (verify(string(i:i), 
"0123456789") .ne. 0) 
then 
  345   character(len=*), 
intent(inout) :: dest
 
  346   character(len=*), 
intent(in) :: source
 
  347   integer, 
intent(in) :: domain_tile_id
 
  352     call error(
"The file "//trim(source)//
" has a domain tile id (tileX) added. Check your open_file call")
 
  354   i = index(trim(source), 
".nc", back=.true.)
 
  356     call error(
"The file "//trim(source)//
" does not contain .nc. Check your open_file call")
 
  358   write(dest, 
'(a,i0,a)') source(1:i-1)//
".tile", &
 
  359                           domain_tile_id, source(i:len_trim(source))
 
  368   character(len=*), 
intent(in) :: string
 
  369   logical :: has_string
 
  375   i = index(trim(string), 
".nc.", back=.true.)
 
  380       if (verify(string(i:i), 
"0123456789") .ne. 0) 
then 
  393   character(len=*), 
intent(inout) :: dest
 
  394   character(len=*), 
intent(in) :: source
 
  395   integer, 
intent(in) :: io_domain_tile_id
 
  398     call error(
"The file "//trim(source)// &
 
  399              & 
" has already had a domain tile id (.nc.XXXX) added. Check your open_file call.")
 
  401   write(dest,
'(a,i4.4)') trim(source)//
".", io_domain_tile_id
 
  410   character(len=*), 
intent(in) :: string
 
  411   logical :: has_string
 
  413   has_string = index(trim(string), 
".res.", back=.true.) .ne. 0
 
  420   character(len=*), 
intent(inout) :: dest
 
  421   character(len=*), 
intent(in) :: source
 
  430     i = index(trim(source), 
".tile", back=.true.)
 
  432     i = index(trim(source), 
".nc", back=.true.)
 
  434       call error(
"The file "//trim(source)//
" does not contain .nc. Check your open_file call")
 
  437   call string_copy(dest, source(1:i-1)//
".res"//source(i:len_trim(source)))
 
  442   logical, 
intent(in) :: flag
 
  443   character(len=*), 
intent(in), 
optional :: fname
 
  446      if (
present(fname)) 
then 
  447           call mpp_error(fatal, 
"Error occurred while opening file "//trim(fname))
 
  449           call mpp_error(fatal, 
"Error occurred while opening file.")
 
  456 subroutine ascii_read(ascii_filename, ascii_var, num_lines, max_length)
 
  457   character(len=*), 
intent(in) :: ascii_filename
 
  458   character(len=:), 
dimension(:), 
allocatable, 
intent(out) :: ascii_var
 
  461   integer, 
optional, 
intent(out) :: num_lines
 
  462   integer, 
optional, 
intent(out) :: max_length
 
  463   integer, 
dimension(2) :: lines_and_length
 
  464   if(
allocated(ascii_var)) 
deallocate(ascii_var)
 
  466   allocate(
character(len=lines_and_length(2))::ascii_var(lines_and_length(1)))
 
  468   if(
present(num_lines)) num_lines = lines_and_length(1)
 
  469   if(
present(max_length)) max_length = lines_and_length(2)
 
  475   character(len=*), 
intent(in) :: mask_table
 
  476   logical,         
intent(out) :: maskmap(:,:)
 
  477   character(len=*), 
intent(in) :: modelname
 
  479   integer                      :: nmask, layout(2)
 
  480   integer, 
allocatable         :: mask_list(:,:)
 
  481   character(len=:), 
dimension(:), 
allocatable :: mask_table_contents
 
  482   integer                      :: iocheck, n, stdoutunit, offset
 
  483   character(len=128)           :: record
 
  488   call ascii_read(mask_table, mask_table_contents)
 
  489   if( 
mpp_pe() == mpp_root_pe() ) 
then 
  490      read(mask_table_contents(1), fmt=*, iostat=iocheck) nmask
 
  491      if (iocheck > 0) 
then 
  492          call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error in reading nmask from file variable")
 
  493      elseif (iocheck < 0) 
then 
  494          call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error: nmask not completely read from file variable")
 
  496      write(stdoutunit,*)
"parse_mask_table: Number of domain regions masked in ", trim(modelname), 
" = ", nmask
 
  499         read(mask_table_contents(2), fmt=*, iostat=iocheck) layout
 
  500         if (iocheck > 0) 
then 
  501             call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error in reading layout from file variable")
 
  502         elseif (iocheck < 0) 
then 
  503             call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error: layout not completely read from file variable")
 
  505         if( (layout(1) .NE. 
size(maskmap,1)) .OR. (layout(2) .NE. 
size(maskmap,2)) )
then 
  506            write(stdoutunit,*)
"layout=", layout, 
", size(maskmap) = ", 
size(maskmap,1), 
size(maskmap,2)
 
  507            call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): layout in file "//trim(mask_table)// &
 
  508                   "does not match size of maskmap for "//trim(modelname))
 
  512            .NE.
"fms2_io(parse_mask_table_2d): mpp_npes()  layout(1)*layout(2) - nmask for "//trim(modelname))
 
  520    allocate(mask_list(nmask,2))
 
  522    if( 
mpp_pe() == mpp_root_pe() ) 
then 
  525      do while (offset + n < 
size(mask_table_contents)+1)
 
  526         read(mask_table_contents(n+offset),
'(a)',iostat=iocheck) record
 
  527         if (iocheck > 0) 
then 
  528             call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error in reading record from file variable")
 
  529         elseif (iocheck < 0) 
then 
  530             call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error: record not completely read from file variable")
 
  532         if (record(1:1) == 
'#') 
then 
  535         elseif (record(1:10) == 
'          ') 
then 
  541            call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): number of mask_list entry "// &
 
  542                 "is greater than nmask in file "//trim(mask_table) )
 
  544         read(record,*,iostat=iocheck) mask_list(n,1), mask_list(n,2)
 
  545         if (iocheck > 0) 
then 
  546             call mpp_error(fatal, 
"fms2_io(parse_mask_table_2d): Error in reading mask_list from record variable")
 
  547         elseif (iocheck < 0) 
then 
  549                         &  
"fms2_io(parse_mask_table_2d): Error: mask_list not completely read from record variable")
 
  554      if( n .NE. nmask) 
call mpp_error(fatal, &
 
  555         "fms2_io(parse_mask_table_2d): number of mask_list entry does not match nmask in file "//trim(mask_table))
 
  560      maskmap(mask_list(n,1),mask_list(n,2)) = .false.
 
  563   deallocate(mask_list, mask_table_contents)
 
  571   character(len=*), 
intent(in) :: mask_table
 
  572   logical,         
intent(out) :: maskmap(:,:,:)
 
  573   character(len=*), 
intent(in) :: modelname
 
  575   integer                      :: nmask, layout(2)
 
  576   integer, 
allocatable         :: mask_list(:,:)
 
  577   character(len=:), 
dimension(:), 
allocatable :: mask_table_contents
 
  578   integer                      :: iocheck, n, stdoutunit, ntiles, offset
 
  579   character(len=128)           :: record
 
  584   call ascii_read(mask_table, mask_table_contents)
 
  585   if( 
mpp_pe() == mpp_root_pe() ) 
then 
  586      read(mask_table_contents(1), fmt=*, iostat=iocheck) nmask
 
  587      if (iocheck > 0) 
then 
  588          call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error in reading nmask from file variable")
 
  589      elseif (iocheck < 0) 
then 
  590          call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error: nmask not completely read from file variable")
 
  592      write(stdoutunit,*)
"parse_mask_table: Number of domain regions masked in ", trim(modelname), 
" = ", nmask
 
  595         read(mask_table_contents(2), fmt=*, iostat=iocheck) layout(1), layout(2), ntiles
 
  596         if (iocheck > 0) 
then 
  597             call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error in reading layout from file variable")
 
  598         elseif (iocheck < 0) 
then 
  599             call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error: layout not completely read from file variable")
 
  601         if( (layout(1) .NE. 
size(maskmap,1)) .OR. (layout(2) .NE. 
size(maskmap,2)) )
then 
  602            write(stdoutunit,*)
"layout=", layout, 
", size(maskmap) = ", 
size(maskmap,1), 
size(maskmap,2)
 
  603            call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): layout in file "//trim(mask_table)// &
 
  604                   "does not match size of maskmap for "//trim(modelname))
 
  606         if( ntiles .NE. 
size(maskmap,3) ) 
then 
  607            write(stdoutunit,*)
"ntiles=", ntiles, 
", size(maskmap,3) = ", 
size(maskmap,3)
 
  608            call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): ntiles in file "//trim(mask_table)// &
 
  609                   "does not match size of maskmap for "//trim(modelname))
 
  612         if( 
mpp_npes() .NE. layout(1)*layout(2)*ntiles - nmask ) 
then 
  613            print*, 
"layout=", layout, nmask, 
mpp_npes()
 
  615               .NE.
"fms2_io(parse_mask_table_3d): mpp_npes()  layout(1)*layout(2) - nmask for "//trim(modelname))
 
  624    allocate(mask_list(nmask,3))
 
  626    if( 
mpp_pe() == mpp_root_pe() ) 
then 
  629      do while (offset + n < 
size(mask_table_contents)+1)
 
  630         read(mask_table_contents(n+offset),
'(a)',iostat=iocheck) record
 
  631         if (iocheck > 0) 
then 
  632             call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error in reading record from file variable")
 
  633         elseif (iocheck < 0) 
then 
  634             call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error: record not completely read from file variable")
 
  636         if (record(1:1) == 
'#') 
then 
  639         elseif (record(1:10) == 
'          ') 
then 
  645            call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): number of mask_list entry "// &
 
  646                 "is greater than nmask in file "//trim(mask_table) )
 
  648         read(record,*,iostat=iocheck) mask_list(n,1), mask_list(n,2), mask_list(n,3)
 
  649         if (iocheck > 0) 
then 
  650             call mpp_error(fatal, 
"fms2_io(parse_mask_table_3d): Error in reading mask_list from record variable")
 
  651         elseif (iocheck < 0) 
then 
  653                           &  
"fms2_io(parse_mask_table_3d): Error: mask_list not completely read from record variable")
 
  658      if( n .NE. nmask) 
call mpp_error(fatal, &
 
  659         "fms2_io(parse_mask_table_3d): number of mask_list entry does not match nmask in file "//trim(mask_table))
 
  665      maskmap(mask_list(n,1),mask_list(n,2),mask_list(n,3)) = .false.
 
  667   deallocate(mask_list, mask_table_contents)
 
  673   character(len=*), 
intent(in)            :: file_in
 
  674   character(len=*), 
intent(out)           :: file_out
 
  675   logical,          
intent(in)            :: is_no_domain
 
  677   type(
domain2d),   
intent(in), 
optional, 
target :: domain
 
  678   integer,          
intent(in), 
optional  :: tile_count
 
  680   character(len=FMS_FILE_LEN)                    :: basefile
 
  681   character(len=6)                               :: tilename
 
  682   character(len=2)                               :: my_tile_str
 
  683   integer                                        :: lens, ntiles, ntileMe, tile, my_tile_id
 
  684   integer, 
dimension(:), 
allocatable             :: tile_id
 
  685   type(
domain2d), 
pointer, 
save                  :: d_ptr =>null()
 
  686   logical                                        :: domain_exist
 
  688   if(index(file_in, 
'.nc', back=.true.)==0) 
then 
  689      basefile = trim(file_in)
 
  691      lens = len_trim(file_in)
 
  692      if(file_in(lens-2:lens) .NE. 
'.nc') 
call mpp_error(fatal, &
 
  693           'get_mosaic_tile_file_sg: .nc should be at the end of file '//trim(file_in))
 
  694      basefile = file_in(1:lens-3)
 
  700   domain_exist = .false.
 
  701   if(
PRESENT(domain))
then 
  702      domain_exist = .true.
 
  707   if(domain_exist) 
then 
  709      allocate(tile_id(ntileme))
 
  712      if(
present(tile_count)) tile = tile_count
 
  713      my_tile_id = tile_id(tile)
 
  716   if(ntiles > 1 .or. my_tile_id > 1 )
then 
  717      write(my_tile_str, 
'(I0)') my_tile_id
 
  718      tilename = 
'tile'//trim(my_tile_str)
 
  719      if(index(basefile,
'.'//trim(tilename),back=.true.) == 0)
then 
  720         basefile = trim(basefile)//
'.'//trim(tilename);
 
  723   if(
allocated(tile_id)) 
deallocate(tile_id)
 
  725   file_out = trim(basefile)//
'.nc' 
  734   character(len=*), 
intent(in)           :: file_in
 
  735   character(len=*), 
intent(out)          :: file_out
 
  736   type(
domainug),   
intent(in), 
optional :: domain
 
  738   character(len=FMS_FILE_LEN)            :: basefile
 
  739   character(len=6)                       :: tilename
 
  740   character(len=2)                       :: my_tile_str
 
  741   integer                                :: lens, ntiles, my_tile_id
 
  743   if(index(file_in, 
'.nc', back=.true.)==0) 
then 
  744      basefile = trim(file_in)
 
  746      lens = len_trim(file_in)
 
  747      if(file_in(lens-2:lens) .NE. 
'.nc') 
call mpp_error(fatal, &
 
  748           'fms_io_mod: .nc should be at the end of file '//trim(file_in))
 
  749      basefile = file_in(1:lens-3)
 
  755   if(
PRESENT(domain))
then 
  756      ntiles = mpp_get_ug_domain_ntiles(domain)
 
  757      my_tile_id = mpp_get_ug_domain_tile_id(domain)
 
  760   if(ntiles > 1 .or. my_tile_id > 1 )
then 
  761      write(my_tile_str, 
'(I0)') my_tile_id
 
  762      tilename = 
'tile'//trim(my_tile_str)
 
  763      if(index(basefile,
'.'//trim(tilename),back=.true.) == 0)
then 
  764         basefile = trim(basefile)//
'.'//trim(tilename);
 
  768   file_out = trim(basefile)//
'.nc' 
  774   character(len=*) , 
intent(out) :: string_out
 
  776   string_out = trim(filename_appendix)
 
  783   filename_appendix = 
'' 
  790   character(len=*) , 
intent(in) :: string_in
 
  793   if (len_trim(filename_appendix) > 0) 
then 
  794       call error(
"Set_filename_appendix: The filename appendix has already be set " &
 
  795                  //
"call 'nullify_filename_appendix' first")
 
  798   filename_appendix = trim(string_in)
 
  804   character(len=*)  , 
intent(in)  :: name_in
 
  805   character(len=*), 
intent(inout) :: name_out
 
  810   length = len_trim(name_in)
 
  811   name_out = name_in(1:length)
 
  813   if(len_trim(filename_appendix) > 0) 
then 
  816          i = index(trim(name_in), 
".tile", back=.true.)
 
  817          name_out = name_in(1:i-1)    //
'.'//trim(filename_appendix)//name_in(i:length)
 
  822      i = index(trim(name_in), 
".nc", back=.true.)
 
  824         name_out = name_in(1:i-1)//
'.'//trim(filename_appendix)//name_in(i:length)
 
  826         i = index(trim(name_in), 
".yaml", back=.true.)
 
  829           name_out = name_in(1:i-1)//
'.'//trim(filename_appendix)//name_in(i:length)
 
  832           name_out = name_in(1:length)  //
'.'//trim(filename_appendix)
 
  839 include 
"array_utils.inc" 
  840 include 
"array_utils_char.inc" 
  841 include 
"get_data_type_string.inc" 
  844 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.