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 14429 – NEMO

Changeset 14429


Ignore:
Timestamp:
2021-02-11T08:43:31+01:00 (3 years ago)
Author:
smasson
Message:

agrif: add Agrif_Root_Only function, see #2615

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendors/AGRIF/dev_r14312_MPI_Interface/AGRIF_FILES/modcurgridfunctions.F90

    r14107 r14429  
    11251125end subroutine Agrif_UnSet_external_linear_interp 
    11261126 
     1127! test if there is at least a child grid in the early stage of the initialisation 
     1128! (when Agrif_Nb_Fine_Grids is not yet defined) 
     1129LOGICAL FUNCTION Agrif_Root_Only() 
     1130   INTEGER :: nb_rootschildgrids 
     1131   INTEGER :: nunit, iost 
     1132   LOGICAL :: Bexist 
     1133    
     1134   nunit = Agrif_Get_Unit() 
     1135   OPEN(nunit, file='AGRIF_FixedGrids.in', form='formatted', status="old", action ="read", IOSTAT=iost) 
     1136   IF( iost == 0 ) THEN 
     1137      READ(nunit,*) nb_rootschildgrids 
     1138      CLOSE(nunit) 
     1139      Agrif_Root_Only = (nb_rootschildgrids <= 0) 
     1140   ELSE 
     1141      INQUIRE(FILE='AGRIF_FixedGrids.in',EXIST=BEXIST) 
     1142      IF (.NOT. BEXIST) THEN 
     1143         PRINT*,'ERROR : File AGRIF_FixedGrids.in not found.' 
     1144         STOP 
     1145      ELSE 
     1146         PRINT*,'Error opening file AGRIF_FixedGrids.in' 
     1147         STOP 
     1148      ENDIF 
     1149   ENDIF 
     1150  
     1151END FUNCTION Agrif_Root_Only 
     1152 
    11271153end module Agrif_CurgridFunctions 
Note: See TracChangeset for help on using the changeset viewer.