ValueError : nlat must be even

Issue #38 resolved
ashwin .D created an issue

Hello,

‌ Newbie just starting to work with SHTNS Python. I have the following combination for my latitude and longitude - 73 and 144. I am using atmospheric reanalysis data and that is the dimension of data that is provided by NOAA. When I use the SHTNS API I get this error - I want to know if this is a show stopper or not ?

  File "/home/winash12/MetPyProject/opendap/7thApril/26thSeptember/pyspecharm.py", line 21, in __init__
    self._shtns.set_grid(nlats,nlons,shtns.sht_reg_dct|shtns.SHT_PHI_CONTIGUOUS,1.e-10)
  File "/usr/local/lib/python3.8/dist-packages/shtns.py", line 146, in set_grid
    val = _shtns.sht_set_grid(self, nlat, nphi, flags, polar_opt, nl_order)
ValueError: arg #1 : nlat must be even

Comments (1)

  1. Nathanaël Schaeffer repo owner

    fixed in v3.5 : odd nlat is now supported, although with significantly lower performance than even nlat.

  2. Log in to comment