UMR-CNRM / EPyGrAM

Enhanced Python for Graphics and Analysis of Meteorological fields
Other
14 stars 15 forks source link

Cannot read SURFGEOPOTENTIEL from AROME FA file #14

Closed SophieMbs closed 1 year ago

SophieMbs commented 1 year ago

EPyGrAM crashes when I try to read SURFGEOPOTENTIEL from AROME FA file, available here on sxgmap1 : /home/marimbordess/Bouzin/CLIM/clim_dap.eurw1s100


  File "/home/marimbordess/Bouzin/score_t2m_sophie.py", line 467, in <module>
    champmod=modepyscore.lectureparam(champtag,modelprefix,datestrmod,ech,listxp[xp],gardegrib,lverbeux=lverbeux,correctempe=correctempe,dirclim=listxp[xp].get("dirclim"))
  File "/home/marimbordess/Bouzin/modepyscore.py", line 1009, in lectureparam
    relief=frel.readfield("SURFGEOPOTENTIEL")
  File "/home/marimbordess/.local/lib/python3.10/site-packages/EPyGrAM/epygram/resources/FileResource.py", line 51, in nowopen
    return mtd(self, *args, **kwargs)
  File "/home/marimbordess/.local/lib/python3.10/site-packages/EPyGrAM/epygram/formats/FA.py", line 786, in readfield
    data, masked, masked_value = numpy.array(wfa.wfacilo(datasize,
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3,) + inhomogeneous part.```
AlexandreMary commented 1 year ago

I think this is fixed in 1.4.16 (commit ed99859e).