def __download(self):
        """Set download source based on user parameters"""

        # Version 4.3.1 changed the package name
        if Version(self.__version) >= Version('4.3.1'):
            pkgname = 'netcdf-c'
            tarball = 'v{0}.tar.gz'.format(self.__version)
        else:
            pkgname = 'netcdf'
            tarball = '{0}-{1}.tar.gz'.format(pkgname, self.__version)

        self.__directory_c = '{0}-{1}'.format(pkgname, self.__version)
        self.__url_c = '{0}/{1}'.format(self.__baseurl_c, tarball)
Set download source based on user parameters
hpccm/building_blocks/netcdf.py