Opened 5 years ago
Closed 5 years ago
#657 closed task (fixed)
ucar2ropp unable to process sonPrf files
Reported by: | Ian Culverwell | Owned by: | Ian Culverwell |
---|---|---|---|
Priority: | normal | Milestone: | 10.0 |
Component: | ropp_io | Version: | 9.0 |
Keywords: | sonPrf, ucar2ropp | Cc: |
Description
Helpdesk enquiry 400 (http://www.romsaf.org/view_admin_enquiry.php?id=400) has revealed that the ROPP tool ucar2ropp cannot process 'sonPrf' files, which it claims to be able to do, because the global attributes lon
and lat
are strings rather than numbers (why?), as they are for the other file types such as atmPrf. The key lines below appear in Sec 6.6 ('Georeferencing') of ropp_io/ropp/ropp_
ropp_io/ropp/ropp_io_read_ncdf_get.f90:
CALL ncdf_getatt('lat', data%georef%lat) data%georef%units%lat = "degrees_north" CALL ncdf_getatt('lon', data%georef%lon) data%georef%units%lon = "degrees_east"
Changing these to
CALL ncdf_getatt('lat', readstr) READ(readstr, *) data%georef%lat data%georef%units%lat = "degrees_north" CALL ncdf_getatt('lon', readstr) READ(readstr, *) data%georef%lon data%georef%units%lon = "degrees_east"
allows ucar2ropp to read sonPrf files, but obviously prevents it from reading other types of file. Something that can handle both is clearly needed.
Change history (2)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The change committed at r6039 changes
INFO (from ucar2ropp): Reading file data/sonPrf_C001.2015.190.04.39.G03_2014.2860_nc FATAL ERROR (from ropp_io_read_ucardata): NetCDF: Attempt to convert between text & numbers
at ROPP9.1 to
INFO (from ucar2ropp): Reading file data/sonPrf_C001.2015.190.04.39.G03_2014.2860_nc ... (from ucar2ropp): Ensuring all profiles are in ascending height order. ... (from ropp_io_thin): Thinning method: NONE (Thinning disabled) [v3.1] INFO (from ucar2ropp): Profile 1 : BG_20150709043946_C001_G003_UCAR ... (from ucar2ropp): Latitude/Longitude : 24.33, 124.17 ... (from ucar2ropp): No. of phase/SNR samples : 0 ... (from ucar2ropp): No. of bending angle samples : 0 ... (from ucar2ropp): No. of refractivity samples : 36 ... (from ucar2ropp): No. of geophysical samples : 36 ... (from ucar2ropp): No. of surface geo. samples : 0 ... (from ucar2ropp): No. of model coeff. levels : 0 INFO (from ucar2ropp): Writing data/sonPrf_C001.2015.190.04.39.G03_2014.2860_test1.nc
at ROPP10.0. The output netCDF file looks OK. The change has no deleterious effect on an example atmPrf file. Closing ticket.
I think the function ropp_io/ncdf/ncdf_isatt.f90 should be of help here. It has an optional argument
xtype
, which returns the netCDF type of the attribute:NF90_BYTE, NF90_CHAR, NF90_SHORT, NF90_INT, NF90_FLOAT
orNF90_DOUBLE
.