Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Unexpected behaviour comparing two views of the same data: pp and netcdf

Aberta
#775 3 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
data

Direção de pesquisa

Reproduza o round trip de PP-to-NetCDF descrito na issue com cf-python 3.16.2 e, em seguida, compare as identidades dos campos retornadas pelas duas leituras. Investigue se os diferentes identificadores long_name e UM devem ser preservados de forma consistente no round trip; considera-se concluído quando o comportamento for resolvido ou quando sua semântica esperada estiver claramente estabelecida.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug um/pp

Usecase: I read some pp data, and look at what I have. I then write the same data out to netcdf, and read it back in. I expect the list of cf-fields to be identical. But they are not.

ff=cf.read('myfile.pp`)
ff
[<CF Field: geopotential_height(time(40), air_pressure(9), latitude(1921), longitude(2560)) m>,
 <CF Field: id%UM_m01s30i301_vn1106(time(40), air_pressure(6), latitude(1921), longitude(2560))>,
 <CF Field: id%UM_m01s30i407_vn1106(time(40), latitude(1920), longitude(2560))>,
 <CF Field: id%UM_m01s30i408_vn1106(time(40), latitude(1920), longitude(2560))>]

compare with the same operation aftrer writing that list of fields out to a netcdf file

ff=cf.read('myfile.nc')
ff
[<CF Field: geopotential_height(time(40), air_pressure(9), latitude(1921), longitude(2560)) m>,
 <CF Field: long_name=HEAVYSIDE FN ON P LEV/UV GRID(time(40), air_pressure(6), latitude(1921), longitude(2560))>,
 <CF Field: long_name=TOTAL MOISTURE FLUX U  RHO GRID(time(40), latitude(1920), longitude(2560))>,
 <CF Field: long_name=TOTAL MOISTURE FLUX V  RHO GRID(time(40), latitude(1920), longitude(2560))>]

This is cf.__version__ = 3.16.2

From my point of view the file format should not affect the logical view of the contents. I understand there may be some historical reasons for this behaviour, but maybe they should be reviewed.

Linguagem predominante
Python
Estrelas
150
Forks
23
Merge médio
21h 29min
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de NCAS-CMS/cf-python

Todas as issues de NCAS-CMS/cf-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.