Opened 16 years ago

Closed 16 years ago

#151 closed defect (fixed)

Testing additional variable behaviour with multifiles

Reported by: Huw Lewis Owned by: Huw Lewis
Priority: normal Milestone: 2.0
Component: ROPP (all) Version: 2.0beta
Keywords: Cc:

Description

Axel identified problem with reading/writing additional variables (i.e. non core variables) with multifiles.

If '-m' flag is not set then ropp_io_write complains about trying to write a netCDF variable already in use. Using ropp2ropp with the '-m flag' output the additional variables, but the data of the first profile are simply copied to all profiles.

Need to investigate this behaviour, and find a fix.

Change history (1)

comment:1 by Huw Lewis, 16 years ago

Resolution: fixed
Status: newclosed

See [1936].

Problem: If using '-m' flag, output file is written ok but data from first profile in a multifile would be copied to all profiles in the output file. Solution: Reset ncdf_read() for each variable in the input every time a profile is read. This ensures that 'non-core' variables are all set as unread for each profile (and the vlist structure is filled with new data from subsequent profiles in a multifile).

Problem: If omitting '-m' flag, netCDF causes an error on writing to the second profile file. Solution: Initialise the vlist structure for each profile. In the initial implementation, the vlist structure would be added to for subsequent profiles in a multifile, so on defining the (signle) output files, more than one element of the current vlist structure would have the same variable name. NetCDF cannot define 2 variables with the same name (and we don't want to write more than one profile worth of data into single output files in any case).

Ticket closed as fixed.

Note: See TracTickets for help on using tickets.