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 10087 for vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modupdatebasic.F90 – NEMO

Ignore:
Timestamp:
2018-09-05T15:33:44+02:00 (6 years ago)
Author:
rblod
Message:

update AGRIF library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modupdatebasic.F90

    r5656 r10087  
    4949    integer,             intent(in)     :: np           !< Length of parent array 
    5050    integer,             intent(in)     :: nc           !< Length of child  array 
    51     real,                intent(in)     :: s_parent     !< Parent grid position (s_root = 0) 
    52     real,                intent(in)     :: s_child      !< Child  grid position (s_root = 0) 
    53     real,                intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1) 
    54     real,                intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1) 
     51    real(kind=8),        intent(in)     :: s_parent     !< Parent grid position (s_root = 0) 
     52    real(kind=8),        intent(in)     :: s_child      !< Child  grid position (s_root = 0) 
     53    real(kind=8),        intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1) 
     54    real(kind=8),        intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1) 
    5555!--------------------------------------------------------------------------------------------------- 
    5656    integer :: i, locind_child_left, coeffraf 
     
    8484    integer,             intent(in)     :: np           !< Length of parent array 
    8585    integer,             intent(in)     :: nc           !< Length of child  array 
    86     real,                intent(in)     :: s_parent     !< Parent grid position (s_root = 0) 
    87     real,                intent(in)     :: s_child      !< Child  grid position (s_root = 0) 
    88     real,                intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1) 
    89     real,                intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1) 
     86    real(kind=8),        intent(in)     :: s_parent     !< Parent grid position (s_root = 0) 
     87    real(kind=8),        intent(in)     :: s_child      !< Child  grid position (s_root = 0) 
     88    real(kind=8),        intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1) 
     89    real(kind=8),        intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1) 
    9090    integer,             intent(in)     :: dir          !< Direction 
    9191!--------------------------------------------------------------------------------------------------- 
     
    157157    REAL, DIMENSION(nc), intent(in)     :: y 
    158158    INTEGER,             intent(in)     :: np,nc 
    159     REAL,                intent(in)     :: s_parent,  s_child 
    160     REAL,                intent(in)     :: ds_parent, ds_child 
     159    REAL(kind=8),        intent(in)     :: s_parent,  s_child 
     160    REAL(kind=8),        intent(in)     :: ds_parent, ds_child 
    161161! 
    162162    INTEGER :: i, ii, locind_child_left, coeffraf 
    163     REAL    :: xpos, invcoeffraf 
     163    REAL(kind=8)    :: xpos 
     164    REAL ::  invcoeffraf 
    164165    INTEGER :: nbnonnuls 
    165166    INTEGER :: diffmod 
     
    229230!--------------------------------------------------------------------------------------------------- 
    230231    INTEGER, intent(in) :: nc2, np, nc 
    231     REAL,    intent(in) :: s_parent,  s_child 
    232     REAL,    intent(in) :: ds_parent, ds_child 
     232    REAL(kind=8),    intent(in) :: s_parent,  s_child 
     233    REAL(kind=8),    intent(in) :: ds_parent, ds_child 
    233234    INTEGER, intent(in) :: dir 
    234235! 
    235236    INTEGER, DIMENSION(:,:), ALLOCATABLE :: indchildaverage_tmp 
    236237    INTEGER :: i, locind_child_left, coeffraf 
    237     REAL    :: xpos 
     238    REAL(kind=8)    :: xpos 
    238239    INTEGER :: diffmod 
    239240! 
     
    281282    REAL, DIMENSION(nc), intent(in)     :: y 
    282283    INTEGER,             intent(in)     :: np, nc 
    283     REAL,                intent(in)     :: s_parent,  s_child 
    284     REAL,                intent(in)     :: ds_parent, ds_child 
     284    REAL(kind=8),                intent(in)     :: s_parent,  s_child 
     285    REAL(kind=8),                intent(in)     :: ds_parent, ds_child 
    285286    INTEGER,             intent(in)     :: dir 
    286287! 
     
    311312    ELSE 
    312313! 
    313 !CDIR NOLOOPCHG 
    314         do  j = 1,coeffraf 
    315 !CDIR VECTOR 
    316             do i= 1,np 
     314 
     315        do i = 1,np 
     316        do j = 1,coeffraf 
    317317                x(i) = x(i) + y(indchildaverage(i,dir) + j-1 ) 
    318             enddo 
     318        enddo 
    319319        enddo 
    320320        IF (.not.Agrif_Update_Weights) THEN 
     
    338338    real, dimension(nc), intent(in)     :: y 
    339339    integer,             intent(in)     :: np, nc 
    340     real,                intent(in)     :: s_parent,  s_child 
    341     real,                intent(in)     :: ds_parent, ds_child 
    342 !--------------------------------------------------------------------------------------------------- 
    343     REAL    :: xpos, xposfin 
     340    real(kind=8),                intent(in)     :: s_parent,  s_child 
     341    real(kind=8),                intent(in)     :: ds_parent, ds_child 
     342!--------------------------------------------------------------------------------------------------- 
     343    REAL(kind=8)    :: xpos, xposfin 
    344344    INTEGER :: i, ii, diffmod 
    345345    INTEGER :: it1, it2 
Note: See TracChangeset for help on using the changeset viewer.