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 8138 for branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modbcfunction.F90 – NEMO

Ignore:
Timestamp:
2017-06-05T12:01:03+02:00 (7 years ago)
Author:
timgraham
Message:

Modifications to AGRIF_FILES as received from Laurent (need to check that these are definitely needed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modbcfunction.F90

    r5656 r8138  
    5858    integer, intent(in)     :: value        !< input value 
    5959! 
    60     Agrif_Curgrid % parent % tabvars_i(tabvarsindic) % iarray0 = value 
     60 
     61integer :: i 
     62logical :: i_found 
     63 
     64i_found = .FALSE. 
     65 
     66do i=1,Agrif_NbVariables(4) 
     67  if (LOC(tabvarsindic) == LOC(agrif_curgrid%tabvars_i(i)%iarray0)) then 
     68     agrif_curgrid%tabvars_i(i)%parent_var%iarray0 = value 
     69     i_found = .TRUE. 
     70     EXIT 
     71  endif 
     72enddo 
     73 
     74if (.NOT.i_found) STOP 'Agrif_Set_Integer : Variable not found' 
     75 
    6176!--------------------------------------------------------------------------------------------------- 
    6277end subroutine Agrif_Set_parent_int 
     
    7085subroutine Agrif_Set_parent_real4 ( tabvarsindic, value ) 
    7186!--------------------------------------------------------------------------------------------------- 
    72     integer, intent(in)     :: tabvarsindic !< indice of the variable in tabvars 
    73     real(kind=4),intent(in) :: value        !< input value 
    74 ! 
    75     Agrif_Curgrid % parent % tabvars_r(tabvarsindic) % array0 = value 
    76     Agrif_Curgrid % parent % tabvars_r(tabvarsindic) % sarray0 = value 
     87    real(kind=4), intent(in)     :: tabvarsindic !< input variable 
     88    real(kind=4),intent(in) :: value        !< input value for the parent grid 
     89 
     90integer :: i 
     91logical :: i_found 
     92 
     93i_found = .FALSE. 
     94 
     95do i=1,Agrif_NbVariables(2) 
     96  if (LOC(tabvarsindic) == LOC(agrif_curgrid%tabvars_r(i)%array0)) then 
     97     agrif_curgrid%tabvars_r(i)%parent_var%array0 = value 
     98     agrif_curgrid%tabvars_r(i)%parent_var%sarray0 = value 
     99     i_found = .TRUE. 
     100     EXIT 
     101  endif 
     102enddo 
     103 
     104IF (.NOT.i_found) THEN 
     105do i=1,Agrif_NbVariables(2) 
     106  if (LOC(tabvarsindic) == LOC(agrif_curgrid%tabvars_r(i)%sarray0)) then 
     107     agrif_curgrid%tabvars_r(i)%parent_var%array0 = value 
     108     agrif_curgrid%tabvars_r(i)%parent_var%sarray0 = value 
     109     i_found = .TRUE. 
     110     EXIT 
     111  endif 
     112enddo 
     113ENDIF 
     114 
     115if (.NOT.i_found) STOP 'Agrif_Set_parent_real4 : Variable not found' 
    77116!--------------------------------------------------------------------------------------------------- 
    78117end subroutine Agrif_Set_parent_real4 
     
    86125subroutine Agrif_Set_parent_real8 ( tabvarsindic, value ) 
    87126!--------------------------------------------------------------------------------------------------- 
    88     integer, intent(in)     :: tabvarsindic !< indice of the variable in tabvars 
    89     real(kind=8),intent(in) :: value        !< input value 
    90 ! 
    91     Agrif_Curgrid % parent % tabvars_r(tabvarsindic) % darray0 = value 
     127    real(kind=8), intent(in)     :: tabvarsindic !< input variable 
     128    real(kind=8),intent(in) :: value        !< input value for the parent grid 
     129 
     130integer :: i 
     131logical :: i_found 
     132 
     133i_found = .FALSE. 
     134 
     135do i=1,Agrif_NbVariables(2) 
     136  if (LOC(tabvarsindic) == LOC(agrif_curgrid%tabvars_r(i)%array0)) then 
     137     agrif_curgrid%tabvars_r(i)%parent_var%darray0 = value 
     138     agrif_curgrid%tabvars_r(i)%parent_var%array0 = value 
     139     i_found = .TRUE. 
     140     EXIT 
     141  endif 
     142enddo 
     143 
     144IF (.NOT.i_found) THEN 
     145do i=1,Agrif_NbVariables(2) 
     146  if (LOC(tabvarsindic) == LOC(agrif_curgrid%tabvars_r(i)%darray0)) then 
     147     agrif_curgrid%tabvars_r(i)%parent_var%darray0 = value 
     148     agrif_curgrid%tabvars_r(i)%parent_var%array0 = value 
     149     i_found = .TRUE. 
     150     EXIT 
     151  endif 
     152enddo 
     153ENDIF 
     154 
     155if (.NOT.i_found) STOP 'Agrif_Set_parent_real8 : Variable not found' 
     156 
    92157!--------------------------------------------------------------------------------------------------- 
    93158end subroutine Agrif_Set_parent_real8 
Note: See TracChangeset for help on using the changeset viewer.