{"action":"created","issue":{"url":"https://api.github.com/repos/geodynamics/aspect/issues/983","repository_url":"https://api.github.com/repos/geodynamics/aspect","labels_url":"https://api.github.com/repos/geodynamics/aspect/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/geodynamics/aspect/issues/983/comments","events_url":"https://api.github.com/repos/geodynamics/aspect/issues/983/events","html_url":"https://github.com/geodynamics/aspect/issues/983","id":162346099,"number":983,"title":"S40RTS data directory assumes \"/\" at end","user":{"login":"tjhei","id":1531285,"avatar_url":"https://avatars.githubusercontent.com/u/1531285?v=3","gravatar_id":"","url":"https://api.github.com/users/tjhei","html_url":"https://github.com/tjhei","followers_url":"https://api.github.com/users/tjhei/followers","following_url":"https://api.github.com/users/tjhei/following{/other_user}","gists_url":"https://api.github.com/users/tjhei/gists{/gist_id}","starred_url":"https://api.github.com/users/tjhei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjhei/subscriptions","organizations_url":"https://api.github.com/users/tjhei/orgs","repos_url":"https://api.github.com/users/tjhei/repos","events_url":"https://api.github.com/users/tjhei/events{/privacy}","received_events_url":"https://api.github.com/users/tjhei/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/geodynamics/aspect/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/geodynamics/aspect/labels/starter%20project","name":"starter project","color":"1d76db"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-26T20:39:19Z","updated_at":"2016-06-28T03:53:23Z","closed_at":null,"body":" just add it if it is not there. @bjs2 "},"comment":{"url":"https://api.github.com/repos/geodynamics/aspect/issues/comments/228941510","html_url":"https://github.com/geodynamics/aspect/issues/983#issuecomment-228941510","issue_url":"https://api.github.com/repos/geodynamics/aspect/issues/983","id":228941510,"user":{"login":"bangerth","id":7504421,"avatar_url":"https://avatars.githubusercontent.com/u/7504421?v=3","gravatar_id":"","url":"https://api.github.com/users/bangerth","html_url":"https://github.com/bangerth","followers_url":"https://api.github.com/users/bangerth/followers","following_url":"https://api.github.com/users/bangerth/following{/other_user}","gists_url":"https://api.github.com/users/bangerth/gists{/gist_id}","starred_url":"https://api.github.com/users/bangerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangerth/subscriptions","organizations_url":"https://api.github.com/users/bangerth/orgs","repos_url":"https://api.github.com/users/bangerth/repos","events_url":"https://api.github.com/users/bangerth/events{/privacy}","received_events_url":"https://api.github.com/users/bangerth/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T03:53:23Z","updated_at":"2016-06-28T03:53:23Z","body":"The issue is in S40RTS.cc, line 161:\r\n```\r\nspherical_harmonics_lookup\r\n  .reset(new internal::S40RTS::SphericalHarmonicsLookup(datadirectory+harmonics_coeffs_file_name,\r\n                                                                                               this->get_mpi_communicator()));\r\n```\r\nFor this to work, `datadirectory` needs to be terminated with a slash. The default value of the corresponding parameter is in fact so terminated, but that need not be so if the user does not provide a slash at the end of a user-specified directory, because we have this code in line 363:\r\n```\r\n          datadirectory = Utilities::replace_in_string(prm.get (\"Data directory\"),\r\n                                                       \"$ASPECT_SOURCE_DIR\",\r\n                                                       ASPECT_SOURCE_DIR);\r\n```\r\nThis just need the extra statement\r\n```\r\n  if ((datadirectory.size()>0) && (datadirectory[data_directory.size()-1] != '/'))\r\n    datadirectory += \"/\";\r\n```\r\n\r\nBonus points if you rename `datadirectory` to `data_directory`. Extra bonus points if you check whether the same problem exists in the `SAVANI.cc` file."}}
{"actor":{"display_login":"bangerth"}}