37 character(len=*),
intent(in) :: filename
38 character(len=*),
intent(in) :: fieldname
39 real,
intent(inout) :: fdata
40 type(domainug),
intent(in) :: domain
41 integer,
intent(in),
optional :: timelevel
42 integer,
dimension(:),
intent(in),
optional :: start
43 integer,
dimension(:),
intent(in),
optional :: nread
44 integer,
intent(in),
optional :: threading
47 real,
dimension(1) :: tmp
51 if (
present(timelevel))
then
52 if (tlevel .le. 0)
then
53 call mpp_error(fatal, &
54 "fms_io_unstructured_read_r_scalar:" &
55 //
" the inputted time level must be at" &
88 character(len=*),
intent(in) :: filename
89 character(len=*),
intent(in) :: fieldname
90 real,
dimension(:),
intent(inout) :: fdata
91 type(domainug),
intent(in) :: domain
92 integer,
intent(in),
optional :: timelevel
93 integer,
dimension(:),
intent(in),
optional :: start
94 integer,
dimension(:),
intent(in),
optional :: nread
95 integer,
intent(in),
optional :: threading
98 logical(INT_KIND) :: found_file
99 character(len=256) :: fname
100 logical(INT_KIND) :: read_dist
102 integer(INT_KIND) :: funit
103 integer(INT_KIND) :: file_index
104 integer(INT_KIND) :: index_field
107 if (.not. module_is_initialized)
then
108 call mpp_error(fatal, &
109 "fms_io_unstructured_read_r_1D:" &
110 //
" you must first call fms_io_init.")
120 if (.not. found_file)
then
121 call mpp_error(fatal, &
122 "fms_io_unstructured_read_r_1D:" &
123 //
" file "//trim(filename) &
124 //
" (with the consideration of the domain tile ids)" &
138 call get_field_id(funit, &
146 if (files_read(file_index)%var(index_field)%is_dimvar)
then
147 call mpp_get_axis_data(files_read(file_index)%var(index_field)%axis, &
150 call mpp_io_unstructured_read(funit, &
151 files_read(file_index)%var(index_field)%field, &
176 character(len=*),
intent(in) :: filename
177 character(len=*),
intent(in) :: fieldname
178 real,
dimension(:,:),
intent(inout) :: fdata
179 type(domainug),
intent(in) :: domain
180 integer,
intent(in),
optional :: timelevel
181 integer,
dimension(:),
intent(in),
optional :: start
182 integer,
dimension(:),
intent(in),
optional :: nread
183 integer,
intent(in),
optional :: threading
186 logical(INT_KIND) :: found_file
187 character(len=256) :: fname
188 logical(INT_KIND) :: read_dist
190 integer(INT_KIND) :: funit
191 integer(INT_KIND) :: file_index
192 integer(INT_KIND) :: index_field
195 if (.not. module_is_initialized)
then
196 call mpp_error(fatal, &
197 "fms_io_unstructured_read_r_2D:" &
198 //
" you must first call fms_io_init.")
208 if (.not. found_file)
then
209 call mpp_error(fatal, &
210 "fms_io_unstructured_read_r_2D:" &
211 //
" file "//trim(filename) &
212 //
" (with the consideration of the domain tile ids)" &
226 call get_field_id(funit, &
234 if (files_read(file_index)%var(index_field)%is_dimvar)
then
235 call mpp_get_axis_data(files_read(file_index)%var(index_field)%axis, &
238 call mpp_io_unstructured_read(funit, &
239 files_read(file_index)%var(index_field)%field, &
264 character(len=*),
intent(in) :: filename
265 character(len=*),
intent(in) :: fieldname
266 real,
dimension(:,:,:),
intent(inout) :: fdata
267 type(domainug),
intent(in) :: domain
268 integer,
intent(in),
optional :: timelevel
269 integer,
dimension(:),
intent(in),
optional :: start
270 integer,
dimension(:),
intent(in),
optional :: nread
271 integer,
intent(in),
optional :: threading
274 logical(INT_KIND) :: found_file
275 character(len=256) :: fname
276 logical(INT_KIND) :: read_dist
278 integer(INT_KIND) :: funit
279 integer(INT_KIND) :: file_index
280 integer(INT_KIND) :: index_field
283 if (.not. module_is_initialized)
then
284 call mpp_error(fatal, &
285 "fms_io_unstructured_read_r_3D:" &
286 //
" you must first call fms_io_init.")
296 if (.not. found_file)
then
297 call mpp_error(fatal, &
298 "fms_io_unstructured_read_r_3D:" &
299 //
" file "//trim(filename) &
300 //
" (with the consideration of the domain tile ids)" &
314 call get_field_id(funit, &
322 if (files_read(file_index)%var(index_field)%is_dimvar)
then
323 call mpp_get_axis_data(files_read(file_index)%var(index_field)%axis, &
326 call mpp_io_unstructured_read(funit, &
327 files_read(file_index)%var(index_field)%field, &
352 character(len=*),
intent(in) :: filename
353 character(len=*),
intent(in) :: fieldname
354 integer,
intent(inout) :: fdata
355 type(domainug),
intent(in) :: domain
356 integer,
intent(in),
optional :: timelevel
357 integer,
dimension(:),
intent(in),
optional :: start
358 integer,
dimension(:),
intent(in),
optional :: nread
359 integer,
intent(in),
optional :: threading
362 real,
dimension(1) :: tmp
366 if (
present(timelevel))
then
367 if (tlevel .le. 0)
then
368 call mpp_error(fatal, &
369 "fms_io_unstructured_read_i_scalar:" &
370 //
" the inputted time level must be at" &
385 fdata = ceiling(tmp(1))
403 character(len=*),
intent(in) :: filename
404 character(len=*),
intent(in) :: fieldname
405 integer,
dimension(:),
intent(inout) :: fdata
406 type(domainug),
intent(in) :: domain
407 integer,
intent(in),
optional :: timelevel
408 integer,
dimension(:),
intent(in),
optional :: start
409 integer,
dimension(:),
intent(in),
optional :: nread
410 integer,
intent(in),
optional :: threading
413 real,
dimension(size(fdata)) :: tmp
414 integer(INT_KIND) :: i
426 fdata(i) = ceiling(tmp(i))
445 character(len=*),
intent(in) :: filename
446 character(len=*),
intent(in) :: fieldname
447 integer,
dimension(:,:),
intent(inout) :: fdata
448 type(domainug),
intent(in) :: domain
449 integer,
intent(in),
optional :: timelevel
450 integer,
dimension(:),
intent(in),
optional :: start
451 integer,
dimension(:),
intent(in),
optional :: nread
452 integer,
intent(in),
optional :: threading
455 real,
dimension(size(fdata,1),size(fdata,2)) :: tmp
456 integer(INT_KIND) :: i
457 integer(INT_KIND) :: j
468 do i = 1,
size(fdata,2)
469 do j = 1,
size(fdata,1)
470 fdata(j,i) = ceiling(tmp(j,i))
subroutine fms_io_unstructured_read_r_2d(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a two dimensional "compressed" field from a file associated with an unstructured mpp domain.
subroutine fms_io_unstructured_read_i_scalar(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a scalar field from a file associated with an unstructured mpp domain.
subroutine fms_io_unstructured_read_r_1d(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a one dimensional "compressed" field from a file associated with an unstructured mpp domain.
logical(int_kind) function fms_io_unstructured_get_file_name(orig_file, actual_file, read_dist, domain)
For an inputted file name, check if it or any of its variants exist. For a file named "foo",...
subroutine fms_io_unstructured_read_r_scalar(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a scalar field from a file associated with an unstructured mpp domain.
subroutine fms_io_unstructured_read_i_2d(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a two dimensional "compressed" field from a file associated with an unstructured mpp domain.
subroutine fms_io_unstructured_get_file_unit(filename, funit, index_file, read_dist, domain)
Return the file unit and index in the "files_read" module array for the inputted file....
subroutine fms_io_unstructured_read_r_3d(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a three dimensional "compressed" field from a file associated with an unstructured mpp domain...
subroutine fms_io_unstructured_read_i_1d(filename, fieldname, fdata, domain, timelevel, start, nread, threading)
Read in a one dimensional "compressed" field from a file associated with an unstructured mpp domain.