FV3 Bundle
fms_io_unstructured_read.inc
Go to the documentation of this file.
1 !***********************************************************************
2 !* GNU Lesser General Public License
3 !*
4 !* This file is part of the GFDL Flexible Modeling System (FMS).
5 !*
6 !* FMS is free software: you can redistribute it and/or modify it under
7 !* the terms of the GNU Lesser General Public License as published by
8 !* the Free Software Foundation, either version 3 of the License, or (at
9 !* your option) any later version.
10 !*
11 !* FMS is distributed in the hope that it will be useful, but WITHOUT
12 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 !* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 !* for more details.
15 !*
16 !* You should have received a copy of the GNU Lesser General Public
17 !* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18 !***********************************************************************
19 !----------
20 !ug support
21 
22 !------------------------------------------------------------------------------
23 !>Read in a scalar field from a file associated with an unstructured mpp
24 !!domain.
25 subroutine fms_io_unstructured_read_r_scalar(filename, &
26  fieldname, &
27  fdata, &
28  domain, &
29  timelevel, &
30  start, &
31  nread, &
32  threading)
33 
34  !Inputs/Outputs
35  character(len=*),intent(in) :: filename !<The name of a file.
36  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
37  real,intent(inout) :: fdata !<Data to be read in from the file.
38  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
39  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
40  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
41  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
42  integer,intent(in),optional :: threading !<Threading flag.
43 
44  !Local variables
45  real,dimension(1) :: tmp !<Dummy variable.
46  integer :: tlevel !<Dummy variable.
47 
48  !Use the 1D case.
49  if (present(timelevel)) then
50  if (tlevel .le. 0) then
51  call mpp_error(FATAL, &
52  "fms_io_unstructured_read_r_scalar:" &
53  //" the inputted time level must be at" &
54  //" least one.")
55  endif
56  tlevel = timelevel
57  else
58  tlevel = 1
59  endif
60  call fms_io_unstructured_read_r_1D(filename, &
61  fieldname, &
62  tmp, &
63  domain, &
64  tlevel, &
65  start, &
66  nread, &
67  threading)
68  fdata = tmp(1)
69 
70  return
71 end subroutine fms_io_unstructured_read_r_scalar
72 
73 !------------------------------------------------------------------------------
74 !>Read in a one dimensional "compressed" field from a file associated with
75 !!an unstructured mpp domain.
76 subroutine fms_io_unstructured_read_r_1D(filename, &
77  fieldname, &
78  fdata, &
79  domain, &
80  timelevel, &
81  start, &
82  nread, &
83  threading)
84 
85  !Inputs/Outputs
86  character(len=*),intent(in) :: filename !<The name of a file.
87  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
88  real,dimension(:),intent(inout) :: fdata !<Data to be read in from the file.
89  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
90  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
91  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
92  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
93  integer,intent(in),optional :: threading !<Threading flag.
94 
95  !Local variables
96  logical(INT_KIND) :: found_file !<Flag telling if the input file or any of its variants exist.
97  character(len=256) :: fname !<Name of file that is actually found.
98  logical(INT_KIND) :: read_dist !<Flag telling if the file is "distributed" (has I/O domain tile id appended onto the end).
99  integer(INT_KIND) :: funit !<File unit for the inputted file.
100  integer(INT_KIND) :: file_index !<Index of the inputted file in the "files_read" module array.
101  integer(INT_KIND) :: index_field !<Index of the inputted field in the files_read(file_index)%var array.
102 
103  !Make sure that the module has been initialized.
104  if (.not. module_is_initialized) then
105  call mpp_error(FATAL, &
106  "fms_io_unstructured_read_r_1D:" &
107  //" you must first call fms_io_init.")
108  endif
109 
110  !Get the full name of the input file.
111  found_file = fms_io_unstructured_get_file_name(filename, &
112  fname, &
113  read_dist, &
114  domain)
115 
116  !If the file does not exit, then throw a fatal error.
117  if (.not. found_file) then
118  call mpp_error(FATAL, &
119  "fms_io_unstructured_read_r_1D:" &
120  //" file "//trim(filename) &
121  //" (with the consideration of the domain tile ids)" &
122  //" was not found.")
123  endif
124 
125  !Get the file unit and in the index of the file in the "files_read" module
126  !array.
127  call fms_io_unstructured_get_file_unit(fname, &
128  funit, &
129  file_index, &
130  read_dist, &
131  domain)
132 
133  !Get the index of the inputted field in the files_read(file_index)%var
134  !array.
135  call get_field_id(funit, &
136  file_index, &
137  fieldname, &
138  index_field, &
139  .false., &
140  .false.)
141 
142  !Read in the field data.
143  if (files_read(file_index)%var(index_field)%is_dimvar) then
144  call mpp_get_axis_data(files_read(file_index)%var(index_field)%axis, &
145  fdata)
146  else
147  call mpp_io_unstructured_read(funit, &
148  files_read(file_index)%var(index_field)%field, &
149  domain, &
150  fdata, &
151  timelevel, &
152  start, &
153  nread, &
154  threading)
155  endif
156 
157  return
158 end subroutine fms_io_unstructured_read_r_1D
159 
160 !------------------------------------------------------------------------------
161 !>Read in a two dimensional "compressed" field from a file associated with
162 !!an unstructured mpp domain.
163 subroutine fms_io_unstructured_read_r_2D(filename, &
164  fieldname, &
165  fdata, &
166  domain, &
167  timelevel, &
168  start, &
169  nread, &
170  threading)
171 
172  !Inputs/Outputs
173  character(len=*),intent(in) :: filename !<The name of a file.
174  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
175  real,dimension(:,:),intent(inout) :: fdata !<Data to be read in from the file.
176  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
177  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
178  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
179  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
180  integer,intent(in),optional :: threading !<Threading flag.
181 
182  !Local variables
183  logical(INT_KIND) :: found_file !<Flag telling if the input file or any of its variants exist.
184  character(len=256) :: fname !<Name of file that is actually found.
185  logical(INT_KIND) :: read_dist !<Flag telling if the file is "distributed" (has I/O domain tile id appended onto the end).
186  integer(INT_KIND) :: funit !<File unit for the inputted file.
187  integer(INT_KIND) :: file_index !<Index of the inputted file in the "files_read" module array.
188  integer(INT_KIND) :: index_field !<Index of the inputted field in the files_read(file_index)%var array.
189 
190  !Make sure that the module has been initialized.
191  if (.not. module_is_initialized) then
192  call mpp_error(FATAL, &
193  "fms_io_unstructured_read_r_2D:" &
194  //" you must first call fms_io_init.")
195  endif
196 
197  !Get the full name of the input file.
198  found_file = fms_io_unstructured_get_file_name(filename, &
199  fname, &
200  read_dist, &
201  domain)
202 
203  !If the file does not exit, then throw a fatal error.
204  if (.not. found_file) then
205  call mpp_error(FATAL, &
206  "fms_io_unstructured_read_r_2D:" &
207  //" file "//trim(filename) &
208  //" (with the consideration of the domain tile ids)" &
209  //" was not found.")
210  endif
211 
212  !Get the file unit and in the index of the file in the "files_read" module
213  !array.
214  call fms_io_unstructured_get_file_unit(fname, &
215  funit, &
216  file_index, &
217  read_dist, &
218  domain)
219 
220  !Get the index of the inputted field in the files_read(file_index)%var
221  !array.
222  call get_field_id(funit, &
223  file_index, &
224  fieldname, &
225  index_field, &
226  .false., &
227  .false.)
228 
229  !Read in the field data.
230  if (files_read(file_index)%var(index_field)%is_dimvar) then
231  call mpp_get_axis_data(files_read(file_index)%var(index_field)%axis, &
232  fdata(:,1))
233  else
234  call mpp_io_unstructured_read(funit, &
235  files_read(file_index)%var(index_field)%field, &
236  domain, &
237  fdata, &
238  timelevel, &
239  start, &
240  nread, &
241  threading)
242  endif
243 
244  return
245 end subroutine fms_io_unstructured_read_r_2D
246 
247 !------------------------------------------------------------------------------
248 !>Read in a three dimensional "compressed" field from a file associated with
249 !!an unstructured mpp domain.
250 subroutine fms_io_unstructured_read_r_3D(filename, &
251  fieldname, &
252  fdata, &
253  domain, &
254  timelevel, &
255  start, &
256  nread, &
257  threading)
258 
259  !Inputs/Outputs
260  character(len=*),intent(in) :: filename !<The name of a file.
261  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
262  real,dimension(:,:,:),intent(inout) :: fdata !<Data to be read in from the file.
263  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
264  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
265  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
266  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
267  integer,intent(in),optional :: threading !<Threading flag.
268 
269  !Local variables
270  logical(INT_KIND) :: found_file !<Flag telling if the input file or any of its variants exist.
271  character(len=256) :: fname !<Name of file that is actually found.
272  logical(INT_KIND) :: read_dist !<Flag telling if the file is "distributed" (has I/O domain tile id appended onto the end).
273  integer(INT_KIND) :: funit !<File unit for the inputted file.
274  integer(INT_KIND) :: file_index !<Index of the inputted file in the "files_read" module array.
275  integer(INT_KIND) :: index_field !<Index of the inputted field in the files_read(file_index)%var array.
276 
277  !Make sure that the module has been initialized.
278  if (.not. module_is_initialized) then
279  call mpp_error(FATAL, &
280  "fms_io_unstructured_read_r_3D:" &
281  //" you must first call fms_io_init.")
282  endif
283 
284  !Get the full name of the input file.
285  found_file = fms_io_unstructured_get_file_name(filename, &
286  fname, &
287  read_dist, &
288  domain)
289 
290  !If the file does not exit, then throw a fatal error.
291  if (.not. found_file) then
292  call mpp_error(FATAL, &
293  "fms_io_unstructured_read_r_3D:" &
294  //" file "//trim(filename) &
295  //" (with the consideration of the domain tile ids)" &
296  //" was not found.")
297  endif
298 
299  !Get the file unit and in the index of the file in the "files_read" module
300  !array.
301  call fms_io_unstructured_get_file_unit(fname, &
302  funit, &
303  file_index, &
304  read_dist, &
305  domain)
306 
307  !Get the index of the inputted field in the files_read(file_index)%var
308  !array.
309  call get_field_id(funit, &
310  file_index, &
311  fieldname, &
312  index_field, &
313  .false., &
314  .false.)
315 
316  !Read in the field data.
317  if (files_read(file_index)%var(index_field)%is_dimvar) then
318  call mpp_get_axis_data(files_read(file_index)%var(index_field)%axis, &
319  fdata(:,1,1))
320  else
321  call mpp_io_unstructured_read(funit, &
322  files_read(file_index)%var(index_field)%field, &
323  domain, &
324  fdata, &
325  timelevel, &
326  start, &
327  nread, &
328  threading)
329  endif
330 
331  return
332 end subroutine fms_io_unstructured_read_r_3D
333 
334 !------------------------------------------------------------------------------
335 !>Read in a scalar field from a file associated with an unstructured mpp
336 !!domain.
337 subroutine fms_io_unstructured_read_i_scalar(filename, &
338  fieldname, &
339  fdata, &
340  domain, &
341  timelevel, &
342  start, &
343  nread, &
344  threading)
345 
346  !Inputs/Outputs
347  character(len=*),intent(in) :: filename !<The name of a file.
348  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
349  integer,intent(inout) :: fdata !<Data to be read in from the file.
350  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
351  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
352  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
353  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
354  integer,intent(in),optional :: threading !<Threading flag.
355 
356  !Local variables
357  real,dimension(1) :: tmp !<Dummy variable.
358  integer :: tlevel !<Dummy variable.
359 
360  !Read in the data.
361  if (present(timelevel)) then
362  if (tlevel .le. 0) then
363  call mpp_error(FATAL, &
364  "fms_io_unstructured_read_i_scalar:" &
365  //" the inputted time level must be at" &
366  //" least one.")
367  endif
368  tlevel = timelevel
369  else
370  tlevel = 1
371  endif
372  call fms_io_unstructured_read_r_1D(filename, &
373  fieldname, &
374  tmp, &
375  domain, &
376  tlevel, &
377  start, &
378  nread, &
379  threading)
380  fdata = ceiling(tmp(1))
381 
382  return
383 end subroutine fms_io_unstructured_read_i_scalar
384 
385 !------------------------------------------------------------------------------
386 !>Read in a one dimensional "compressed" field from a file associated with
387 !!an unstructured mpp domain.
388 subroutine fms_io_unstructured_read_i_1D(filename, &
389  fieldname, &
390  fdata, &
391  domain, &
392  timelevel, &
393  start, &
394  nread, &
395  threading)
396 
397  !Inputs/Outputs
398  character(len=*),intent(in) :: filename !<The name of a file.
399  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
400  integer,dimension(:),intent(inout) :: fdata !<Data to be read in from the file.
401  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
402  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
403  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
404  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
405  integer,intent(in),optional :: threading !<Threading flag.
406 
407  !Local variables
408  real,dimension(size(fdata)) :: tmp !<Dummy variable.
409  integer(INT_KIND) :: i !<Loop variable.
410 
411  !Read in the data.
412  call fms_io_unstructured_read_r_1D(filename, &
413  fieldname, &
414  tmp, &
415  domain, &
416  timelevel, &
417  start, &
418  nread, &
419  threading)
420  do i = 1,size(fdata)
421  fdata(i) = ceiling(tmp(i))
422  enddo
423 
424  return
425 end subroutine fms_io_unstructured_read_i_1D
426 
427 !------------------------------------------------------------------------------
428 !>Read in a two dimensional "compressed" field from a file associated with
429 !!an unstructured mpp domain.
430 subroutine fms_io_unstructured_read_i_2D(filename, &
431  fieldname, &
432  fdata, &
433  domain, &
434  timelevel, &
435  start, &
436  nread, &
437  threading)
438 
439  !Inputs/Outputs
440  character(len=*),intent(in) :: filename !<The name of a file.
441  character(len=*),intent(in) :: fieldname !<The name of field in the input file.
442  integer,dimension(:,:),intent(inout) :: fdata !<Data to be read in from the file.
443  type(domainUG),intent(in) :: domain !<Unstructured mpp domain associated with the input file.
444  integer,intent(in),optional :: timelevel !<Time level at which the data is read in.
445  integer,dimension(:),intent(in),optional :: start !<NetCDF "Corner" indices for the data.
446  integer,dimension(:),intent(in),optional :: nread !<NetCDF "edge lengths" for the data.
447  integer,intent(in),optional :: threading !<Threading flag.
448 
449  !Local variables
450  real,dimension(size(fdata,1),size(fdata,2)) :: tmp !<Dummy variable.
451  integer(INT_KIND) :: i !<Loop variable.
452  integer(INT_KIND) :: j !<Loop variable.
453 
454  !Read in the data.
455  call fms_io_unstructured_read_r_2D(filename, &
456  fieldname, &
457  tmp, &
458  domain, &
459  timelevel, &
460  start, &
461  nread, &
462  threading)
463  do i = 1,size(fdata,2)
464  do j = 1,size(fdata,1)
465  fdata(j,i) = ceiling(tmp(j,i))
466  enddo
467  enddo
468 
469  return
470 end subroutine fms_io_unstructured_read_i_2D
471 
472 !------------------------------------------------------------------------------
473 
474 !----------
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT get_len end if return end subroutine MPP_TRANSMIT_ ! MPP_BROADCAST ! subroutine but that doesn t allow !broadcast to a subset of PEs This version will
type(ext_fieldtype), dimension(:), pointer, save, private field
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_UPDATE_NEST_FINE_2D_(field, nest_domain, wbuffer, ebuffer, sbuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::field3D(size(field, 1), size(field, 2), 1) MPP_TYPE_ ::wbuffer3D(size(wbuffer, 1), size(wbuffer, 2), 1) MPP_TYPE_ ::ebuffer3D(size(ebuffer, 1), size(ebuffer, 2), 1) MPP_TYPE_ ::sbuffer3D(size(sbuffer, 1), size(sbuffer, 2), 1) MPP_TYPE_ ::nbuffer3D(size(nbuffer, 1), size(nbuffer, 2), 1) pointer(ptr, field3D) pointer(ptr_w, wbuffer3D) pointer(ptr_e, ebuffer3D) pointer(ptr_s, sbuffer3D) pointer(ptr_n, nbuffer3D) ptr=LOC(field) ptr_w=LOC(wbuffer) ptr_e=LOC(ebuffer) ptr_s=LOC(sbuffer) ptr_n=LOC(nbuffer) call mpp_update_nest_fine(field3D, nest_domain, wbuffer3D, ebuffer3D, sbuffer3D, nbuffer3D, &flags, complete, position, extra_halo, name, tile_count) returnend subroutine MPP_UPDATE_NEST_FINE_2D_subroutine MPP_UPDATE_NEST_FINE_3D_(field, nest_domain, wbuffer, sbuffer, ebuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::d_type type(nestSpec), pointer ::update=> set_mismatch integer ::tile update_position nbuffersz l_size integer
l_size ! loop over number of fields ke do je do i
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> unit
subroutine, public copy(self, rhs)
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT end
type(restart_file_type), dimension(:), allocatable files_read
Definition: fms_io.F90:498
integer(long), parameter false
l_size ! loop over number of fields ke do j
character(len=32) name
l_size ! loop over number of fields ke do je do ie to je n if(.NOT. d_comm%R_do_buf(list)) cycle from_pe
logical module_is_initialized
character(len=128) version
l_size ! loop over number of fields ke do je do ie to is
type
Definition: c2f.py:15
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> tlevel if(PRESENT(start_in) .AND. PRESENT(axsiz_in)) then if(size(start(! the data domain and compute domain must refer to the subdomain being passed ! In this ! since that attempts to gather all data on PE start
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call mpp_error(FATAL, 'MPP_TRANSMIT:you cannot transmit to ANY_PE using MPI.') else if(to_pe.NE.NULL_PE) then !no other valid cases except NULL_PE call mpp_error(FATAL
integer error
Definition: mpp.F90:1310
subroutine get_field_id(unit, index_file, fieldname, index_field, is_no_domain, is_not_dim)
Definition: fms_io.F90:8125
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> tlevel if(PRESENT(start_in) .AND. PRESENT(axsiz_in)) then if(size(start(! the data domain and compute domain must refer to the subdomain being passed ! In this case
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> id
real(double), parameter one
logical function received(this, seqno)
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine READ_RECORD_CORE_(unit, field, nwords, data, start, axsiz) integer, intent(in) ::unit type(fieldtype), intent(in) ::field integer, intent(in) ::nwords MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in) ::start(:), axsiz(:) integer(SHORT_KIND) ::i2vals(nwords)!rab used in conjunction with transfer intrinsic to determine size of a variable integer(KIND=1) ::one_byte(8) integer ::word_sz!#ifdef __sgi integer(INT_KIND) ::ivals(nwords) real(FLOAT_KIND) ::rvals(nwords)!#else! integer ::ivals(nwords)! real ::rvals(nwords)!#endif real(DOUBLE_KIND) ::r8vals(nwords) pointer(ptr1, i2vals) pointer(ptr2, ivals) pointer(ptr3, rvals) pointer(ptr4, r8vals) if(mpp_io_stack_size< nwords) call mpp_io_set_stack_size(nwords) call mpp_error(FATAL, 'MPP_READ currently requires use_netCDF option') end subroutine READ_RECORD_CORE_ subroutine READ_RECORD_(unit, field, nwords, data, time_level, domain, position, tile_count, start_in, axsiz_in)!routine that is finally called by all mpp_read routines to perform the read!a non-netCDF record contains:! field ID! a set of 4 coordinates(is:ie, js:je) giving the data subdomain! a timelevel and a timestamp(=NULLTIME if field is static)! 3D real data(stored as 1D)!if you are using direct access I/O, the RECL argument to OPEN must be large enough for the above!in a global direct access file, record position on PE is given by %record.!Treatment of timestamp:! We assume that static fields have been passed without a timestamp.! Here that is converted into a timestamp of NULLTIME.! For non-netCDF fields, field is treated no differently, but is written! with a timestamp of NULLTIME. There is no check in the code to prevent! the user from repeatedly writing a static field. integer, intent(in) ::unit, nwords type(fieldtype), intent(in) ::field MPP_TYPE_, intent(inout) ::data(nwords) integer, intent(in), optional ::time_level type(domain2D), intent(in), optional ::domain integer, intent(in), optional ::position, tile_count integer, intent(in), optional ::start_in(:), axsiz_in(:) integer, dimension(size(field%axes(:))) ::start, axsiz integer ::tlevel !, subdomain(4) integer ::i, error, is, ie, js, je, isg, ieg, jsg, jeg type(domain2d), pointer ::io_domain=> tlevel if(PRESENT(start_in) .AND. PRESENT(axsiz_in)) then if(size(start(! the data domain and compute domain must refer to the subdomain being passed ! In this ! since that attempts to gather all data on PE size(field%axes(:)) axsiz(i)
************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! MPP_TRANSMIT !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! subroutine MPP_TRANSMIT_(put_data, put_len, to_pe, get_data, get_len, from_pe, block, tag, recv_request, send_request)!a message-passing routine intended to be reminiscent equally of both MPI and SHMEM!put_data and get_data are contiguous MPP_TYPE_ arrays!at each call, your put_data array is put to to_pe 's get_data! your get_data array is got from from_pe 's put_data!i.e we assume that typically(e.g updating halo regions) each PE performs a put _and_ a get!special PE designations:! NULL_PE:to disable a put or a get(e.g at boundaries)! ANY_PE:if remote PE for the put or get is to be unspecific! ALL_PES:broadcast and collect operations(collect not yet implemented)!ideally we would not pass length, but this f77-style call performs better(arrays passed by address, not descriptor)!further, this permits< length > contiguous words from an array of any rank to be passed(avoiding f90 rank conformance check)!caller is responsible for completion checks(mpp_sync_self) before and after integer, intent(in) ::put_len, to_pe, get_len, from_pe MPP_TYPE_, intent(in) ::put_data(*) MPP_TYPE_, intent(out) ::get_data(*) logical, intent(in), optional ::block integer, intent(in), optional ::tag integer, intent(out), optional ::recv_request, send_request logical ::block_comm integer ::i MPP_TYPE_, allocatable, save ::local_data(:) !local copy used by non-parallel code(no SHMEM or MPI) integer ::comm_tag integer ::rsize if(.NOT.module_is_initialized) call mpp_error(FATAL, 'MPP_TRANSMIT:You must first call mpp_init.') if(to_pe.EQ.NULL_PE .AND. from_pe.EQ.NULL_PE) return block_comm=.true. if(PRESENT(block)) block_comm=block if(debug) then call SYSTEM_CLOCK(tick) write(stdout_unit,'(a, i18, a, i6, a, 2i6, 2i8)')&'T=', tick, ' PE=', pe, ' MPP_TRANSMIT begin:to_pe, from_pe, put_len, get_len=', to_pe, from_pe, put_len, get_len end if comm_tag=DEFAULT_TAG if(present(tag)) comm_tag=tag!do put first and then get if(to_pe.GE.0 .AND. to_pe.LT.npes) then!use non-blocking sends if(debug .and.(current_clock.NE.0)) call SYSTEM_CLOCK(start_tick)!z1l:truly non-blocking send.! if(request(to_pe).NE.MPI_REQUEST_NULL) then !only one message from pe-> to_pe in queue *PE waiting for to_pe ! call error else get_len so only do gets but you cannot have a pure get with MPI call a get means do a wait to ensure put on remote PE is complete error call increase mpp_nml request_multiply call MPP_TRANSMIT get_len end if return end subroutine MPP_TRANSMIT_ ! MPP_BROADCAST ! subroutine but that doesn t allow !broadcast to a subset of PEs This version and mpp_transmit will remain !backward compatible intent(inout) a
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If see< http:! ***********************************************************************subroutine MPP_UPDATE_NEST_FINE_2D_(field, nest_domain, wbuffer, ebuffer, sbuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::field3D(size(field, 1), size(field, 2), 1) MPP_TYPE_ ::wbuffer3D(size(wbuffer, 1), size(wbuffer, 2), 1) MPP_TYPE_ ::ebuffer3D(size(ebuffer, 1), size(ebuffer, 2), 1) MPP_TYPE_ ::sbuffer3D(size(sbuffer, 1), size(sbuffer, 2), 1) MPP_TYPE_ ::nbuffer3D(size(nbuffer, 1), size(nbuffer, 2), 1) pointer(ptr, field3D) pointer(ptr_w, wbuffer3D) pointer(ptr_e, ebuffer3D) pointer(ptr_s, sbuffer3D) pointer(ptr_n, nbuffer3D) ptr=LOC(field) ptr_w=LOC(wbuffer) ptr_e=LOC(ebuffer) ptr_s=LOC(sbuffer) ptr_n=LOC(nbuffer) call mpp_update_nest_fine(field3D, nest_domain, wbuffer3D, ebuffer3D, sbuffer3D, nbuffer3D, &flags, complete, position, extra_halo, name, tile_count) returnend subroutine MPP_UPDATE_NEST_FINE_2D_subroutine MPP_UPDATE_NEST_FINE_3D_(field, nest_domain, wbuffer, sbuffer, ebuffer, nbuffer, &flags, complete, position, extra_halo, name, tile_count) MPP_TYPE_, intent(in) ::field(:,:,:) type(nest_domain_type), intent(inout) ::nest_domain MPP_TYPE_, intent(inout) ::wbuffer(:,:,:) MPP_TYPE_, intent(inout) ::ebuffer(:,:,:) MPP_TYPE_, intent(inout) ::sbuffer(:,:,:) MPP_TYPE_, intent(inout) ::nbuffer(:,:,:) integer, intent(in), optional ::flags logical, intent(in), optional ::complete integer, intent(in), optional ::position integer, intent(in), optional ::extra_halo character(len= *), intent(in), optional ::name integer, intent(in), optional ::tile_count MPP_TYPE_ ::d_type type(nestSpec), pointer ::update=> dimension(MAX_DOMAIN_FIELDS)
integer, parameter, public fatal
*f90 *************************************************************************GNU Lesser General Public License **This file is part of the GFDL Flexible Modeling System(FMS). ! *! *FMS is free software without even the implied warranty of MERCHANTABILITY or *FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License *for more details **You should have received a copy of the GNU Lesser General Public *License along with FMS If not
#define INT_KIND
integer, dimension(:), allocatable file_index
module
Definition: c2f.py:21