MOM6
mom_restart::register_restart_field Interface Reference

Detailed Description

Definition at line 135 of file MOM_restart.F90.

Private functions

subroutine register_restart_field_ptr4d (f_ptr, var_desc, mandatory, CS)
 
subroutine register_restart_field_ptr3d (f_ptr, var_desc, mandatory, CS)
 
subroutine register_restart_field_ptr2d (f_ptr, var_desc, mandatory, CS)
 
subroutine register_restart_field_ptr1d (f_ptr, var_desc, mandatory, CS)
 
subroutine register_restart_field_ptr0d (f_ptr, var_desc, mandatory, CS)
 

Functions and subroutines

◆ register_restart_field_ptr0d()

subroutine mom_restart::register_restart_field::register_restart_field_ptr0d ( real, target  f_ptr,
type(vardesc), intent(in)  var_desc,
logical, intent(in)  mandatory,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 307 of file MOM_restart.F90.

307  real, target :: f_ptr
308  type(vardesc), intent(in) :: var_desc
309  logical, intent(in) :: mandatory
310  type(mom_restart_cs), pointer :: cs
311 ! Set up a field that will be written to and read from restart
312 ! files.
313 !
314 ! Arguments: f_ptr - A pointer to the field to be read or written.
315 ! (in) var_desc - The descriptive structure for the field.
316 ! (in) mandatory - If .true. the run will abort if this field is not
317 ! successfully read from the restart file. If .false.,
318 ! alternate techniques are provided to initialize this
319 ! field if it is cannot be read from the file.
320 ! (in/out) CS - The control structure returned by a previous call to
321 ! restart_init.
322  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
323  "register_restart_field: Module must be initialized before it is used.")
324 
325  cs%novars = cs%novars+1
326  if (cs%novars > cs%max_fields) return ! This is an error that will be reported
327  ! once the total number of fields is known.
328 
329  cs%restart_field(cs%novars)%vars = var_desc
330  cs%restart_field(cs%novars)%mand_var = mandatory
331  cs%restart_field(cs%novars)%initialized = .false.
332  call query_vardesc(cs%restart_field(cs%novars)%vars, &
333  name=cs%restart_field(cs%novars)%var_name, &
334  caller="register_restart_field_ptr0d")
335 
336  cs%var_ptr0d(cs%novars)%p => f_ptr
337  cs%var_ptr4d(cs%novars)%p => null()
338  cs%var_ptr3d(cs%novars)%p => null()
339  cs%var_ptr2d(cs%novars)%p => null()
340  cs%var_ptr1d(cs%novars)%p => null()
341 

◆ register_restart_field_ptr1d()

subroutine mom_restart::register_restart_field::register_restart_field_ptr1d ( real, dimension(:), target  f_ptr,
type(vardesc), intent(in)  var_desc,
logical, intent(in)  mandatory,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 269 of file MOM_restart.F90.

269  real, dimension(:), target :: f_ptr
270  type(vardesc), intent(in) :: var_desc
271  logical, intent(in) :: mandatory
272  type(mom_restart_cs), pointer :: cs
273 ! Set up a field that will be written to and read from restart
274 ! files.
275 !
276 ! Arguments: f_ptr - A pointer to the field to be read or written.
277 ! (in) var_desc - The descriptive structure for the field.
278 ! (in) mandatory - If .true. the run will abort if this field is not
279 ! successfully read from the restart file. If .false.,
280 ! alternate techniques are provided to initialize this
281 ! field if it is cannot be read from the file.
282 ! (in/out) CS - The control structure returned by a previous call to
283 ! restart_init.
284  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
285  "register_restart_field: Module must be initialized before it is used.")
286 
287  cs%novars = cs%novars+1
288  if (cs%novars > cs%max_fields) return ! This is an error that will be reported
289  ! once the total number of fields is known.
290 
291  cs%restart_field(cs%novars)%vars = var_desc
292  cs%restart_field(cs%novars)%mand_var = mandatory
293  cs%restart_field(cs%novars)%initialized = .false.
294  call query_vardesc(cs%restart_field(cs%novars)%vars, &
295  name=cs%restart_field(cs%novars)%var_name, &
296  caller="register_restart_field_ptr1d")
297 
298  cs%var_ptr1d(cs%novars)%p => f_ptr
299  cs%var_ptr4d(cs%novars)%p => null()
300  cs%var_ptr3d(cs%novars)%p => null()
301  cs%var_ptr2d(cs%novars)%p => null()
302  cs%var_ptr0d(cs%novars)%p => null()
303 

◆ register_restart_field_ptr2d()

subroutine mom_restart::register_restart_field::register_restart_field_ptr2d ( real, dimension(:,:), target  f_ptr,
type(vardesc), intent(in)  var_desc,
logical, intent(in)  mandatory,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 231 of file MOM_restart.F90.

231  real, dimension(:,:), target :: f_ptr
232  type(vardesc), intent(in) :: var_desc
233  logical, intent(in) :: mandatory
234  type(mom_restart_cs), pointer :: cs
235 ! Set up a field that will be written to and read from restart
236 ! files.
237 !
238 ! Arguments: f_ptr - A pointer to the field to be read or written.
239 ! (in) var_desc - The descriptive structure for the field.
240 ! (in) mandatory - If .true. the run will abort if this field is not
241 ! successfully read from the restart file. If .false.,
242 ! alternate techniques are provided to initialize this
243 ! field if it is cannot be read from the file.
244 ! (in/out) CS - The control structure returned by a previous call to
245 ! restart_init.
246  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
247  "register_restart_field: Module must be initialized before it is used.")
248 
249  cs%novars = cs%novars+1
250  if (cs%novars > cs%max_fields) return ! This is an error that will be reported
251  ! once the total number of fields is known.
252 
253  cs%restart_field(cs%novars)%vars = var_desc
254  cs%restart_field(cs%novars)%mand_var = mandatory
255  cs%restart_field(cs%novars)%initialized = .false.
256  call query_vardesc(cs%restart_field(cs%novars)%vars, &
257  name=cs%restart_field(cs%novars)%var_name, &
258  caller="register_restart_field_ptr2d")
259 
260  cs%var_ptr2d(cs%novars)%p => f_ptr
261  cs%var_ptr4d(cs%novars)%p => null()
262  cs%var_ptr3d(cs%novars)%p => null()
263  cs%var_ptr1d(cs%novars)%p => null()
264  cs%var_ptr0d(cs%novars)%p => null()
265 

◆ register_restart_field_ptr3d()

subroutine mom_restart::register_restart_field::register_restart_field_ptr3d ( real, dimension(:,:,:), target  f_ptr,
type(vardesc), intent(in)  var_desc,
logical, intent(in)  mandatory,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 155 of file MOM_restart.F90.

155  real, dimension(:,:,:), target :: f_ptr
156  type(vardesc), intent(in) :: var_desc
157  logical, intent(in) :: mandatory
158  type(mom_restart_cs), pointer :: cs
159 ! Set up a field that will be written to and read from restart
160 ! files.
161 !
162 ! Arguments: f_ptr - A pointer to the field to be read or written.
163 ! (in) var_desc - The descriptive structure for the field.
164 ! (in) mandatory - If .true. the run will abort if this field is not
165 ! successfully read from the restart file. If .false.,
166 ! alternate techniques are provided to initialize this
167 ! field if it is cannot be read from the file.
168 ! (in/out) CS - The control structure returned by a previous call to
169 ! restart_init.
170  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
171  "register_restart_field: Module must be initialized before it is used.")
172 
173  cs%novars = cs%novars+1
174  if (cs%novars > cs%max_fields) return ! This is an error that will be reported
175  ! once the total number of fields is known.
176 
177  cs%restart_field(cs%novars)%vars = var_desc
178  cs%restart_field(cs%novars)%mand_var = mandatory
179  cs%restart_field(cs%novars)%initialized = .false.
180  call query_vardesc(cs%restart_field(cs%novars)%vars, &
181  name=cs%restart_field(cs%novars)%var_name, &
182  caller="register_restart_field_ptr3d")
183 
184  cs%var_ptr3d(cs%novars)%p => f_ptr
185  cs%var_ptr4d(cs%novars)%p => null()
186  cs%var_ptr2d(cs%novars)%p => null()
187  cs%var_ptr1d(cs%novars)%p => null()
188  cs%var_ptr0d(cs%novars)%p => null()
189 

◆ register_restart_field_ptr4d()

subroutine mom_restart::register_restart_field::register_restart_field_ptr4d ( real, dimension(:,:,:,:), target  f_ptr,
type(vardesc), intent(in)  var_desc,
logical, intent(in)  mandatory,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 193 of file MOM_restart.F90.

193  real, dimension(:,:,:,:), target :: f_ptr
194  type(vardesc), intent(in) :: var_desc
195  logical, intent(in) :: mandatory
196  type(mom_restart_cs), pointer :: cs
197 ! Set up a field that will be written to and read from restart
198 ! files.
199 !
200 ! Arguments: f_ptr - A pointer to the field to be read or written.
201 ! (in) var_desc - The descriptive structure for the field.
202 ! (in) mandatory - If .true. the run will abort if this field is not
203 ! successfully read from the restart file. If .false.,
204 ! alternate techniques are provided to initialize this
205 ! field if it is cannot be read from the file.
206 ! (in/out) CS - The control structure returned by a previous call to
207 ! restart_init.
208  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
209  "register_restart_field: Module must be initialized before it is used.")
210 
211  cs%novars = cs%novars+1
212  if (cs%novars > cs%max_fields) return ! This is an error that will be reported
213  ! once the total number of fields is known.
214 
215  cs%restart_field(cs%novars)%vars = var_desc
216  cs%restart_field(cs%novars)%mand_var = mandatory
217  cs%restart_field(cs%novars)%initialized = .false.
218  call query_vardesc(cs%restart_field(cs%novars)%vars, &
219  name=cs%restart_field(cs%novars)%var_name, &
220  caller="register_restart_field_ptr4d")
221 
222  cs%var_ptr4d(cs%novars)%p => f_ptr
223  cs%var_ptr3d(cs%novars)%p => null()
224  cs%var_ptr2d(cs%novars)%p => null()
225  cs%var_ptr1d(cs%novars)%p => null()
226  cs%var_ptr0d(cs%novars)%p => null()
227 

The documentation for this interface was generated from the following file: