4.3.6 SHTS2G

1.
Function
Performs inverse spectral transformation by successively carrying out SHTS2W and SHTW2G.

2.
Definition
The definitions of ISW and arrays S, W, and G are the same as for SHTS2W and SHTW2G. This routine successively carries out SHTS2W and SHTW2G, with the following results.

When ISW=0, a normal inverse spectral transformation is carried out.

(4.25)



When ISW=1, the latitudinal derivative of the inverse spectral transform is calculated.

(4.26)



When ISW=-1, the meridional derivative of the inverse spectral transform is calculated.

(4.27)

3.
Call
SHTS2G(MM,JM,IM,ISW,S,W,G,WORK)

4.
Explanation of Parameters
MM (I) Input parameter. The cut-off wavenumber (M).
JM (I) Input parameter. 1/2 of the NS partition number (J)
IM (I) Input parameter. 1/2 of the EW partition number (I)
ISW (I) Input parameter. Specifies the type of transformation. (See above definition.)
S (R) Input parameter. Spectral data. (For length and arrangement, see SHTNML.)
W (R) Output parameter. Wave data. (For length and arrangement, see SHTS2W.)
G (R) Output parameter. Grid data. (For length and arrangement, see SHTW2G.)
WORK (R) Working area initialized by SHTINT.

5.
Notes
(a)
This subroutine is equivalent to successively calling SHTS2W and SHTW2G.
(b)
By using the two transforms for ISW=1 and ISW=-1, it is possible to calculate the gradient vector of a scalar field.