New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13027 for vendors/AGRIF/dev_r12970_AGRIF_CMEMS/AGRIF_FILES/modtypes.F90 – NEMO

Ignore:
Timestamp:
2020-06-03T16:36:09+02:00 (4 years ago)
Author:
rblod
Message:

New AGRIF library, see ticket #2129

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendors/AGRIF/dev_r12970_AGRIF_CMEMS/AGRIF_FILES/modtypes.F90

    r12420 r13027  
    2020! 
    2121! 
    22 ! 
     22!  
    2323!> Definition of data types used in AGRIF, of several variables and parameters 
    2424! 
     
    109109    real(4), dimension(:,:,:,:,:,:), allocatable :: sarray6 
    110110!> @} 
     111!> \name Arrays containing the values of the grid variables (real) 
     112!> @{ 
     113    real,    dimension(:)          , pointer :: parray1 
     114    real,    dimension(:,:)        , pointer :: parray2 
     115    real,    dimension(:,:,:)      , pointer :: parray3 
     116    real,    dimension(:,:,:,:)    , pointer :: parray4 
     117    real,    dimension(:,:,:,:,:)  , pointer :: parray5 
     118    real,    dimension(:,:,:,:,:,:), pointer :: parray6 
     119!> @} 
     120!> \name Arrays containing the values of the grid variables (real*8) 
     121!> @{ 
     122    real(8), dimension(:)          , pointer :: pdarray1 
     123    real(8), dimension(:,:)        , pointer :: pdarray2 
     124    real(8), dimension(:,:,:)      , pointer :: pdarray3 
     125    real(8), dimension(:,:,:,:)    , pointer :: pdarray4 
     126    real(8), dimension(:,:,:,:,:)  , pointer :: pdarray5 
     127    real(8), dimension(:,:,:,:,:,:), pointer :: pdarray6 
     128!> @} 
     129!> \name Arrays containing the values of the grid variables (real*4) 
     130!> @{ 
     131    real(4), dimension(:)          , pointer :: psarray1 
     132    real(4), dimension(:,:)        , pointer :: psarray2 
     133    real(4), dimension(:,:,:)      , pointer :: psarray3 
     134    real(4), dimension(:,:,:,:)    , pointer :: psarray4 
     135    real(4), dimension(:,:,:,:,:)  , pointer :: psarray5 
     136    real(4), dimension(:,:,:,:,:,:), pointer :: psarray6 
     137!> @} 
    111138!> \name Arrays used to restore the values 
    112139!> @{ 
     
    153180!> \name Arrays containing the values of the grid variables (character) 
    154181!> @{ 
    155     character(2400)                             :: carray0 
     182    character(4000)                             :: carray0 
    156183    character(:)  ,                 allocatable :: carrayu 
    157     character(200), dimension(:)  , allocatable :: carray1 
    158     character(200), dimension(:,:), allocatable :: carray2 
     184    character(400), dimension(:)  , allocatable :: carray1 
     185    character(400), dimension(:,:), allocatable :: carray2 
    159186!> @} 
    160187!--------------------------------------------------------------------------------------------------- 
     
    219246!> \name Arrays containing the values of the grid variables (logical) 
    220247!> @{ 
    221     logical                                      :: larray0 
     248    logical                                      :: larray0 = .FALSE. 
    222249    logical, dimension(:)          , allocatable :: larray1 
    223250    logical, dimension(:,:)        , allocatable :: larray2 
     
    226253    logical, dimension(:,:,:,:,:)  , allocatable :: larray5 
    227254    logical, dimension(:,:,:,:,:,:), allocatable :: larray6 
    228 !> @} 
     255 
     256!> @} 
     257!> \name Arrays containing the values of the grid variables (logical pointers) 
     258!> @{ 
     259    logical, dimension(:)          , pointer :: plarray1 
     260    logical, dimension(:,:)        , pointer :: plarray2 
     261    logical, dimension(:,:,:)      , pointer :: plarray3 
     262    logical, dimension(:,:,:,:)    , pointer :: plarray4 
     263    logical, dimension(:,:,:,:,:)  , pointer :: plarray5 
     264    logical, dimension(:,:,:,:,:,:), pointer :: plarray6 
     265!> @} 
     266 
    229267!--------------------------------------------------------------------------------------------------- 
    230268end type Agrif_Variable_l 
     
    243281!> \name Arrays containing the values of the grid variables (integer) 
    244282!> @{ 
    245     integer                                      :: iarray0 
     283    integer                                      :: iarray0 = 0 
    246284    integer, dimension(:)          , allocatable :: iarray1 
    247285    integer, dimension(:,:)        , allocatable :: iarray2 
     
    250288    integer, dimension(:,:,:,:,:)  , allocatable :: iarray5 
    251289    integer, dimension(:,:,:,:,:,:), allocatable :: iarray6 
     290 
     291!> @} 
     292! 
     293!> \name Arrays containing the values of the grid variables (integer pointers) 
     294!> @{ 
     295    integer, dimension(:)          , pointer :: piarray1 
     296    integer, dimension(:,:)        , pointer :: piarray2 
     297    integer, dimension(:,:,:)      , pointer :: piarray3 
     298    integer, dimension(:,:,:,:)    , pointer :: piarray4 
     299    integer, dimension(:,:,:,:,:)  , pointer :: piarray5 
     300    integer, dimension(:,:,:,:,:,:), pointer :: piarray6 
    252301!> @} 
    253302!--------------------------------------------------------------------------------------------------- 
     
    274323    logical, dimension(:),    pointer :: sendtoproc2    => NULL() 
    275324    logical, dimension(:),    pointer :: recvfromproc1  => NULL() 
    276     logical, dimension(:),    pointer :: recvfromproc2  => NULL() 
     325    logical, dimension(:),    pointer :: recvfromproc2  => NULL()  
    277326#endif 
     327    integer                           :: nb_chunks 
     328    integer, dimension(:,:,:,:), allocatable :: parentarray_chunk 
     329    integer, dimension(:,:,:,:), allocatable :: parentarray_chunk_decal 
     330    integer, dimension(:,:),allocatable :: decal_chunks 
     331    logical, dimension(:),allocatable :: correction_required 
     332    logical, dimension(:),allocatable :: member_chuncks  
    278333!--------------------------------------------------------------------------------------------------- 
    279334end type Agrif_Interp_Loc 
     
    345400    integer, parameter    :: Agrif_Update_Average = 2           !< average 
    346401    integer, parameter    :: Agrif_Update_Full_Weighting = 3    !< full-weighting 
     402    integer, parameter    :: Agrif_Update_Max = 4               !< Max 
    347403!> @} 
    348404!> \name Raffinement grid switches 
     
    375431    real, dimension(:,:,:,:,:,:), allocatable :: parray6 
    376432! 
    377     logical :: agrif_debug = .false.    ! may be activaded in users subroutine for debugging purposes 
     433    logical :: agrif_debug = .false.        ! may be activaded in users subroutine for debugging purposes 
     434    logical :: agrif_debug_interp = .false. ! may be activaded in users subroutine for debugging interpolations 
     435    logical :: agrif_debug_update = .false. ! may be activaded in users subroutine for debugging updates 
    378436 
    379437! If a grand mother grid is present 
     
    381439    integer, dimension(3) :: coarse_spaceref = (/1,1,1/) 
    382440    integer, dimension(3) :: coarse_timeref  = (/1,1,1/) 
     441     
     442     
     443! External mapping procedure 
     444    Procedure(mapping), pointer :: agrif_external_mapping => NULL() 
     445    abstract interface 
     446     subroutine mapping(ndim,ptx,pty,bounds,bounds_chunks,correction_required,nb_chunks) 
     447     integer :: ndim, ptx, pty 
     448     integer,dimension(ndim,2,2) :: bounds 
     449     integer,dimension(:,:,:,:),allocatable :: bounds_chunks 
     450     logical,dimension(:),allocatable :: correction_required 
     451     integer :: nb_chunks 
     452     end subroutine mapping 
     453    end interface 
     454 
     455    Procedure(linear_interp), pointer :: agrif_external_linear_interp => NULL() 
     456    abstract interface 
     457     real function linear_interp(x1,x2,coeff) 
     458     real :: x1, x2, coeff 
     459     end function linear_interp 
     460    end interface 
    383461! 
    384462contains 
Note: See TracChangeset for help on using the changeset viewer.