atmtools / arts

The Atmospheric Radiative Transfer Simulator
https://www.radiativetransfer.org/
Other
66 stars 30 forks source link

ReadSplitARTSCAT ValueError: Type <class 'NoneType'> currently not supported. #317

Closed kvngvikram closed 3 years ago

kvngvikram commented 3 years ago

I am trying to run the exercise in arts-lectures repository. I am getting the same error for all the scripts there with the function ws.ReadSplitARTSCAT.

ValueError: Type <class 'NoneType'> currently not supported. occuring at line

# Line catalogue: Perrin or HITRAN
ws.ReadSplitARTSCAT(
    abs_species=ws.abs_species,
    basename="hitran/hitran_split_artscat5/",
    fmin=0.9 * fmin,
    fmax=1.1 * fmax,
    globalquantumnumbers="",
    localquantumnumbers="",
    ignore_missing=0,
)

I did not find any folder in both installation and data directories with the name hitran_split_artscat5, so I trid using other directories in the arts-xml-data folder by changing the basename to spectroscopy/Hitran/, spectroscopy/Perrin/, spectroscopy/cat/ and spectroscopy/Perrin_newformat_speciessplit/ but still getting the same error.

lines in .bashrc for arts

export PATH="/home/ram/installs/arts-2.4.0/build/src/:$PATH"
export ARTS_BUILD_PATH="/home/ram/installs/arts-2.4.0/build/"
export ARTS_DATA_PATH="/home/ram/installs/arts-xml-data-2.4.0/"
export ARTS_INCLUDE_PATH="/home/ram/installs/arts-2.4.0/controlfiles/"

So the issue is with my arts installation, or arts-xml-data or codes in arts-lectures ? You can check the complete error message below.

Thank you in advance.

Error output for ipython absorption.py :


- jacobianOff
- Copy
- abs_speciesSet
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-2621b86668a0> in <module>
    129
    130 if __name__ == "__main__":
--> 131     main()

<ipython-input-3-2621b86668a0> in main()
     16
     17     # Call ARTS to calculate absorption cross sections
---> 18     freq, abs_xsec = calculate_absxsec(species, pressure, temperature)
     19
     20     # Plot the results.

<ipython-input-3-2621b86668a0> in calculate_absxsec(species, pressure, temperature, fmin, fmax, fnum, lineshape, normalization, verbosity)
     85
     86     # Line catalogue: Perrin or HITRAN
---> 87     ws.ReadSplitARTSCAT(
     88         abs_species=ws.abs_species,
     89         basename="hitran/hitran_split_artscat5/",

~/anaconda3/lib/python3.8/site-packages/typhon/arts/workspace/workspace.py in __call__(self, *args, **kwargs)
    260
    261     def __call__(self, *args, **kwargs):
--> 262         self.m.call(self.ws, *args, **kwargs)
    263
    264     def __repr__(self):

~/anaconda3/lib/python3.8/site-packages/typhon/arts/workspace/methods.py in call(*args, **kwargs)
    358         ws   = args[1]
    359
--> 360         (m_id, arts_args_out, arts_args_in, temps) = self._parse_output_input_lists(ws,
    361                                                                                     args[2:],
    362                                                                                     kwargs)

~/anaconda3/lib/python3.8/site-packages/typhon/arts/workspace/methods.py in _parse_output_input_lists(self, ws, args, kwargs)
    236         g_out_types = dict([(k,WorkspaceVariable.get_group_id(g_output_args[k]))
    237                             for k in self.g_out])
--> 238         g_in_types  = dict([(k,WorkspaceVariable.get_group_id(g_input_args[k]))
    239                             for k in self.g_in])
    240         m_id = self.m_ids[0]

~/anaconda3/lib/python3.8/site-packages/typhon/arts/workspace/methods.py in <listcomp>(.0)
    236         g_out_types = dict([(k,WorkspaceVariable.get_group_id(g_output_args[k]))
    237                             for k in self.g_out])
--> 238         g_in_types  = dict([(k,WorkspaceVariable.get_group_id(g_input_args[k]))
    239                             for k in self.g_in])
    240         m_id = self.m_ids[0]

~/anaconda3/lib/python3.8/site-packages/typhon/arts/workspace/variables.py in get_group_id(value)
    189             return group_ids[type(value).__name__]
    190         else:
--> 191             raise ValueError(f"Type {type(value)} currently not supported.")
    192
    193     @classmethod

ValueError: Type <class 'NoneType'> currently not supported.

System info

olemke commented 3 years ago

The master branch is currently not compatible with ARTS 2.4. We have been working on an updated version during the current term which will be soon merged into master. Please have a look at the arts-lectures develop branch. Note that the exercises have been converted into Jupyter notebooks. If you encounter any problems, please open a new issue in the arts-lecture repository.