!-------------------------------------- LICENCE BEGIN ------------------------------------ !Environment Canada - Atmospheric Science and Technology License/Disclaimer, ! version 3; Last Modified: May 7, 2008. !This is free but copyrighted software; you can use/redistribute/modify it under the terms !of the Environment Canada - Atmospheric Science and Technology License/Disclaimer !version 3 or (at your option) any later version that should be found at: !http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html ! !This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; !without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. !See the above mentioned License/Disclaimer for more details. !You should have received a copy of the License/Disclaimer along with this software; !if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), !CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca !-------------------------------------- LICENCE END -------------------------------------- !SUBROUTINE AEXTRAP( PROFIN, PROFOUT, JPMOLEV, JPLEV, KNPF ) 1 #if defined (DOC) * ***s/r AEXTRAP - Adjoint of extrapolation of temperature profile above 20mb * * on RTTOV levels (up to 0.1 mbs). * *Author : J. Halle *CMDA/AES November 01, 1994 * *Revision 001 : J. Halle *CMDA/AES December 07, 1994 * new extrapolation coefficients * *Revision 002 : J. Halle *CMDA/AES Oct 1999 * adapt to new levels (RTTOV5) * *Revision 003 : J. Halle *CMDA/AES dec 2000 * adapt to TOVS level 1b. * *Revision 004 : JM Belanger *CMDA/SMC june 2001 * 32 bits conversion. * *Revision 005 : J. Halle *CMDA/SMC may 2002 * adapt to RTTOV-7. * *Revision 006 : J. Halle *CMDA/SMC dec 2004 * generalize list of extrapolated levels by using jpmolev and jplev. * *Revision 007 : J. Halle *CMDA/SMC may 2005 * compute jpmotop from jpmolev and jplev. * *Arguments * o PROFIN (JPMOLEV,KNPF) : output adjoint of temperature profile * i PROFOUT(JPLEV,KNPF) : input adjoint of temperature profile * i JPMOLEV : number of levels (RT model) from NWP * i JPLEV : number of pressure levels * i KNPF : Number of profiles * * ------------------- ** Purpose: adjoint of extrapolation of temperature profile * above 20 mb (RTTOV5 levels 1 to 12) using temperatures from * 400mbs to 20mbs (RTTOV5 levels 13 to 28). #endif IMPLICIT NONE *implicits #include "comtovxt.cdk"
* INTEGER JI, JJ, JK, KNPF, ILEV, JPMOLEV, JPLEV, NLVLS_XTRAP, JPMOTOP C REAL*8 PROFIN(JPMOLEV,KNPF), PROFOUT(JPLEV,KNPF) C C* 1. Initialize output adjoint of temperature profile C . ------------------------------------------------ C 100 CONTINUE C JPMOTOP = JPLEV - JPMOLEV + 1 NLVLS_XTRAP = JPLEV - JPMOLEV DO JI= 1, JPMOLEV DO JK = 1, KNPF PROFIN(JI,JK) = 0.0 ENDDO ENDDO C C* 2. Adjoint of extrapolation of temperatures C . ---------------------------------------- C 200 CONTINUE DO JJ = NLVLS_XTRAP, 1, -1 DO JI = JPXTLVIN, 1, -1 ILEV = MLVXTIN(JI) DO JK = KNPF, 1, -1 PROFIN(ILEV-JPMOTOP+1,JK) = PROFIN(ILEV-JPMOTOP+1,JK) + S PROFOUT(JJ,JK)*COEFF(JI,JJ) ENDDO ENDDO ENDDO C DO JJ = NLVLS_XTRAP, 1, -1 DO JK = KNPF, 1, -1 PROFOUT(JJ,JK) = 0.0 ENDDO ENDDO C DO JI = JPLEV, NLVLS_XTRAP+1, -1 DO JK = KNPF, 1, -1 PROFIN(JI-JPMOTOP+1,JK) = PROFIN(JI-JPMOTOP+1,JK) + S PROFOUT(JI,JK) PROFOUT(JI,JK) = 0.0 ENDDO ENDDO RETURN END