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

Ignore:
Timestamp:
2019-02-27T14:55:54+01:00 (5 years ago)
Author:
rblod
Message:

Update agrif library and conv see ticket #2129

File:
1 edited

Legend:

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

    r10087 r10725  
    2727module Agrif_Update 
    2828! 
    29 !    use Agrif_UpdateBasic 
    30 !    use Agrif_Arrays 
    31 !    use Agrif_CurgridFunctions 
    32 !    use Agrif_Mask 
    33 #if defined AGRIF_MPI 
    34 !    use Agrif_Mpp 
    35 #endif 
    36 ! 
    3729    use Agrif_UpdateBasic 
    3830    use Agrif_Arrays 
    39     use Agrif_User_Functions 
    40     use Agrif_Init 
     31    use Agrif_CurgridFunctions 
    4132    use Agrif_Mask 
    42      
    4333#if defined AGRIF_MPI 
    4434    use Agrif_Mpp 
     
    6858    integer, dimension(6) :: ub_child 
    6959    integer, dimension(6) :: lb_parent 
    70     real(kind=8)   , dimension(6) ::  s_child           ! Child  grid position (s_root = 0) 
    71     real(kind=8)   , dimension(6) ::  s_parent          ! Parent grid position (s_root = 0) 
    72     real(kind=8)   , dimension(6) :: ds_child           ! Child  grid dx (ds_root = 1) 
    73     real(kind=8)   , dimension(6) :: ds_parent          ! Parent grid dx (ds_root = 1) 
     60    real   , dimension(6) ::  s_child           ! Child  grid position (s_root = 0) 
     61    real   , dimension(6) ::  s_parent          ! Parent grid position (s_root = 0) 
     62    real   , dimension(6) :: ds_child           ! Child  grid dx (ds_root = 1) 
     63    real   , dimension(6) :: ds_parent          ! Parent grid dx (ds_root = 1) 
    7464    logical, dimension(6) :: do_update          ! Indicates if we perform update for each dimension 
    7565    integer, dimension(6) :: posvar             ! Position of the variable on the cell (1 or 2) 
     
    170160    integer, dimension(nbdim), intent(in) :: posvar         !< Position of the variable on the cell (1 or 2) 
    171161    logical, dimension(nbdim), intent(in) :: do_update      !< Indicates if we update for each dimension 
    172     real(kind=8),    dimension(nbdim), intent(in) :: s_child        !< Positions of the child grid 
    173     real(kind=8),    dimension(nbdim), intent(in) :: s_parent       !< Positions of the parent grid 
    174     real(kind=8),    dimension(nbdim), intent(in) :: ds_child       !< Space steps of the child grid 
    175     real(kind=8),    dimension(nbdim), intent(in) :: ds_parent      !< Space steps of the parent grid 
     162    real,    dimension(nbdim), intent(in) :: s_child        !< Positions of the child grid 
     163    real,    dimension(nbdim), intent(in) :: s_parent       !< Positions of the parent grid 
     164    real,    dimension(nbdim), intent(in) :: ds_child       !< Space steps of the child grid 
     165    real,    dimension(nbdim), intent(in) :: ds_parent      !< Space steps of the parent grid 
    176166    procedure()                           :: procname       !< Data recovery procedure 
    177167! 
     
    240230! lubglob(:,2) : global lbound for each dimension 
    241231! 
    242 !     call Agrif_get_var_global_bounds(child, lubglob, nbdim) 
    243     lubglob = child % lubglob(1:nbdim,:) 
     232    call Agrif_get_var_global_bounds(child, lubglob, nbdim) 
    244233! 
    245234    indtruetab(1:nbdim,1,1) = max(indtab(1:nbdim,1,1), lubglob(1:nbdim,1)) 
     
    285274    integer, dimension(nbdim), intent(in)   :: posvar       !< Position of the variable on the cell (1 or 2) 
    286275    logical, dimension(nbdim), intent(in)   :: do_update    !< Indicates if we update for each dimension 
    287     real(kind=8),    dimension(nbdim), intent(in)   :: s_child      !< Positions of the child grid 
    288     real(kind=8),    dimension(nbdim), intent(in)   :: s_parent     !< Positions of the parent grid 
    289     real(kind=8),    dimension(nbdim), intent(in)   :: ds_child     !< Space steps of the child grid 
    290     real(kind=8),    dimension(nbdim), intent(in)   :: ds_parent    !< Space steps of the parent grid 
     276    real,    dimension(nbdim), intent(in)   :: s_child      !< Positions of the child grid 
     277    real,    dimension(nbdim), intent(in)   :: s_parent     !< Positions of the parent grid 
     278    real,    dimension(nbdim), intent(in)   :: ds_child     !< Space steps of the child grid 
     279    real,    dimension(nbdim), intent(in)   :: ds_parent    !< Space steps of the parent grid 
    291280    procedure()                             :: procname     !< Data recovery procedure 
    292281! 
     
    411400    integer, dimension(nbdim), intent(in)   :: lb_parent !< Index of the first point inside the domain for the parent 
    412401                                                            !!    grid variable 
    413     real(kind=8),    dimension(nbdim), intent(in)   :: s_child      !< Positions of the child grid 
    414     real(kind=8),    dimension(nbdim), intent(in)   :: s_parent     !< Positions of the parent grid 
    415     real(kind=8),    dimension(nbdim), intent(in)   :: ds_child     !< Space steps of the child grid 
    416     real(kind=8),    dimension(nbdim), intent(in)   :: ds_parent    !< Space steps of the parent grid 
     402    real,    dimension(nbdim), intent(in)   :: s_child      !< Positions of the child grid 
     403    real,    dimension(nbdim), intent(in)   :: s_parent     !< Positions of the parent grid 
     404    real,    dimension(nbdim), intent(in)   :: ds_child     !< Space steps of the child grid 
     405    real,    dimension(nbdim), intent(in)   :: ds_parent    !< Space steps of the parent grid 
    417406    procedure()                             :: procname     !< Data recovery procedure 
    418407    integer, optional,         intent(in)   :: nb, ndir 
     
    426415    integer, dimension(nbdim)       :: indmin, indmax 
    427416    integer, dimension(nbdim)       :: indminglob, indmaxglob 
    428     real(kind=8)   , dimension(nbdim)       :: s_Child_temp, s_Parent_temp 
     417    real   , dimension(nbdim)       :: s_Child_temp, s_Parent_temp 
    429418    integer, dimension(nbdim)       :: lowerbound,upperbound 
    430419    integer, dimension(nbdim)       :: pttruetabwhole, cetruetabwhole 
     
    461450    real :: coeff_multi 
    462451    integer :: nb_dimensions 
    463  
    464452! 
    465453!   Get local lower and upper bound of the child variable 
     
    518506! 
    519507        call Agrif_array_allocate(tempC,pttruetab,cetruetab,nbdim) 
    520 #if defined AGRIF_MPI 
    521508        call Agrif_var_set_array_tozero(tempC,nbdim) 
    522 #endif 
    523509 
    524510        SELECT CASE (nbdim) 
     
    615601! 
    616602        call Agrif_array_allocate(tempP,indmin,indmax,nbdim) 
    617  
    618         IF (Agrif_UseSpecialValueInUpdate) THEN 
    619             allocate(tempC_indic) 
    620             allocate(tempP_indic) 
    621             call Agrif_array_allocate(tempC_indic,pttruetabwhole,cetruetabwhole,nbdim) 
    622             call Agrif_array_allocate(tempP_indic,indmin,indmax,nbdim) 
    623             call agrif_set_array_cond(tempCextend,tempC_indic,agrif_SpecialValueFineGrid,nbdim) 
    624         ELSE 
    625             tempC_indic=>tempCextend ! Just to associate tempC_indic to something ... 
    626         ENDIF 
    627 ! 
    628  
    629  
     603! 
    630604        if ( nbdim == 1 ) then 
    631605            tempP % array1 = 0. 
     
    633607                                            tempP%array1,   & 
    634608                                            tempCextend%array1, & 
    635                                             tempC_indic%array1, & 
    636609                                            indmin(1), indmax(1),   & 
    637610                                            pttruetabwhole(1), cetruetabwhole(1),   & 
     
    640613                                             
    641614            IF (Agrif_UseSpecialValueInUpdate) THEN 
     615            allocate(tempC_indic) 
     616            allocate(tempP_indic) 
     617            call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array1),ubound(tempCextend%array1),nbdim) 
     618            call Agrif_array_allocate(tempP_indic,lbound(tempP%array1),ubound(tempP%array1),nbdim) 
    642619 
    643620            compute_average = .FALSE. 
     
    653630                                            tempP_average%array1,       & 
    654631                                            tempCextend%array1, & 
    655                                             tempC_indic%array1, & 
    656632                                            indmin(1), indmax(1),   & 
    657633                                            pttruetabwhole(1), cetruetabwhole(1),   & 
     
    664640            ENDIF 
    665641             
     642            WHERE (tempCextend%array1 == Agrif_SpecialValueFineGrid) 
     643              tempC_indic%array1 = 0. 
     644            ELSEWHERE 
     645              tempC_indic%array1 = 1. 
     646            END WHERE 
     647             
    666648            Agrif_UseSpecialValueInUpdate = .FALSE. 
    667649            Agrif_Update_Weights = .TRUE. 
     
    669651             call Agrif_Update_1D_Recursive( type_update_temp(1),   & 
    670652                                            tempP_indic%array1,       & 
    671                                             tempC_indic%array1, & 
    672653                                            tempC_indic%array1, & 
    673654                                            indmin(1), indmax(1),   & 
     
    711692                                            tempP%array2,       & 
    712693                                            tempCextend%array2, & 
    713                                             tempC_indic%array2, & 
    714694                                            indmin(1:2), indmax(1:2),   & 
    715695                                            pttruetabwhole(1:2), cetruetabwhole(1:2),   & 
     
    718698 
    719699            IF (Agrif_UseSpecialValueInUpdate) THEN 
     700            allocate(tempC_indic) 
     701            allocate(tempP_indic) 
     702            call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array2),ubound(tempCextend%array2),nbdim) 
     703            call Agrif_array_allocate(tempP_indic,lbound(tempP%array2),ubound(tempP%array2),nbdim) 
    720704  
    721705            compute_average = .FALSE. 
     
    731715                                            tempP_average%array2,       & 
    732716                                            tempCextend%array2, & 
    733                                             tempC_indic%array2, & 
    734717                                            indmin(1:2), indmax(1:2),   & 
    735718                                            pttruetabwhole(1:2), cetruetabwhole(1:2),   & 
     
    742725            ENDIF 
    743726             
     727            WHERE (tempCextend%array2 == Agrif_SpecialValueFineGrid) 
     728              tempC_indic%array2 = 0. 
     729            ELSEWHERE 
     730              tempC_indic%array2 = 1. 
     731            END WHERE 
     732             
    744733            Agrif_UseSpecialValueInUpdate = .FALSE. 
    745734            Agrif_Update_Weights = .TRUE. 
     
    747736            call Agrif_Update_2D_Recursive( type_update_temp(1:2),   & 
    748737                                            tempP_indic%array2,       & 
    749                                             tempC_indic%array2, & 
    750738                                            tempC_indic%array2, & 
    751739                                            indmin(1:2), indmax(1:2),   & 
     
    786774        endif 
    787775        if ( nbdim == 3 ) then 
    788  
    789776            call Agrif_Update_3D_Recursive( type_update(1:3),   & 
    790777                                            tempP%array3,       & 
    791778                                            tempCextend%array3, & 
    792                                             tempC_indic%array3, & 
    793779                                            indmin(1:3), indmax(1:3),   & 
    794780                                            pttruetabwhole(1:3), cetruetabwhole(1:3),   & 
    795781                                            s_Child_temp(1:3), s_Parent_temp(1:3),      & 
    796782                                            ds_child(1:3), ds_parent(1:3) ) 
    797  
    798                        
     783                                             
    799784            IF (Agrif_UseSpecialValueInUpdate) THEN 
     785            allocate(tempC_indic) 
     786            allocate(tempP_indic) 
     787            call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array3),ubound(tempCextend%array3),nbdim) 
     788            call Agrif_array_allocate(tempP_indic,lbound(tempP%array3),ubound(tempP%array3),nbdim) 
    800789 
    801790            compute_average = .FALSE. 
     
    808797                type_update_temp(1:nbdim) = Agrif_Update_Average 
    809798              END WHERE 
    810  
    811799              call Agrif_Update_3D_Recursive( type_update_temp(1:3),   & 
    812800                                            tempP_average%array3,       & 
    813801                                            tempCextend%array3, & 
    814                                             tempC_indic%array3, & 
    815802                                            indmin(1:3), indmax(1:3),   & 
    816803                                            pttruetabwhole(1:3), cetruetabwhole(1:3),   & 
     
    822809              enddo 
    823810            ENDIF 
    824  
     811             
     812            WHERE (tempCextend%array3 == Agrif_SpecialValueFineGrid) 
     813              tempC_indic%array3 = 0. 
     814            ELSEWHERE 
     815              tempC_indic%array3 = 1. 
     816            END WHERE 
     817             
    825818            Agrif_UseSpecialValueInUpdate = .FALSE. 
    826819            Agrif_Update_Weights = .TRUE. 
    827  
    828  
     820  
    829821             call Agrif_Update_3D_Recursive( type_update_temp(1:3),   & 
    830822                                            tempP_indic%array3,       & 
    831823                                            tempC_indic%array3, & 
    832                                             tempCextend%array3, & 
    833824                                            indmin(1:3), indmax(1:3),   & 
    834825                                            pttruetabwhole(1:3), cetruetabwhole(1:3),   & 
     
    836827                                            ds_child(1:3), ds_parent(1:3) ) 
    837828 
    838  
    839829           Agrif_UseSpecialValueInUpdate = .TRUE. 
    840830           Agrif_Update_Weights = .FALSE. 
    841831 
    842  
    843832           IF (compute_average) THEN 
    844           
    845833               WHERE (tempP_indic%array3 == 0.) 
    846834                  tempP%array3 = Agrif_SpecialValueFineGrid 
     
    850838                  tempP%array3 = tempP_average%array3 /tempP_indic%array3 
    851839               END WHERE 
    852              
     840 
    853841           ELSE 
    854842               WHERE (tempP_indic%array3 == 0.) 
     
    858846               END WHERE 
    859847            ENDIF 
    860  
     848            
    861849            deallocate(tempP_indic%array3) 
    862850            deallocate(tempC_indic%array3) 
     
    868856            ENDIF 
    869857            ENDIF 
    870  
    871           
     858             
    872859        endif 
    873860        if ( nbdim == 4 ) then 
    874            
    875861            call Agrif_Update_4D_Recursive( type_update(1:4),   & 
    876862                                            tempP%array4,       & 
    877863                                            tempCextend%array4, & 
    878                                             tempC_indic%array4, & 
    879864                                            indmin(1:4), indmax(1:4),   & 
    880865                                            pttruetabwhole(1:4), cetruetabwhole(1:4),   & 
    881866                                            s_Child_temp(1:4), s_Parent_temp(1:4),      & 
    882867                                            ds_child(1:4), ds_parent(1:4) ) 
    883                  
     868                                             
    884869            IF (Agrif_UseSpecialValueInUpdate) THEN 
     870             
     871            allocate(tempC_indic) 
     872            allocate(tempP_indic) 
     873            call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array4),ubound(tempCextend%array4),nbdim) 
     874            call Agrif_array_allocate(tempP_indic,lbound(tempP%array4),ubound(tempP%array4),nbdim) 
    885875            
    886876            compute_average = .FALSE. 
     
    896886                                            tempP_average%array4,       & 
    897887                                            tempCextend%array4, & 
    898                                             tempC_indic%array4, & 
    899888                                            indmin(1:4), indmax(1:4),   & 
    900889                                            pttruetabwhole(1:4), cetruetabwhole(1:4),   & 
     
    907896            ENDIF 
    908897             
     898            WHERE (tempCextend%array4 == Agrif_SpecialValueFineGrid) 
     899              tempC_indic%array4 = 0. 
     900            ELSEWHERE 
     901              tempC_indic%array4 = 1. 
     902            END WHERE 
     903             
    909904            Agrif_UseSpecialValueInUpdate = .FALSE. 
    910905            Agrif_Update_Weights = .TRUE. 
     
    912907             call Agrif_Update_4D_Recursive( type_update_temp(1:4),   & 
    913908                                            tempP_indic%array4,       & 
    914                                             tempC_indic%array4, & 
    915909                                            tempC_indic%array4, & 
    916910                                            indmin(1:4), indmax(1:4),   & 
     
    947941            ENDIF 
    948942            ENDIF 
    949                   
     943             
    950944        endif 
    951945        if ( nbdim == 5 ) then 
     
    953947                                            tempP%array5,       & 
    954948                                            tempCextend%array5, & 
    955                                             tempC_indic%array5, & 
    956949                                            indmin(1:5), indmax(1:5),   & 
    957950                                            pttruetabwhole(1:5), cetruetabwhole(1:5),   & 
     
    960953                                             
    961954            IF (Agrif_UseSpecialValueInUpdate) THEN 
     955            allocate(tempC_indic) 
     956            allocate(tempP_indic) 
     957            call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array5),ubound(tempCextend%array5),nbdim) 
     958            call Agrif_array_allocate(tempP_indic,lbound(tempP%array5),ubound(tempP%array5),nbdim) 
    962959 
    963960            compute_average = .FALSE. 
     
    973970                                            tempP_average%array5,       & 
    974971                                            tempCextend%array5, & 
    975                                             tempC_indic%array5, & 
    976972                                            indmin(1:5), indmax(1:5),   & 
    977973                                            pttruetabwhole(1:5), cetruetabwhole(1:5),   & 
     
    984980            ENDIF 
    985981             
     982            WHERE (tempCextend%array5 == Agrif_SpecialValueFineGrid) 
     983              tempC_indic%array5 = 0. 
     984            ELSEWHERE 
     985              tempC_indic%array5 = 1. 
     986            END WHERE 
     987             
    986988            Agrif_UseSpecialValueInUpdate = .FALSE. 
    987989            Agrif_Update_Weights = .TRUE. 
     
    989991             call Agrif_Update_5D_Recursive( type_update_temp(1:5),   & 
    990992                                            tempP_indic%array5,       & 
    991                                             tempC_indic%array5, & 
    992993                                            tempC_indic%array5, & 
    993994                                            indmin(1:5), indmax(1:5),   & 
     
    10311032                                            tempP%array6,       & 
    10321033                                            tempCextend%array6, & 
    1033                                             tempC_indic%array6, & 
    10341034                                            indmin(1:6), indmax(1:6),   & 
    10351035                                            pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
    10361036                                            s_Child_temp(1:6), s_Parent_temp(1:6),      & 
    10371037                                            ds_child(1:6), ds_parent(1:6) ) 
    1038  
    10391038            IF (Agrif_UseSpecialValueInUpdate) THEN 
     1039            allocate(tempC_indic) 
     1040            allocate(tempP_indic) 
     1041            call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array6),ubound(tempCextend%array6),nbdim) 
     1042            call Agrif_array_allocate(tempP_indic,lbound(tempP%array6),ubound(tempP%array6),nbdim) 
    10401043 
    10411044            compute_average = .FALSE. 
     
    10521055                                            tempP_average%array6,       & 
    10531056                                            tempCextend%array6, & 
    1054                                             tempC_indic%array6, & 
    10551057                                            indmin(1:6), indmax(1:6),   & 
    10561058                                            pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
     
    10631065            ENDIF 
    10641066 
    1065              
    1066             Agrif_UseSpecialValueInUpdate = .FALSE. 
    1067             Agrif_Update_Weights = .TRUE. 
    1068   
    1069              call Agrif_Update_6D_Recursive( type_update_temp(1:6),   & 
    1070                                             tempP_indic%array6,       & 
    1071                                             tempC_indic%array6, & 
    1072                                             tempC_indic%array6, & 
    1073                                             indmin(1:6), indmax(1:6),   & 
    1074                                             pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
    1075                                             s_Child_temp(1:6), s_Parent_temp(1:6),      & 
    1076                                             ds_child(1:6), ds_parent(1:6) ) 
    1077  
    1078            Agrif_UseSpecialValueInUpdate = .TRUE. 
    1079            Agrif_Update_Weights = .FALSE. 
    1080             
    10811067           IF (compute_average) THEN 
    10821068               WHERE (tempP_indic%array6 == 0.) 
     
    10951081               END WHERE 
    10961082            ENDIF 
     1083             
     1084            Agrif_UseSpecialValueInUpdate = .FALSE. 
     1085            Agrif_Update_Weights = .TRUE. 
     1086  
     1087             call Agrif_Update_6D_Recursive( type_update_temp(1:6),   & 
     1088                                            tempP_indic%array6,       & 
     1089                                            tempC_indic%array6, & 
     1090                                            indmin(1:6), indmax(1:6),   & 
     1091                                            pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
     1092                                            s_Child_temp(1:6), s_Parent_temp(1:6),      & 
     1093                                            ds_child(1:6), ds_parent(1:6) ) 
     1094 
     1095           Agrif_UseSpecialValueInUpdate = .TRUE. 
     1096           Agrif_Update_Weights = .FALSE. 
     1097            
     1098            WHERE (tempP_indic%array6 == 0.) 
     1099              tempP%array6 = Agrif_SpecialValueFineGrid 
     1100            ELSEWHERE 
     1101              tempP%array6 = tempP%array6 /tempP_indic%array6 
     1102            END WHERE 
    10971103            
    10981104            deallocate(tempP_indic%array6) 
     
    13191325    integer,                   intent(in)   :: nbdim 
    13201326    integer, dimension(nbdim), intent(out)  :: indmin, indmax 
    1321     real(kind=8),    dimension(nbdim), intent(out)  :: s_Parent_temp, s_Child_temp 
    1322     real(kind=8),    dimension(nbdim), intent(in)   :: s_child,  ds_child 
    1323     real(kind=8),    dimension(nbdim), intent(in)   :: s_parent, ds_parent 
     1327    real,    dimension(nbdim), intent(out)  :: s_Parent_temp, s_Child_temp 
     1328    real,    dimension(nbdim), intent(in)   :: s_child,  ds_child 
     1329    real,    dimension(nbdim), intent(in)   :: s_parent, ds_parent 
    13241330    integer, dimension(nbdim), intent(in)   :: pttruetab, cetruetab 
    13251331    integer, dimension(nbdim), intent(in)   :: lb_child, lb_parent 
     
    13311337#endif 
    13321338! 
    1333     real(kind=8),dimension(nbdim) :: dim_newmin,dim_newmax 
     1339    real,dimension(nbdim) :: dim_newmin,dim_newmax 
    13341340    integer :: i 
    13351341#if defined AGRIF_MPI 
    1336     real(kind=8)    :: positionmin, positionmax 
     1342    real    :: positionmin, positionmax 
    13371343    integer :: imin, imax 
    13381344    integer :: coeffraf 
     
    13511357        IF ( do_update(i) ) THEN 
    13521358            IF (posvar(i) == 1) THEN 
    1353                 IF      (type_update(i) == Agrif_Update_Average) THEN 
     1359                IF ((type_update(i) == Agrif_Update_Average).OR.(type_update(i) == Agrif_Update_Max)) THEN 
    13541360                    positionmin = positionmin - ds_parent(i)/2. 
    13551361                ELSE IF (type_update(i) == Agrif_Update_Full_Weighting) THEN 
     
    13771383        IF ( do_update(i) ) THEN 
    13781384            IF (posvar(i) == 1) THEN 
    1379                 IF      (type_update(i) == Agrif_Update_Average) THEN 
     1385                IF ((type_update(i) == Agrif_Update_Average).OR.(type_update(i) == Agrif_Update_Max)) THEN 
    13801386                    positionmax = positionmax  + ds_parent(i)/2. 
    13811387                ELSE IF (type_update(i) == Agrif_Update_Full_Weighting) THEN 
     
    14181424!> Updates a 1D grid variable on the parent grid 
    14191425!--------------------------------------------------------------------------------------------------- 
    1420 subroutine Agrif_Update_1D_Recursive ( type_update,                     & 
    1421                                        tempP, tempC, tempC_indic,       & 
    1422                                        indmin, indmax,                  & 
    1423                                        lb_child, ub_child,              & 
    1424                                        s_child,  s_parent,              & 
     1426subroutine Agrif_Update_1D_Recursive ( type_update,         & 
     1427                                       tempP, tempC,        & 
     1428                                       indmin, indmax,      & 
     1429                                       lb_child, ub_child,  & 
     1430                                       s_child,  s_parent,  & 
    14251431                                       ds_child, ds_parent ) 
    14261432!--------------------------------------------------------------------------------------------------- 
     
    14281434    integer,                            intent(in)  :: indmin, indmax 
    14291435    integer,                            intent(in)  :: lb_child, ub_child 
    1430     real(kind=8),                               intent(in)  ::  s_child,  s_parent 
    1431     real(kind=8),                               intent(in)  :: ds_child, ds_parent 
     1436    real,                               intent(in)  ::  s_child,  s_parent 
     1437    real,                               intent(in)  :: ds_child, ds_parent 
    14321438    real, dimension(indmin:indmax),     intent(out) :: tempP 
    1433     real, dimension(lb_child:ub_child), intent(in)  :: tempC, tempC_indic 
     1439    real, dimension(lb_child:ub_child), intent(in)  :: tempC 
    14341440!--------------------------------------------------------------------------------------------------- 
    14351441    call Agrif_UpdateBase(type_update,              & 
     
    14501456!! Calls #Agrif_Update_1D_Recursive and #Agrif_UpdateBase 
    14511457!--------------------------------------------------------------------------------------------------- 
    1452 subroutine Agrif_Update_2D_Recursive ( type_update,                     & 
    1453                                        tempP, tempC, tempC_indic,       & 
    1454                                        indmin, indmax,                  & 
    1455                                        lb_child, ub_child,              & 
    1456                                        s_child,  s_parent,              & 
     1458subroutine Agrif_Update_2D_Recursive ( type_update,         & 
     1459                                       tempP, tempC,        & 
     1460                                       indmin, indmax,      & 
     1461                                       lb_child, ub_child,  & 
     1462                                        s_child,  s_parent, & 
    14571463                                       ds_child, ds_parent ) 
    14581464!--------------------------------------------------------------------------------------------------- 
     
    14601466    integer, dimension(2),          intent(in)  :: indmin, indmax 
    14611467    integer, dimension(2),          intent(in)  :: lb_child, ub_child 
    1462     real(kind=8),    dimension(2),          intent(in)  ::  s_child,  s_parent 
    1463     real(kind=8),    dimension(2),          intent(in)  :: ds_child, ds_parent 
     1468    real,    dimension(2),          intent(in)  ::  s_child,  s_parent 
     1469    real,    dimension(2),          intent(in)  :: ds_child, ds_parent 
    14641470    real,    dimension(          & 
    14651471        indmin(1):indmax(1),     & 
    14661472        indmin(2):indmax(2)),       intent(out) :: tempP 
    1467     real,    dimension(:,:),        intent(in)  :: tempC, tempC_indic 
     1473    real,    dimension(:,:),        intent(in)  :: tempC 
    14681474!--------------------------------------------------------------------------------------------------- 
    14691475    real, dimension(indmin(1):indmax(1), lb_child(2):ub_child(2)) :: tabtemp 
     
    14711477    real, dimension(lb_child(2):ub_child(2), indmin(1):indmax(1)) :: tabtemp_trsp 
    14721478    integer :: i, j 
    1473     integer :: coeffraf, coeffraf_2 
    1474    integer :: jmin,jmax 
    1475     integer locind_child_left, locind_child_left_2,kuinf 
    1476     logical :: to_transpose 
    1477     real :: invcoeffraf 
    1478     integer :: diffmod, jj,i1,j1 
    1479  
    1480  
    1481     to_transpose = .TRUE. 
    1482 ! 
    1483      
     1479    integer :: coeffraf 
     1480! 
     1481    tabtemp = 0. 
    14841482    coeffraf = nint ( ds_parent(1) / ds_child(1) ) 
    14851483! 
     
    14941492        endif 
    14951493!---CDIR NEXPAND 
    1496         tabtemp = 0. 
    14971494        call Average1dAfterCompute( tabtemp, tempC, size(tabtemp), size(tempC), & 
    14981495                    s_parent(1),s_child(1),ds_parent(1),ds_child(1),1) 
     
    15081505        endif 
    15091506!---CDIR NEXPAND 
    1510  
    15111507        call Agrif_basicupdate_copy1d_after(tabtemp,tempC,size(tabtemp),size(tempC),1) 
    15121508! 
    1513     ELSE IF ((coeffraf == 1).AND.(type_update(2) == Agrif_Update_Average)) THEN 
    1514             locind_child_left = 1+agrif_int((s_parent(1)-s_child(1))/ds_child(1)) 
    1515             coeffraf_2 = nint ( ds_parent(2) / ds_child(2) ) 
    1516             invcoeffraf = 1./coeffraf_2 
    1517             tempP = 0. 
    1518             diffmod = 0 
    1519             if (mod(coeffraf_2,2) == 0) diffmod = 1 
    1520             locind_child_left_2 = 1+agrif_int((s_parent(2)-s_child(2))/ds_child(2)) 
    1521  
    1522             if (Agrif_UseSpecialValueInUpdate) then 
    1523               j1 = -coeffraf_2/2+locind_child_left_2+diffmod 
    1524               do j=indmin(2),indmax(2) 
    1525                 do jj=j1,j1+coeffraf_2-1 
    1526                   i1 = locind_child_left 
    1527                   do i=indmin(1),indmax(1) 
    1528                      tempP(i,j) = tempP(i,j) + tempC(i1,jj)*tempC_indic(i1,jj) 
    1529                      i1 = i1 + 1 
    1530                   enddo 
    1531                 enddo 
    1532                 j1 = j1 + coeffraf_2 
    1533               enddo 
    1534             else 
    1535               j1 = -coeffraf_2/2+locind_child_left_2+diffmod 
    1536               do j=indmin(2),indmax(2) 
    1537                 do jj=j1,j1+coeffraf_2-1 
    1538                   do i=indmin(1),indmax(1) 
    1539                        tempP(i,j) = tempP(i,j) + tempC(locind_child_left+i-indmin(1),jj) 
    1540                   enddo 
    1541                 enddo 
    1542                 j1 = j1 + coeffraf_2 
    1543               enddo 
    1544               if (.not.Agrif_Update_Weights) tempP = tempP * invcoeffraf 
    1545             endif 
    1546             return 
    1547 ! 
    1548     ELSE IF ((coeffraf == 1).AND.(type_update(2) == Agrif_Update_Copy)) THEN 
    1549  
    1550             locind_child_left = 1 + agrif_int((s_parent(1)-s_child(1))/ds_child(1)) 
    1551 ! 
    1552             locind_child_left_2 = 1+nint((s_parent(2)-s_child(2))/ds_child(2)) 
    1553             coeffraf_2 = nint ( ds_parent(2) / ds_child(2) ) 
    1554  
    1555             do j=indmin(2),indmax(2) 
    1556               do i=indmin(1),indmax(1) 
    1557                 tempP(i,j) = tempC(locind_child_left+i-indmin(1),locind_child_left_2) 
    1558               enddo 
    1559               locind_child_left_2 = locind_child_left_2 + coeffraf_2 
    1560             enddo 
    1561  
    1562             return 
    1563  
    1564     ELSE IF (coeffraf == 1) THEN 
    1565             locind_child_left = 1 + agrif_int((s_parent(1)-s_child(1))/ds_child(1)) 
    1566 ! 
    1567             do j = lb_child(2),ub_child(2) 
    1568 !              tabtemp(indmin(1):indmax(1),j) = tempC(locind_child_left:locind_child_left+indmax(1)-indmin(1),j-lb_child(2)+1) 
    1569               tabtemp_trsp(j,indmin(1):indmax(1)) = tempC(locind_child_left:locind_child_left+indmax(1)-indmin(1),j-lb_child(2)+1) 
    1570             enddo 
    1571             to_transpose = .FALSE. 
    15721509    ELSE 
    15731510        do j = lb_child(2),ub_child(2) 
     
    15771514                                            tabtemp(:,j),               & 
    15781515                                            tempC(:,j-lb_child(2)+1),   & 
    1579                                             tempC_indic(:,j-lb_child(2)+1),   & 
    15801516                                            indmin(1), indmax(1),       & 
    15811517                                            lb_child(1),ub_child(1),    & 
     
    15851521    ENDIF 
    15861522! 
    1587  
    1588     if (to_transpose) tabtemp_trsp = TRANSPOSE(tabtemp) 
    1589  
     1523    tabtemp_trsp = TRANSPOSE(tabtemp) 
    15901524    coeffraf = nint(ds_parent(2)/ds_child(2)) 
    15911525! 
     
    16321566    ENDIF 
    16331567! 
    1634  
    1635     
    16361568    tempP = TRANSPOSE(tempP_trsp) 
    16371569!--------------------------------------------------------------------------------------------------- 
    16381570end subroutine Agrif_Update_2D_Recursive 
     1571!=================================================================================================== 
     1572! 
     1573subroutine Agrif_Update_2D_Recursive_ok ( type_update, & 
     1574                                        tempP, tempC, & 
     1575                                        indmin, indmax,   & 
     1576                                       lb_child, ub_child,                    & 
     1577                                       s_child, s_parent, ds_child, ds_parent ) 
     1578!--------------------------------------------------------------------------------------------------- 
     1579    INTEGER, DIMENSION(2), intent(in)   :: type_update            !< Type of update (copy or average) 
     1580    INTEGER, DIMENSION(2), intent(in)   :: indmin, indmax 
     1581    INTEGER, DIMENSION(2), intent(in)   :: lb_child, ub_child 
     1582    REAL,    DIMENSION(2), intent(in)   :: s_child,  s_parent 
     1583    REAL,    DIMENSION(2), intent(in)   :: ds_child, ds_parent 
     1584    REAL,    DIMENSION(                 & 
     1585                indmin(1):indmax(1),    & 
     1586                indmin(2):indmax(2)),           intent(out) :: tempP 
     1587    REAL, DIMENSION(                            & 
     1588                lb_child(1):ub_child(1),  & 
     1589                lb_child(2):ub_child(2)), intent(in)  :: tempC 
     1590! 
     1591    REAL, DIMENSION(indmin(1):indmax(1), lb_child(2):ub_child(2)) :: tabtemp 
     1592    INTEGER :: i 
     1593! 
     1594    do i = lb_child(2),ub_child(2) 
     1595        call Agrif_Update_1D_Recursive(type_update(1),                              & 
     1596                                       tabtemp(:, i),          & 
     1597                                       tempC(:,i),  & 
     1598                                       indmin(1),indmax(1),                 & 
     1599                                       lb_child(1),ub_child(1),       & 
     1600                                       s_child(1), s_parent(1),             & 
     1601                                      ds_child(1),ds_parent(1)) 
     1602    enddo 
     1603! 
     1604    tempP = 0. 
     1605! 
     1606    do i = indmin(1),indmax(1) 
     1607        call Agrif_UpdateBase(type_update(2),                                       & 
     1608                              tempP(i,:),             & 
     1609                              tabtemp(i,:), & 
     1610                              indmin(2),indmax(2),                          & 
     1611                              lb_child(2),ub_child(2),                & 
     1612                              s_parent(2),s_child(2),                       & 
     1613                             ds_parent(2),ds_child(2)) 
     1614    enddo 
     1615!--------------------------------------------------------------------------------------------------- 
     1616end subroutine Agrif_Update_2D_Recursive_ok 
    16391617!=================================================================================================== 
    16401618 
     
    16461624!! Calls #Agrif_Update_2D_Recursive and #Agrif_UpdateBase. 
    16471625!--------------------------------------------------------------------------------------------------- 
    1648 subroutine Agrif_Update_3D_Recursive ( type_update,                     & 
    1649                                        tempP, tempC, tempC_indic,       & 
    1650                                        indmin, indmax,                  & 
    1651                                        lb_child, ub_child,              & 
    1652                                        s_child,  s_parent,              & 
     1626subroutine Agrif_Update_3D_Recursive ( type_update,         & 
     1627                                       tempP, tempC,        & 
     1628                                       indmin, indmax,      & 
     1629                                       lb_child, ub_child,  & 
     1630                                        s_child,  s_parent, & 
    16531631                                       ds_child, ds_parent ) 
    16541632!--------------------------------------------------------------------------------------------------- 
     
    16561634    integer, dimension(3),          intent(in)  :: indmin, indmax 
    16571635    integer, dimension(3),          intent(in)  :: lb_child, ub_child 
    1658     real(kind=8),    dimension(3),          intent(in)  ::  s_child,  s_parent 
    1659     real(kind=8),    dimension(3),          intent(in)  :: ds_child, ds_parent 
     1636    real,    dimension(3),          intent(in)  ::  s_child,  s_parent 
     1637    real,    dimension(3),          intent(in)  :: ds_child, ds_parent 
    16601638    real,    dimension(          & 
    16611639        indmin(1):indmax(1),     & 
     
    16651643        lb_child(1):ub_child(1), & 
    16661644        lb_child(2):ub_child(2), & 
    1667         lb_child(3):ub_child(3)),   intent(in)  :: tempC, tempC_indic 
     1645        lb_child(3):ub_child(3)),   intent(in)  :: tempC 
    16681646!--------------------------------------------------------------------------------------------------- 
    16691647    real, dimension(            & 
     
    16741652    integer :: coeffraf,locind_child_left 
    16751653    integer :: kuinf 
    1676     REAL :: invcoeffraf 
    1677     INTEGER :: diffmod, kk 
    16781654! 
    16791655    coeffraf = nint ( ds_parent(1) / ds_child(1) ) 
     
    17131689    endif 
    17141690! 
    1715  !   do k = lb_child(3),ub_child(3) 
    1716  !       call Agrif_Update_2D_Recursive( type_update(1:2),tabtemp(:,:,k),tempC(:,:,k), & 
    1717  !                                       indmin(1:2),indmax(1:2),                & 
    1718  !                                       lb_child(1:2),ub_child(1:2),      & 
    1719  !                                       s_child(1:2),s_parent(1:2),             & 
    1720  !                                       ds_child(1:2),ds_parent(1:2) ) 
    1721  !   enddo 
    1722  
    1723  
    17241691    do k = lb_child(3),ub_child(3) 
    1725         call Agrif_Update_2D_Recursive( type_update,tabtemp(:,:,k),tempC(:,:,k),tempC_indic(:,:,k), & 
    1726                                         indmin,indmax,                & 
    1727                                         lb_child,ub_child,      & 
    1728                                         s_child,s_parent,             & 
    1729                                         ds_child,ds_parent) 
    1730     enddo 
    1731  
     1692        call Agrif_Update_2D_Recursive( type_update(1:2),tabtemp(:,:,k),tempC(:,:,k), & 
     1693                                        indmin(1:2),indmax(1:2),                & 
     1694                                        lb_child(1:2),ub_child(1:2),      & 
     1695                                        s_child(1:2),s_parent(1:2),             & 
     1696                                        ds_child(1:2),ds_parent(1:2) ) 
     1697    enddo 
    17321698! 
    17331699    precomputedone(1) = .FALSE. 
     
    17471713            enddo 
    17481714        enddo 
    1749     else if (type_update(3) == Agrif_Update_Copy) then 
    1750     locind_child_left = lb_child(3) + nint((s_parent(3)-s_child(3))/ds_child(3)) 
    1751  
    1752         do k=indmin(3),indmax(3) 
    1753             do j = indmin(2),indmax(2) 
    1754             do i = indmin(1),indmax(1) 
    1755                 tempP(i,j,k) = tabtemp(i,j,locind_child_left) 
    1756             enddo 
    1757             enddo 
    1758             locind_child_left = locind_child_left + coeffraf 
    1759         enddo 
    1760     else if (type_update(3) == Agrif_Update_Average) then 
    1761       invcoeffraf = 1./coeffraf 
    1762       tempP = 0. 
    1763       diffmod = 0 
    1764       if (mod(coeffraf,2) == 0) diffmod=1  
    1765       locind_child_left = lb_child(3) + agrif_int((s_parent(3)-s_child(3))/ds_child(3)) 
    1766       if (Agrif_UseSpecialValueInUpdate) then 
    1767         do k=indmin(3),indmax(3) 
    1768           do kk=-coeffraf/2+locind_child_left+diffmod, & 
    1769                    coeffraf/2+locind_child_left 
    1770             do j=indmin(2),indmax(2) 
    1771             do i=indmin(1),indmax(1) 
    1772                if (tabtemp(i,j,kk) /= Agrif_SpecialValueFineGrid) then 
    1773                   tempP(i,j,k) = tempP(i,j,k) + tabtemp(i,j,kk) 
    1774                endif 
    1775             enddo 
    1776             enddo 
    1777           enddo 
    1778           locind_child_left = locind_child_left + coeffraf 
    1779         enddo 
    1780       else 
    1781         do k=indmin(3),indmax(3) 
    1782           do kk=-coeffraf/2+locind_child_left+diffmod, & 
    1783                    coeffraf/2+locind_child_left 
    1784             do j=indmin(2),indmax(2) 
    1785             do i=indmin(1),indmax(1) 
    1786                   tempP(i,j,k) = tempP(i,j,k) + tabtemp(i,j,kk) 
    1787             enddo 
    1788             enddo 
    1789           enddo 
    1790           locind_child_left = locind_child_left + coeffraf 
    1791         enddo 
    1792         if (.not.Agrif_Update_Weights) tempP = tempP * invcoeffraf 
    1793       endif 
    17941715    else 
     1716        tempP = 0. 
    17951717        do j = indmin(2),indmax(2) 
    17961718        do i = indmin(1),indmax(1) 
     
    18001722                                  s_parent(3),s_child(3),               & 
    18011723                                  ds_parent(3),ds_child(3)) 
    1802  
     1724! 
    18031725        enddo 
    18041726        enddo 
    1805  
    1806  
    18071727    endif 
    18081728!--------------------------------------------------------------------------------------------------- 
     
    18161736!! Calls #Agrif_Update_3D_Recursive and #Agrif_UpdateBase. 
    18171737!--------------------------------------------------------------------------------------------------- 
    1818 subroutine Agrif_Update_4D_Recursive ( type_update,                     & 
    1819                                        tempP, tempC, tempC_indic,       & 
    1820                                        indmin, indmax,                  & 
    1821                                        lb_child, ub_child,              & 
    1822                                        s_child,  s_parent,              & 
     1738subroutine Agrif_Update_4D_Recursive ( type_update,         & 
     1739                                       tempP, tempC,        & 
     1740                                       indmin, indmax,      & 
     1741                                       lb_child, ub_child,  & 
     1742                                        s_child,  s_parent, & 
    18231743                                       ds_child, ds_parent ) 
    18241744!--------------------------------------------------------------------------------------------------- 
     
    18261746    integer, dimension(4),          intent(in)  :: indmin, indmax 
    18271747    integer, dimension(4),          intent(in)  :: lb_child, ub_child 
    1828     real(kind=8),    dimension(4),          intent(in)  ::  s_child,  s_parent 
    1829     real(kind=8),    dimension(4),          intent(in)  :: ds_child, ds_parent 
     1748    real,    dimension(4),          intent(in)  ::  s_child,  s_parent 
     1749    real,    dimension(4),          intent(in)  :: ds_child, ds_parent 
    18301750    real,    dimension(          & 
    18311751        indmin(1):indmax(1),     & 
     
    18371757        lb_child(2):ub_child(2), & 
    18381758        lb_child(3):ub_child(3), & 
    1839         lb_child(4):ub_child(4)),   intent(in)  :: tempC, tempC_indic 
     1759        lb_child(4):ub_child(4)),   intent(in)  :: tempC 
    18401760!--------------------------------------------------------------------------------------------------- 
    18411761    real, dimension(:,:,:,:), allocatable       :: tabtemp 
     
    18531773                                               indmin(3):indmax(3), l),     & 
    18541774                                       tempC(lb_child(1):ub_child(1),       & 
    1855                                              lb_child(2):ub_child(2),       & 
    1856                                              lb_child(3):ub_child(3), l),   & 
    1857                                        tempC_indic(lb_child(1):ub_child(1),       & 
    18581775                                             lb_child(2):ub_child(2),       & 
    18591776                                             lb_child(3):ub_child(3), l),   & 
     
    18911808!! Calls #Agrif_Update_4D_Recursive and #Agrif_UpdateBase. 
    18921809!--------------------------------------------------------------------------------------------------- 
    1893 subroutine Agrif_Update_5D_Recursive ( type_update,                     & 
    1894                                        tempP, tempC, tempC_indic,       & 
    1895                                        indmin, indmax,                  & 
    1896                                        lb_child, ub_child,              & 
    1897                                        s_child,  s_parent,              & 
     1810subroutine Agrif_Update_5D_Recursive ( type_update,         & 
     1811                                       tempP, tempC,        & 
     1812                                       indmin, indmax,      & 
     1813                                       lb_child, ub_child,  & 
     1814                                        s_child,  s_parent, & 
    18981815                                       ds_child, ds_parent ) 
    18991816!--------------------------------------------------------------------------------------------------- 
     
    19011818    integer, dimension(5),          intent(in)  :: indmin, indmax 
    19021819    integer, dimension(5),          intent(in)  :: lb_child, ub_child 
    1903     real(kind=8),    dimension(5),          intent(in)  ::  s_child,  s_parent 
    1904     real(kind=8),    dimension(5),          intent(in)  :: ds_child, ds_parent 
     1820    real,    dimension(5),          intent(in)  ::  s_child,  s_parent 
     1821    real,    dimension(5),          intent(in)  :: ds_child, ds_parent 
    19051822    real,    dimension(          & 
    19061823        indmin(1):indmax(1),     & 
     
    19141831        lb_child(3):ub_child(3), & 
    19151832        lb_child(4):ub_child(4), & 
    1916         lb_child(5):ub_child(5)),   intent(in)  :: tempC, tempC_indic 
     1833        lb_child(5):ub_child(5)),   intent(in)  :: tempC 
    19171834!--------------------------------------------------------------------------------------------------- 
    19181835    real, dimension(:,:,:,:,:), allocatable     :: tabtemp 
     
    19321849                                               indmin(4):indmax(4), m),     & 
    19331850                                       tempC(lb_child(1):ub_child(1),       & 
    1934                                              lb_child(2):ub_child(2),       & 
    1935                                              lb_child(3):ub_child(3),       & 
    1936                                              lb_child(4):ub_child(4), m),   & 
    1937                                        tempC_indic(lb_child(1):ub_child(1),       & 
    19381851                                             lb_child(2):ub_child(2),       & 
    19391852                                             lb_child(3):ub_child(3),       & 
     
    19741887!! Calls #Agrif_Update_5D_Recursive and #Agrif_UpdateBase. 
    19751888!--------------------------------------------------------------------------------------------------- 
    1976 subroutine Agrif_Update_6D_Recursive ( type_update,                     & 
    1977                                        tempP, tempC, tempC_indic,       & 
    1978                                        indmin, indmax,                  & 
    1979                                        lb_child, ub_child,              & 
    1980                                        s_child,  s_parent,              & 
     1889subroutine Agrif_Update_6D_Recursive ( type_update,         & 
     1890                                       tempP, tempC,        & 
     1891                                       indmin, indmax,      & 
     1892                                       lb_child, ub_child,  & 
     1893                                        s_child,  s_parent, & 
    19811894                                       ds_child, ds_parent ) 
    19821895!--------------------------------------------------------------------------------------------------- 
     
    19841897    integer, dimension(6),          intent(in)  :: indmin, indmax 
    19851898    integer, dimension(6),          intent(in)  :: lb_child, ub_child 
    1986     real(kind=8),    dimension(6),          intent(in)  ::  s_child,  s_parent 
    1987     real(kind=8),    dimension(6),          intent(in)  :: ds_child, ds_parent 
     1899    real,    dimension(6),          intent(in)  ::  s_child,  s_parent 
     1900    real,    dimension(6),          intent(in)  :: ds_child, ds_parent 
    19881901    real,    dimension(          & 
    19891902        indmin(1):indmax(1),     & 
     
    19991912        lb_child(4):ub_child(4), & 
    20001913        lb_child(5):ub_child(5), & 
    2001         lb_child(6):ub_child(6)),   intent(in)  :: tempC, tempC_indic 
     1914        lb_child(6):ub_child(6)),   intent(in)  :: tempC 
    20021915!--------------------------------------------------------------------------------------------------- 
    20031916    real, dimension(:,:,:,:,:,:), allocatable   :: tabtemp 
     
    20231936                                             lb_child(4):ub_child(4),       & 
    20241937                                             lb_child(5):ub_child(5), n),   & 
    2025                                        tempC_indic(lb_child(1):ub_child(1),       & 
    2026                                              lb_child(2):ub_child(2),       & 
    2027                                              lb_child(3):ub_child(3),       & 
    2028                                              lb_child(4):ub_child(4),       & 
    2029                                              lb_child(5):ub_child(5), n),   & 
    20301938                                       indmin(1:5), indmax(1:5),            & 
    20311939                                       lb_child(1:5),ub_child(1:5),         & 
     
    20761984    real, dimension(indmin:indmax),     intent(out):: parent_tab 
    20771985    real, dimension(lb_child:ub_child), intent(in) :: child_tab 
    2078     real(kind=8),                       intent(in) :: s_parent,  s_child 
    2079     real(kind=8),                       intent(in) :: ds_parent, ds_child 
     1986    real,                               intent(in) :: s_parent,  s_child 
     1987    real,                               intent(in) :: ds_parent, ds_child 
    20801988!--------------------------------------------------------------------------------------------------- 
    20811989    integer :: np       ! Length of parent array 
     
    21012009                    ds_parent, ds_child ) 
    21022010! 
     2011    elseif ( type_update == Agrif_Update_Max ) then 
     2012! 
     2013        call Agrif_basicupdate_max1d(           & 
     2014                    parent_tab, child_tab,          & 
     2015                    np,         nc,                 & 
     2016                     s_parent,  s_child,            & 
     2017                    ds_parent, ds_child ) 
    21032018    elseif ( type_update == Agrif_Update_Full_Weighting ) then 
    21042019! 
Note: See TracChangeset for help on using the changeset viewer.