source: CONFIG/publications/ICOLMDZORINCA_CO2_Transport_GMD_2023/INCA/src/INCA_SRC/navu.F90 @ 6610

Last change on this file since 6610 was 6610, checked in by acosce, 10 months ago

INCA used for ICOLMDZORINCA_CO2_Transport_GMD_2023

File size: 3.4 KB
Line 
1!$Id: navu.F90 10 2007-08-09 12:43:01Z acosce $
2!! =========================================================================
3!! INCA - INteraction with Chemistry and Aerosols
4!!
5!! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE)
6!!           Unite mixte CEA-CNRS-UVSQ
7!!
8!! Contributors to this INCA subroutine:
9!!
10!! S. Walters, NCAR, stacy@ucar.edu
11!!
12!! Anne Cozic, LSCE, anne.cozic@cea.fr
13!! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr
14!!
15!! This software is a computer program whose purpose is to simulate the
16!! atmospheric gas phase and aerosol composition. The model is designed to be
17!! used within a transport model or a general circulation model. This version
18!! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts
19!! for emissions, transport (resolved and sub-grid scale), photochemical
20!! transformations, and scavenging (dry deposition and washout) of chemical
21!! species and aerosols interactively in the GCM. Several versions of the INCA
22!! model are currently used depending on the envisaged applications with the
23!! chemistry-climate model.
24!!
25!! This software is governed by the CeCILL  license under French law and
26!! abiding by the rules of distribution of free software.  You can  use,
27!! modify and/ or redistribute the software under the terms of the CeCILL
28!! license as circulated by CEA, CNRS and INRIA at the following URL
29!! "http://www.cecill.info".
30!!
31!! As a counterpart to the access to the source code and  rights to copy,
32!! modify and redistribute granted by the license, users are provided only
33!! with a limited warranty  and the software's author,  the holder of the
34!! economic rights,  and the successive licensors  have only  limited
35!! liability.
36!!
37!! In this respect, the user's attention is drawn to the risks associated
38!! with loading,  using,  modifying and/or developing or reproducing the
39!! software by the user in light of its specific status of free software,
40!! that may mean  that it is complicated to manipulate,  and  that  also
41!! therefore means  that it is reserved for developers  and  experienced
42!! professionals having in-depth computer knowledge. Users are therefore
43!! encouraged to load and test the software's suitability as regards their
44!! requirements in conditions enabling the security of their systems and/or
45!! data to be ensured and,  more generally, to use and operate it in the
46!! same conditions as regards security.
47!!
48!! The fact that you are presently reading this means that you have had
49!! knowledge of the CeCILL license and that you accept its terms.
50!! =========================================================================
51
52#include <inca_define.h>
53INTEGER FUNCTION NAVU( )
54  !-----------------------------------------------------------------------
55  !     ... Utility function to return index of next
56  !         available Fortran unit number.
57  !-----------------------------------------------------------------------
58  USE PRINT_INCA
59
60  IMPLICIT NONE
61
62  !-----------------------------------------------------------------------
63  !     ... Local variables
64  !-----------------------------------------------------------------------
65  INTEGER :: unit      ! Index
66  LOGICAL :: inuse(99) = .FALSE.
67
68  DO unit = 20,99
69    IF( .NOT. inuse(unit) ) THEN
70        NAVU = unit
71        inuse(unit) = .TRUE.
72        RETURN
73    END IF
74  END DO
75 
76  WRITE(lunout,*) 'NAVU: Ran out of Fortran unit numbers'
77  call print_err(3,'NAVU', ' Unit error', '', '')
78
79END FUNCTION NAVU
Note: See TracBrowser for help on using the repository browser.