Opened 8 years ago

Closed 8 years ago

#713 closed defect (Fixed)

Important: corrected long_name attribute for obs_type

Reported by: arango Owned by: arango
Priority: major Milestone: Matlab Processing Scripts
Component: Matlab Version: 3.7
Keywords: Cc:

Description

The is a typo in line 364 of 4dvar/c_observations.m for the 4D-Var long name attribute for obs_type. We have long instead of long_name attribute. We need to have instead:

Var.name          = Vname.type;
Var.type          = nc_constant('nc_int');
Var.dimid         = [did.datum];
Var.long_name     = 'model state variable associated with observations';
Var.flag_values   = S.state_flag_values;
Var.flag_meanings = S.state_flag_meanings;
[~,status]=nc_vdef(ncid,Var);
if (status ~= 0), return, end,
clear Var

There is an easy way to correct this in 4D-Var observations NetCDF file by using Matlab repository nc_attdel and nc_attadd functions:

>> ncfile='my_obsfile.nc';
>> Avalue='model state variable associated with observation';
>> nc_attdel(ncfile, 'long', 'obs_type');
>> nc_attadd(ncfile, 'long_name', Avalue, 'obs_type');

It deletes the long attribute for obs_type and adds the long_name attribute for obs_type.

I corrected this long time ago but I forgot to load correction to the repository. Many thanks to Chris Edwards for bringing this to my attention.

Change History (1)

comment:1 by arango, 8 years ago

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.