Opened 5 years ago
Last modified 4 years ago
#48 assigned defect
Coherence of the "long_name"/"title" attribute in the utilitary programs
Reported by: | abierjon | Owned by: | abierjon |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | MARS GCM | Version: | |
Keywords: | Cc: |
Description
Some utilitary programs (like zrecast) rewrite the netcdf variables with a "long_name" attribute instead of a "title" attribute, which can lead to the loss of this attribute when using the utilitary programs successively.
One should define only one name for this attribute for all the utilitary programs, so that it is conserved throughout any post-analysis process.
Change History (5)
comment:1 Changed 5 years ago by
Owner: | set to abierjon |
---|---|
Status: | new → assigned |
comment:2 Changed 5 years ago by
Nota Bene: Mess with Ferret when putting "pseudo-alt" in the altitude "long_name" attribute (and not when it's a "title" attribute"), Ferret considering this as an invalid altitude axis.
comment:3 Changed 4 years ago by
Typical modification should be :
ierr = nf_get_att_text(nid,var,'title',title)
Replaced by :
ierr = nf_get_att_text(nid,var,'long_name',long_name)
if (ierr.ne.nf_noerr) then
! if no attribute 'long_name', try 'title'
ierr = nf_get_att_text(nid,var,'title',long_name)
endif
Following POULDP 23/04/2020, it is decided to progressively shift the utilitary programs (as well as the writediagfi routine of the GCM) towards the NetCDF Climate and Forecast (CF) Conventions, which push for the utilization of a "long_name" attribute for the netcdf variables, while the attribute "title" must be restricted only as a global attribute for the netcdf file itself.
However, the retrocompatibility with old simulation files/GCM versions must be ensured, hence one must add in the utilitary programs the possibility to look for a "title" attribute when a "long_name" attribute is not found.