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 HNTFAU(INGRIB,INLEN)
C
C---->
C**** HNTFAU
C
C Purpose
C -------
C
C Prepare to interpolate input field...
C
C
C Interface
C ---------
C
C IRET = HNTFAU(INGRIB,INLEN)
C
C Input
C -----
C
C INGRIB - Input field (unpacked).
C INLEN - Input field length (words).
C
C
C Output
C ------
C
C Field unpacked values are in ZNFELDI, rotated if necessary.
C
C Returns: 0, if OK. Otherwise, an error occured in interpolation.
C
C
C Method
C ------
C
C Calls HNTFAUS to handle rotation when input and output fields
C are both spectral.
C
C Calls HNTFAUH in all other cases.
C
C
C Externals
C ---------
C
C HNTFAUS - Handle rotation when input and output fields
C are both spectral.
C HNTFAUH - Handle rotation in all other cases.
C
C
C Author
C ------
C
C J.D.Chambers ECMWF January 31, 2001
C
C
C----<
C
C -----------------------------------------------------------------|
C* Section 0. Variables
C -----------------------------------------------------------------|
C
IMPLICIT NONE
C
#include "parim.h"
#include "nifld.common"
#include "nofld.common"
#include "grfixed.h"
#include "intf.h"
C
C Parameters
C
INTEGER JPROUTINE
PARAMETER (JPROUTINE = 40130 )
C
C Function arguments
C
INTEGER INGRIB(*),INLEN
C
C Local variables
C
INTEGER IRET
C
C Externals
C
INTEGER HNTFAUS, HNTFAUH
EXTERNAL HNTFAUS, HNTFAUH
C
C -----------------------------------------------------------------|
C* Section 1. Initialise
C -----------------------------------------------------------------|
C
100 CONTINUE
C
HNTFAU = 0
C
C -----------------------------------------------------------------|
C* Section 2. Split handling in case there are rotations to do.
C -----------------------------------------------------------------|
C
200 CONTINUE
C
C Is the interpolation from SH to SH?
C
IF( ((NIREPR.EQ.JPSPHERE).OR.(NIREPR.EQ.JPSPHROT)) .AND.
X ((NOREPR.EQ.JPSPHERE).OR.(NOREPR.EQ.JPSPHROT)) ) THEN
C
IRET = HNTFAUS(INGRIB,INLEN)
C
ELSE
C
IF( LIMISSA ) THEN
CALL INTLOG(JP_DEBUG,'HNTFAU: Use missing value',JPQUIET)
LIMISSV = .TRUE.
ENDIF
IRET = HNTFAUH(INGRIB,INLEN)
C
ENDIF
C
IF( IRET.NE.0 ) HNTFAU = JPROUTINE
C
C -----------------------------------------------------------------|
C* Section 9. Closedown.
C -----------------------------------------------------------------|
C
900 CONTINUE
C
RETURN
END
|