1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
C Copyright 1981-2007 ECMWF
C
C Licensed under the GNU Lesser General Public License which
C incorporates the terms and conditions of version 3 of the GNU
C General Public License.
C See LICENSE and gpl-3.0.txt for details.
C
INTEGER FUNCTION INTUVY( PVIN, PDIN, INLEN,
X PUOUT, PVOUT, OUTLEN)
C
C---->
C**** INTUVY
C
C Purpose
C -------
C
C Convert GRIB format input vorticity and divergence field to
C unpacked U and V fields.
C
C
C Interface
C ---------
C
C IRET = INTUVY( PVIN, PDIN, INLEN, PUOUT,PVOUT,OUTLEN)
C
C Input
C -----
C
C KVIN - Input vorticity field (spectral).
C KDIN - Input divergence field (spectral).
C INLEN - Input field length (words).
C
C
C Output
C ------
C
C KUOUT - Output U field
C KVOUT - Output V field
C OUTLEN - Output field length (words).
C
C
C Method
C ------
C
C Convert spectral vorticity/divergence to spectral U/V without
C subsequent interpolation.
C
C Note that a common block is used in intf.h to hold the U/V
C fields before interpolation.
C
C Externals
C ---------
C
C INTUVU - Now does all the work!
C INTLOG - Log error message.
C
C
C Author
C ------
C
C S.Curic ECMWF Dec 2006
C
C
C----<
C -----------------------------------------------------------------|
C
IMPLICIT NONE
C
C Function arguments
C
INTEGER INLEN, OUTLEN
REAL PVIN(INLEN), PDIN(INLEN), PUOUT(*), PVOUT(*)
C
#include "parim.h"
#include "nifld.common"
#include "nofld.common"
#include "grfixed.h"
#include "intf.h"
C
C Parameters
C
INTEGER JPROUTINE
PARAMETER (JPROUTINE = 26900 )
C
C Local variables
C
INTEGER IHOLD1, IHOLD2, IHOLD3
LOGICAL LHOLD4
C
C Externals
C
INTEGER INTUVU
C
C -----------------------------------------------------------------|
C* Section 1. Initialise
C -----------------------------------------------------------------|
C
100 CONTINUE
C
C -----------------------------------------------------------------|
C* Section 2. Unpack the vorticity/divergence fields.
C -----------------------------------------------------------------|
C
200 CONTINUE
C
C Ensure output representation says 'spectral, no rotation'
C
IHOLD1 = NOREPR
NOREPR = JPSPHERE
IHOLD2 = NOROTA(1)
IHOLD3 = NOROTA(2)
NOROTA(1) = -9000000
NOROTA(2) = 0.0
LHOLD4 = LNOROTA
LNOROTA = .FALSE.
C
INTUVY =
X INTUVU(PVIN,PDIN,INLEN,PUOUT,PVOUT,OUTLEN)
C
C Restore output representation
C
NOREPR = IHOLD1
NOROTA(1) = IHOLD2
NOROTA(2) = IHOLD3
LNOROTA = LHOLD4
C
C -----------------------------------------------------------------|
C* Section 9. Closedown.
C -----------------------------------------------------------------|
C
900 CONTINUE
C
RETURN
END
|