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 14107 for vendors/AGRIF/dev/AGRIF_FILES/modutil.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T18:02:20+01:00 (4 years ago)
Author:
nicolasmartin
Message:

Reintegration of dev_r12970_AGRIF_CMEMS to AGRIF/dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendors/AGRIF/dev/AGRIF_FILES/modutil.F90

    r12420 r14107  
    108108!--------------------------------------------------------------------------------------------------- 
    109109end subroutine Agrif_Step_Child 
     110!=================================================================================================== 
     111! 
     112!=================================================================================================== 
     113!  subroutine Agrif_Step_Childs 
     114! 
     115!> Apply 'procname' to each child grids of the current grid 
     116!--------------------------------------------------------------------------------------------------- 
     117!     ************************************************************************** 
     118!!!   Subroutine Agrif_Step_Childs 
     119!     ************************************************************************** 
     120! 
     121      Subroutine Agrif_Step_Childs(procname) 
     122! 
     123    procedure(step_proc)    :: procname     !< subroutine to call on each grid 
     124!     Pointer argument 
     125      Type(Agrif_Grid),pointer   :: g        ! Pointer on the current grid 
     126! 
     127 
     128! 
     129!     Local pointer 
     130      Type(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive 
     131                                             ! procedure 
     132! 
     133      g => Agrif_Curgrid 
     134       
     135      parcours => g % child_list % first 
     136! 
     137!     Recursive procedure for the time integration of the grid hierarchy       
     138      Do while (associated(parcours)) 
     139! 
     140!       Instanciation of the variables of the current grid 
     141        Call Agrif_Instance(parcours % gr) 
     142 
     143!     One step on the current grid 
     144 
     145         Call procname () 
     146        parcours => parcours % next 
     147      enddo 
     148    
     149      If (associated(g % child_list % first)) Call Agrif_Instance (g) 
     150      Return 
     151      End Subroutine Agrif_Step_Childs 
    110152!=================================================================================================== 
    111153! 
     
    538580!=================================================================================================== 
    539581! 
     582!=================================================================================================== 
     583! 
    540584! 
    541585!=================================================================================================== 
     
    587631#ifdef AGRIF_MPI 
    588632    else 
    589 #endif     
    590633! Continue only if the grid has defined sequences of child integrations. 
    591634    if ( .not. associated(save_grid % child_seq) ) return 
     
    610653! 
    611654    enddo 
    612 #ifdef AGRIF_MPI 
    613655    endif 
    614656#endif  
     
    700742subroutine Agrif_Init_Grids ( procname1, procname2 ) 
    701743!--------------------------------------------------------------------------------------------------- 
    702     procedure(typdef_proc), optional   :: procname1 !< (Default: Agrif_probdim_modtype_def) 
     744    procedure(typedef_proc), optional   :: procname1 !< (Default: Agrif_probdim_modtype_def) 
    703745    procedure(alloc_proc),   optional   :: procname2 !< (Default: Agrif_Allocationcalls) 
    704746! 
     
    717759    nunit = Agrif_Get_Unit() 
    718760    open(nunit, file='AGRIF_FixedGrids.in', form='formatted', status="old", ERR=98) 
    719     if (Agrif_Probdim == 3) then 
    720        read(nunit,*) is_coarse, rhox, rhoy, rhoz, rhot 
    721     elseif (Agrif_Probdim == 2) then 
    722        read(nunit,*) is_coarse, rhox, rhoy, rhot 
    723     elseif (Agrif_Probdim == 2) then 
    724        read(nunit,*) is_coarse, rhox, rhot 
    725     endif 
     761    read(nunit,*) is_coarse 
    726762    if (is_coarse == -1) then 
    727763       agrif_coarse = .TRUE. 
     764       rewind(nunit) 
    728765       if (Agrif_Probdim == 3) then 
     766          read(nunit,*) is_coarse, rhox, rhoy, rhoz, rhot 
    729767          coarse_spaceref(1:3)=(/rhox,rhoy,rhoz/) 
    730768       elseif (Agrif_Probdim == 2) then 
     769          read(nunit,*) is_coarse, rhox, rhoy, rhot 
    731770          coarse_spaceref(1:2)=(/rhox,rhoy/) 
    732        elseif (Agrif_Probdim == 2) then 
     771       elseif (Agrif_Probdim == 1) then 
     772          read(nunit,*) is_coarse, rhox, rhot 
    733773          coarse_spaceref(1:1)=(/rhox/) 
    734774       endif 
Note: See TracChangeset for help on using the changeset viewer.