[6610] | 1 | !$Id: adjh2o.F90 123 2009-03-27 10:38:52Z 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 | !! Stacy Walters, NCAR, stacy@ucar.edu |
---|
| 11 | !! Didier Hauglustaine, LSCE, didier.hauglustaine@lsce.ipsl.fr |
---|
| 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 ADJH2O(h2o, sh, ql, h2oc, mbar, vmr) |
---|
| 55 | !----------------------------------------------------------------------- |
---|
| 56 | ! ... Adjust the water vapor field in the stratosphere |
---|
| 57 | ! Note: the formula is 6ppm - 2*ch4 |
---|
| 58 | ! Transform water vapor to volumetric m.r. |
---|
| 59 | ! |
---|
| 60 | ! Note: this routine is the multitasked version |
---|
| 61 | ! Note: this routine assumes that ch4 is in the |
---|
| 62 | ! array vmr |
---|
| 63 | ! Stacy Walters, NCAR, 1998. |
---|
| 64 | ! Didier Hauglustaine, LSCE. |
---|
| 65 | !----------------------------------------------------------------------- |
---|
| 66 | |
---|
| 67 | USE SPECIES_NAMES |
---|
| 68 | USE AIRPLANE_SRC, ONLY : itrop |
---|
| 69 | USE CHEM_MODS, ONLY : adv_mass |
---|
| 70 | USE INCA_DIM |
---|
| 71 | |
---|
| 72 | IMPLICIT NONE |
---|
| 73 | |
---|
| 74 | !----------------------------------------------------------------------- |
---|
| 75 | ! ... Dummy arguments |
---|
| 76 | !----------------------------------------------------------------------- |
---|
| 77 | REAL, INTENT(inout) :: vmr(PLON,PLEV,PCNST) ! xported species vmr |
---|
| 78 | REAL, INTENT(in) :: sh(PLON,PLEV) ! specific humidity ( mmr ) |
---|
| 79 | REAL, INTENT(in) :: ql(PLON,PLEV) ! eau liquide |
---|
| 80 | REAL, INTENT(in) :: mbar(PLON,PLEV) ! atmos mean mass |
---|
| 81 | REAL, INTENT(out) :: h2o(PLON,PLEV) ! water vapor vmr |
---|
| 82 | REAL, INTENT(inout) :: h2oc(PLON,PLEV) ! condensed phase water vmr |
---|
| 83 | |
---|
| 84 | !----------------------------------------------------------------------- |
---|
| 85 | ! ... Local variables |
---|
| 86 | !----------------------------------------------------------------------- |
---|
| 87 | INTEGER :: i, j, k, ktrop |
---|
| 88 | REAL :: t_value(PLON) |
---|
| 89 | |
---|
| 90 | REAL, PARAMETER :: mh2o = 1. /18.01528 |
---|
| 91 | |
---|
| 92 | #ifdef STRAT |
---|
| 93 | DO i = 1, PLON |
---|
| 94 | ktrop=itrop(i) |
---|
| 95 | vmr(i,1:ktrop,id_H2O) = mbar(i,1:ktrop) * sh(i,1:ktrop) / adv_mass(id_H2O) |
---|
| 96 | h2oc(i,1:ktrop) = mbar(i,1:ktrop) * ql(i,1:ktrop) / adv_mass(id_H2O) |
---|
| 97 | END DO |
---|
| 98 | |
---|
| 99 | h2o(:,:) = vmr(:,:,id_H2O) + h2oc(:,:) |
---|
| 100 | |
---|
| 101 | #else |
---|
| 102 | h2o(:,:) = mbar(:,:) * sh(:PLON,:) * mh2o |
---|
| 103 | |
---|
| 104 | #ifdef NMHC |
---|
| 105 | DO k = 1,PLEV |
---|
| 106 | t_value(:) = 6.e-6 - 2. * vmr(:,k,id_ch4) - vmr(:,k,id_h2) |
---|
| 107 | WHERE( t_value(:) > h2o(:,k) ) |
---|
| 108 | h2o(:,k) = t_value(:) |
---|
| 109 | endwhere |
---|
| 110 | END DO |
---|
| 111 | #endif |
---|
| 112 | #endif |
---|
| 113 | |
---|
| 114 | END SUBROUTINE ADJH2O |
---|