Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#102 closed defect (fixed)

Global/local attributes in TS files

Reported by: aclsce Owned by: rlacroix
Priority: critical Component: XIOS
Version: 2.0 Keywords: global attributes time series
Cc: rlacroix

Description

Global/local attributes defined for a file are not reported in Time Series files.
Example :

<file name="file1" output_freq="1d" timeseries="both" >

<variable id="project_id" type="string" > CMIP6/CMIP6 </variable>
<field field_ref="soce" name="soce">

...

The file "file1.nc" contains
:project_id = "CMIP6/CMIP6" ;
whereas in TS file "file1_soce.nc" there is no :
:project_id = "CMIP6/CMIP6" ;

Attachments (1)

iodef.xml (2.1 KB) - added by rlacroix 8 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by rlacroix

  • Cc rlacroix added

If I understand correctly the variables defined for a file should be copied to all the automatically generated files when timeseries are enabled. Is that correct?

comment:2 Changed 8 years ago by aclsce

Yes, that's correct.

comment:3 Changed 8 years ago by rlacroix

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r928.

comment:4 Changed 8 years ago by aclsce

  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks to the commit 928, that's ok for global attribute (variable of a file). But, variables defined for a field (which is included in a file) should be copied to all the automatically generated files containing this variable (including Time series file).
Example :

<file name="file1" timeseries="both" >
 <field field_ref="toce" name="thetao" >
     <variable name="realm" type="string" > ocean </variable>
...

The file "file1.nc" contains

float thetao(time_counter, axis_oce, y, x) ;
		thetao:realm = "ocean" ;

whereas in file "file1_thetao.nc", the variable "thetao" does not contain :

thetao:realm = "ocean" ;

as attribute of thetao variable.

comment:5 Changed 8 years ago by rlacroix

  • Owner changed from developer to rlacroix
  • Status changed from reopened to new

Ok, I will fix that shortly.

comment:6 Changed 8 years ago by rlacroix

If I use a test case similar to what you showed above, I get a strange crash (unrelated to my change in r928) with the latest revision. Can you confirm that you are not seeing this?

comment:7 Changed 8 years ago by aclsce

I tested with last revision 953 and I had no crash with my small test...only problem I mentionned above about local attributes and TS files.

comment:8 Changed 8 years ago by rlacroix

Can you try the attached xml file with test_client.exe?

As far as I can tell there is an infinite recursion somewhere but I don't understand why you are not affected.

Changed 8 years ago by rlacroix

comment:9 Changed 8 years ago by aclsce

OK, I am affected too. My small test was not the test_client (it was another one), that's why I haven't encountered a crash. I confirm that there is a crash by using the iodef.xml you attached and the test_client. It seems there is no crash if I put
<field field_ref="field_A" name="field_A" ts_enabled="false" />
but I don't know why...

comment:10 Changed 8 years ago by rlacroix

I have some ideas but I couldn't really look into it yet.

comment:11 follow-up: Changed 8 years ago by rlacroix

I was able to confirm that my intuition was correct. Currently there is a conceptual bug that might result in infinite recursion. I will commit a fix later today.

comment:12 in reply to: ↑ 11 Changed 8 years ago by rlacroix

  • Resolution set to fixed
  • Status changed from new to closed

Replying to rlacroix:

I was able to confirm that my intuition was correct. Currently there is a conceptual bug that might result in infinite recursion. I will commit a fix later today.

Fixed in r957.

But, variables defined for a field (which is included in a file) should be copied to all the automatically generated files containing this variable (including Time series file).

Fixed in r958, let's hope everything is fine this time.

comment:13 Changed 8 years ago by aclsce

I confirm that seems ok now, thanks Remi !

Note: See TracTickets for help on using tickets.