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/modupdate.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/modupdate.F90

    r5656 r10087  
    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! 
    2937    use Agrif_UpdateBasic 
    3038    use Agrif_Arrays 
    31     use Agrif_CurgridFunctions 
     39    use Agrif_User_Functions 
     40    use Agrif_Init 
    3241    use Agrif_Mask 
     42     
    3343#if defined AGRIF_MPI 
    3444    use Agrif_Mpp 
     
    5868    integer, dimension(6) :: ub_child 
    5969    integer, dimension(6) :: lb_parent 
    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) 
     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) 
    6474    logical, dimension(6) :: do_update          ! Indicates if we perform update for each dimension 
    6575    integer, dimension(6) :: posvar             ! Position of the variable on the cell (1 or 2) 
     
    160170    integer, dimension(nbdim), intent(in) :: posvar         !< Position of the variable on the cell (1 or 2) 
    161171    logical, dimension(nbdim), intent(in) :: do_update      !< Indicates if we update for each dimension 
    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 
     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 
    166176    procedure()                           :: procname       !< Data recovery procedure 
    167177! 
     
    230240! lubglob(:,2) : global lbound for each dimension 
    231241! 
    232     call Agrif_get_var_global_bounds(child, lubglob, nbdim) 
     242!     call Agrif_get_var_global_bounds(child, lubglob, nbdim) 
     243    lubglob = child % lubglob(1:nbdim,:) 
    233244! 
    234245    indtruetab(1:nbdim,1,1) = max(indtab(1:nbdim,1,1), lubglob(1:nbdim,1)) 
     
    274285    integer, dimension(nbdim), intent(in)   :: posvar       !< Position of the variable on the cell (1 or 2) 
    275286    logical, dimension(nbdim), intent(in)   :: do_update    !< Indicates if we update for each dimension 
    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 
     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 
    280291    procedure()                             :: procname     !< Data recovery procedure 
    281292! 
     
    390401#endif 
    391402! 
    392     integer, dimension(6),     intent(in)   :: type_update  !< Type of update (copy or average) 
    393403    type(Agrif_Variable), pointer           :: parent       !< Variable of the parent grid 
    394404    type(Agrif_Variable), pointer           :: child        !< Variable of the child grid 
    395405    integer,                   intent(in)   :: nbdim 
     406    integer, dimension(nbdim), intent(in)   :: type_update  !< Type of update (copy or average) 
    396407    integer, dimension(nbdim), intent(in)   :: pttab        !< Index of the first point inside the domain 
    397408    integer, dimension(nbdim), intent(in)   :: petab        !< Index of the first point inside the domain 
     
    400411    integer, dimension(nbdim), intent(in)   :: lb_parent !< Index of the first point inside the domain for the parent 
    401412                                                            !!    grid variable 
    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 
     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 
    406417    procedure()                             :: procname     !< Data recovery procedure 
    407418    integer, optional,         intent(in)   :: nb, ndir 
     
    415426    integer, dimension(nbdim)       :: indmin, indmax 
    416427    integer, dimension(nbdim)       :: indminglob, indmaxglob 
    417     real   , dimension(nbdim)       :: s_Child_temp, s_Parent_temp 
     428    real(kind=8)   , dimension(nbdim)       :: s_Child_temp, s_Parent_temp 
    418429    integer, dimension(nbdim)       :: lowerbound,upperbound 
    419430    integer, dimension(nbdim)       :: pttruetabwhole, cetruetabwhole 
     
    450461    real :: coeff_multi 
    451462    integer :: nb_dimensions 
     463 
    452464! 
    453465!   Get local lower and upper bound of the child variable 
     
    506518! 
    507519        call Agrif_array_allocate(tempC,pttruetab,cetruetab,nbdim) 
     520#if defined AGRIF_MPI 
    508521        call Agrif_var_set_array_tozero(tempC,nbdim) 
     522#endif 
    509523 
    510524        SELECT CASE (nbdim) 
     
    582596                                     nbdim, memberinall, coords,                            & 
    583597                                     sendtoproc1,recvfromproc1,                             & 
    584                                      tab4t(:,:,5),tab4t(:,:,6),tab4t(:,:,7),tab4t(:,:,8)) 
     598                                     tab4t(:,:,5),tab4t(:,:,6),tab4t(:,:,7),tab4t(:,:,8),   & 
     599                                     tab4t(:,:,1),tab4t(:,:,2)) 
    585600    endif 
    586601 
     
    600615! 
    601616        call Agrif_array_allocate(tempP,indmin,indmax,nbdim) 
    602 ! 
     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 
    603630        if ( nbdim == 1 ) then 
    604631            tempP % array1 = 0. 
     
    606633                                            tempP%array1,   & 
    607634                                            tempCextend%array1, & 
     635                                            tempC_indic%array1, & 
    608636                                            indmin(1), indmax(1),   & 
    609637                                            pttruetabwhole(1), cetruetabwhole(1),   & 
     
    612640                                             
    613641            IF (Agrif_UseSpecialValueInUpdate) THEN 
    614             allocate(tempC_indic) 
    615             allocate(tempP_indic) 
    616             call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array1),ubound(tempCextend%array1),nbdim) 
    617             call Agrif_array_allocate(tempP_indic,lbound(tempP%array1),ubound(tempP%array1),nbdim) 
    618642 
    619643            compute_average = .FALSE. 
     
    629653                                            tempP_average%array1,       & 
    630654                                            tempCextend%array1, & 
     655                                            tempC_indic%array1, & 
    631656                                            indmin(1), indmax(1),   & 
    632657                                            pttruetabwhole(1), cetruetabwhole(1),   & 
     
    639664            ENDIF 
    640665             
    641             WHERE (tempCextend%array1 == Agrif_SpecialValueFineGrid) 
    642               tempC_indic%array1 = 0. 
    643             ELSEWHERE 
    644               tempC_indic%array1 = 1. 
    645             END WHERE 
    646              
    647666            Agrif_UseSpecialValueInUpdate = .FALSE. 
    648667            Agrif_Update_Weights = .TRUE. 
     
    650669             call Agrif_Update_1D_Recursive( type_update_temp(1),   & 
    651670                                            tempP_indic%array1,       & 
     671                                            tempC_indic%array1, & 
    652672                                            tempC_indic%array1, & 
    653673                                            indmin(1), indmax(1),   & 
     
    691711                                            tempP%array2,       & 
    692712                                            tempCextend%array2, & 
     713                                            tempC_indic%array2, & 
    693714                                            indmin(1:2), indmax(1:2),   & 
    694715                                            pttruetabwhole(1:2), cetruetabwhole(1:2),   & 
     
    697718 
    698719            IF (Agrif_UseSpecialValueInUpdate) THEN 
    699             allocate(tempC_indic) 
    700             allocate(tempP_indic) 
    701             call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array2),ubound(tempCextend%array2),nbdim) 
    702             call Agrif_array_allocate(tempP_indic,lbound(tempP%array2),ubound(tempP%array2),nbdim) 
    703720  
    704721            compute_average = .FALSE. 
     
    714731                                            tempP_average%array2,       & 
    715732                                            tempCextend%array2, & 
     733                                            tempC_indic%array2, & 
    716734                                            indmin(1:2), indmax(1:2),   & 
    717735                                            pttruetabwhole(1:2), cetruetabwhole(1:2),   & 
     
    724742            ENDIF 
    725743             
    726             WHERE (tempCextend%array2 == Agrif_SpecialValueFineGrid) 
    727               tempC_indic%array2 = 0. 
    728             ELSEWHERE 
    729               tempC_indic%array2 = 1. 
    730             END WHERE 
    731              
    732744            Agrif_UseSpecialValueInUpdate = .FALSE. 
    733745            Agrif_Update_Weights = .TRUE. 
     
    735747            call Agrif_Update_2D_Recursive( type_update_temp(1:2),   & 
    736748                                            tempP_indic%array2,       & 
     749                                            tempC_indic%array2, & 
    737750                                            tempC_indic%array2, & 
    738751                                            indmin(1:2), indmax(1:2),   & 
     
    773786        endif 
    774787        if ( nbdim == 3 ) then 
     788 
    775789            call Agrif_Update_3D_Recursive( type_update(1:3),   & 
    776790                                            tempP%array3,       & 
    777791                                            tempCextend%array3, & 
     792                                            tempC_indic%array3, & 
    778793                                            indmin(1:3), indmax(1:3),   & 
    779794                                            pttruetabwhole(1:3), cetruetabwhole(1:3),   & 
    780795                                            s_Child_temp(1:3), s_Parent_temp(1:3),      & 
    781796                                            ds_child(1:3), ds_parent(1:3) ) 
    782                                              
     797 
     798                       
    783799            IF (Agrif_UseSpecialValueInUpdate) THEN 
    784             allocate(tempC_indic) 
    785             allocate(tempP_indic) 
    786             call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array3),ubound(tempCextend%array3),nbdim) 
    787             call Agrif_array_allocate(tempP_indic,lbound(tempP%array3),ubound(tempP%array3),nbdim) 
    788800 
    789801            compute_average = .FALSE. 
     
    796808                type_update_temp(1:nbdim) = Agrif_Update_Average 
    797809              END WHERE 
     810 
    798811              call Agrif_Update_3D_Recursive( type_update_temp(1:3),   & 
    799812                                            tempP_average%array3,       & 
    800813                                            tempCextend%array3, & 
     814                                            tempC_indic%array3, & 
    801815                                            indmin(1:3), indmax(1:3),   & 
    802816                                            pttruetabwhole(1:3), cetruetabwhole(1:3),   & 
     
    808822              enddo 
    809823            ENDIF 
    810              
    811             WHERE (tempCextend%array3 == Agrif_SpecialValueFineGrid) 
    812               tempC_indic%array3 = 0. 
    813             ELSEWHERE 
    814               tempC_indic%array3 = 1. 
    815             END WHERE 
    816              
     824 
    817825            Agrif_UseSpecialValueInUpdate = .FALSE. 
    818826            Agrif_Update_Weights = .TRUE. 
    819   
     827 
     828 
    820829             call Agrif_Update_3D_Recursive( type_update_temp(1:3),   & 
    821830                                            tempP_indic%array3,       & 
    822831                                            tempC_indic%array3, & 
     832                                            tempCextend%array3, & 
    823833                                            indmin(1:3), indmax(1:3),   & 
    824834                                            pttruetabwhole(1:3), cetruetabwhole(1:3),   & 
     
    826836                                            ds_child(1:3), ds_parent(1:3) ) 
    827837 
     838 
    828839           Agrif_UseSpecialValueInUpdate = .TRUE. 
    829840           Agrif_Update_Weights = .FALSE. 
    830841 
     842 
    831843           IF (compute_average) THEN 
     844          
    832845               WHERE (tempP_indic%array3 == 0.) 
    833846                  tempP%array3 = Agrif_SpecialValueFineGrid 
     
    837850                  tempP%array3 = tempP_average%array3 /tempP_indic%array3 
    838851               END WHERE 
    839  
     852             
    840853           ELSE 
    841854               WHERE (tempP_indic%array3 == 0.) 
     
    845858               END WHERE 
    846859            ENDIF 
    847             
     860 
    848861            deallocate(tempP_indic%array3) 
    849862            deallocate(tempC_indic%array3) 
     
    855868            ENDIF 
    856869            ENDIF 
    857              
     870 
     871          
    858872        endif 
    859873        if ( nbdim == 4 ) then 
     874           
    860875            call Agrif_Update_4D_Recursive( type_update(1:4),   & 
    861876                                            tempP%array4,       & 
    862877                                            tempCextend%array4, & 
     878                                            tempC_indic%array4, & 
    863879                                            indmin(1:4), indmax(1:4),   & 
    864880                                            pttruetabwhole(1:4), cetruetabwhole(1:4),   & 
    865881                                            s_Child_temp(1:4), s_Parent_temp(1:4),      & 
    866882                                            ds_child(1:4), ds_parent(1:4) ) 
    867                                              
     883                 
    868884            IF (Agrif_UseSpecialValueInUpdate) THEN 
    869              
    870             allocate(tempC_indic) 
    871             allocate(tempP_indic) 
    872             call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array4),ubound(tempCextend%array4),nbdim) 
    873             call Agrif_array_allocate(tempP_indic,lbound(tempP%array4),ubound(tempP%array4),nbdim) 
    874885            
    875886            compute_average = .FALSE. 
     
    885896                                            tempP_average%array4,       & 
    886897                                            tempCextend%array4, & 
     898                                            tempC_indic%array4, & 
    887899                                            indmin(1:4), indmax(1:4),   & 
    888900                                            pttruetabwhole(1:4), cetruetabwhole(1:4),   & 
     
    895907            ENDIF 
    896908             
    897             WHERE (tempCextend%array4 == Agrif_SpecialValueFineGrid) 
    898               tempC_indic%array4 = 0. 
    899             ELSEWHERE 
    900               tempC_indic%array4 = 1. 
    901             END WHERE 
    902              
    903909            Agrif_UseSpecialValueInUpdate = .FALSE. 
    904910            Agrif_Update_Weights = .TRUE. 
     
    906912             call Agrif_Update_4D_Recursive( type_update_temp(1:4),   & 
    907913                                            tempP_indic%array4,       & 
     914                                            tempC_indic%array4, & 
    908915                                            tempC_indic%array4, & 
    909916                                            indmin(1:4), indmax(1:4),   & 
     
    940947            ENDIF 
    941948            ENDIF 
    942              
     949                  
    943950        endif 
    944951        if ( nbdim == 5 ) then 
     
    946953                                            tempP%array5,       & 
    947954                                            tempCextend%array5, & 
     955                                            tempC_indic%array5, & 
    948956                                            indmin(1:5), indmax(1:5),   & 
    949957                                            pttruetabwhole(1:5), cetruetabwhole(1:5),   & 
     
    952960                                             
    953961            IF (Agrif_UseSpecialValueInUpdate) THEN 
    954             allocate(tempC_indic) 
    955             allocate(tempP_indic) 
    956             call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array5),ubound(tempCextend%array5),nbdim) 
    957             call Agrif_array_allocate(tempP_indic,lbound(tempP%array5),ubound(tempP%array5),nbdim) 
    958962 
    959963            compute_average = .FALSE. 
     
    969973                                            tempP_average%array5,       & 
    970974                                            tempCextend%array5, & 
     975                                            tempC_indic%array5, & 
    971976                                            indmin(1:5), indmax(1:5),   & 
    972977                                            pttruetabwhole(1:5), cetruetabwhole(1:5),   & 
     
    979984            ENDIF 
    980985             
    981             WHERE (tempCextend%array5 == Agrif_SpecialValueFineGrid) 
    982               tempC_indic%array5 = 0. 
    983             ELSEWHERE 
    984               tempC_indic%array5 = 1. 
    985             END WHERE 
    986              
    987986            Agrif_UseSpecialValueInUpdate = .FALSE. 
    988987            Agrif_Update_Weights = .TRUE. 
     
    990989             call Agrif_Update_5D_Recursive( type_update_temp(1:5),   & 
    991990                                            tempP_indic%array5,       & 
     991                                            tempC_indic%array5, & 
    992992                                            tempC_indic%array5, & 
    993993                                            indmin(1:5), indmax(1:5),   & 
     
    10311031                                            tempP%array6,       & 
    10321032                                            tempCextend%array6, & 
     1033                                            tempC_indic%array6, & 
    10331034                                            indmin(1:6), indmax(1:6),   & 
    10341035                                            pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
    10351036                                            s_Child_temp(1:6), s_Parent_temp(1:6),      & 
    10361037                                            ds_child(1:6), ds_parent(1:6) ) 
     1038 
    10371039            IF (Agrif_UseSpecialValueInUpdate) THEN 
    1038             allocate(tempC_indic) 
    1039             allocate(tempP_indic) 
    1040             call Agrif_array_allocate(tempC_indic,lbound(tempCextend%array6),ubound(tempCextend%array6),nbdim) 
    1041             call Agrif_array_allocate(tempP_indic,lbound(tempP%array6),ubound(tempP%array6),nbdim) 
    10421040 
    10431041            compute_average = .FALSE. 
     
    10541052                                            tempP_average%array6,       & 
    10551053                                            tempCextend%array6, & 
     1054                                            tempC_indic%array6, & 
    10561055                                            indmin(1:6), indmax(1:6),   & 
    10571056                                            pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
     
    10641063            ENDIF 
    10651064 
     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            
    10661081           IF (compute_average) THEN 
    10671082               WHERE (tempP_indic%array6 == 0.) 
     
    10801095               END WHERE 
    10811096            ENDIF 
    1082              
    1083             Agrif_UseSpecialValueInUpdate = .FALSE. 
    1084             Agrif_Update_Weights = .TRUE. 
    1085   
    1086              call Agrif_Update_6D_Recursive( type_update_temp(1:6),   & 
    1087                                             tempP_indic%array6,       & 
    1088                                             tempC_indic%array6, & 
    1089                                             indmin(1:6), indmax(1:6),   & 
    1090                                             pttruetabwhole(1:6), cetruetabwhole(1:6),   & 
    1091                                             s_Child_temp(1:6), s_Parent_temp(1:6),      & 
    1092                                             ds_child(1:6), ds_parent(1:6) ) 
    1093  
    1094            Agrif_UseSpecialValueInUpdate = .TRUE. 
    1095            Agrif_Update_Weights = .FALSE. 
    1096             
    1097             WHERE (tempP_indic%array6 == 0.) 
    1098               tempP%array6 = Agrif_SpecialValueFineGrid 
    1099             ELSEWHERE 
    1100               tempP%array6 = tempP%array6 /tempP_indic%array6 
    1101             END WHERE 
    11021097            
    11031098            deallocate(tempP_indic%array6) 
     
    11541149                                     nbdim, memberinall2, coords,                           & 
    11551150                                     sendtoproc2, recvfromproc2,                            & 
    1156                                      tab5t(:,:,5),tab5t(:,:,6),tab5t(:,:,7),tab5t(:,:,8)) 
     1151                                     tab5t(:,:,5),tab5t(:,:,6),tab5t(:,:,7),tab5t(:,:,8),   & 
     1152                                     tab5t(:,:,1),tab5t(:,:,2)) 
    11571153 
    11581154        call Agrif_Addto_list_update(child%list_update,pttab,petab,lb_child,lb_parent,      & 
     
    13231319    integer,                   intent(in)   :: nbdim 
    13241320    integer, dimension(nbdim), intent(out)  :: indmin, indmax 
    1325     real,    dimension(nbdim), intent(out)  :: s_Parent_temp, s_Child_temp 
    1326     real,    dimension(nbdim), intent(in)   :: s_child,  ds_child 
    1327     real,    dimension(nbdim), intent(in)   :: s_parent, ds_parent 
     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 
    13281324    integer, dimension(nbdim), intent(in)   :: pttruetab, cetruetab 
    13291325    integer, dimension(nbdim), intent(in)   :: lb_child, lb_parent 
     
    13351331#endif 
    13361332! 
    1337     real,dimension(nbdim) :: dim_newmin,dim_newmax 
     1333    real(kind=8),dimension(nbdim) :: dim_newmin,dim_newmax 
    13381334    integer :: i 
    13391335#if defined AGRIF_MPI 
    1340     real    :: positionmin, positionmax 
     1336    real(kind=8)    :: positionmin, positionmax 
    13411337    integer :: imin, imax 
    13421338    integer :: coeffraf 
     
    14221418!> Updates a 1D grid variable on the parent grid 
    14231419!--------------------------------------------------------------------------------------------------- 
    1424 subroutine Agrif_Update_1D_Recursive ( type_update,         & 
    1425                                        tempP, tempC,        & 
    1426                                        indmin, indmax,      & 
    1427                                        lb_child, ub_child,  & 
    1428                                        s_child,  s_parent,  & 
     1420subroutine Agrif_Update_1D_Recursive ( type_update,                     & 
     1421                                       tempP, tempC, tempC_indic,       & 
     1422                                       indmin, indmax,                  & 
     1423                                       lb_child, ub_child,              & 
     1424                                       s_child,  s_parent,              & 
    14291425                                       ds_child, ds_parent ) 
    14301426!--------------------------------------------------------------------------------------------------- 
     
    14321428    integer,                            intent(in)  :: indmin, indmax 
    14331429    integer,                            intent(in)  :: lb_child, ub_child 
    1434     real,                               intent(in)  ::  s_child,  s_parent 
    1435     real,                               intent(in)  :: ds_child, ds_parent 
     1430    real(kind=8),                               intent(in)  ::  s_child,  s_parent 
     1431    real(kind=8),                               intent(in)  :: ds_child, ds_parent 
    14361432    real, dimension(indmin:indmax),     intent(out) :: tempP 
    1437     real, dimension(lb_child:ub_child), intent(in)  :: tempC 
     1433    real, dimension(lb_child:ub_child), intent(in)  :: tempC, tempC_indic 
    14381434!--------------------------------------------------------------------------------------------------- 
    14391435    call Agrif_UpdateBase(type_update,              & 
     
    14541450!! Calls #Agrif_Update_1D_Recursive and #Agrif_UpdateBase 
    14551451!--------------------------------------------------------------------------------------------------- 
    1456 subroutine Agrif_Update_2D_Recursive ( type_update,         & 
    1457                                        tempP, tempC,        & 
    1458                                        indmin, indmax,      & 
    1459                                        lb_child, ub_child,  & 
    1460                                         s_child,  s_parent, & 
     1452subroutine Agrif_Update_2D_Recursive ( type_update,                     & 
     1453                                       tempP, tempC, tempC_indic,       & 
     1454                                       indmin, indmax,                  & 
     1455                                       lb_child, ub_child,              & 
     1456                                       s_child,  s_parent,              & 
    14611457                                       ds_child, ds_parent ) 
    14621458!--------------------------------------------------------------------------------------------------- 
     
    14641460    integer, dimension(2),          intent(in)  :: indmin, indmax 
    14651461    integer, dimension(2),          intent(in)  :: lb_child, ub_child 
    1466     real,    dimension(2),          intent(in)  ::  s_child,  s_parent 
    1467     real,    dimension(2),          intent(in)  :: ds_child, ds_parent 
     1462    real(kind=8),    dimension(2),          intent(in)  ::  s_child,  s_parent 
     1463    real(kind=8),    dimension(2),          intent(in)  :: ds_child, ds_parent 
    14681464    real,    dimension(          & 
    14691465        indmin(1):indmax(1),     & 
    14701466        indmin(2):indmax(2)),       intent(out) :: tempP 
    1471     real,    dimension(:,:),        intent(in)  :: tempC 
     1467    real,    dimension(:,:),        intent(in)  :: tempC, tempC_indic 
    14721468!--------------------------------------------------------------------------------------------------- 
    14731469    real, dimension(indmin(1):indmax(1), lb_child(2):ub_child(2)) :: tabtemp 
     
    14751471    real, dimension(lb_child(2):ub_child(2), indmin(1):indmax(1)) :: tabtemp_trsp 
    14761472    integer :: i, j 
    1477     integer :: coeffraf 
    1478 ! 
    1479     tabtemp = 0. 
     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     
    14801484    coeffraf = nint ( ds_parent(1) / ds_child(1) ) 
    14811485! 
     
    14901494        endif 
    14911495!---CDIR NEXPAND 
     1496        tabtemp = 0. 
    14921497        call Average1dAfterCompute( tabtemp, tempC, size(tabtemp), size(tempC), & 
    14931498                    s_parent(1),s_child(1),ds_parent(1),ds_child(1),1) 
     
    15031508        endif 
    15041509!---CDIR NEXPAND 
     1510 
    15051511        call Agrif_basicupdate_copy1d_after(tabtemp,tempC,size(tabtemp),size(tempC),1) 
    15061512! 
     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. 
    15071572    ELSE 
    15081573        do j = lb_child(2),ub_child(2) 
     
    15121577                                            tabtemp(:,j),               & 
    15131578                                            tempC(:,j-lb_child(2)+1),   & 
     1579                                            tempC_indic(:,j-lb_child(2)+1),   & 
    15141580                                            indmin(1), indmax(1),       & 
    15151581                                            lb_child(1),ub_child(1),    & 
     
    15191585    ENDIF 
    15201586! 
    1521     tabtemp_trsp = TRANSPOSE(tabtemp) 
     1587 
     1588    if (to_transpose) tabtemp_trsp = TRANSPOSE(tabtemp) 
     1589 
    15221590    coeffraf = nint(ds_parent(2)/ds_child(2)) 
    15231591! 
     
    15641632    ENDIF 
    15651633! 
     1634 
     1635    
    15661636    tempP = TRANSPOSE(tempP_trsp) 
    15671637!--------------------------------------------------------------------------------------------------- 
    15681638end subroutine Agrif_Update_2D_Recursive 
    1569 !=================================================================================================== 
    1570 ! 
    1571 subroutine Agrif_Update_2D_Recursive_ok ( type_update, & 
    1572                                         tempP, tempC, & 
    1573                                         indmin, indmax,   & 
    1574                                        lb_child, ub_child,                    & 
    1575                                        s_child, s_parent, ds_child, ds_parent ) 
    1576 !--------------------------------------------------------------------------------------------------- 
    1577     INTEGER, DIMENSION(2), intent(in)   :: type_update            !< Type of update (copy or average) 
    1578     INTEGER, DIMENSION(2), intent(in)   :: indmin, indmax 
    1579     INTEGER, DIMENSION(2), intent(in)   :: lb_child, ub_child 
    1580     REAL,    DIMENSION(2), intent(in)   :: s_child,  s_parent 
    1581     REAL,    DIMENSION(2), intent(in)   :: ds_child, ds_parent 
    1582     REAL,    DIMENSION(                 & 
    1583                 indmin(1):indmax(1),    & 
    1584                 indmin(2):indmax(2)),           intent(out) :: tempP 
    1585     REAL, DIMENSION(                            & 
    1586                 lb_child(1):ub_child(1),  & 
    1587                 lb_child(2):ub_child(2)), intent(in)  :: tempC 
    1588 ! 
    1589     REAL, DIMENSION(indmin(1):indmax(1), lb_child(2):ub_child(2)) :: tabtemp 
    1590     INTEGER :: i 
    1591 ! 
    1592     do i = lb_child(2),ub_child(2) 
    1593         call Agrif_Update_1D_Recursive(type_update(1),                              & 
    1594                                        tabtemp(:, i),          & 
    1595                                        tempC(:,i),  & 
    1596                                        indmin(1),indmax(1),                 & 
    1597                                        lb_child(1),ub_child(1),       & 
    1598                                        s_child(1), s_parent(1),             & 
    1599                                       ds_child(1),ds_parent(1)) 
    1600     enddo 
    1601 ! 
    1602     tempP = 0. 
    1603 ! 
    1604     do i = indmin(1),indmax(1) 
    1605         call Agrif_UpdateBase(type_update(2),                                       & 
    1606                               tempP(i,:),             & 
    1607                               tabtemp(i,:), & 
    1608                               indmin(2),indmax(2),                          & 
    1609                               lb_child(2),ub_child(2),                & 
    1610                               s_parent(2),s_child(2),                       & 
    1611                              ds_parent(2),ds_child(2)) 
    1612     enddo 
    1613 !--------------------------------------------------------------------------------------------------- 
    1614 end subroutine Agrif_Update_2D_Recursive_ok 
    16151639!=================================================================================================== 
    16161640 
     
    16221646!! Calls #Agrif_Update_2D_Recursive and #Agrif_UpdateBase. 
    16231647!--------------------------------------------------------------------------------------------------- 
    1624 subroutine Agrif_Update_3D_Recursive ( type_update,         & 
    1625                                        tempP, tempC,        & 
    1626                                        indmin, indmax,      & 
    1627                                        lb_child, ub_child,  & 
    1628                                         s_child,  s_parent, & 
     1648subroutine Agrif_Update_3D_Recursive ( type_update,                     & 
     1649                                       tempP, tempC, tempC_indic,       & 
     1650                                       indmin, indmax,                  & 
     1651                                       lb_child, ub_child,              & 
     1652                                       s_child,  s_parent,              & 
    16291653                                       ds_child, ds_parent ) 
    16301654!--------------------------------------------------------------------------------------------------- 
     
    16321656    integer, dimension(3),          intent(in)  :: indmin, indmax 
    16331657    integer, dimension(3),          intent(in)  :: lb_child, ub_child 
    1634     real,    dimension(3),          intent(in)  ::  s_child,  s_parent 
    1635     real,    dimension(3),          intent(in)  :: ds_child, ds_parent 
     1658    real(kind=8),    dimension(3),          intent(in)  ::  s_child,  s_parent 
     1659    real(kind=8),    dimension(3),          intent(in)  :: ds_child, ds_parent 
    16361660    real,    dimension(          & 
    16371661        indmin(1):indmax(1),     & 
     
    16411665        lb_child(1):ub_child(1), & 
    16421666        lb_child(2):ub_child(2), & 
    1643         lb_child(3):ub_child(3)),   intent(in)  :: tempC 
     1667        lb_child(3):ub_child(3)),   intent(in)  :: tempC, tempC_indic 
    16441668!--------------------------------------------------------------------------------------------------- 
    16451669    real, dimension(            & 
     
    16501674    integer :: coeffraf,locind_child_left 
    16511675    integer :: kuinf 
     1676    REAL :: invcoeffraf 
     1677    INTEGER :: diffmod, kk 
    16521678! 
    16531679    coeffraf = nint ( ds_parent(1) / ds_child(1) ) 
     
    16871713    endif 
    16881714! 
     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 
    16891724    do k = lb_child(3),ub_child(3) 
    1690         call Agrif_Update_2D_Recursive( type_update(1:2),tabtemp(:,:,k),tempC(:,:,k), & 
    1691                                         indmin(1:2),indmax(1:2),                & 
    1692                                         lb_child(1:2),ub_child(1:2),      & 
    1693                                         s_child(1:2),s_parent(1:2),             & 
    1694                                         ds_child(1:2),ds_parent(1:2) ) 
     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) 
    16951730    enddo 
     1731 
    16961732! 
    16971733    precomputedone(1) = .FALSE. 
     
    17111747            enddo 
    17121748        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 
    17131794    else 
    1714         tempP = 0. 
    17151795        do j = indmin(2),indmax(2) 
    17161796        do i = indmin(1),indmax(1) 
     
    17201800                                  s_parent(3),s_child(3),               & 
    17211801                                  ds_parent(3),ds_child(3)) 
    1722 ! 
     1802 
    17231803        enddo 
    17241804        enddo 
     1805 
     1806 
    17251807    endif 
    17261808!--------------------------------------------------------------------------------------------------- 
     
    17341816!! Calls #Agrif_Update_3D_Recursive and #Agrif_UpdateBase. 
    17351817!--------------------------------------------------------------------------------------------------- 
    1736 subroutine Agrif_Update_4D_Recursive ( type_update,         & 
    1737                                        tempP, tempC,        & 
    1738                                        indmin, indmax,      & 
    1739                                        lb_child, ub_child,  & 
    1740                                         s_child,  s_parent, & 
     1818subroutine Agrif_Update_4D_Recursive ( type_update,                     & 
     1819                                       tempP, tempC, tempC_indic,       & 
     1820                                       indmin, indmax,                  & 
     1821                                       lb_child, ub_child,              & 
     1822                                       s_child,  s_parent,              & 
    17411823                                       ds_child, ds_parent ) 
    17421824!--------------------------------------------------------------------------------------------------- 
     
    17441826    integer, dimension(4),          intent(in)  :: indmin, indmax 
    17451827    integer, dimension(4),          intent(in)  :: lb_child, ub_child 
    1746     real,    dimension(4),          intent(in)  ::  s_child,  s_parent 
    1747     real,    dimension(4),          intent(in)  :: ds_child, ds_parent 
     1828    real(kind=8),    dimension(4),          intent(in)  ::  s_child,  s_parent 
     1829    real(kind=8),    dimension(4),          intent(in)  :: ds_child, ds_parent 
    17481830    real,    dimension(          & 
    17491831        indmin(1):indmax(1),     & 
     
    17551837        lb_child(2):ub_child(2), & 
    17561838        lb_child(3):ub_child(3), & 
    1757         lb_child(4):ub_child(4)),   intent(in)  :: tempC 
     1839        lb_child(4):ub_child(4)),   intent(in)  :: tempC, tempC_indic 
    17581840!--------------------------------------------------------------------------------------------------- 
    17591841    real, dimension(:,:,:,:), allocatable       :: tabtemp 
     
    17711853                                               indmin(3):indmax(3), l),     & 
    17721854                                       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),       & 
    17731858                                             lb_child(2):ub_child(2),       & 
    17741859                                             lb_child(3):ub_child(3), l),   & 
     
    18061891!! Calls #Agrif_Update_4D_Recursive and #Agrif_UpdateBase. 
    18071892!--------------------------------------------------------------------------------------------------- 
    1808 subroutine Agrif_Update_5D_Recursive ( type_update,         & 
    1809                                        tempP, tempC,        & 
    1810                                        indmin, indmax,      & 
    1811                                        lb_child, ub_child,  & 
    1812                                         s_child,  s_parent, & 
     1893subroutine Agrif_Update_5D_Recursive ( type_update,                     & 
     1894                                       tempP, tempC, tempC_indic,       & 
     1895                                       indmin, indmax,                  & 
     1896                                       lb_child, ub_child,              & 
     1897                                       s_child,  s_parent,              & 
    18131898                                       ds_child, ds_parent ) 
    18141899!--------------------------------------------------------------------------------------------------- 
     
    18161901    integer, dimension(5),          intent(in)  :: indmin, indmax 
    18171902    integer, dimension(5),          intent(in)  :: lb_child, ub_child 
    1818     real,    dimension(5),          intent(in)  ::  s_child,  s_parent 
    1819     real,    dimension(5),          intent(in)  :: ds_child, ds_parent 
     1903    real(kind=8),    dimension(5),          intent(in)  ::  s_child,  s_parent 
     1904    real(kind=8),    dimension(5),          intent(in)  :: ds_child, ds_parent 
    18201905    real,    dimension(          & 
    18211906        indmin(1):indmax(1),     & 
     
    18291914        lb_child(3):ub_child(3), & 
    18301915        lb_child(4):ub_child(4), & 
    1831         lb_child(5):ub_child(5)),   intent(in)  :: tempC 
     1916        lb_child(5):ub_child(5)),   intent(in)  :: tempC, tempC_indic 
    18321917!--------------------------------------------------------------------------------------------------- 
    18331918    real, dimension(:,:,:,:,:), allocatable     :: tabtemp 
     
    18471932                                               indmin(4):indmax(4), m),     & 
    18481933                                       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),       & 
    18491938                                             lb_child(2):ub_child(2),       & 
    18501939                                             lb_child(3):ub_child(3),       & 
     
    18851974!! Calls #Agrif_Update_5D_Recursive and #Agrif_UpdateBase. 
    18861975!--------------------------------------------------------------------------------------------------- 
    1887 subroutine Agrif_Update_6D_Recursive ( type_update,         & 
    1888                                        tempP, tempC,        & 
    1889                                        indmin, indmax,      & 
    1890                                        lb_child, ub_child,  & 
    1891                                         s_child,  s_parent, & 
     1976subroutine Agrif_Update_6D_Recursive ( type_update,                     & 
     1977                                       tempP, tempC, tempC_indic,       & 
     1978                                       indmin, indmax,                  & 
     1979                                       lb_child, ub_child,              & 
     1980                                       s_child,  s_parent,              & 
    18921981                                       ds_child, ds_parent ) 
    18931982!--------------------------------------------------------------------------------------------------- 
     
    18951984    integer, dimension(6),          intent(in)  :: indmin, indmax 
    18961985    integer, dimension(6),          intent(in)  :: lb_child, ub_child 
    1897     real,    dimension(6),          intent(in)  ::  s_child,  s_parent 
    1898     real,    dimension(6),          intent(in)  :: ds_child, ds_parent 
     1986    real(kind=8),    dimension(6),          intent(in)  ::  s_child,  s_parent 
     1987    real(kind=8),    dimension(6),          intent(in)  :: ds_child, ds_parent 
    18991988    real,    dimension(          & 
    19001989        indmin(1):indmax(1),     & 
     
    19101999        lb_child(4):ub_child(4), & 
    19112000        lb_child(5):ub_child(5), & 
    1912         lb_child(6):ub_child(6)),   intent(in)  :: tempC 
     2001        lb_child(6):ub_child(6)),   intent(in)  :: tempC, tempC_indic 
    19132002!--------------------------------------------------------------------------------------------------- 
    19142003    real, dimension(:,:,:,:,:,:), allocatable   :: tabtemp 
     
    19302019                                               indmin(5):indmax(5), n),     & 
    19312020                                       tempC(lb_child(1):ub_child(1),       & 
     2021                                             lb_child(2):ub_child(2),       & 
     2022                                             lb_child(3):ub_child(3),       & 
     2023                                             lb_child(4):ub_child(4),       & 
     2024                                             lb_child(5):ub_child(5), n),   & 
     2025                                       tempC_indic(lb_child(1):ub_child(1),       & 
    19322026                                             lb_child(2):ub_child(2),       & 
    19332027                                             lb_child(3):ub_child(3),       & 
     
    19822076    real, dimension(indmin:indmax),     intent(out):: parent_tab 
    19832077    real, dimension(lb_child:ub_child), intent(in) :: child_tab 
    1984     real,                               intent(in) :: s_parent,  s_child 
    1985     real,                               intent(in) :: ds_parent, ds_child 
     2078    real(kind=8),                       intent(in) :: s_parent,  s_child 
     2079    real(kind=8),                       intent(in) :: ds_parent, ds_child 
    19862080!--------------------------------------------------------------------------------------------------- 
    19872081    integer :: np       ! Length of parent array 
Note: See TracChangeset for help on using the changeset viewer.