igmk / pamtra

Passive and Active Microwave TRAnsfer model
GNU General Public License v3.0
20 stars 16 forks source link

necessity of $PAMTRA_DATADIR? #30

Open MeraX opened 4 years ago

MeraX commented 4 years ago

Hi all,

often, when I want to do simple clear-sky simulations, either zenith pointing or above the ocean, I stumble upon the PAMTRA_DATADIR environment variable. Often I end up setting os.environ['PAMTRA_DATADIR'] = ""in the beginning of my code, as I see no need for this extra data, but setting this variable is required for importing pyPamtra.

I would suggest to postpone this variable check to a later place, where the code actually requires any of the additional files. As far as I can see, PAMTRA_DATADIR is required for hongdb, db_liu, and land emissivity (land_emis_ssmi and telsem2).

So my idea would be to move the check to runPamtra and check for the variable, and perhaps also the required sub directories, if and only if there are any hong or liu particles in the descriptor file or if there are any columns over land.

What do you think?

Best Marek