debian/0000775000000000000000000000000012316541367007200 5ustar debian/source/0000775000000000000000000000000012263741406010475 5ustar debian/source/format0000664000000000000000000000001412263741406011703 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000000504612263741406011135 0ustar This package was debianized by Alastair McKinstry on Wed, 3 Nov 2010 19:19:54 +0000. It was downloaded from http://www.cisl.ucar.edu//css/software/spherepack/sp.resp.html The sources in Src/ are the Spherepack software from UCAR, as licensed below. Other sources in Lib/, providing the python interface, come from the CDAT software package, also supplied by UCAR, under the same conditions. Copyright (C) 2004 the University Corporation for Atmospheric Research ("UCAR"). All rights reserved. Developed by NCAR's Computational and Information Systems Laboratory, UCAR, www.cisl.ucar.edu. SPHEREPACK LICENSE AGREEMENT IMPORTANT! PLEASE READ THIS SOFTWARE LICENSE AGREEMENT ("LICENSE") CAREFULLY BEFORE DOWNLOADING THE SOFTWARE. BY DOWNLOADING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS LICENSE. IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, YOU ARE NOT AUTHORIZED TO DOWNLOAD THIS SOFTWARE. Copyright (C) 2004 the University Corporation for Atmospheric Research ("UCAR"). All rights reserved. Developed by NCAR's Computational and Information Systems Laboratory, UCAR, www.cisl.ucar.edu. Redistribution and use of the Software in source and binary forms, with or without modification, is permitted provided that the following conditions are met: * Neither the names of NCAR's Computational and Information Systems Laboratory, the University Corporation for Atmospheric Research, nor the names of its sponsors or contributors may be used to endorse or promote products derived from this Software without specific prior written permission. * Redistributions of source code must retain the above copyright notices, this list of conditions, and the disclaimer below. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the disclaimer below in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. SPHEREPACK is a product of the Computational & Information Systems Laboratory at the National Center for Atmospheric Research (NCAR) debian/python-sphere.install0000664000000000000000000000002212263741406013364 0ustar /usr/lib/python2* debian/changelog0000664000000000000000000000352112316541367011053 0ustar spherepack (3.2-7build1) trusty; urgency=medium * No change rebuild to drop python3.3 compiled extension. -- Dimitri John Ledkov Tue, 01 Apr 2014 14:45:27 +0100 spherepack (3.2-7) unstable; urgency=medium * Fix rules so that shared lib always built first, not python wrappers. Closes: #734824. * Move to Standards-Version: 3.9.5 -- Alastair McKinstry Fri, 10 Jan 2014 09:42:06 +0000 spherepack (3.2-6) unstable; urgency=low * Fortran ABI change: Now build with --default-real-8; * Add python3-sphere package. -- Alastair McKinstry Wed, 03 Jul 2013 07:34:38 +0100 spherepack (3.2-5) unstable; urgency=low * Transtion from python-support to dh_python2. * Standards-Version: 3.9.4. No changes required. * Fortify the shared library. -- Alastair McKinstry Sun, 19 May 2013 06:54:01 +0100 spherepack (3.2-4) unstable; urgency=low * --with=python-support needs to be explicity stated when moving to debhelper COMPAT=9. Closes: #662680. * Move to Standards-Version: 3.9.3. No changes required. * Add C/F77 interface support. Closes: #611812. -- Alastair McKinstry Mon, 12 Mar 2012 09:31:25 +0000 spherepack (3.2-3) unstable; urgency=low * B-D on python-support. Closes: #642474 * Add --as-needed to lib build line. * Multi-Arch enabled. -- Alastair McKinstry Sat, 24 Sep 2011 11:25:59 +0100 spherepack (3.2-2) unstable; urgency=low * Call dh_numpy to add versioned dependency on numpy. Closes: #641766 * Standards-Version: 3.9.2 -- Alastair McKinstry Fri, 16 Sep 2011 11:18:19 +0100 spherepack (3.2-1) unstable; urgency=low * Initial release. (Closes: #602285) -- Alastair McKinstry Thu, 04 Nov 2010 12:38:37 +0000 debian/libsphere-dev.install0000664000000000000000000000006412263741406013316 0ustar usr/lib/*/libsphere.a usr/lib/*/pkgconfig/sphere.pc debian/control0000664000000000000000000000610412316541367010604 0ustar Source: spherepack Section: utils Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Alastair McKinstry Build-Depends: debhelper (>= 9), python-all-dev (>= 2.6.2~) , gfortran, python-numpy, python3-numpy, python3-all-dev Standards-Version: 3.9.5 X-Python-Version: >= 2.6 X-Python3-Version: >= 3.2 Homepage: http://www.cisl.ucar.edu/css/software/spherepack/ Package: libsphere-dev Section: libdevel Multi-Arch: same Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, libsphere0d (= ${binary:Version}) Description: Development files for Spherepack scientific library SPHEREPACK is a collection of FORTRAN programs that facilitates computer modeling of geophysical processes. The package contains programs for computing certain common differential operators including divergence, vorticity, gradients, and the Laplacian of both scalar and vector functions. Programs are also available for inverting these operators. For example, given divergence and vorticity, the package can be used to compute the velocity components. The Laplacian can also be inverted and therefore the package can be used to solve both the scalar and vector Poisson equations. Its use in model development is demonstrated by a sample program that solves the time-dependent non-linear shallow-water equations. Accurate solutions are obtained via the spectral method that uses both scalar and vector spherical harmonic transforms that are available to the user. The package also contains utility programs for computing the associated Legendre functions, Gauss points and weights, and multiple fast Fourier transforms. Programs are provided for both equally-spaced and Gauss distributed latitudinal points as well as programs that transfer data between these grids. Package: libsphere0d Section: libs Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: Spherepack scientific library for geophysical processes SPHEREPACK is a collection of FORTRAN programs that facilitates computer modeling of geophysical processes. The package contains programs for computing certain common differential operators including divergence, vorticity, gradients, and the Laplacian of both scalar and vector functions. . This package contains the shared library, libsphere. Package: python-sphere Section: python Architecture: any Multi-Arch: foreign Depends: ${python:Depends}, ${misc:Depends}, ${shlibs:Depends}, libsphere0d (=${binary:Version}), python-numpy Provides: ${python:Provides} Description: Python interface to the spherepack scientific library. This is a python interface to spherepack, a library for geophysical processes. Package: python3-sphere Section: python Architecture: any Multi-Arch: foreign Depends: ${python3:Depends}, ${misc:Depends}, ${shlibs:Depends}, libsphere0d (=${binary:Version}), python3-numpy Description: Python3 interface to the spherepack scientific library. This is a python3 interface to spherepack, a library for geophysical processes. debian/libsphere0d.install0000664000000000000000000000003312263741406012762 0ustar /usr/lib/*/libsphere.so.0d debian/rules0000775000000000000000000000201312263741406010251 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 # magic debhelper rule %: dh $@ --with python2,python3 PYTHON2=$(shell pyversions -vr) PYTHON3=$(shell py3versions -vr) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH) override_dh_auto_build: cp debian/aliases.ld Src/aliases.ld $(MAKE) -C Src all dh_auto_build # For some reason, dh_strip isn't stripping this properly, according to lintian strip Src/libsphere.a override_dh_auto_install: $(PYTHON3:%=install-python%) $(MAKE) -C Src install DESTDIR=`pwd`/debian/tmp PREFIX=/usr LIBDIR=$(LIBDIR) dh_auto_install dh_link -p libsphere-dev $(LIBDIR)/libsphere.so.0d $(LIBDIR)/libsphere.so dh_numpy dh_numpy3 override_dh_auto_clean: dh_clean $(MAKE) -C Src clean || echo "No clean target in original Makefile" rm -rf build Src/aliases.ld build-python%: python$* setup.py build install-python%: python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb debian/python3-sphere.install0000664000000000000000000000002212263741406013447 0ustar /usr/lib/python3* debian/patches/0000775000000000000000000000000012263741737010633 5ustar debian/patches/make.patch0000664000000000000000000000302012263741406012555 0ustar Author: Alastair McKinstry Description: Fix makefile to build shared libs and static lib Last-Updated: 2014-01-10 Forwarded: no Index: spherepack-3.2/Src/Makefile =================================================================== --- spherepack-3.2.orig/Src/Makefile 2013-05-19 07:26:15.000000000 +0100 +++ spherepack-3.2/Src/Makefile 2013-07-02 01:31:48.000000000 +0100 @@ -1,4 +1,31 @@ +FC:=gfortran +PREFIX:=/usr/local +LD:=$(LD) +SONAME=libsphere.so.0d +SHLIBFLAGS:= -Wl,--soname,$(SONAME) -Wl,--version-script,spherepack.ver -Wl,--script,aliases.ld -lm +PIC_OBJS = $(patsubst %.f,%.pic_o, $(wildcard *.f)) + +all: libsphere.a shlib libsphere.so + libsphere.a: *.f - g77 -c *.f - ld -r -o libsphere.a *.o + $(FC) --default-real-8 -c $< + $(LD) -r -o libsphere.a *.o + +libsphere.so: $(SONAME) + ln -sf $(SONAME) $@ + +shlib $(SONAME): $(PIC_OBJS) + $(FC) -Wl,--as-needed -shared -o $(SONAME) $(SHLIBFLAGS) $(PIC_OBJS) -lc + +install: + mkdir -p $(DESTDIR)$(PREFIX)/lib + cp libsphere.a $(DESTDIR)$(PREFIX)/lib + cp $(SONAME) $(DESTDIR)$(PREFIX)/lib + ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/lib/libsphere.so + +clean: + rm -f *.o *.pic_o libsphere.a $(SONAME) libsphere.so + +%.pic_o: %.f + $(FC) --default-real-8 -fPIC -c -o $@ $< Index: spherepack-3.2/Src/spherepack.ver =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ spherepack-3.2/Src/spherepack.ver 2013-07-01 01:25:22.000000000 +0100 @@ -0,0 +1,3 @@ +SPHEREPACK_3.2 { + global: *; + }; debian/patches/8byte.patch0000664000000000000000000000360312263741406012702 0ustar Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . spherepack (3.2-6) UNRELEASED; urgency=low . * Fortran ABI change: Now build with --default-real-8; d* versions of methods are also provided as required by NCL (our first real use of spherepack). * Add python3-sphere package. Author: Alastair McKinstry --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: Index: spherepack-3.2/setup.py =================================================================== --- spherepack-3.2.orig/setup.py 2013-07-03 15:37:09.000000000 +0100 +++ spherepack-3.2/setup.py 2013-07-03 15:37:09.000000000 +0100 @@ -16,6 +16,8 @@ extra_link_args = ['-bundle','-bundle_loader '+sys.prefix+'/bin/python'] ext1 = Extension(name = 'spherepack', extra_link_args=extra_link_args, + extra_f77_compile_args = ["-ffixed-line-length-0", "-fdefault-real-8"], + extra_f90_compile_args = ["-fdefault-real-8"], libraries = ['sphere'], library_dirs = [ os.path.join( os.getcwd() + '/Src')], sources = ['Src/spherepack.pyf',]) debian/patches/fortify.patch0000664000000000000000000000124412263741737013337 0ustar Author: Alastair McKinstry Description: Add $(LDFLAGS) for hardening the library Last-Updated: 2013-05-19 Forwarded: not-needed Index: spherepack-3.2/Src/Makefile =================================================================== --- spherepack-3.2.orig/Src/Makefile 2014-01-10 09:55:50.000000000 +0000 +++ spherepack-3.2/Src/Makefile 2014-01-10 09:56:34.000000000 +0000 @@ -17,7 +17,7 @@ ln -sf $(SONAME) $@ shlib $(SONAME): $(PIC_OBJS) - $(FC) -Wl,--as-needed -shared -o $(SONAME) $(SHLIBFLAGS) $(PIC_OBJS) -lc + $(FC) $(LDFLAGS) -Wl,--as-needed -shared -o $(SONAME) $(SHLIBFLAGS) $(PIC_OBJS) -lc install: mkdir -p $(DESTDIR)$(PREFIX)/lib debian/patches/python3.patch0000664000000000000000000044662512263741406013272 0ustar Author: Alastair McKinstry Description: Port sphere.py to python3. Works in python2 Last-Updated: 2013-07-02 Forwarded: no Index: spherepack-3.2/Lib/__init__.py =================================================================== --- spherepack-3.2.orig/Lib/__init__.py 2013-07-03 08:13:07.000000000 +0100 +++ spherepack-3.2/Lib/__init__.py 2013-07-03 08:13:07.000000000 +0100 @@ -1 +1 @@ -from sphere import * +from .sphere import * Index: spherepack-3.2/Lib/sphere.py =================================================================== --- spherepack-3.2.orig/Lib/sphere.py 2013-07-03 08:13:07.000000000 +0100 +++ spherepack-3.2/Lib/sphere.py 2013-07-03 08:17:47.000000000 +0100 @@ -1,3 +1,9 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from __future__ import print_function +from __future__ import division + # Adapted for numpy/ma/cdms2 by convertcdms.py """Documentation for module sphere: an interface to spherepack @@ -338,7 +344,7 @@ try: import numpy.ma except ImportError: - print 'Can not convert from numpy.ma array to numpy array without module numpy.ma' + print('Can not convert from numpy.ma array to numpy array without module numpy.ma') usefilled = 'no' class Sphere: @@ -443,13 +449,13 @@ # check the shape for a unique number of longitudes and a unique number of latitudes if self.lon in [self.tme, self.lev, self.lat]: - print 'Warning - number of longitudes in duplicated in the shape. The geotomath shape \ + print( 'Warning - number of longitudes in duplicated in the shape. The geotomath shape \ transform will not work unless it differs from the number of latitudes and it \ - is one of the last two entiries in the shape' + is one of the last two entiries in the shape') if self.lat in [self.tme, self.lev, self.lon]: - print 'Warning - number of latitudes in duplicated in the shape. The geotomath shape \ + print( 'Warning - number of latitudes in duplicated in the shape. The geotomath shape \ transform will not work unless it differs from the number of longitudes and it \ - is one of the last two entiries in the shape' + is one of the last two entiries in the shape') # check grids and get grid_type as 'even' or 'gaussian' @@ -475,7 +481,7 @@ self.gridComp = Wrapes() else: msg = 'CANNOT PROCESS THE DATA - The computation scheme for the coefficients must be either computed or stored' - raise ValueError, msg + raise ValueError(msg) def div(self, u, v, missingValue = None): """ -------------------------------------------------------------------------------------------------------- @@ -1532,23 +1538,22 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to divec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from divec with div' + print(' ') + print('pass to divec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from divec with div') if ierror != 0: - msg = 'In return from call to shaeci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError('In return from call to shaeci ierror = %d' % (ierror,)) return dv @@ -1596,23 +1601,22 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to gradec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from gradec with u, v' + print(' ') + print('pass to gradec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from gradec with u, v') if ierror != 0: - msg = 'In return from call to gradec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError('In return from call to gradec ierror = %d' % (ierror,)) return w, v @@ -1662,23 +1666,22 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to idivec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from idivec with u, v' + print(' ') + print('pass to idivec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from idivec with u, v') if ierror != 0: - msg = 'In return from call to idivec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError('In return from call to idivec ierror = %d' % (ierror,)) return w, v @@ -1728,23 +1731,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idvtec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from idvtec with u and v' + print(' ') + print('pass to idvtec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from idvtec with u and v') if ierror != 0: msg = 'In return from call to idvtec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -1792,23 +1795,23 @@ sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to igradec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'isf = ', isf - print 'jsf = ', jsf - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from igradec with sf' + print(' ') + print('pass to igradec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('isf = ', isf) + print('jsf = ', jsf) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from igradec with sf') if ierror != 0: msg = 'In return from call to igradec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -1858,23 +1861,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to isfvpec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from isfvpec with u and v' + print(' ') + print('pass to isfvpec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from isfvpec with u and v') if ierror != 0: msg = 'In return from call to isfvpec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -1919,23 +1922,23 @@ sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to islapec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from islapec with sf' + print(' ') + print('pass to islapec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from islapec with sf') if ierror != 0: msg = 'In return from call to islapec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -1980,23 +1983,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivlapec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from ivlapec with u and v' + print( ' ') + print('pass to ivlapec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from ivlapec with u and v') if ierror != 0: msg = 'In return from call to ivlapec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -2044,23 +2047,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivrtec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from ivrtec with u, v' + print(' ') + print('pass to ivrtec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from ivrtec with u, v') if ierror != 0: msg = 'In return from call to ivrtec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -2110,23 +2113,23 @@ vp = numpy.transpose(vp) if ierror != 0 or debug == 1: - print ' ' - print 'pass to sfvpec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from sfvpec with sf and vp' + print(' ') + print('pass to sfvpec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from sfvpec with sf and vp') if ierror != 0: msg = 'In return from call to sfvpec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf, vp @@ -2158,17 +2161,17 @@ wshaec, ierror = spherepack.shaeci(nlat, nlon, lshaec, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shaeci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshaec = ', lshaec - print 'ldwork = ', ldwork - print 'return from shaeci with wshaec and lshaec' + print(' ') + print('pass to shaeci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshaec = ', lshaec) + print('ldwork = ', ldwork) + print('return from shaeci with wshaec and lshaec') if ierror != 0: msg = 'In return from call to shaeci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshaec, lshaec @@ -2212,23 +2215,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to shaec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshaec = ', lshaec - print 'lwork = ', lwork - print 'return from shaec with a, b' + print( ' ') + print( 'pass to shaec') + print( 'nlon = ', nlon) + print( 'nlat = ', nlat) + print( 'isym = ', isym) + print( 'nt = ', nt) + print( 'idg = ', idg) + print( 'jdg = ', jdg) + print( 'mdab = ', mdab) + print( 'ndab = ', ndab) + print( 'lshaec = ', lshaec) + print( 'lwork = ', lwork) + print( 'return from shaec with a, b') if ierror != 0: msg = 'In return from call to shaec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return a, b @@ -2261,17 +2264,17 @@ wshsec, ierror = spherepack.shseci(nlat, nlon, lshsec, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shseci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshsec = ', lshsec - print 'ldwork = ', ldwork - print 'return from shseci with wshsec and lshsec' + print(' ') + print('pass to shseci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshsec = ', lshsec) + print('ldwork = ', ldwork) + print('return from shseci with wshsec and lshsec') if ierror != 0: msg = 'In return from call to shseci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshsec, lshsec @@ -2313,23 +2316,23 @@ g = numpy.transpose(g) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shsec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from shsec with g' + print(' ') + print('pass to shsec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from shsec with g') if ierror != 0: msg = 'In return from call to shsec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return g @@ -2373,23 +2376,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to slapec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from slapec with slap' + print(' ') + print('pass to slapec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from slapec with slap') if ierror != 0: msg = 'In return from call to slapec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return slap @@ -2421,17 +2424,17 @@ wvhaec, ierror = spherepack.vhaeci(nlat, nlon, lvhaec, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhaeci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhaec = ', lvhaec - print 'ldwork = ', ldwork - print 'return from vhaeci with wvhaec and lvhaec' + print(' ') + print('pass to vhaeci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhaec = ', lvhaec) + print('ldwork = ', ldwork) + print('return from vhaeci with wvhaec and lvhaec') if ierror != 0: msg = 'In return from call to vhaeci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhaec, lvhaec @@ -2477,23 +2480,23 @@ ci = numpy.transpose(ci) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhaec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhaec = ', lvhaec - print 'lwork = ', lwork - print 'return from vhaec with br,bi,cr,ci' + print(' ') + print('pass to vhaec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhaec = ', lvhaec) + print('lwork = ', lwork) + print('return from vhaec with br,bi,cr,ci') if ierror != 0: msg = 'In return from call to vhaec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return br, bi, cr, ci @@ -2524,17 +2527,17 @@ wvhsec, ierror = spherepack.vhseci(nlat, nlon, lvhsec, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhseci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhsec = ', lvhsec - print 'ldwork = ', ldwork - print 'return from vhseci with wvhsec and lvhsec' + print(' ') + print('pass to vhseci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhsec = ', lvhsec) + print('ldwork = ', ldwork) + print('return from vhseci with wvhsec and lvhsec') if ierror != 0: msg = 'In return from call to vhseci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhsec, lvhsec @@ -2579,23 +2582,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhsec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from vhsec with u and v' + print(' ') + print('pass to vhsec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from vhsec with u and v') if ierror != 0: msg = 'In return from call to vhsec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -2647,23 +2650,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to vlapec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhsec = ', lvhsec - print 'lwork = ', lwork - print 'return from vlapec with u and v' + print(' ') + print('pass to vlapec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhsec = ', lvhsec) + print('lwork = ', lwork) + print('return from vlapec with u and v') if ierror != 0: msg = 'In return from call to vlapec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -2707,23 +2710,23 @@ vort = numpy.transpose(vort) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vortec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ivrt = ', ivrt - print 'jvrt = ', jvrt - print 'mdc = ', mdc - print 'ndc = ', ndc - print 'lshsec = ', lshsec - print 'lwork = ', lwork - print 'return from vrtec with vort' + print(' ') + print('pass to vortec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ivrt = ', ivrt) + print('jvrt = ', jvrt) + print('mdc = ', mdc) + print('ndc = ', ndc) + print('lshsec = ', lshsec) + print('lwork = ', lwork) + print('return from vrtec with vort') if ierror != 0: msg = 'In return from call to vrtec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return vort @@ -2754,17 +2757,17 @@ wvts, ierror = spherepack.vtseci(nlat, nlon, lwvts, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtseci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lwvts = ', lwvts - print 'ldwork = ', ldwork - print 'return from vtseci with wvts and lwvts' + print(' ') + print('pass to vtseci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lwvts = ', lwvts) + print('ldwork = ', ldwork) + print('return from vtseci with wvts and lwvts') if ierror != 0: msg = 'In return from call to vtseci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvts, lwvts @@ -2809,23 +2812,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtsec' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lwvts = ', lwvts - print 'lwork = ', lwork - print 'return from vtsec with u and v' + print(' ') + print('pass to vtsec') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lwvts = ', lwvts) + print('lwork = ', lwork) + print('return from vtsec with u and v') if ierror != 0: msg = 'In return from call to vtsec ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -2889,23 +2892,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to divgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from divgc with div' + print(' ') + print('pass to divgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsgc = ', lshsgca) + print('lwork = ', lwork) + print('return from divgc with div') if ierror != 0: msg = 'In return from call to divgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return dv @@ -2953,23 +2956,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to gradgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from gradgc with u, v' + print(' ') + print('pass to gradgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from gradgc with u, v') if ierror != 0: msg = 'In return from call to gradgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3017,23 +3020,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idivgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from idivgc with u, v' + print(' ') + print('pass to idivgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from idivgc with u, v') if ierror != 0: msg = 'In return from call to idivgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3083,23 +3086,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idvtgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from idvtgc with w and v' + print(' ') + print('pass to idvtgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from idvtgc with w and v') if ierror != 0: msg = 'In return from call to idvtgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3147,23 +3150,23 @@ sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to igradgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'isf = ', isf - print 'jsf = ', jsf - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from igradgc with sf' + print(' ') + print('pass to igradgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('isf = ', isf) + print('jsf = ', jsf) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsgc = ', lshsgc) + print('lwork = ', lwork) + print('return from igradgc with sf') if ierror != 0: msg = 'In return from call to igradgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -3208,23 +3211,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to isfvpgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from isfvpgc with u and v' + print(' ') + print('pass to isfvpgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from isfvpgc with u and v') if ierror != 0: msg = 'In return from call to isfvpgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3269,23 +3272,23 @@ sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to islapgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from islapgc with sf' + print(' ') + print('pass to islapgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsgc = ', lshsgc) + print('lwork = ', lwork) + print('return from islapgc with sf') if ierror != 0: msg = 'In return from call to islapgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -3334,23 +3337,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivlapgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from ivlapgc with u and v' + print(' ') + print('pass to ivlapgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from ivlapgc with u and v') if ierror != 0: msg = 'In return from call to ivlapgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3400,23 +3403,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivrtgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from ivrtgc with u, v' + print(' ') + print('pass to ivrtgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from ivrtgc with u, v') if ierror != 0: msg = 'In return from call to ivrtgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3467,23 +3470,23 @@ vp = numpy.transpose(vp) if ierror != 0 or debug == 1: - print ' ' - print 'pass to sfvpgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from sfvpgc with sf and vp' + print(' ') + print('pass to sfvpgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsgc = ', lshsgc) + print('lwork = ', lwork) + print('return from sfvpgc with sf and vp') if ierror != 0: msg = 'In return from call to sfvpgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf, vp @@ -3514,17 +3517,17 @@ wshagc, ierror = spherepack.shagci(nlat, nlon, lshagc, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shagci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshagc = ', lshagc - print 'ldwork = ', ldwork - print 'return from shagci with wshagc and lshagc' + print(' ') + print('pass to shagci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshagc = ', lshagc) + print('ldwork = ', ldwork) + print('return from shagci with wshagc and lshagc') if ierror != 0: msg = 'In return from call to shagci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshagc, lshagc @@ -3568,23 +3571,23 @@ b = numpy.transpose(b) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shagc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshagc = ', lshagc - print 'lwork = ', lwork - print 'return from shagc with a, b' + print(' ') + print('pass to shagc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshagc = ', lshagc) + print('lwork = ', lwork) + print('return from shagc with a, b') if ierror != 0: msg = 'In return from call to shagc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return a, b @@ -3615,17 +3618,17 @@ wshsgc, ierror = spherepack.shsgci(nlat, nlon, lshsgc, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shsgci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshsgc = ', lshsgc - print 'ldwork = ', ldwork - print 'return from shsgci with wshsgc and lshsgc' + print(' ') + print('pass to shsgci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshsgc = ', lshsgc) + print('ldwork = ', ldwork) + print('return from shsgci with wshsgc and lshsgc') if ierror != 0: msg = 'In return from call to shsgci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshsgc, lshsgc @@ -3666,23 +3669,23 @@ wshsgc, work) g = numpy.transpose(g) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shsgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'mode = ', mode - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from shsgc with g' + print(' ') + print('pass to shsgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('mode = ', mode) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsgc = ', lshsgc) + print('lwork = ', lwork) + print('return from shsgc with g') if ierror != 0: msg = 'In return from call to shsgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return g @@ -3725,23 +3728,23 @@ slap = numpy.transpose(slap) if ierror != 0 or debug == 1: - print ' ' - print 'pass to slapgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from slapgc with slap' + print(' ') + print('pass to slapgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsgc = ', lshsgc) + print('lwork = ', lwork) + print('return from slapgc with slap') if ierror != 0: msg = 'In return from call to slapgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return slap @@ -3774,17 +3777,17 @@ wvhagc, ierror = spherepack.vhagci(nlat, nlon, lvhagc, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhagci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhagc = ', lvhagc - print 'ldwork = ', ldwork - print 'return from vhagci with wvhagc' + print(' ') + print('pass to vhagci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhagc = ', lvhagc) + print('ldwork = ', ldwork) + print('return from vhagci with wvhagc') if ierror != 0: msg = 'In return from call to vhagci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhagc, lvhagc @@ -3830,23 +3833,23 @@ ci = numpy.transpose(ci) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhagc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhagc = ', lvhagc - print 'lwork = ', lwork - print 'return from vhagc with br,bi,cr,ci' + print(' ') + print('pass to vhagc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhagc = ', lvhagc) + print('lwork = ', lwork) + print('return from vhagc with br,bi,cr,ci') if ierror != 0: msg = 'In return from call to vhagc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return br, bi, cr, ci @@ -3877,17 +3880,17 @@ wvhsgc, ierror = spherepack.vhsgci(nlat, nlon, lvhsgc, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhsgci' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhsgc = ', lvhsgc - print 'ldwork = ', ldwork - print 'return from vhsgci with wvhsgc' + print(' ') + print('pass to vhsgci') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhsgc = ', lvhsgc) + print('ldwork = ', ldwork) + print('return from vhsgci with wvhsgc') if ierror != 0: msg = 'In return from call to vhsgci ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhsgc, lvhsgc @@ -3931,23 +3934,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhsgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from vhsgc with u and v' + print(' ') + print('pass to vhsgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from vhsgc with u and v') if ierror != 0: msg = 'In return from call to vhsgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -3998,23 +4001,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vlapgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhsgc = ', lvhsgc - print 'lwork = ', lwork - print 'return from vlapgc with u and v' + print(' ') + print('pass to vlapgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhsgc = ', lvhsgc) + print('lwork = ', lwork) + print('return from vlapgc with u and v') if ierror != 0: msg = 'In return from call to vlapgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4056,23 +4059,23 @@ vort = numpy.transpose(vort) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vortgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ivrt = ', ivrt - print 'jvrt = ', jvrt - print 'mdc = ', mdc - print 'ndc = ', ndc - print 'lshsgc = ', lshsgc - print 'lwork = ', lwork - print 'return from vrtgc with vort' + print(' ') + print('pass to vortgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ivrt = ', ivrt) + print('jvrt = ', jvrt) + print('mdc = ', mdc) + print('ndc = ', ndc) + print('lshsgc = ', lshsgc) + print('lwork = ', lwork) + print('return from vrtgc with vort') if ierror != 0: msg = 'In return from call to vrtgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return vort @@ -4103,16 +4106,16 @@ wvts, ierror = spherepack.vtsgci(nlat, nlon, lwvts, work) if ierror != 0 or debug == 1: - print ' ' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lwvts = ', lwvts - print 'ldwork = ', ldwork - print 'return from vtsgci with wvts and lwvts' + print(' ') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lwvts = ', lwvts) + print('ldwork = ', ldwork) + print('return from vtsgci with wvts and lwvts') if ierror != 0: msg = 'In return from call to vtsi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvts, lwvts @@ -4157,23 +4160,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtsgc' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lwvts = ', lwvts - print 'lwork = ', lwork - print 'return from vtsgc with u and v' + print(' ') + print('pass to vtsgc') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lwvts = ', lwvts) + print('lwork = ', lwork) + print('return from vtsgc with u and v') if ierror != 0: msg = 'In return from call to vtsgc ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4236,23 +4239,23 @@ dv = numpy.transpose(dv) if ierror != 0 or debug == 1: - print ' ' - print 'pass to dives' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from dives with div' + print(' ') + print('pass to dives') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from dives with div') if ierror != 0: msg = 'In return from call to dives ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return dv @@ -4300,23 +4303,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to grades' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from grades with u, v' + print(' ') + print('pass to grades') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from grades with u, v') if ierror != 0: msg = 'In return from call to grades ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4364,23 +4367,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idives' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from idives with u, v' + print(' ') + print('pass to idives') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from idives with u, v') if ierror != 0: msg = 'In return from call to idives ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4430,23 +4433,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idvtes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from idvtes with u and v' + print(' ') + print('pass to idvtes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from idvtes with u and v') if ierror != 0: msg = 'In return from call to idvtes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4493,23 +4496,23 @@ wshses, work) sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to igrades' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'isf = ', isf - print 'jsf = ', jsf - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from igrades with sf' + print(' ') + print('pass to igrades') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('isf = ', isf) + print('jsf = ', jsf) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from igrades with sf') if ierror != 0: msg = 'In return from call to igrades ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -4552,23 +4555,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to isfvpes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from isfvpes with u and v' + print(' ') + print('pass to isfvpes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from isfvpes with u and v') if ierror != 0: msg = 'In return from call to isfvpes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4613,23 +4616,23 @@ sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to islapes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from islapes with sf' + print(' ') + print('pass to islapes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from islapes with sf') if ierror != 0: msg = 'In return from call to islapes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -4674,23 +4677,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivlapes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from ivlapes with u and v' + print(' ') + print('pass to ivlapes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from ivlapes with u and v') if ierror != 0: msg = 'In return from call to ivlapes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4739,23 +4742,23 @@ v = numpy.transpose(v) w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivrtes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from ivrtes with u, v' + print(' ') + print('pass to ivrtes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from ivrtes with u, v') if ierror != 0: msg = 'In return from call to ivrtes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -4803,23 +4806,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to sfvpes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from sfvpes with sf and vp' + print(' ') + print('pass to sfvpes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from sfvpes with sf and vp') if ierror != 0: msg = 'In return from call to sfvpes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf, vp @@ -4853,18 +4856,18 @@ wshaes, ierror = spherepack.shaesi(nlat, nlon, lshaes, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shaesi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshaes = ', lshaes - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from shaesi with wshaes and lshaes' + print(' ') + print('pass to shaesi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshaes = ', lshaes) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from shaesi with wshaes and lshaes') if ierror != 0: msg = 'In return from call to shaies ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshaes, lshaes @@ -4909,23 +4912,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to shaes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshaes = ', lshaes - print 'lwork = ', lwork - print 'return from shaes with a, b' + print(' ') + print('pass to shaes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshaes = ', lshaes) + print('lwork = ', lwork) + print('return from shaes with a, b') if ierror != 0: msg = 'In return from call to shaes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return a, b @@ -4958,18 +4961,18 @@ wshses, ierror = spherepack.shsesi(nlat, nlon, lshses, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shsesi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from shsesi with wshses and lshses' + print(' ') + print('pass to shsesi') + print('nlon = ', nlo) + print('nlat = ', nlat) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from shsesi with wshses and lshses') if ierror != 0: msg = 'In return from call to shsesi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshses, lshses @@ -5012,23 +5015,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to shses' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from shses with g' + print(' ') + print('pass to shses') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from shses with g') if ierror != 0: msg = 'In return from call to shses ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return g @@ -5073,23 +5076,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to slapes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from slapes with slap' + print(' ') + print('pass to slapes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from slapes with slap') if ierror != 0: msg = 'In return from call to slapes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return slap @@ -5122,18 +5125,18 @@ wvhaes, ierror = spherepack.vhaesi(nlat, nlon, lvhaes, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhaesi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhaes = ', lvhaes - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from vhaesi with wvhaes and lvhaes' + print(' ') + print('pass to vhaesi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhaes = ', lvhaes) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from vhaesi with wvhaes and lvhaes') if ierror != 0: msg = 'In return from call to vhaesi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhaes, lvhaes @@ -5181,23 +5184,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhaes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhaes = ', lvhaes - print 'lwork = ', lwork - print 'return from vhaes with br,bi,cr,ci' + print(' ') + print('pass to vhaes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhaes = ', lvhaes) + print('lwork = ', lwork) + print('return from vhaes with br,bi,cr,ci') if ierror != 0: msg = 'In return from call to vhaes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return br, bi, cr, ci @@ -5232,18 +5235,18 @@ wvhses, ierror = spherepack.vhsesi(nlat, nlon, lvhses, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhsesi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from vhsesi with wvhses and lvhses' + print(' ') + print('pass to vhsesi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from vhsesi with wvhses and lvhses') if ierror != 0: msg = 'In return from call to vhsies ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhses, lvhses @@ -5287,23 +5290,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhses' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from vhses with u and v' + print(' ') + print('pass to vhses') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from vhses with u and v') if ierror != 0: msg = 'In return from call to vhses ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5353,23 +5356,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vlapes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhses = ', lvhses - print 'lwork = ', lwork - print 'return from vlapes with u and v' + print(' ') + print('pass to vlapes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhses = ', lvhses) + print('lwork = ', lwork) + print('return from vlapes with u and v') if ierror != 0: msg = 'In return from call to vlapes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5413,23 +5416,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to vortes' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ivrt = ', ivrt - print 'jvrt = ', jvrt - print 'mdc = ', mdc - print 'ndc = ', ndc - print 'lshses = ', lshses - print 'lwork = ', lwork - print 'return from vrtes with vort' + print(' ') + print('pass to vortes') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ivrt = ', ivrt) + print('jvrt = ', jvrt) + print('mdc = ', mdc) + print('ndc = ', ndc) + print('lshses = ', lshses) + print('lwork = ', lwork) + print('return from vrtes with vort') if ierror != 0: msg = 'In return from call to vrtes ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return vort @@ -5462,18 +5465,18 @@ wvts, ierror = spherepack.vtsesi(nlat, nlon, lwvts, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtsesi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lwvts = ', lwvts - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from vtsesi with wvts and lwvts' + print(' ') + print('pass to vtsesi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lwvts = ', lwvts) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from vtsesi with wvts and lwvts') if ierror != 0: msg = 'In return from call to vtsesi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvts, lwvts @@ -5518,23 +5521,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtses' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lwvts = ', lwvts - print 'lwork = ', lwork - print 'return from vtses with u and v' + print(' ') + print('pass to vtses') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lwvts = ', lwvts) + print('lwork = ', lwork) + print('return from vtses with u and v') if ierror != 0: msg = 'In return from call to vtses ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5599,23 +5602,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to divgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idiv = ', idiv - print 'jdiv = ', jdiv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from divgs with div' + print(' ') + print('pass to divgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idiv = ', idiv) + print('jdiv = ', jdiv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from divgs with div') if ierror != 0: msg = 'In return from call to divgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return dv @@ -5663,23 +5666,23 @@ w = numpy.transpose(W) if ierror != 0 or debug == 1: - print ' ' - print 'pass to gradgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from gradgs with u, v' + print(' ') + print('pass to gradgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from gradgs with u, v') if ierror != 0: msg = 'In return from call to gradgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5727,23 +5730,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idivgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from idivgs with u, v' + print(' ') + print('pass to idivgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from idivgs with u, v') if ierror != 0: msg = 'In return from call to idivgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5793,23 +5796,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to idvtgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from idvtgs with u and v' + print(' ') + print('pass to idvtgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from idvtgs with u and v') if ierror != 0: msg = 'In return from call to idvtgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5858,23 +5861,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to igradgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'isf = ', isf - print 'jsf = ', jsf - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from igradgs with sf' + print(' ') + print('pass to igradgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('isf = ', isf) + print('jsf = ', jsf) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from igradgs with sf') if ierror != 0: msg = 'In return from call to igradgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -5919,23 +5922,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to isfvpgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from isfvpgs with u and v' + print(' ') + print('pass to isfvpgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from isfvpgs with u and v') if ierror != 0: msg = 'In return from call to isfvpgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -5980,23 +5983,23 @@ sf = numpy.transpose(sf) if ierror != 0 or debug == 1: - print ' ' - print 'pass to islapgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from islapgs with sf' + print(' ') + print('pass to islapgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from islapgs with sf') if ierror != 0: msg = 'In return from call to islapgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf @@ -6041,23 +6044,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivlapgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from ivlapgs with u and v' + print(' ') + print('pass to ivlapgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from ivlapgs with u and v') if ierror != 0: msg = 'In return from call to ivlapgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -6106,23 +6109,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to ivrtgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from ivrtgs with u, v' + print(' ') + print('pass to ivrtgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from ivrtgs with u, v') if ierror != 0: msg = 'In return from call to ivrtgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -6174,23 +6177,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to sfvpgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idv = ', idv - print 'jdv = ', jdv - print 'mdb = ', mdb - print 'ndb = ', ndb - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from sfvpgs with sf and vp' + print(' ') + print('pass to sfvpgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idv = ', idv) + print('jdv = ', jdv) + print('mdb = ', mdb) + print('ndb = ', ndb) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from sfvpgs with sf and vp') if ierror != 0: msg = 'In return from call to sfvpgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return sf, vp @@ -6224,18 +6227,18 @@ wshags, ierror = spherepack.shagsi(nlat, nlon, lshags, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shagsi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshags = ', lshags - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from shagsi with wshags and lshags' + print(' ') + print('pass to shagsi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshags = ', lshags) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from shagsi with wshags and lshags') if ierror != 0: msg = 'In return from call to shagsi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshags, lshags @@ -6279,23 +6282,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to shags' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshags = ', lshags - print 'lwork = ', lwork - print 'return from shags with a, b' + print(' ') + print('pass to shags') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshags = ', lshags) + print('lwork = ', lwork) + print('return from shags with a, b') if ierror != 0: msg = 'In return from call to shags ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return a, b @@ -6328,18 +6331,18 @@ wshsgs, ierror = spherepack.shsgsi(nlat, nlon, lshsgs, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shsgsi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'ldwork = ', ldwork - print 'return from shsgsi with wshsgs and lshsgs' + print(' ') + print('pass to shsgsi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + print('return from shsgsi with wshsgs and lshsgs') if ierror != 0: msg = 'In return from call to shsgsi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wshsgs, lshsgs @@ -6380,23 +6383,23 @@ wshsgs, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to shsgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'mode = ', mode - print 'nt = ', nt - print 'idg = ', idg - print 'jdg = ', jdg - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from shsgs with g' + print(' ') + print('pass to shsgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('mode = ', mode) + print('nt = ', nt) + print('idg = ', idg) + print('jdg = ', jdg) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from shsgs with g') if ierror != 0: msg = 'In return from call to shsgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return g @@ -6438,23 +6441,23 @@ wshsgs, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to slapgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ids = ', ids - print 'jds = ', jds - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from slapgs with slap' + print(' ') + print('pass to slapgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ids = ', ids) + print('jds = ', jds) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from slapgs with slap') if ierror != 0: msg = 'In return from call to slapgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return slap @@ -6487,17 +6490,17 @@ wvhags, ierror = spherepack.vhagsi(nlat, nlon, lvhags, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhagsi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhags = ', lvhags - print 'ldwork = ', ldwork - print 'return from vhagsi with wvhags' + print(' ') + print('pass to vhagsi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhags = ', lvhags) + print('ldwork = ', ldwork) + print('return from vhagsi with wvhags') if ierror != 0: msg = 'In return from call to vhagsi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhags, lvhags @@ -6540,23 +6543,23 @@ wvhags, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhags' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhags = ', lvhags - print 'lwork = ', lwork - print 'return from vhags with br,bi,cr,ci' + print(' ') + print('pass to vhags') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhags = ', lvhags) + print('lwork = ', lwork) + print('return from vhags with br,bi,cr,ci') if ierror != 0: msg = 'In return from call to vhags ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return br, bi, cr, ci @@ -6587,17 +6590,17 @@ wvhsgs, ierror = spherepack.vhsgsi(nlat, nlon, lvhsgs, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhsgsi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lvhsgs = ', lvhsgs - print 'ldwork = ', ldwork - print 'return from vhsgsi with wvhsgs' + print(' ') + print('pass to vhsgsi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lvhsgs = ', lvhsgs) + print('ldwork = ', ldwork) + print('return from vhsgsi with wvhsgs') if ierror != 0: msg = 'In return from call to vhsigs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvhsgs, lvhsgs @@ -6641,23 +6644,23 @@ w = numpy.transpose(w) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vhsgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from vhsgs with u and v' + print(' ') + print('pass to vhsgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from vhsgs with u and v') if ierror != 0: msg = 'In return from call to vhsgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -6709,23 +6712,23 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to vlapgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdbc = ', mdbc - print 'ndbc = ', ndbc - print 'lvhsgs = ', lvhsgs - print 'lwork = ', lwork - print 'return from vlapgs with u and v' + print(' ') + print('pass to vlapgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdbc = ', mdbc) + print('ndbc = ', ndbc) + print('lvhsgs = ', lvhsgs) + print('lwork = ', lwork) + print('return from vlapgs with u and v') if ierror != 0: msg = 'In return from call to vlapgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -6767,23 +6770,23 @@ vort = numpy.transpose(vort) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vortgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'isym = ', isym - print 'nt = ', nt - print 'ivrt = ', ivrt - print 'jvrt = ', jvrt - print 'mdc = ', mdc - print 'ndc = ', ndc - print 'lshsgs = ', lshsgs - print 'lwork = ', lwork - print 'return from vrtgs with vort' + print(' ') + print('pass to vortgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('isym = ', isym) + print('nt = ', nt) + print('ivrt = ', ivrt) + print('jvrt = ', jvrt) + print('mdc = ', mdc) + print('ndc = ', ndc) + print('lshsgs = ', lshsgs) + print('lwork = ', lwork) + print('return from vrtgs with vort') if ierror != 0: msg = 'In return from call to vrtgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return vort @@ -6816,17 +6819,17 @@ wvts, ierror = spherepack.vtsgsi(nlat, nlon, lwvts, work, dwork) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtsgsi' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lwvts = ', lwvts - print 'ldwork = ', ldwork - print 'return from vtsgsi with wvts and lwvts' + print(' ') + print('pass to vtsgsi') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lwvts = ', lwvts) + print('ldwork = ', ldwork) + print('return from vtsgsi with wvts and lwvts') if ierror != 0: msg = 'In return from call to vtsgsi ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return wvts, lwvts @@ -6869,23 +6872,23 @@ wvts, work) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vtsgs' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'ityp = ', ityp - print 'nt = ', nt - print 'idvw = ', idvw - print 'jdvw = ', jdvw - print 'mdab = ', mdab - print 'ndab = ', ndab - print 'lwvts = ', lwvts - print 'lwork = ', lwork - print 'return from vtsgs with u and v' + print(' ') + print('pass to vtsgs') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('ityp = ', ityp) + print('nt = ', nt) + print('idvw = ', idvw) + print('jdvw = ', jdvw) + print('mdab = ', mdab) + print('ndab = ', ndab) + print('lwvts = ', lwvts) + print('lwork = ', lwork) + print('return from vtsgs with u and v') if ierror != 0: msg = 'In return from call to vtsgs ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) return w, v @@ -6958,13 +6961,13 @@ # ------ check the shape for a unique number of longitudes and a unique number of latitudes ------ if self.lonIn in [self.tmeIn, self.levIn, self.latIn]: - print 'Warning - number of longitudes in duplicated in the shape. The geotomath shape \ + print('Warning - number of longitudes in duplicated in the shape. The geotomath shape \ transform will not work unless it differs from the number of latitudes and it \ - is one of the last two entiries in the shape' + is one of the last two entiries in the shape') if self.latIn in [self.tmeIn, self.levIn, self.lonIn]: - print 'Warning - number of latitudes in duplicated in the shape. The geotomath shape \ + print('Warning - number of latitudes in duplicated in the shape. The geotomath shape \ transform will not work unless it differs from the number of longitudes and it \ - is one of the last two entiries in the shape' + is one of the last two entiries in the shape') # ------ set self data for igridIn and igridOut ------ @@ -6996,7 +6999,7 @@ self.igridIn[0] = +2 else: # gaussian msg = 'CANNOT PROCESS THE DATA - Grid maust be even or gaussian' - raise ValueError, msg + raise ValueError(msg) return if grid_typeOut == 'even': @@ -7011,7 +7014,7 @@ self.igridOut[0] = +2 else: # gaussian msg = 'CANNOT PROCESS THE DATA - Grid maust be even or gaussian' - raise ValueError, msg + raise ValueError(msg) return self.igridIn[1] = 1 # for choice nlat x nlon built into .pyf file @@ -7099,26 +7102,26 @@ if ierror != 0: msg = 'In return from call to trssph ierror = %d and call number = %d' % (ierror,i) - raise ValueError, msg + raise ValueError(msg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to trssph' - print 'igrida = ', igrida - print 'nlona = ', nlona - print 'nlata = ', nlata - print 'igridb = ', igridb - print 'nlonb = ', nlonb - print 'nlatb = ', nlatb - print 'lsave = ', lsave - print 'lwork = ', lwork - print 'ldwork = ', ldwork - - print 'return from trssph with db' - print 'lsvmin = ', lsvmin - print 'lsave = ', lsave - print 'lwkmin = ', lwkmin - print 'lwork = ', lwork + print(' ') + print('pass to trssph') + print('igrida = ', igrida) + print('nlona = ', nlona) + print('nlata = ', nlata) + print('igridb = ', igridb) + print('nlonb = ', nlonb) + print('nlatb = ', nlatb) + print('lsave = ', lsave) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + + print('return from trssph with db') + print('lsvmin = ', lsvmin) + print('lsave = ', lsave) + print('lwkmin = ', lwkmin) + print('lwork = ', lwork) # ** transform to geo order ** @@ -7209,28 +7212,28 @@ if ierror != 0: msg = 'In return from call to trvsph ierror = %d and call number = %d' % (ierror,i) - raise ValueError, msg + raise ValueError(msg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to trvsph' - print 'igrida = ', igrida - print 'iveca = ', iveca - print 'nlona = ', nlona - print 'nlata = ', nlata - print 'igridb = ', igridb - print 'ivecb = ', ivecb - print 'nlonb = ', nlonb - print 'nlatb = ', nlatb - print 'lsave = ', lsave - print 'lwork = ', lwork - print 'ldwork = ', ldwork - - print 'return from trvsph with ub, vb, lsvmin, lwkmin' - print 'lsvmin = ', lsvmin - print 'lsave = ', lsave - print 'lwkmin = ', lwkmin - print 'lwork = ', lwork + print(' ') + print('pass to trvsph') + print('igrida = ', igrida) + print('iveca = ', iveca) + print('nlona = ', nlona) + print('nlata = ', nlata) + print('igridb = ', igridb) + print('ivecb = ', ivecb) + print('nlonb = ', nlonb) + print('nlatb = ', nlatb) + print('lsave = ', lsave) + print('lwork = ', lwork) + print('ldwork = ', ldwork) + + print('return from trvsph with ub, vb, lsvmin, lwkmin') + print('lsvmin = ', lsvmin) + print('lsave = ', lsave) + print('lwkmin = ', lwkmin) + print('lwork = ', lwork) # ** transform to geo order ** ub, vb = mathtogeo(reverseLatitude, standardShapeb, inverseOrder, ub, vb) @@ -7316,13 +7319,13 @@ # check the shape for a unique number of longitudes and a unique number of latitudes if self.lon in [self.tme, self.lev, self.lat]: - print 'Warning - number of longitudes in duplicated in the shape. The geotomath shape \ + print('Warning - number of longitudes in duplicated in the shape. The geotomath shape \ transform will not work unless it differs from the number of latitudes and it \ - is one of the last two entiries in the shape' + is one of the last two entiries in the shape') if self.lat in [self.tme, self.lev, self.lon]: - print 'Warning - number of latitudes in duplicated in the shape. The geotomath shape \ + print('Warning - number of latitudes in duplicated in the shape. The geotomath shape \ transform will not work unless it differs from the number of longitudes and it \ - is one of the last two entiries in the shape' + is one of the last two entiries in the shape') def shiftScalar(self, sf, missingValue = None): """ -------------------------------------------------------------------------------------------------------- @@ -7366,7 +7369,7 @@ wsav, ierror = spherepack.sshifti(ioff, nlon, nlat, lsav) if ierror != 0: msg = 'In return from call to sshifti ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) # ** transform to standard geo order ** if ioff == 1: # regular grid passed in @@ -7398,17 +7401,17 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to sshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from sshifte' + print(' ') + print('pass to sshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from sshifte') if ierror != 0: msg = 'In return from call to sshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) goff_return[i,:,:] = goff @@ -7436,17 +7439,17 @@ goff = numpy.transpose(goff) greg = numpy.transpose(greg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to sshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from sshifte' + print(' ') + print('pass to sshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from sshifte') if ierror != 0: msg = 'In return from call to sshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) greg_return[i,:,:] = greg @@ -7476,17 +7479,17 @@ greg = numpy.transpose(greg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to sshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from sshifte' + print(' ') + print('pass to sshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from sshifte') if ierror != 0: msg = 'In return from call to sshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) goff = numpy.reshape(goff, (1, goff.shape[0], goff.shape[1])) # restore dummy dimension @@ -7512,17 +7515,17 @@ greg = numpy.transpose(greg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to sshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from sshifte' + print(' ') + print('pass to sshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from sshifte') if ierror != 0: msg = 'In return from call to sshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) greg = numpy.reshape(greg, (1, greg.shape[0], greg.shape[1])) # restore dummy dimension @@ -7575,7 +7578,7 @@ wsav, ierror = spherepack.vshifti(ioff, nlon, nlat, lsav) if ierror != 0: msg = 'In return from call to vshifti ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) # ** transform to standard geo order ** if ioff == 1: # regular grid passed in @@ -7619,17 +7622,17 @@ if ierror != 0 or debug == 1: - print ' ' - print 'pass to sshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from vshifte' + print(' ') + print('pass to sshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from vshifte') if ierror != 0: msg = 'In return from call to vshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) uoff_return[i,:,:] = uoff voff_return[i,:,:] = voff @@ -7669,17 +7672,17 @@ vreg = numpy.transpose(vreg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from sshifte' + print(' ') + print('pass to vshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from sshifte') if ierror != 0: msg = 'In return from call to vshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) ureg_return[i,:,:] = ureg vreg_return[i,:,:] = vreg @@ -7721,17 +7724,17 @@ vreg = numpy.transpose(vreg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from vshifte' + print(' ') + print('pass to vshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from vshifte') if ierror != 0: msg = 'In return from call to vshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) uoff = numpy.reshape(uoff, (1, uoff.shape[0], uoff.shape[1])) # restore dummy dimension voff = numpy.reshape(voff, (1, voff.shape[0], voff.shape[1])) # restore dummy dimension @@ -7768,17 +7771,17 @@ vreg = numpy.transpose(vreg) if ierror != 0 or debug == 1: - print ' ' - print 'pass to vshifte' - print 'nlon = ', nlon - print 'nlat = ', nlat - print 'lsav = ', lsav - print 'lwrk = ', lwrk - print 'return from vshifte' + print(' ') + print('pass to vshifte') + print('nlon = ', nlon) + print('nlat = ', nlat) + print('lsav = ', lsav) + print('lwrk = ', lwrk) + print('return from vshifte') if ierror != 0: msg = 'In return from call to sshifte ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) ureg = numpy.reshape(ureg, (1, ureg.shape[0], ureg.shape[1])) # restore dummy dimension vreg = numpy.reshape(vreg, (1, vreg.shape[0], vreg.shape[1])) # restore dummy dimension @@ -7821,12 +7824,12 @@ if ierror != 0: msg = 'In return from call to gaqd ierror = %d' % (ierror,) - raise ValueError, msg + raise ValueError(msg) # convert points to geophysical format colatlist = list(points) - latlist = map( (lambda x: 90.0 - x*180.0/math.pi), colatlist) + latlist = list(map( (lambda x: 90.0 - x*180.0/math.pi), colatlist)) # calculate the bounds @@ -7891,9 +7894,9 @@ if maxdiff < small: if abs(90. - checklat[0]) > small or abs(-90. - checklat[nlat-1]) > small: - print '***************************************************************************' - print 'CANNOT PROCESS THE DATA - Evenly spaced grids must include the pole points' - print '***************************************************************************' + print('***************************************************************************') + print('CANNOT PROCESS THE DATA - Evenly spaced grids must include the pole points') + print('***************************************************************************') raise ValueError return else: @@ -7904,17 +7907,17 @@ # check the pass for evenly spaced longitudes without a wrap if checklon[0] > checklon[nlon-1]: - print '****************************************************************' - print 'CANNOT PROCESS THE DATA - Longitudes must run from west to east' - print '****************************************************************' + print('****************************************************************') + print('CANNOT PROCESS THE DATA - Longitudes must run from west to east') + print('****************************************************************') raise ValueError return delta = 360./nlon if (checklon[nlon-1] - checklon[0]) > (360.0 -(delta - small)) : - print '**************************************************' - print 'CANNOT PROCESS THE DATA - Longitudes can not wrap' - print '**************************************************' + print('**************************************************') + print('CANNOT PROCESS THE DATA - Longitudes can not wrap') + print('**************************************************') raise ValueError return @@ -7948,17 +7951,17 @@ maxdiff = diff if maxdiff > small: - print '***********************************************************' - print 'CANNOT PROCESS THE DATA - Longitudes are not evenly spaced' - print '***********************************************************' + print('***********************************************************') + print('CANNOT PROCESS THE DATA - Longitudes are not evenly spaced') + print('***********************************************************') raise ValueError return laterror = max( abs(latvals - checklat) ) if laterror > small: - print '********************************************************' - print 'CANNOT PROCESS THE DATA - Latitude values are incorrect' - print '********************************************************' + print('********************************************************') + print('CANNOT PROCESS THE DATA - Latitude values are incorrect') + print('********************************************************') raise ValueError return grid_type @@ -8007,26 +8010,26 @@ else: grid_type = 'offset' else: - print '*********************************************************' - print 'CANNOT PROCESS THE DATA - Latitudes are not evenly spaced' - print '*********************************************************' + print('*********************************************************') + print('CANNOT PROCESS THE DATA - Latitudes are not evenly spaced') + print('*********************************************************') raise ValueError return # check the pass for evenly spaced longitudes and conformity to the grid type as 'regular' or 'offset' if checklon[0] > checklon[nlon-1]: - print '***************************************************************' - print 'CANNOT PROCESS THE DATA - Longitudes must run from west to east' - print '***************************************************************' + print('***************************************************************') + print('CANNOT PROCESS THE DATA - Longitudes must run from west to east') + print('***************************************************************') raise ValueError return delta = 360./nlon if (checklon[nlon-1] - checklon[0]) > (360.0 -(delta - small)) : - print '*************************************************' - print 'CANNOT PROCESS THE DATA - Longitudes can not wrap' - print '*************************************************' + print('*************************************************') + print('CANNOT PROCESS THE DATA - Longitudes can not wrap') + print('*************************************************') raise ValueError return @@ -8037,24 +8040,24 @@ maxdiff = diff if maxdiff > small: - print '**********************************************************' - print 'CANNOT PROCESS THE DATA - Longitudes are not evenly spaced' - print '**********************************************************' + print('**********************************************************') + print('CANNOT PROCESS THE DATA - Longitudes are not evenly spaced') + print('**********************************************************') raise ValueError return else: if grid_type == 'regular': if abs(0. - checklon[0]) > small or abs(360. - delta - checklon[nlon-1]) > small: - print '********************************************************************' - print 'WARNING - Longitude end points do not conform to regular grid values' - print 'Expected longitude to start at 0 degrees' - print '********************************************************************' + print('********************************************************************') + print('WARNING - Longitude end points do not conform to regular grid values') + print('Expected longitude to start at 0 degrees') + print('********************************************************************') else: if abs(0. + delta/2. - checklon[0]) > small or abs(360. - delta/2. - checklon[nlon-1]) > small: - print '*********************************************************************' - print 'WARNING - Longitude end points do not conform to offset grid values' - print 'Expected longitude to start offset from 0 degrees by half grid spacing' - print '**********************************************************************' + print('*********************************************************************') + print('WARNING - Longitude end points do not conform to offset grid values') + print('Expected longitude to start offset from 0 degrees by half grid spacing') + print('**********************************************************************') return grid_type @@ -8109,16 +8112,16 @@ # ----- Check data type and change to float if necessary ------- if u.dtype.char != 'f': - print '*******************************************' - print 'WARNING - data will be converted to Float32' - print '*******************************************' + print('*******************************************') + print('WARNING - data will be converted to Float32') + print('*******************************************') u = u.astype(numpy.float32) if v is not None: if v.dtype.char != 'f': - print '*******************************************' - print 'WARNING - data will be converted to Float32' - print '*******************************************' + print('*******************************************') + print('WARNING - data will be converted to Float32') + print('*******************************************') v = v.astype(numpy.float32) # ----- Check for missing data ------- @@ -8126,17 +8129,17 @@ if missingValue is not None and usefilled == 'yes': um = numpy.ma.masked_where(u, missingValue) if um.mask is not numpy.ma.nomask: - print '************************************************' - print 'CANNOT PROCESS THE DATA - field has missing data' - print '************************************************' + print('************************************************') + print('CANNOT PROCESS THE DATA - field has missing data') + print('************************************************') raise ValueError return if v is not None: vm = numpy.ma.masked_where(v, missingValue) if vm.mask is not numpy.ma.nomask: - print '************************************************' - print 'CANNOT PROCESS THE DATA - field has missing data' - print '************************************************' + print('************************************************') + print('CANNOT PROCESS THE DATA - field has missing data') + print('************************************************') raise ValueError return @@ -8144,21 +8147,21 @@ if v is not None: if u.shape != v.shape: - print '***************************************************************************' - print 'CANNOT PROCESS THE DATA - Error in the data - u and v have different shapes' - print '***************************************************************************' - raise 'IndexError' + print('***************************************************************************') + print('CANNOT PROCESS THE DATA - Error in the data - u and v have different shapes') + print('***************************************************************************') + raise IndexError return origShape = u.shape # u is the scalar function if len(standardShape) != len(origShape): - print '***********************************' - print 'CANNOT PROCESS THE DATA' - print 'Shapes are not the same length' - print 'standardShape is : ', standardShape - print 'origShape is : ', origShape - print '***********************************' + print('***********************************') + print('CANNOT PROCESS THE DATA') + print('Shapes are not the same length') + print('standardShape is : ', standardShape) + print('origShape is : ', origShape) + print('***********************************') raise IndexError return @@ -8199,9 +8202,9 @@ elif size == 2: nt = 1 else: - print '**************************************************************' - print 'CANNOT PROCESS THE DATA - size of data array must be 2, 3 or 4' - print '**************************************************************' + print('**************************************************************') + print('CANNOT PROCESS THE DATA - size of data array must be 2, 3 or 4') + print('**************************************************************') raise IndexError return @@ -8217,7 +8220,7 @@ elif reverseLatitude == 'geoyes': u = u[:,::-1,:] else: - print 'Only choices for reverseLatitude are strings no, mathyes or geoyes' + print('Only choices for reverseLatitude are strings no, mathyes or geoyes') raise ValueError if v is None: # scalar function case @@ -8234,7 +8237,7 @@ elif reverseLatitude == 'geoyes': v = v[:,::-1,:] else: - print 'Only choices for reverseLatitude are strings no, mathyes or geoyes' + print('Only choices for reverseLatitude are strings no, mathyes or geoyes') raise ValueError @@ -8264,7 +8267,7 @@ u = u[:,::-1,:] v = v[:,::-1,:] else: - print 'Only choices for reverseLatitude are strings no, mathyes or geoyes' + print('Only choices for reverseLatitude are strings no, mathyes or geoyes') raise ValueError u = numpy.reshape(u, standardShape) @@ -8292,7 +8295,7 @@ elif reverseLatitude == 'geoyes': u = u[:,::-1,:] else: - print 'Only choices for reverseLatitude are strings no, mathyes or geoyes' + print('Only choices for reverseLatitude are strings no, mathyes or geoyes') raise ValueError u = numpy.reshape(u, standardShape) @@ -8328,16 +8331,16 @@ #-------------------------------------------------------------------------------------------- if typeLatitudes != 'even' and typeLatitudes != 'gaussian': # check ltitude request - print '****************************************************************' - print 'CANNOT PROCESS THE DATA - typeLatitudes must be even or gaussian' - print '****************************************************************' + print('****************************************************************') + print('CANNOT PROCESS THE DATA - typeLatitudes must be even or gaussian') + print('****************************************************************') raise ValueError return if directionLatitudes != 'north_to_south' and directionLatitudes != 'south_to_north': - print '*************************************************************************************' - print 'CANNOT PROCESS THE DATA - directionLatitudes must be north_to_south or south_to_north' - print '*************************************************************************************' + print('*************************************************************************************') + print('CANNOT PROCESS THE DATA - directionLatitudes must be north_to_south or south_to_north') + print('*************************************************************************************') raise ValueError return @@ -8404,16 +8407,16 @@ ashape = a.shape # -- Preliminary error checks -- bshape = b.shape if ashape != bshape: - print 'In truncate -- the shape of the two coefficient arrays passed are not the same ' + print('In truncate -- the shape of the two coefficient arrays passed are not the same ') raise IndexError if len(ashape) != 3: - print 'In truncate -- the coefficient arrays must be 3D' + print('In truncate -- the coefficient arrays must be 3D') raise IndexError nb = ashape[1] if wave + 1 > nb: - print 'In truncate -- the wave number for the truncation is too large' + print('In truncate -- the wave number for the truncation is too large') raise IndexError t = wave + 1 # -- Perform triangular truncation -- @@ -8449,10 +8452,10 @@ def help(choice = None): - import sphere + from . import sphere if choice is None: - print """------------------------------------------------------------------------------------------- + print("""------------------------------------------------------------------------------------------- To get an overview of the sphere module, type sphere.help('overview') @@ -8533,12 +8536,12 @@ To get a suggestion for an example of the the use of the Sphere class which has an an answer which can be verified type sphere.help('SphereTest') - ----------------------------------------------------------------------------------------------------------------""" + ----------------------------------------------------------------------------------------------------------------""") elif choice == 'overview': # look at the whole package - print sphere.__doc__ + print(sphere.__doc__) elif choice == 'Sphere': # how to make an instance of a class - print """ -------------------------------------------------------------------------------------- + print(""" -------------------------------------------------------------------------------------- To make an instance x of the Sphere class type @@ -8570,10 +8573,10 @@ computed_stored = 'stored') where the order of the keyword entries is immaterial. - -----------------------------------------------------------------------------------""" + -----------------------------------------------------------------------------------""") elif choice == 'Regrid': - print """ -------------------------------------------------------------------------------------- + print(""" -------------------------------------------------------------------------------------- To make an instance x of the Regrid class type @@ -8589,10 +8592,10 @@ numberLevels = input grid number of levels (optional) numberTimes = input grid number of times (optional) - -----------------------------------------------------------------------------------""" + -----------------------------------------------------------------------------------""") elif choice == 'Shiftgrid': - print """ -------------------------------------------------------------------------------------- + print(""" -------------------------------------------------------------------------------------- To make an instance x of the Shiftgrid class type @@ -8606,10 +8609,10 @@ numberLevels = number of levels (optional) numberTimes = number of times (optional) - -----------------------------------------------------------------------------------""" + -----------------------------------------------------------------------------------""") elif choice == 'GeneralExample': # example and a suggestion - print """ -------------------------------------------------------------------------------------- + print(""" -------------------------------------------------------------------------------------- Step 1. Type @@ -8641,10 +8644,10 @@ sphere.Clasname.functionName.__doc__ - -----------------------------------------------------------------------------------""" + -----------------------------------------------------------------------------------""") elif choice == 'SphereTest': - print """ -------------------------------------------------------------------------------------- + print(""" -------------------------------------------------------------------------------------- Typing @@ -8683,10 +8686,10 @@ Step 6. Compare the results for equality, sf_source with vort and vp_source with div. If the comparison fails, please complain about it. - -----------------------------------------------------------------------------------""" + -----------------------------------------------------------------------------------""") elif choice == 'gridGenerator': # utilities - print """ ----------------------------------------------------------------------------- + print(""" ----------------------------------------------------------------------------- routine: gridGenerator @@ -8705,10 +8708,10 @@ definition: gridGenerator(nlon, nlat, firstLongitude, typeLatitudes, directionLatitudes): - -----------------------------------------------------------------------------------""" + -----------------------------------------------------------------------------------""") elif choice == 'truncate': - print """ ------------------------------------------------------------------------------------------- + print(""" ------------------------------------------------------------------------------------------- routine: truncate @@ -8734,78 +8737,78 @@ in Sardeshmukh P. D. and Hoskins B. J., 1984, Spatial Smoothing on the Sphere. Mon. Wea. Rev., 112, 2524-2529. - -------------------------------------------------------------------------------------------""" + -------------------------------------------------------------------------------------------""") elif choice == 'div': # Sphere class method functions - print sphere.Sphere.div.__doc__ + print(sphere.Sphere.div.__doc__) elif choice == 'idiv': - print sphere.Sphere.idiv.__doc__ + print(sphere.Sphere.idiv.__doc__) elif choice == 'vrt': - print sphere.Sphere.vrt.__doc__ + print(sphere.Sphere.vrt.__doc__) elif choice == 'ivrt': - print sphere.Sphere.ivrt.__doc__ + print(sphere.Sphere.ivrt.__doc__) elif choice == 'idvt': - print sphere.Sphere.idvt.__doc__ + print(sphere.Sphere.idvt.__doc__) elif choice == 'vts': - print sphere.Sphere.vts.__doc__ + print(sphere.Sphere.vts.__doc__) elif choice == 'grad': - print sphere.Sphere.grad.__doc__ + print(sphere.Sphere.grad.__doc__) elif choice == 'igrad': - print sphere.Sphere.igrad.__doc__ + print(sphere.Sphere.igrad.__doc__) elif choice == 'slap': - print sphere.Sphere.slap.__doc__ + print(sphere.Sphere.slap.__doc__) elif choice == 'islap': - print sphere.Sphere.islap.__doc__ + print(sphere.Sphere.islap.__doc__) elif choice == 'vlap': - print sphere.Sphere.vlap.__doc__ + print(sphere.Sphere.vlap.__doc__) elif choice == 'ivlap': - print sphere.Sphere.ivlap.__doc__ + print(sphere.Sphere.ivlap.__doc__) elif choice == 'sfvp': - print sphere.Sphere.sfvp.__doc__ + print(sphere.Sphere.sfvp.__doc__) elif choice == 'isfvp': - print sphere.Sphere.isfvp.__doc__ + print(sphere.Sphere.isfvp.__doc__) elif choice == 'truncation': - print sphere.Sphere.truncation.__doc__ + print(sphere.Sphere.truncation.__doc__) elif choice == 'sha': - print sphere.Sphere.sha.__doc__ + print(sphere.Sphere.sha.__doc__) elif choice == 'shs': - print sphere.Sphere.shs.__doc__ + print(sphere.Sphere.shs.__doc__) elif choice == 'vha': - print sphere.Sphere.vha.__doc__ + print(sphere.Sphere.vha.__doc__) elif choice == 'vhs': - print sphere.Sphere.vhs.__doc__ + print(sphere.Sphere.vhs.__doc__) elif choice == 'regridScalar': # Regrid class method functions - print sphere.Regrid.regridScalar.__doc__ + print(sphere.Regrid.regridScalar.__doc__) elif choice == 'regridVector': - print sphere.Regrid.regridVector.__doc__ + print(sphere.Regrid.regridVector.__doc__) elif choice == 'shiftScalar': # Regrid class method functions - print sphere.Shiftgrid.shiftScalar.__doc__ + print(sphere.Shiftgrid.shiftScalar.__doc__) elif choice == 'shiftVector': - print sphere.Shiftgrid.shiftVector.__doc__ + print(sphere.Shiftgrid.shiftVector.__doc__) else: - print 'Unknown Request - cannot provide help for ', choice + print('Unknown Request - cannot provide help for ', choice ) return None debian/patches/pkgconfig.patch0000664000000000000000000000343312263741406013617 0ustar Author: Alastair McKinstry Description: Rudimentary support for pkgconfig files in spherepack Last-Updated: 2010-11-04 Forwarded: no Index: spherepack-3.2/Src/Makefile =================================================================== --- spherepack-3.2.orig/Src/Makefile 2013-07-03 18:52:15.000000000 +0100 +++ spherepack-3.2/Src/Makefile 2013-07-04 11:23:13.000000000 +0100 @@ -1,8 +1,10 @@ FC:=gfortran PREFIX:=/usr/local +PACKAGE_VERSION:=3.2 +LIBDIR=$(PREFIX)/lib LD:=$(LD) SONAME=libsphere.so.0d -SHLIBFLAGS:= -Wl,--soname,$(SONAME) -Wl,--version-script,spherepack.ver -Wl,--script,aliases.ld -lm +SHLIBFLAGS:= -Wl,--soname,$(SONAME) -Wl,--version-script,spherepack.ver -lm PIC_OBJS = $(patsubst %.f,%.pic_o, $(wildcard *.f)) all: libsphere.a shlib libsphere.so @@ -22,6 +24,13 @@ cp libsphere.a $(DESTDIR)$(PREFIX)/lib cp $(SONAME) $(DESTDIR)$(PREFIX)/lib ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/lib/libsphere.so + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig + cp libsphere.a $(DESTDIR)$(LIBDIR) + cp $(SONAME) $(DESTDIR)$(LIBDIR) + ln -sf $(SONAME) $(DESTDIR)$(LIDBIR)/libsphere.so + sed -e 's;@prefix@;${PREFIX};' -e 's;@PACKAGE_VERSION@;${PACKAGE_VERSION};' -e 's;@LIBDIR@;${LIBDIR};' \ + < sphere.pc.in > $(DESTDIR)$(LIBDIR)/pkgconfig/sphere.pc clean: rm -f *.o *.pic_o libsphere.a $(SONAME) libsphere.so Index: spherepack-3.2/Src/sphere.pc.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ spherepack-3.2/Src/sphere.pc.in 2013-07-03 18:52:15.000000000 +0100 @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=@LIBDIR@ + +Name: sphere +Description: Spherical operators for geophysics +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lsphere + debian/patches/python-2.6.patch0000664000000000000000000004335212263741406013500 0ustar Author: Alastair McKinstry Description: avoid using 'as' as variable: now a reserved keyword in python2.6 Last-Updated: 2010-11-03 Forwarded: no Index: spherepack-3.2/Lib/sphere.py =================================================================== --- spherepack-3.2.orig/Lib/sphere.py 2010-11-03 13:52:02.000000000 +0000 +++ spherepack-3.2/Lib/sphere.py 2010-11-03 13:56:51.000000000 +0000 @@ -776,7 +776,7 @@ wsha, lsha = gridComp.shai(nlat, nlon) - as, bs = gridComp.sha(nlat, nlon, nt, lsha, wsha, sf) + aas, bbs = gridComp.sha(nlat, nlon, nt, lsha, wsha, sf) wsha, lsha = gridComp.shai(nlat, nlon) @@ -786,7 +786,7 @@ wvhs, lvhs = gridComp.vhsi(nlat, nlon) - u, v = gridComp.isfvp(nlat, nlon, nt, as, bs, av, bv, lvhs, wvhs) + u, v = gridComp.isfvp(nlat, nlon, nt, aas, bbs, av, bv, lvhs, wvhs) u, v = mathtogeo(reverseLatitude, standardShape, inverseOrder, u, v) @@ -1812,13 +1812,13 @@ return sf - def isfvp(self, nlat, nlon, nt, as, bs, av, bv, lvhsec, wvhsec): + def isfvp(self, nlat, nlon, nt, aas, bbs, av, bv, lvhsec, wvhsec): #----------------------------------------------------------------------------- # # purpose: computes a vector function with a given stream function and # velocity potential on a equally spaced grid # - # usage: u, v = x.isfvp(nlat, nlon, nt, as, bs, av, bv, wvhsec, lvhsec) + # usage: u, v = x.isfvp(nlat, nlon, nt, aas, bbs, av, bv, wvhsec, lvhsec) # #----------------------------------------------------------------------------- @@ -1849,8 +1849,8 @@ work = numpy.zeros((lwork,),'f') v, w, ierror = spherepack.isfvpec(nlat, nlon, isym, idv, jdv, - numpy.transpose(as), - numpy.transpose(bs), + numpy.transpose(aas), + numpy.transpose(bbs), numpy.transpose(av), numpy.transpose(bv), wvhsec, work) @@ -3167,13 +3167,13 @@ return sf - def isfvp(self, nlat, nlon, nt, as, bs, av, bv, lvhsgc, wvhsgc): + def isfvp(self, nlat, nlon, nt, aas, bbs, av, bv, lvhsgc, wvhsgc): #----------------------------------------------------------------------------- # # purpose: computes a vector function with a given stream function and # velocity potential on a gaussian grid # - # usage: u, v = g.isfvp(nlat, nlon, nt, as, bs, av, bv, wvhsgc, lvhsgc) + # usage: u, v = g.isfvp(nlat, nlon, nt, aas, bbs, av, bv, wvhsgc, lvhsgc) # #----------------------------------------------------------------------------- @@ -3199,8 +3199,8 @@ work = numpy.zeros((lwork,),'f') v, w, ierror = spherepack.isfvpgc(nlat, nlon, isym, idv, jdv, - numpy.transpose(as), - numpy.transpose(bs), + numpy.transpose(aas), + numpy.transpose(bbs), numpy.transpose(av), numpy.transpose(bv), wvhsgc, work) @@ -4513,13 +4513,13 @@ return sf - def isfvp(self, nlat, nlon, nt, as, bs, av, bv, lvhses, wvhses): + def isfvp(self, nlat, nlon, nt, aas, bbs, av, bv, lvhses, wvhses): #----------------------------------------------------------------------------- # # purpose: computes a vector function with a given stream function and # velocity potential on a equally spaced grid # - # usage: u, v = x.isfvp(nlat, nlon, nt, as, bs, av, bv, wvhses, lvhses) + # usage: u, v = x.isfvp(nlat, nlon, nt, aas, bbs, av, bv, wvhses, lvhses) # #----------------------------------------------------------------------------- @@ -4542,8 +4542,8 @@ work = numpy.zeros((lwork,),'f') v, w, ierror = spherepack.isfvpes(nlat, nlon, isym, idv, jdv, - numpy.transpose(as), - numpy.transpose(bis), + numpy.transpose(aas), + numpy.transpose(bbs), numpy.transpose(av), numpy.transpose(bv), wvhses, work) @@ -5878,13 +5878,13 @@ return sf - def isfvp(self, nlat, nlon, nt, as, bs, av, bv, lvhsgs, wvhsgs): + def isfvp(self, nlat, nlon, nt, aas, bbs, av, bv, lvhsgs, wvhsgs): #----------------------------------------------------------------------------- # # purpose: computes a vector function with a given stream function and # velocity potential on a gaussian grid # - # usage: u, v, ierror = g.isfvp(nlat, nlon, nt, as, bs, av, bv, wvhsgs, lvhsgs) + # usage: u, v, ierror = g.isfvp(nlat, nlon, nt, aas, bbs, av, bv, wvhsgs, lvhsgs) # #----------------------------------------------------------------------------- @@ -5910,8 +5910,8 @@ work = numpy.zeros((lwork,),'f') v, w, ierror = spherepack.isfvpgs(nlat, nlon, isym, idv, jdv, - numpy.transpose(as), - numpy.transpose(bs), + numpy.transpose(aas), + numpy.transpose(bbs), numpy.transpose(av), numpy.transpose(bv), wvhsgs, work) Index: spherepack-3.2/Src/spherepack.pyf =================================================================== --- spherepack-3.2.orig/Src/spherepack.pyf 2010-11-04 09:11:22.000000000 +0000 +++ spherepack-3.2/Src/spherepack.pyf 2010-11-04 09:13:36.000000000 +0000 @@ -2735,10 +2735,10 @@ ! end - subroutine isfvpec(nlat,nlon,isym,nt,v,w,idv,jdv,as,bs,av,bv,mdb,ndb,wvhsec,lvhsec,work,lwork,ierror) + subroutine isfvpec(nlat,nlon,isym,nt,v,w,idv,jdv,aas,bbs,av,bv,mdb,ndb,wvhsec,lvhsec,work,lwork,ierror) ! ************************************************************************** ! - ! given the scalar spherical harmonic coefficients as,bs precomputed + ! given the scalar spherical harmonic coefficients aas,bbs precomputed ! by shaec for the scalar stream function sf and av,bv precomputed by ! shaec for the scalar velocity potenital vp, subroutine isfvpec computes ! the vector field (v,w) corresponding to sf and vp. w is the east @@ -2790,7 +2790,7 @@ ! jdv the second dimension of the arrays v,w as it appears in ! the program that calls isfvpec. ! - ! as,bs two or three dimensional arrays (see input parameter nt) + ! aas,bbs two or three dimensional arrays (see input parameter nt) ! that contain the spherical harmonic coefficients of ! the scalar field sf as computed by subroutine shaec. ! @@ -2798,10 +2798,10 @@ ! that contain the spherical harmonic coefficients of ! the scalar field vp as computed by subroutine shaec. ! - ! mdb the first dimension of the arrays as,bs,av,bv as it + ! mdb the first dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpec. ! - ! ndb the second dimension of the arrays as,bs,av,bv as it + ! ndb the second dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpec. ! ! wvhsec an array which must be initialized by subroutine vhseci. @@ -2821,7 +2821,7 @@ !v,w two or three dimensional arrays (see input parameter nt) ! that contains the vector field corresponding to the stream ! function sf and velocity potential vp whose coefficients, - ! as,bs (for sf) and av,bv (for vp), were precomputed by + ! aas,bbs (for sf) and av,bv (for vp), were precomputed by ! subroutine shaec. ! colatitude point ! @@ -2852,18 +2852,18 @@ real, intent(out)::v(idv, jdv, nt) real, intent(out)::w(idv, jdv, nt) real, intent(temporary):: work(lwork) - real as(mdb, ndb, nt) - real bs(mdb, ndb, nt) + real aas(mdb, ndb, nt) + real bbs(mdb, ndb, nt) real av(mdb, ndb, nt) real bv(mdb, ndb, nt) real wvhsec(lvhsec) ! end - subroutine isfvpes(nlat,nlon,isym,nt,v,w,idv,jdv,as,bs,av,bv,mdb,ndb,wvhses,lvhses,work,lwork,ierror) + subroutine isfvpes(nlat,nlon,isym,nt,v,w,idv,jdv,aas,bbs,av,bv,mdb,ndb,wvhses,lvhses,work,lwork,ierror) ! ************************************************************************** ! - ! given the scalar spherical harmonic coefficients as,bs precomputed + ! given the scalar spherical harmonic coefficients aas,bbs precomputed ! by shaes for the scalar stream function sf and av,bv precomputed by ! shaes for the scalar velocity potenital vp, subroutine isfvpes computes ! the vector field (v,w) corresponding to sf and vp. w is the east @@ -2913,7 +2913,7 @@ ! jdv the second dimension of the arrays v,w as it appears in ! the program that calls isfvpes. jdv must be at least nlon. ! - ! as,bs two or three dimensional arrays (see input parameter nt) + ! aas,bbs two or three dimensional arrays (see input parameter nt) ! that contain the spherical harmonic coefficients of ! the scalar field sf as computed by subroutine shaes. ! @@ -2921,10 +2921,10 @@ ! that contain the spherical harmonic coefficients of ! the scalar field vp as computed by subroutine shaes. ! - ! mdb the first dimension of the arrays as,bs,av,bv as it + ! mdb the first dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpes. ! - ! ndb the second dimension of the arrays as,bs,av,bv as it + ! ndb the second dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpes. ! ! wvhses an array which must be initialized by subroutine vhsesi. @@ -2944,7 +2944,7 @@ ! v,w two or three dimensional arrays (see input parameter nt) ! that contains the vector field corresponding to the stream ! function sf and velocity potential vp whose coefficients, - ! as,bs (for sf) and av,bv (for vp), were precomputed by + ! aas,bbs (for sf) and av,bv (for vp), were precomputed by ! subroutine shaes. ! ! ierror = 0 no errors @@ -2974,18 +2974,18 @@ real, intent(out)::v(idv, jdv, nt) real, intent(out)::w(idv, jdv, nt) real, intent(temporary):: work(lwork) - real as(mdb, ndb, nt) - real bs(mdb, ndb, nt) + real aas(mdb, ndb, nt) + real bbs(mdb, ndb, nt) real av(mdb, ndb, nt) real bv(mdb, ndb, nt) real wvhses(lvhses) ! end - subroutine isfvpgc(nlat,nlon,isym,nt,v,w,idv,jdv,as,bs,av,bv,mdb,ndb,wvhsgc,lvhsgc,work,lwork,ierror) + subroutine isfvpgc(nlat,nlon,isym,nt,v,w,idv,jdv,aas,bbs,av,bv,mdb,ndb,wvhsgc,lvhsgc,work,lwork,ierror) ! ************************************************************************** ! - ! given the scalar spherical harmonic coefficients as,bs precomputed + ! given the scalar spherical harmonic coefficients aas,bbs precomputed ! by shagc for the scalar stream function sf and av,bv precomputed by ! shagc for the scalar velocity potenital vp, subroutine isfvpgc computes ! the vector field (v,w) corresponding to sf and vp. w is the east @@ -3030,7 +3030,7 @@ ! jdv the second dimension of the arrays v,w as it appears in ! the program that calls isfvpgc. ! - ! as,bs two or three dimensional arrays (see input parameter nt) + ! aas,bbs two or three dimensional arrays (see input parameter nt) ! that contain the spherical harmonic coefficients of ! the scalar field sf as computed by subroutine shagc. ! @@ -3038,10 +3038,10 @@ ! that contain the spherical harmonic coefficients of ! the scalar field vp as computed by subroutine shagc. ! - ! mdb the first dimension of the arrays as,bs,av,bv as it + ! mdb the first dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpgc. ! - ! ndb the second dimension of the arrays as,bs,av,bv as it + ! ndb the second dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpgc. ! ! wvhsgc an array which must be initialized by subroutine vhsgci. @@ -3064,7 +3064,7 @@ !v,w two or three dimensional arrays (see input parameter nt) ! that contains the vector field corresponding to the stream ! function sf and velocity potential vp whose coefficients, - ! as,bs (for sf) and av,bv (for vp), were precomputed by + ! aas,bbs (for sf) and av,bv (for vp), were precomputed by ! subroutine shagc. ! ! ierror= 0 no errors @@ -3094,18 +3094,18 @@ real, intent(out)::v(idv, jdv, nt) real, intent(out)::w(idv, jdv, nt) real, intent(temporary):: work(lwork) - real as(mdb, ndb, nt) - real bs(mdb, ndb, nt) + real aas(mdb, ndb, nt) + real bbs(mdb, ndb, nt) real av(mdb, ndb, nt) real bv(mdb, ndb, nt) real wvhsgc(lvhsgc) ! end - subroutine isfvpgs(nlat,nlon,isym,nt,v,w,idv,jdv,as,bs,av,bv,mdb,ndb,wvhsgs,lvhsgs,work,lwork,ierror) + subroutine isfvpgs(nlat,nlon,isym,nt,v,w,idv,jdv,aas,bbs,av,bv,mdb,ndb,wvhsgs,lvhsgs,work,lwork,ierror) ! ************************************************************************** ! - ! given the scalar spherical harmonic coefficients as,bs precomputed + ! given the scalar spherical harmonic coefficients aas,bbs precomputed ! by shags for the scalar stream function sf and av,bv precomputed by ! shags for the scalar velocity potenital vp, subroutine isfvpgs computes ! the vector field (v,w) corresponding to sf and vp. w is the east @@ -3150,7 +3150,7 @@ ! jdv the second dimension of the arrays v,w as it appears in ! the program that calls isfvpgs. ! - ! as,bs two or three dimensional arrays (see input parameter nt) + ! aas,bbs two or three dimensional arrays (see input parameter nt) ! that contain the spherical harmonic coefficients of ! the scalar field sf as computed by subroutine shags. ! @@ -3158,10 +3158,10 @@ ! that contain the spherical harmonic coefficients of ! the scalar field vp as computed by subroutine shags. ! - ! mdb the first dimension of the arrays as,bs,av,bv as it + ! mdb the first dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpgs. ! - ! ndb the second dimension of the arrays as,bs,av,bv as it + ! ndb the second dimension of the arrays aas,bbs,av,bv as it ! appears in the program that calls isfvpgs. ! ! wvhsgs an array which must be initialized by subroutine vhsgsi. @@ -3179,7 +3179,7 @@ !v,w two or three dimensional arrays (see input parameter nt) ! that contains the vector field corresponding to the stream ! function sf and velocity potential vp whose coefficients, - ! as,bs (for sf) and av,bv (for vp), were precomputed by + ! aas,bbs (for sf) and av,bv (for vp), were precomputed by ! subroutine shags. ! !ierror = 0 no errors @@ -3209,8 +3209,8 @@ real, intent(out)::v(idv, jdv, nt) real, intent(out)::w(idv, jdv, nt) real, intent(temporary):: work(lwork) - real as(mdb, ndb, nt) - real bs(mdb, ndb, nt) + real aas(mdb, ndb, nt) + real bbs(mdb, ndb, nt) real av(mdb, ndb, nt) real bv(mdb, ndb, nt) real wvhsgs(lvhsgs) debian/patches/python-link.patch0000664000000000000000000000421512263741406014123 0ustar Author: Alastair McKinstry Description: Build against dynamic library rather than hard-build into python module. Last-Updated: 2010-11-04 Forwarded: no Index: spherepack-3.2/setup.py =================================================================== --- spherepack-3.2.orig/setup.py 2010-11-04 10:33:19.000000000 +0000 +++ spherepack-3.2/setup.py 2010-11-04 10:29:05.000000000 +0000 @@ -11,24 +11,14 @@ from numpy.distutils.core import Extension import sys -sources = """ -Src/alf.f Src/gradgs.f Src/idvtgs.f Src/isfvpgs.f Src/ivrtec.f Src/shaes.f Src/slapec.f Src/vhaes.f Src/vlapgc.f Src/vtsgc.f -Src/divec.f Src/hrfft.f Src/igradec.f Src/islapec.f Src/ivrtes.f Src/shagc.f Src/slapes.f Src/vhagc.f Src/vlapgs.f Src/vtsgs.f -Src/dives.f Src/idivec.f Src/igrades.f Src/islapes.f Src/ivrtgc.f Src/shags.f Src/slapgc.f Src/vhags.f Src/vrtec.f -Src/divgc.f Src/idives.f Src/igradgc.f Src/islapgc.f Src/ivrtgs.f Src/shigc.f Src/slapgs.f Src/vhsec.f Src/vrtes.f -Src/divgs.f Src/idivgc.f Src/igradgs.f Src/islapgs.f Src/sfvpec.f Src/shigs.f Src/sphcom.f Src/vhses.f Src/vrtgc.f -Src/gaqd.f Src/idivgs.f Src/ihgeod.f Src/ivlapec.f Src/sfvpes.f Src/shsec.f Src/sshifte.f Src/vhsgc.f Src/vrtgs.f -Src/gradec.f Src/idvtec.f Src/isfvpec.f Src/ivlapes.f Src/sfvpgc.f Src/shses.f Src/trssph.f Src/vhsgs.f Src/vshifte.f -Src/grades.f Src/idvtes.f Src/isfvpes.f Src/ivlapgc.f Src/sfvpgs.f Src/shsgc.f Src/trvsph.f Src/vlapec.f Src/vtsec.f -Src/gradgc.f Src/idvtgc.f Src/isfvpgc.f Src/ivlapgs.f Src/shaec.f Src/shsgs.f Src/vhaec.f Src/vlapes.f Src/vtses.f -""".split() - extra_link_args=[] if sys.platform=='darwin': extra_link_args = ['-bundle','-bundle_loader '+sys.prefix+'/bin/python'] ext1 = Extension(name = 'spherepack', extra_link_args=extra_link_args, - sources = ['Src/spherepack.pyf',]+sources) + libraries = ['sphere'], + library_dirs = [ os.path.join( os.getcwd() + '/Src')], + sources = ['Src/spherepack.pyf',]) if __name__ == "__main__": from numpy.distutils.core import setup debian/patches/series0000664000000000000000000000014612263741406012042 0ustar python-2.6.patch make.patch python-link.patch pkgconfig.patch fortify.patch python3.patch 8byte.patch debian/aliases.ld0000664000000000000000000001747612263741406011156 0ustar /* Add d* variants as "double precision" variants of the spherepack calls. * This build (spherepack (>= 3.2_5) uses 8-byte reals, so d* are just aliases. * -- amckinstry@debian.org, 2013-07-01 */ SECTIONS { .text : { *(.text) ddivec_ = divec_; dshigsp_ = shigsp_; ddives_ = dives_; dhrfti1_ = hrfti1_; didvtgc_ = idvtgc_; dlegin1_ = legin1_; dtrsplat_ = trsplat_; dhrftb1_ = hrftb1_; dvbin1_ = vbin1_; didvtgs_ = idvtgs_; dzfin_ = zfin_; dlfim_ = lfim_; dsshifte_ = sshifte_; dgaqd1_ = gaqd1_; dshigss1_ = shigss1_; dhradfg_ = hradfg_; dshsgsp_ = shsgsp_; dstoc_ = stoc_; dvtgit1_ = vtgit1_; didvgs1_ = idvgs1_; dshagc_ = shagc_; ddwbk_ = dwbk_; dvhgai1_ = vhgai1_; dshags_ = shags_; dhradb4_ = hradb4_; dgradgs1_ = gradgs1_; dlfin1_ = lfin1_; dgradgc_ = gradgc_; ddzwt_ = dzwt_; divtec1_ = ivtec1_; didvtec1_ = idvtec1_; dgradgs_ = gradgs_; ddivgs1_ = divgs1_; ddvtt_ = dvtt_; dslapgs1_ = slapgs1_; dvhags1_ = vhags1_; dvbgit1_ = vbgit1_; dvtsgs1_ = vtsgs1_; dshsgci1_ = shsgci1_; dvhaec_ = vhaec_; dvhaes_ = vhaes_; divlapgs1_ = ivlapgs1_; dvhagsi_ = vhagsi_; dvtsgsi_ = vtsgsi_; dshsgs1_ = shsgs1_; dzwinit_ = zwinit_; dvtini1_ = vtini1_; dshagci1_ = shagci1_; dvtsec_ = vtsec_; dvhifth_ = vhifth_; divrtgc_ = ivrtgc_; disfvpec_ = isfvpec_; dwtinit_ = wtinit_; dlfin_ = lfin_; dvtses_ = vtses_; divlapec_ = ivlapec_; divrtgs_ = ivrtgs_; dshaes1_ = shaes1_; disfvpes_ = isfvpes_; divlapes_ = ivlapes_; dvlapes1_ = vlapes1_; dshsgsi_ = shsgsi_; dsea1_ = sea1_; dvhifthi_ = vhifthi_; dalini1_ = alini1_; dshaesi_ = shaesi_; dvbini1_ = vbini1_; dwbinit_ = wbinit_; dshagc1_ = shagc1_; dhrfftf_ = hrfftf_; dislpes1_ = islpes1_; dvlapgc1_ = vlapgc1_; dhradb5_ = hradb5_; ddwbt_ = dwbt_; dshigc_ = shigc_; dshagci_ = shagci_; dshigs_ = shigs_; dvrtec1_ = vrtec1_; dzvin1_ = zvin1_; dindx_ = indx_; dwtgint_ = wtgint_; dislpgc1_ = islpgc1_; dvhsec1_ = vhsec1_; ddivgc_ = divgc_; dwbgint_ = wbgint_; ddivgs_ = divgs_; dvhseci_ = vhseci_; dsfvpec_ = sfvpec_; dvlapec_ = vlapec_; dsfvpes_ = sfvpes_; dtrvsph_ = trvsph_; dvlapes_ = vlapes_; dzvin_ = zvin_; dves1_ = ves1_; drabcv_ = rabcv_; disfvpec1_ = isfvpec1_; dtrvplat_ = trvplat_; divtes1_ = ivtes1_; didvtes1_ = idvtes1_; didivec_ = idivec_; dshagsp_ = shagsp_; didives_ = idives_; dshsec_ = shsec_; dzvinit_ = zvinit_; dshses_ = shses_; digrdec1_ = igrdec1_; dcovlat_ = covlat_; divtgc1_ = ivtgc1_; didvtgc1_ = idvtgc1_; dshsgsp1_ = shsgsp1_; dvrtec_ = vrtec_; ddrst_ = drst_; dvrtes_ = vrtes_; dvshifte_ = vshifte_; dhradf2_ = hradf2_; dvhagc_ = vhagc_; dvhags_ = vhags_; dshagsp1_ = shagsp1_; dtrvab_ = trvab_; dvtsgc_ = vtsgc_; ddvbk_ = dvbk_; disfvpgc_ = isfvpgc_; dzwin1_ = zwin1_; divlapgc_ = ivlapgc_; dvtsgs_ = vtsgs_; disfvpgs_ = isfvpgs_; dshags1_ = shags1_; divlapgs_ = ivlapgs_; drabcw_ = rabcw_; dvlapgs1_ = vlapgs1_; dvet1_ = vet1_; dshagsi_ = shagsi_; drabcv1_ = rabcv1_; dhradbg_ = hradbg_; dvrtes1_ = vrtes1_; dislpgs1_ = islpgs1_; dshifth_ = shifth_; dislapec_ = islapec_; dislapes_ = islapes_; dvrtgc1_ = vrtgc1_; dvhses1_ = vhses1_; dhradf3_ = hradf3_; dconvlat_ = convlat_; dsfvpec1_ = sfvpec1_; didvec1_ = idvec1_; dsshifti_ = sshifti_; dlegin_ = legin_; dvhsesi_ = vhsesi_; dgradec1_ = gradec1_; dshftreg_ = shftreg_; dzfini1_ = zfini1_; dvhsgc1_ = vhsgc1_; dvtinit_ = vtinit_; ddivec1_ = divec1_; ddvbt_ = dvbt_; dslapec1_ = slapec1_; dvhaec1_ = vhaec1_; drabcp_ = rabcp_; dhrffti_ = hrffti_; dhrftf1_ = hrftf1_; dvtsec1_ = vtsec1_; dsfvpgc_ = sfvpgc_; dvhsgci_ = vhsgci_; dvlapgc_ = vlapgc_; dsfvpgs_ = sfvpgs_; dvlapgs_ = vlapgs_; disfvpes1_ = isfvpes1_; dalinit_ = alinit_; dvbinit_ = vbinit_; divlapec1_ = ivlapec1_; dvhaeci_ = vhaeci_; dvtseci_ = vtseci_; dshsec1_ = shsec1_; ddwtk_ = dwtk_; digrdes1_ = igrdes1_; drabcw1_ = rabcw1_; dshigsp1_ = shigsp1_; divtgs1_ = ivtgs1_; disfvpgc1_ = isfvpgc1_; didivgc_ = idivgc_; didvtgs1_ = idvtgs1_; dshseci_ = shseci_; drabcp1_ = rabcp1_; dslapec_ = slapec_; didivgs_ = idivgs_; dshftoff_ = shftoff_; dvtgint_ = vtgint_; dvbin_ = vbin_; dshsgc_ = shsgc_; dslapes_ = slapes_; dhradf4_ = hradf4_; dvhgsi1_ = vhgsi1_; dnegv_ = negv_; dshsgs_ = shsgs_; dihgeod_ = ihgeod_; digrdgc1_ = igrdgc1_; digradec_ = igradec_; dvrtgc_ = vrtgc_; dvrtgs_ = vrtgs_; digrades_ = igrades_; dwtgit1_ = wtgit1_; dvbgint_ = vbgint_; dvhsec_ = vhsec_; dtrssph_ = trssph_; dvhses_ = vhses_; dhrfftb_ = hrfftb_; dses1_ = ses1_; dwbgit1_ = wbgit1_; dvetg1_ = vetg1_; dsetwts_ = setwts_; dhrf_ = hrf_; ddnzfk_ = dnzfk_; ddnlfk_ = dnlfk_; didvtec_ = idvtec_; dzwini1_ = zwini1_; ddwtt_ = dwtt_; didvtes_ = idvtes_; dwtini1_ = wtini1_; dalin_ = alin_; dvrtgs1_ = vrtgs1_; dhradf5_ = hradf5_; dvhftreg_ = vhftreg_; dctos_ = ctos_; dislapgc_ = islapgc_; dwbini1_ = wbini1_; dislapgs_ = islapgs_; dsfvpes1_ = sfvpes1_; dvea1_ = vea1_; didves1_ = idves1_; dgaqd_ = gaqd_; dshaec_ = shaec_; dwbin1_ = wbin1_; dgrades1_ = grades1_; dshaes_ = shaes_; dshsgss1_ = shsgss1_; dvhsgs1_ = vhsgs1_; dgradec_ = gradec_; ddives1_ = dives1_; dgrades_ = grades_; dpimach_ = pimach_; dsfvpgc1_ = sfvpgc1_; ddzvk_ = dzvk_; dslapes1_ = slapes1_; didvgc1_ = idvgc1_; dvhaes1_ = vhaes1_; dvtses1_ = vtses1_; dhradb2_ = hradb2_; dgradgc1_ = gradgc1_; dvhsgsi_ = vhsgsi_; dshigc1_ = shigc1_; dshagss1_ = shagss1_; dwbin_ = wbin_; ddivgc1_ = divgc1_; divlapes1_ = ivlapes1_; dvhaesi_ = vhaesi_; dvtsesi_ = vtsesi_; dslapgc1_ = slapgc1_; dvhftoff_ = vhftoff_; dvhagc1_ = vhagc1_; ddnzft_ = dnzft_; dshses1_ = shses1_; ddnlft_ = dnlft_; dvtsgc1_ = vtsgc1_; divrtec_ = ivrtec_; disfvpgs1_ = isfvpgs1_; divrtes_ = ivrtes_; dtrab_ = trab_; divlapgc1_ = ivlapgc1_; dshsesi_ = shsesi_; dvhagci_ = vhagci_; dvtsgci_ = vtsgci_; dshsgc1_ = shsgc1_; dvshifti_ = vshifti_; dlfpt_ = lfpt_; digrdgs1_ = igrdgs1_; dstvpgs1_ = stvpgs1_; dshaec1_ = shaec1_; dalin1_ = alin1_; dslapgc_ = slapgc_; dshsgci_ = shsgci_; dvlapec1_ = vlapec1_; dslapgs_ = slapgs_; ddintql_ = dintql_; dshaeci_ = shaeci_; digradgc_ = igradgc_; dlfim1_ = lfim1_; dzfin1_ = zfin1_; ddzvt_ = dzvt_; digradgs_ = igradgs_; dislpec1_ = islpec1_; dzfinit_ = zfinit_; dalfk_ = alfk_; dhradb3_ = hradb3_; dzwin_ = zwin_; dshifthi_ = shifthi_; ddzwk_ = dzwk_; dzvini1_ = zvini1_; dvhsgc_ = vhsgc_; ddvtk_ = dvtk_; ddpytha_ = dpytha_; dvhsgs_ = vhsgs_; } } debian/compat0000664000000000000000000000000212263741406010373 0ustar 9 debian/libsphere-dev.docs0000664000000000000000000000002112263741406012571 0ustar spheremodule.doc