source: CONFIG/publications/ICOLMDZORINCA_CO2_Transport_GMD_2023/INCA/build/ppsrc/INCA_SRC/t_int.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.9 KB
Line 
1
2
3
4
5
6
7
8
9
10
11
12!$Id: t_int.F90 10 2007-08-09 12:43:01Z acosce $
13!! =========================================================================
14!! INCA - INteraction with Chemistry and Aerosols
15!!
16!! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE)
17!!           Unite mixte CEA-CNRS-UVSQ
18!!
19!! Contributors to this INCA subroutine:
20!!
21!!
22!! Anne Cozic, LSCE, anne.cozic@cea.fr
23!! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr
24!!
25!! This software is a computer program whose purpose is to simulate the
26!! atmospheric gas phase and aerosol composition. The model is designed to be
27!! used within a transport model or a general circulation model. This version
28!! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts
29!! for emissions, transport (resolved and sub-grid scale), photochemical
30!! transformations, and scavenging (dry deposition and washout) of chemical
31!! species and aerosols interactively in the GCM. Several versions of the INCA
32!! model are currently used depending on the envisaged applications with the
33!! chemistry-climate model.
34!!
35!! This software is governed by the CeCILL  license under French law and
36!! abiding by the rules of distribution of free software.  You can  use,
37!! modify and/ or redistribute the software under the terms of the CeCILL
38!! license as circulated by CEA, CNRS and INRIA at the following URL
39!! "http://www.cecill.info".
40!!
41!! As a counterpart to the access to the source code and  rights to copy,
42!! modify and redistribute granted by the license, users are provided only
43!! with a limited warranty  and the software's author,  the holder of the
44!! economic rights,  and the successive licensors  have only  limited
45!! liability.
46!!
47!! In this respect, the user's attention is drawn to the risks associated
48!! with loading,  using,  modifying and/or developing or reproducing the
49!! software by the user in light of its specific status of free software,
50!! that may mean  that it is complicated to manipulate,  and  that  also
51!! therefore means  that it is reserved for developers  and  experienced
52!! professionals having in-depth computer knowledge. Users are therefore
53!! encouraged to load and test the software's suitability as regards their
54!! requirements in conditions enabling the security of their systems and/or
55!! data to be ensured and,  more generally, to use and operate it in the
56!! same conditions as regards security.
57!!
58!! The fact that you are presently reading this means that you have had
59!! knowledge of the CeCILL license and that you accept its terms.
60!! =========================================================================
61
62
63SUBROUTINE T_INT( p, t, t500, t200 )
64  !----------------------------------------------------------------
65  !     ... Interpolate for temperature on 500 and 200mb surfaces
66  !----------------------------------------------------------------
67  USE INCA_DIM
68
69  IMPLICIT NONE
70
71  !----------------------------------------------------------------
72  !     ... Dummy args
73  !----------------------------------------------------------------
74  REAL, INTENT(in)  ::  p(PLEV)           ! pressure in pascals
75  REAL, INTENT(in)  ::  t(PLEV)           ! temperature on grid
76  REAL, INTENT(out) ::  t500, t200         ! temp at 500 and 200mb
77 
78  !----------------------------------------------------------------
79  !     ... Local variables
80  !----------------------------------------------------------------
81  INTEGER :: k, k1
82  REAL    :: delp
83
84  IF( p(PLEV) < 500.e2 ) THEN
85     t500 = t(PLEV)
86     k1 = PLEVP
87 ELSE
88     DO k = PLEVM,1,-1
89       IF( p(k) < 500.e2 ) THEN
90           k1 = k
91           EXIT
92       END IF
93     END DO
94     delp = LOG( 500.e2/p(k) ) / LOG( p(k+1)/p(k) )
95     t500 = t(k) + delp * (t(k+1) - t(k))
96 END IF
97 DO k = k1-1,1,-1
98   IF( p(k) < 200.e2 ) THEN
99       EXIT
100   END IF
101 END DO
102 delp = LOG( 200.e2/p(k) ) / LOG( p(k+1)/p(k) )
103 t200 = t(k) + delp * (t(k+1) - t(k))
104 
105END SUBROUTINE T_INT
Note: See TracBrowser for help on using the repository browser.