Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrf4g.core.Experiment._create_wrf4g_bundles does not work in general #17

Open
markelg opened this issue May 8, 2018 · 1 comment
Open

Comments

@markelg
Copy link
Contributor

markelg commented May 8, 2018

It packages the folders bin and lin in WRF4G_DEPLOYMENT_DIR, but in many python installations these folders are not at the same level. Also, in packages all that is in these folders, which can be the full python installation.

self._create_wrf4g_bundles( exp_sub_dir )

Replacing the code below in the try block works for me, but it is likely not generic enough.

           tar = tarfile.open( wrf4g_package, "w:gz" )
            os.chdir( WRF4G_DEPLOYMENT_DIR )
            logging.debug( "Creating '%s' package" % wrf4g_package )
            
            bin_list = [
            "bin/fortnml",
            "bin/wrf4g",
            "bin/wrf4g_autocomplete.sh",
            "bin/wrf4g_init.sh",
            "bin/wrf_launcher.sh",
            "bin/wrf_make_bin",
            "bin/wrf_util.sh",
            "bin/wrf_wrapper.py"
            ]
            
            if os.path.exists("lib/python/fortran_namelist"):
                lib_list = [
                "lib/python/fortran_namelist",
                "lib/python/wrf4g"
                ]
            else:
                lib_list = [
                "lib/python2.7/site-packages/fortran_namelist",
                "lib/python2.7/site-packages/wrf4g"
                ]
            
            [tar.add(ff) for ff in bin_list + lib_list]
@markelg markelg changed the title _create_wrf4g_bundles does not work in general wrf4g.core.Experiment._create_wrf4g_bundles does not work in general May 8, 2018
@cofinoa
Copy link
Member

cofinoa commented Jul 5, 2018

I'm postponing this for a indepth study

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants