In SPHEREPACK 2.0, a single work array was transfered via a single arguement to subroutines that would break it up into several arrays as required by the subroutine. This eliminated the need for the user to specify several different work arrays and therefore simplified the subroutine interface. However, in some cases the original work array was split into work arrays of different type, i.e. real, double precision, integer and so forth. This created a standards problem that was largely overlooked by many machines. However, there exist machines that will not compile SPHEREPACK 2.0 although, to date, we have not received complaints from users. Nevertheless, to avoid problems down the road, SPHEREPACK 3.0 has been created with arguement list types that are compatible throughout.

This change has been initiated early in the life of SPHEREPACK and therefore the impact should be minimal. Indeed there is no need for current users to change to SPHEREPACK 3.0 if the current codes can be isolated from SPHEREPACK 3.0. That is, if the users codes are self-contained and not accessing a library that has the potential to be updated to SPHEREPACK 3.0. If users of SPHEREPACK 2.0 are accessing the codes from a library that is updated to SPHEREPACK 3.0, the codes will no longer run because the arguement lists between the two version are different. A detailed description of the argument list changes and the affected subroutines is provided below.

VERSION 3.0 OF SPHEREPACK CREATED TO ELIMINATE ARGUMENT TYPE CONFLICTS

A new version 3.0 of spherepack has been created to correct a problem with unsaved real, double precision, and integer work space passage. The changes made will require users to modify their calls to some spherepack routines. These modifications are critical, but very simple, and will be specified below.

In several user called subroutines of version 2.0, a real work space argument is passed to lower level subroutines where it is used as a double precision work space. In several of the graphics routines, a real work space is used as type integer. Such type conflicts are nonstandard Fortran and can cause run-time failure on some systems (e.g. SGI Power Challenge).

To correct the type conflicts, it was necessary to modify the argument lists in version 3.0 in three ways which are described in Categories A,B,C below. None of the routine names have changed. The affected subroutines are listed under each category along with an example of how to call them.

CATEGORY A

These are user called subroutines for which a double precision unsaved work space "dwork" of length "ldwork" replaces a real unsaved work space "work" of length "lwork". The affected user called subroutines are:

shaeci,shseci (in files shaec.f,shsec.f respectively)

shagci,shsgci (in files shagc.f,shsgc.f respectively)

vhaeci,vhseci (in files vhaec.f,vhsec.f respectively)

vhagci,vhsgci (in files vhagc.f,vhsgc.f respectively)

vtseci,vtsgci (in files vtsec.f,vtsgc.f respectively)

gaqd (in file gaqd.f)

shigc (in file shigc.f)

Example A:

In Version 2.0

CALL VHAGCI(NLAT,NLON,WVHAGC,LVHAGC,WORK,LWORK,IERROR)

where LWORK is at least 4*NLAT*(NLAT+1)+2 is replaced by

CALL VHAGCI(NLAT,NLON,WVHAGC,LVHAGC,DWORK,LDWORK,IERROR)

in version 3.0 of spherepack. The unsaved double precision work space DWORK has length LDWORK which is at least 2*NLAT*(NLAT+1)+1 (see documentation in file vhagc.f). The other arguments remain identical in the two versions of spherepack.

CATEGORY B

A double precision unsaved work space "DWORK" of length "LDWORK" is added to the argument list of the affected subroutines after the real unsaved work space "WORK" of length "LWORK." The value of "LWORK" remains unchanged. The affected subroutines are:

shaesi,shsesi (in files shaes.f,shses.f)

vhaesi,vhsesi (in files vhaes.f,vhses.f)

vtsesi,vtsgsi (in files vtses.f,vtsgs.f)

shigs (in file shigs.f)

helmsph (in file helmsph.f)

trssph,trvsph (in files trssph.f,trvsph.f)

testrssph,testrvsph (in files testrssph.f,testrvsph.f)

tadvec (in file tadvec.f)

Example B:

In version 2.0

CALL VHSESI(NLAT,NLON,WVHAGC,LVHAGC,WORK,LWORK,IERROR)

is replaced by

CALL VHSESI(NLAT,NLON,WVHAGC,LVHAGC,WORK,LWORK,DWORK,LDWORK,IERROR)

by adding the two new arguments DWORK and LDWORK in version 3.0. In this case, the length of the unsaved double precision work space DWORK in LDWORK must be at least 2*(NLAT+1) words long in the routine calling VHSESI (see documentation for VHSESI in file vhses.f). The minimum length of WORK in LWORK remains the same in versions 2.0 and 3.0 of spherepack.

CATEGORY C

The following graphics routines in spherepack had a type integer work space "IWORK" added to their arguement list after the real work space "WORK."

visgeo (in file visgeo.f)

visequ (in file visequ.f)

visgau(in file visgau.f)

vsurf (in file vsurf.f)

Example C:

In version 2.0, a call to

SUBROUTINE VISGEO (M,IDP,JDP,X,Y,Z,H,EYER,EYELAT,EYELON,WORK,IERROR)

is replaced by the call

SUBROUTINE VISGEO (M,IDP,JDP,X,Y,Z,H,EYER,EYELAT,EYELON,WORK,IWORK,IERROR)

The required lengths for the real unsaved work space "WORK" and integer unsaved work space "IWORK" are described in the documentation which is in file visgeo.f.

Return to the spherepack 3.0 web site