MOM6
mom_restart::query_initialized Interface Reference

Detailed Description

Definition at line 143 of file MOM_restart.F90.

Private functions

logical function query_initialized_name (name, CS)
 
logical function query_initialized_0d (f_ptr, CS)
 
logical function query_initialized_0d_name (f_ptr, name, CS)
 
logical function query_initialized_1d (f_ptr, CS)
 
logical function query_initialized_1d_name (f_ptr, name, CS)
 
logical function query_initialized_2d (f_ptr, CS)
 
logical function query_initialized_2d_name (f_ptr, name, CS)
 
logical function query_initialized_3d (f_ptr, CS)
 
logical function query_initialized_3d_name (f_ptr, name, CS)
 
logical function query_initialized_4d (f_ptr, CS)
 
logical function query_initialized_4d_name (f_ptr, name, CS)
 

Functions and subroutines

◆ query_initialized_0d()

logical function mom_restart::query_initialized::query_initialized_0d ( real, target  f_ptr,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 381 of file MOM_restart.F90.

381  real, target :: f_ptr
382  type(mom_restart_cs), pointer :: cs
383  logical :: query_initialized
384 ! This subroutine tests whether the field pointed to by f_ptr has
385 ! been initialized from a restart file.
386 !
387 ! Arguments: f_ptr - A pointer to the field that is being queried.
388 ! (in) CS - The control structure returned by a previous call to
389 ! restart_init.
390  integer :: m,n
391  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
392  "query_initialized: Module must be initialized before it is used.")
393  if (cs%novars > cs%max_fields) call restart_error(cs)
394 
395  query_initialized = .false.
396  n = cs%novars+1
397  do m=1,cs%novars
398  if (ASSOCIATED(cs%var_ptr0d(m)%p,f_ptr)) then
399  if (cs%restart_field(m)%initialized) query_initialized = .true.
400  n = m ; exit
401  endif
402  enddo
403 ! Assume that you are going to initialize it now, so set flag to initialized if
404 ! queried again.
405  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
406 

◆ query_initialized_0d_name()

logical function mom_restart::query_initialized::query_initialized_0d_name ( real, target  f_ptr,
character(len=*)  name,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 526 of file MOM_restart.F90.

526  real, target :: f_ptr
527  character(len=*) :: name
528  type(mom_restart_cs), pointer :: cs
529  logical :: query_initialized
530 ! This subroutine tests whether the field pointed to by f_ptr or with the
531 ! specified variable name has been initialized from a restart file.
532 !
533 ! Arguments: f_ptr - A pointer to the field that is being queried.
534 ! (in) name - The name of the field that is being queried.
535 ! (in) CS - The control structure returned by a previous call to
536 ! restart_init.
537  integer :: m,n
538  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
539  "query_initialized: Module must be initialized before it is used.")
540  if (cs%novars > cs%max_fields) call restart_error(cs)
541 
542  query_initialized = .false.
543  n = cs%novars+1
544  do m=1,cs%novars
545  if (ASSOCIATED(cs%var_ptr0d(m)%p,f_ptr)) then
546  if (cs%restart_field(m)%initialized) query_initialized = .true.
547  n = m ; exit
548  endif
549  enddo
550 ! Assume that you are going to initialize it now, so set flag to initialized if
551 ! queried again.
552  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
553  if (n==cs%novars+1) then
554  if (is_root_pe()) &
555  call mom_error(note,"MOM_restart: Unable to find "//name//" queried by pointer, "//&
556  "probably because of the suspect comparison of pointers by ASSOCIATED.")
557  query_initialized = query_initialized_name(name, cs)
558  endif
559 

◆ query_initialized_1d()

logical function mom_restart::query_initialized::query_initialized_1d ( real, dimension(:), target  f_ptr,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 410 of file MOM_restart.F90.

410  real, dimension(:), target :: f_ptr
411  type(mom_restart_cs), pointer :: cs
412  logical :: query_initialized
413 ! This subroutine tests whether the field pointed to by f_ptr has
414 ! been initialized from a restart file.
415 !
416 ! Arguments: f_ptr - A pointer to the field that is being queried.
417 ! (in) CS - The control structure returned by a previous call to
418 ! restart_init.
419  integer :: m,n
420  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
421  "query_initialized: Module must be initialized before it is used.")
422  if (cs%novars > cs%max_fields) call restart_error(cs)
423 
424  query_initialized = .false.
425  n = cs%novars+1
426  do m=1,cs%novars
427  if (ASSOCIATED(cs%var_ptr1d(m)%p,f_ptr)) then
428  if (cs%restart_field(m)%initialized) query_initialized = .true.
429  n = m ; exit
430  endif
431  enddo
432 ! Assume that you are going to initialize it now, so set flag to initialized if
433 ! queried again.
434  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
435 

◆ query_initialized_1d_name()

logical function mom_restart::query_initialized::query_initialized_1d_name ( real, dimension(:), target  f_ptr,
character(len=*)  name,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 563 of file MOM_restart.F90.

563  real, dimension(:), target :: f_ptr
564  character(len=*) :: name
565  type(mom_restart_cs), pointer :: cs
566  logical :: query_initialized
567 ! This subroutine tests whether the field pointed to by f_ptr or with the
568 ! specified variable name has been initialized from a restart file.
569 !
570 ! Arguments: f_ptr - A pointer to the field that is being queried.
571 ! (in) name - The name of the field that is being queried.
572 ! (in) CS - The control structure returned by a previous call to
573 ! restart_init.
574  integer :: m,n
575  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
576  "query_initialized: Module must be initialized before it is used.")
577  if (cs%novars > cs%max_fields) call restart_error(cs)
578 
579  query_initialized = .false.
580  n = cs%novars+1
581  do m=1,cs%novars
582  if (ASSOCIATED(cs%var_ptr1d(m)%p,f_ptr)) then
583  if (cs%restart_field(m)%initialized) query_initialized = .true.
584  n = m ; exit
585  endif
586  enddo
587 ! Assume that you are going to initialize it now, so set flag to initialized if
588 ! queried again.
589  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
590  if (n==cs%novars+1) then
591  if (is_root_pe()) &
592  call mom_error(note,"MOM_restart: Unable to find "//name//" queried by pointer, "//&
593  "probably because of the suspect comparison of pointers by ASSOCIATED.")
594  query_initialized = query_initialized_name(name, cs)
595  endif
596 

◆ query_initialized_2d()

logical function mom_restart::query_initialized::query_initialized_2d ( real, dimension(:,:), target  f_ptr,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 439 of file MOM_restart.F90.

439  real, dimension(:,:), target :: f_ptr
440  type(mom_restart_cs), pointer :: cs
441  logical :: query_initialized
442 ! This subroutine tests whether the field pointed to by f_ptr has
443 ! been initialized from a restart file.
444 !
445 ! Arguments: f_ptr - A pointer to the field that is being queried.
446 ! (in) CS - The control structure returned by a previous call to
447 ! restart_init.
448  integer :: m,n
449  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
450  "query_initialized: Module must be initialized before it is used.")
451  if (cs%novars > cs%max_fields) call restart_error(cs)
452 
453  query_initialized = .false.
454  n = cs%novars+1
455  do m=1,cs%novars
456  if (ASSOCIATED(cs%var_ptr2d(m)%p,f_ptr)) then
457  if (cs%restart_field(m)%initialized) query_initialized = .true.
458  n = m ; exit
459  endif
460  enddo
461 ! Assume that you are going to initialize it now, so set flag to initialized if
462 ! queried again.
463  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
464 

◆ query_initialized_2d_name()

logical function mom_restart::query_initialized::query_initialized_2d_name ( real, dimension(:,:), target  f_ptr,
character(len=*)  name,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 600 of file MOM_restart.F90.

600  real, dimension(:,:), target :: f_ptr
601  character(len=*) :: name
602  type(mom_restart_cs), pointer :: cs
603  logical :: query_initialized
604 ! This subroutine tests whether the field pointed to by f_ptr or with the
605 ! specified variable name has been initialized from a restart file.
606 !
607 ! Arguments: f_ptr - A pointer to the field that is being queried.
608 ! (in) name - The name of the field that is being queried.
609 ! (in) CS - The control structure returned by a previous call to
610 ! restart_init.
611  integer :: m,n
612  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
613  "query_initialized: Module must be initialized before it is used.")
614  if (cs%novars > cs%max_fields) call restart_error(cs)
615 
616  query_initialized = .false.
617  n = cs%novars+1
618  do m=1,cs%novars
619  if (ASSOCIATED(cs%var_ptr2d(m)%p,f_ptr)) then
620  if (cs%restart_field(m)%initialized) query_initialized = .true.
621  n = m ; exit
622  endif
623  enddo
624 ! Assume that you are going to initialize it now, so set flag to initialized if
625 ! queried again.
626  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
627  if (n==cs%novars+1) then
628  if (is_root_pe()) &
629  call mom_error(note,"MOM_restart: Unable to find "//name//" queried by pointer, "//&
630  "probably because of the suspect comparison of pointers by ASSOCIATED.")
631  query_initialized = query_initialized_name(name, cs)
632  endif
633 

◆ query_initialized_3d()

logical function mom_restart::query_initialized::query_initialized_3d ( real, dimension(:,:,:), target  f_ptr,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 468 of file MOM_restart.F90.

468  real, dimension(:,:,:), target :: f_ptr
469  type(mom_restart_cs), pointer :: cs
470  logical :: query_initialized
471 ! This subroutine tests whether the field pointed to by f_ptr has
472 ! been initialized from a restart file.
473 !
474 ! Arguments: f_ptr - A pointer to the field that is being queried.
475 ! (in) CS - The control structure returned by a previous call to
476 ! restart_init.
477  integer :: m,n
478  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
479  "query_initialized: Module must be initialized before it is used.")
480  if (cs%novars > cs%max_fields) call restart_error(cs)
481 
482  query_initialized = .false.
483  n = cs%novars+1
484  do m=1,cs%novars
485  if (ASSOCIATED(cs%var_ptr3d(m)%p,f_ptr)) then
486  if (cs%restart_field(m)%initialized) query_initialized = .true.
487  n = m ; exit
488  endif
489  enddo
490 ! Assume that you are going to initialize it now, so set flag to initialized if
491 ! queried again.
492  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
493 

◆ query_initialized_3d_name()

logical function mom_restart::query_initialized::query_initialized_3d_name ( real, dimension(:,:,:), target  f_ptr,
character(len=*)  name,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 637 of file MOM_restart.F90.

637  real, dimension(:,:,:), target :: f_ptr
638  character(len=*) :: name
639  type(mom_restart_cs), pointer :: cs
640  logical :: query_initialized
641 ! This subroutine tests whether the field pointed to by f_ptr or with the
642 ! specified variable name has been initialized from a restart file.
643 !
644 ! Arguments: f_ptr - A pointer to the field that is being queried.
645 ! (in) name - The name of the field that is being queried.
646 ! (in) CS - The control structure returned by a previous call to
647 ! restart_init.
648  integer :: m, n
649  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
650  "query_initialized: Module must be initialized before it is used.")
651  if (cs%novars > cs%max_fields) call restart_error(cs)
652 
653  query_initialized = .false.
654  n = cs%novars+1
655  do m=1,cs%novars
656  if (ASSOCIATED(cs%var_ptr3d(m)%p,f_ptr)) then
657  if (cs%restart_field(m)%initialized) query_initialized = .true.
658  n = m ; exit
659  endif
660  enddo
661 ! Assume that you are going to initialize it now, so set flag to initialized if
662 ! queried again.
663  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
664  if (n==cs%novars+1) then
665  if (is_root_pe()) &
666  call mom_error(note, "MOM_restart: Unable to find "//name//" queried by pointer, "//&
667  "possibly because of the suspect comparison of pointers by ASSOCIATED.")
668  query_initialized = query_initialized_name(name, cs)
669  endif
670 

◆ query_initialized_4d()

logical function mom_restart::query_initialized::query_initialized_4d ( real, dimension(:,:,:,:), target  f_ptr,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 497 of file MOM_restart.F90.

497  real, dimension(:,:,:,:), target :: f_ptr
498  type(mom_restart_cs), pointer :: cs
499  logical :: query_initialized
500 ! This subroutine tests whether the field pointed to by f_ptr has
501 ! been initialized from a restart file.
502 !
503 ! Arguments: f_ptr - A pointer to the field that is being queried.
504 ! (in) CS - The control structure returned by a previous call to
505 ! restart_init.
506  integer :: m,n
507  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
508  "query_initialized: Module must be initialized before it is used.")
509  if (cs%novars > cs%max_fields) call restart_error(cs)
510 
511  query_initialized = .false.
512  n = cs%novars+1
513  do m=1,cs%novars
514  if (ASSOCIATED(cs%var_ptr4d(m)%p,f_ptr)) then
515  if (cs%restart_field(m)%initialized) query_initialized = .true.
516  n = m ; exit
517  endif
518  enddo
519 ! Assume that you are going to initialize it now, so set flag to initialized if
520 ! queried again.
521  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
522 

◆ query_initialized_4d_name()

logical function mom_restart::query_initialized::query_initialized_4d_name ( real, dimension(:,:,:,:), target  f_ptr,
character(len=*)  name,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 674 of file MOM_restart.F90.

674  real, dimension(:,:,:,:), target :: f_ptr
675  character(len=*) :: name
676  type(mom_restart_cs), pointer :: cs
677  logical :: query_initialized
678 ! This subroutine tests whether the field pointed to by f_ptr or with the
679 ! specified variable name has been initialized from a restart file.
680 !
681 ! Arguments: f_ptr - A pointer to the field that is being queried.
682 ! (in) name - The name of the field that is being queried.
683 ! (in) CS - The control structure returned by a previous call to
684 ! restart_init.
685  integer :: m, n
686  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
687  "query_initialized: Module must be initialized before it is used.")
688  if (cs%novars > cs%max_fields) call restart_error(cs)
689 
690  query_initialized = .false.
691  n = cs%novars+1
692  do m=1,cs%novars
693  if (ASSOCIATED(cs%var_ptr4d(m)%p,f_ptr)) then
694  if (cs%restart_field(m)%initialized) query_initialized = .true.
695  n = m ; exit
696  endif
697  enddo
698 ! Assume that you are going to initialize it now, so set flag to initialized if
699 ! queried again.
700  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
701  if (n==cs%novars+1) then
702  if (is_root_pe()) &
703  call mom_error(note, "MOM_restart: Unable to find "//name//" queried by pointer, "//&
704  "possibly because of the suspect comparison of pointers by ASSOCIATED.")
705  query_initialized = query_initialized_name(name, cs)
706  endif
707 

◆ query_initialized_name()

logical function mom_restart::query_initialized::query_initialized_name ( character(len=*)  name,
type(mom_restart_cs), pointer  CS 
)
private

Definition at line 345 of file MOM_restart.F90.

345  character(len=*) :: name
346  type(mom_restart_cs), pointer :: cs
347  logical :: query_initialized
348 ! This subroutine returns .true. if the field referred to by name has
349 ! initialized from a restart file, and .false. otherwise.
350 !
351 ! Arguments: name - A pointer to the field that is being queried.
352 ! (in) CS - The control structure returned by a previous call to
353 ! restart_init.
354  integer :: m,n
355  if (.not.associated(cs)) call mom_error(fatal, "MOM_restart " // &
356  "query_initialized: Module must be initialized before it is used.")
357  if (cs%novars > cs%max_fields) call restart_error(cs)
358 
359  query_initialized = .false.
360  n = cs%novars+1
361  do m=1,cs%novars
362  if (trim(name) == cs%restart_field(m)%var_name) then
363  if (cs%restart_field(m)%initialized) query_initialized = .true.
364  n = m ; exit
365  endif
366  enddo
367 ! Assume that you are going to initialize it now, so set flag to initialized if
368 ! queried again.
369  if (n<=cs%novars) cs%restart_field(n)%initialized = .true.
370  if ((n==cs%novars+1) .and. (is_root_pe())) &
371  call mom_error(note,"MOM_restart: Unknown restart variable "//name// &
372  " queried for initialization.")
373 
374  if ((is_root_pe()) .and. query_initialized) &
375  call mom_error(note,"MOM_restart: "//name// &
376  " initialization confirmed by name.")
377 

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