source: CONFIG/publications/ICOLMDZORINCA_CO2_Transport_GMD_2023/INCA/src/INCA_SRC/neutral.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: 5.3 KB
Line 
1!$Id: neutral.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!! Didier Hauglustaine, LSCE, hauglustaine@cea.fr
11!! Stacy Walters, NCAR, stacy@ucar.edu
12!!
13!! Anne Cozic, LSCE, anne.cozic@cea.fr
14!! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr
15!!
16!! This software is a computer program whose purpose is to simulate the
17!! atmospheric gas phase and aerosol composition. The model is designed to be
18!! used within a transport model or a general circulation model. This version
19!! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts
20!! for emissions, transport (resolved and sub-grid scale), photochemical
21!! transformations, and scavenging (dry deposition and washout) of chemical
22!! species and aerosols interactively in the GCM. Several versions of the INCA
23!! model are currently used depending on the envisaged applications with the
24!! chemistry-climate model.
25!!
26!! This software is governed by the CeCILL  license under French law and
27!! abiding by the rules of distribution of free software.  You can  use,
28!! modify and/ or redistribute the software under the terms of the CeCILL
29!! license as circulated by CEA, CNRS and INRIA at the following URL
30!! "http://www.cecill.info".
31!!
32!! As a counterpart to the access to the source code and  rights to copy,
33!! modify and redistribute granted by the license, users are provided only
34!! with a limited warranty  and the software's author,  the holder of the
35!! economic rights,  and the successive licensors  have only  limited
36!! liability.
37!!
38!! In this respect, the user's attention is drawn to the risks associated
39!! with loading,  using,  modifying and/or developing or reproducing the
40!! software by the user in light of its specific status of free software,
41!! that may mean  that it is complicated to manipulate,  and  that  also
42!! therefore means  that it is reserved for developers  and  experienced
43!! professionals having in-depth computer knowledge. Users are therefore
44!! encouraged to load and test the software's suitability as regards their
45!! requirements in conditions enabling the security of their systems and/or
46!! data to be ensured and,  more generally, to use and operate it in the
47!! same conditions as regards security.
48!!
49!! The fact that you are presently reading this means that you have had
50!! knowledge of the CeCILL license and that you accept its terms.
51!! =========================================================================
52
53#include <inca_define.h>
54  subroutine neutral(u10_mps,ustar_mps,obklen_m, u10n_mps       )
55    !-----------------------------------------------------------------------   
56    ! subroutine to compute u10 neutral wind speed
57    ! inputs
58    !        u10_mps - wind speed at 10 m (m/s)
59    !        ustar_mps - friction velocity (m/s)
60    !        obklen_m - monin-obukhov length scale (m)
61    ! outputs
62    !        u10n_mps - wind speed at 10 m under neutral conditions (m/s)
63    ! following code assumes reference height Z is 10m, consistent with use
64    ! of u10 and u10_neutral.  If not, code
65    ! should be changed so that constants of 50. and 160. in equations
66    ! below are changed to -5 * Z and -16 * Z respectively.
67    ! Reference:  G. L. Geernaert.  'Bulk parameterizations for the
68    ! wind stress and heat fluxes,' in Surface Waves and Fluxes, Vol. I,
69    ! Current Theory, Geernaert and W.J. Plant, editors, Kluwer Academic
70    ! Publishers, Boston, MA, 1990.
71    ! subroutine written Feb 2001 by eg chapman
72    ! adapted to LMD-ZT by E. Cosme 310801
73    ! Following Will Shaw (PNL, Seattle) the theory applied for flux
74    ! calculation with the scheme of Nightingale et al. (2000) does not
75    ! hold anymore when -1<obklen<20. In this case, u10n is set to 0,
76    ! so that the transfer velocity  computed in nightingale.F will also
77    ! be 0. The flux is then set to 0.
78    !----------------------------------------------------------------------             
79   
80    use inca_dim
81    use CONST_MOD
82    IMPLICIT NONE
83   
84    real u10_mps(PLON),ustar_mps(PLON),obklen_m(PLON)
85    real u10n_mps(PLON)
86    real von_karman
87    ! pour etre coherent avec vk de bl_for_dms.F
88    parameter (von_karman = 0.35)       
89
90    real phi, phi_inv, phi_inv_sq, f1, f2, f3, dum1, psi
91    integer i
92   
93   
94    psi = 0.
95    do i=1,PLON
96       
97       if (u10_mps(i) .lt. 0.) u10_mps(i) = 0.0
98       
99       if  (obklen_m(i) .lt. 0.) then
100          phi = (1. - 160./obklen_m(i))**(-0.25)
101          phi_inv = 1./phi
102          phi_inv_sq = 1./phi * 1./phi
103          f1 = (1. + phi_inv) / 2.
104          f2 = (1. + phi_inv_sq)/2.
105          ! following to avoid numerical overruns. recall tan(90deg)=infinity
106          dum1 = min (1.e24, phi_inv)
107          f3 = atan(dum1)
108          psi = 2.*log(f1) + log(f2) - 2.*f3 + pi/2.   
109       else if (obklen_m(i) .gt. 0.) then
110          psi = -50. / obklen_m(i)
111       end if
112       
113       u10n_mps(i) = u10_mps(i) + (ustar_mps(i) * psi /von_karman )
114       ! u10n set to 0. if -1 < obklen < 20
115       if ((obklen_m(i).gt.-1.).and.(obklen_m(i).lt.20.)) then
116          u10n_mps(i) = 0.
117       endif
118       if (u10n_mps(i) .lt. 0.) u10n_mps(i) = 0.0
119       
120    enddo
121    return
122  end subroutine neutral
123
Note: See TracBrowser for help on using the repository browser.