Opened 9 years ago

Closed 8 years ago

#431 closed enhancement (fixed)

Updates to the EUM data reader and writer

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: 9.0
Component: ropp_io Version: 8.0
Keywords: Cc:

Description

Two points have emerged from discussions with Axel.

  1. Allow single level lev1b r_leo etc

by replacing

    IF (getbufr) THEN

in Sec 9.6 of SUBROUTINE ropp_io_read_eumdata(DATA, file, resolution, getlevel1a, getbufr) in ropp_io_read_ncdf_get.f90 with

   IF (.NOT. getlevel1a) THEN

See attached, and #429.

  1. Add time_offset (wrt start time) to time in Sec 1.7.1 of ropp_io_read_ncdf_put.f90 by changing
      CALL ncdf_putvar('time', time, rec = irec)
    

to

  CALL ncdf_putvar('time', time+data%georef%time_offset, rec = irec)

Also attached.

Attachments (7)

ropp_io_read_ncdf_get.f90.17062015 (129.5 KB ) - added by Ian Culverwell 9 years ago.
ropp_io_read_ncdf_get.f90.17062015
ropp_io_write_ncdf_put.f90.17062015 (45.1 KB ) - added by Ian Culverwell 9 years ago.
ropp_io_write_ncdf_put.f90.17062015
ropp_io_write_ncdf_put.f90.18062015 (45.2 KB ) - added by Ian Culverwell 9 years ago.
ropp_io_write_ncdf_put.f90.18062015
ropp_io_read_ncdf_get.f90.16072015 (129.7 KB ) - added by Ian Culverwell 9 years ago.
ropp_io_read_ncdf_get.f90.16072015
eum_io.pdf (107.9 KB ) - added by Ian Culverwell 9 years ago.
eum_io.pdf
bufr-fixes.patch.30062016 (12.1 KB ) - added by Ian Culverwell 8 years ago.
bufr-fixes.patch.30062016
ropp_io_read_ncdf_get.f90.30062016 (124.3 KB ) - added by Ian Culverwell 8 years ago.
ropp_io_read_ncdf_get.f90.30062016

Download all attachments as: .zip

Change history (28)

by Ian Culverwell, 9 years ago

ropp_io_read_ncdf_get.f90.17062015

by Ian Culverwell, 9 years ago

ropp_io_write_ncdf_put.f90.17062015

comment:1 by Ian Culverwell, 9 years ago

Component: ROPP (all)ropp_io
Summary: Updates to the EUM data readerUpdates to the EUM data reader and writer

comment:2 by Ian Culverwell, 9 years ago

Safer version of ropp_io_write_ncdf_put.f90, provided by Axel, is attached.

by Ian Culverwell, 9 years ago

ropp_io_write_ncdf_put.f90.18062015

comment:3 by Ian Culverwell, 9 years ago

Latest version includes an update, which, according to AvE,

first, yet another update to the above routine, I am 
now also checking the environment variable to set the 
data as either offline or NRT. Came out of a document I 
had to write where we identify the BUFR to netCDF 
variable mapping.

We have the inclusion of a block

  ! NRT of offline data
  CALL ncdf_getatt('environment', readstr)
  IF ( readstr /= 'Operational' ) data%PCD = IBSET(data%PCD, PCD_offline)

in Sec 9.4 of subroutine ropp_io_read_eumdata.

by Ian Culverwell, 9 years ago

ropp_io_read_ncdf_get.f90.16072015

comment:4 by Ian Culverwell, 9 years ago

Following discussions between Stig (see #433) and Axel, we have agreed on the following solution:

  • The getlev1a option to be encoded as a character, rather than a logical as at present, which can take the following values:
    • cl, provided 'level1a/closed_loop/dtime' exists;
    • cl+rs, provided 'level1a/closed_loop/dtime' exists and '/quality/rs_data_available' = 1 and 'level1a/raw_sampling/dtime' exists;
    • cl+ol, provided 'level1a/closed_loop/dtime' exists and '/quality/ol_data_available' = 1 and 'level1a/open_loop/dtime' exists;
    • none, the default, which, like all the other options, puts the single reference r_leo etc into GEOtype (under ROprof)
  • (Actually, it may be preferable to remove none, since it's the default. To be decided.)
  • Ensure that eum2bufr and ropp2bufr take these nominal reference values from the GEOtype substructure.
  • Update ropp2bufr to convert positions and velocities to ECF coordinates when they are given in ECI coords.
  • Probably best to set data%georef%time_offset = 0, in anticipation of the adoption of the updated BUFR definition. (This implies that the BUFR doc also needs updating.)

by Ian Culverwell, 9 years ago

Attachment: eum_io.pdf added

eum_io.pdf

comment:5 by Ian Culverwell, 9 years ago

Suggested improvements to the EUM data readers for ROPP9.0 are in the attached file https://trac.romsaf.org/ropp/attachment/ticket/431/eum_io.pdf. For discussion between Axel and Stig.

comment:6 by Ian Culverwell, 9 years ago

Point 5 of the above (setting PCD_offline if environment}} /= {{{Operational) done at r4793.

This increases pcd of the standard output file from 21 to 23 (correctly: PCD_offline is bit 1, with a value of 21=2), and therefore that reference file needs updating too.

comment:7 by Ian Culverwell, 9 years ago

One further amendment is needed: to read the GNSS identifier from the satellite_prn attribute of the /data/transmitter/satellite group. This will, in future, discriminate between GPS, GLONASS, Galileo, Beidou, ... GNSSs. (Currently, eum2ropp assumes that all data come from GPS, so that all gns_ids are automatically 'G??'.)

comment:8 by Ian Culverwell, 9 years ago

Code changes made at r4817.

comment:9 by Ian Culverwell, 9 years ago

While we're at it, update the ROPP8.0 IO UG to reflect the pssible new GNSS constelltions and their satellite IDs. Commit these changes at r4818.

comment:10 by Ian Culverwell, 9 years ago

(I mean ROPP9.0 IO UG, of course.)

comment:11 by Ian Culverwell, 9 years ago

Do the same thing with UCAR input at r4819.

comment:12 by Ian Culverwell, 9 years ago

And same again with GFZ input at r4826.

comment:13 by Ian Culverwell, 9 years ago

The introduction of a new locations (namely, rodata%{leo,gns}_pod%{pos,vel} for the 'reference' POD data, as well as the removal of the now-redundant -b option, have been made at r4857. (See also #452.)

comment:14 by Ian Culverwell, 8 years ago

Stig has also requested that the PCD_open_loop bit be set according to the value of /quality/ol_data_used, rather than the request and existence of ol or rs data. This has been done at r4951. Checks out OK on GRAS_1B_M02_20150224222321Z_20150224222513Z_N_T_20150225003759Z_G09_NN.nc (ie it no longer sets PCD_open_loop, because this file doesn't contain /quality/ol_data_used. Doesn't affect the 'make tests' because the example dataset doesn't have raw sampling data anyway.

comment:15 by Ian Culverwell, 8 years ago

After reflection, I think perhaps we should leave the data%georef%time_offset business alone. It's more of a responsibility of the data providers than of the data processors. Stig agrees.

comment:16 by Ian Culverwell, 8 years ago

Christian Marquardt (EUM) has added the latest (30/6/2016) set of ropp_io_read_ncdf_get.f90 changes (attached).

comment:17 by Ian Culverwell, 8 years ago

A patch describing these changes and some relating to #470 is also attached (bufr-fixes.patch.30062016).

by Ian Culverwell, 8 years ago

Attachment: bufr-fixes.patch.30062016 added

bufr-fixes.patch.30062016

by Ian Culverwell, 8 years ago

ropp_io_read_ncdf_get.f90.30062016

comment:18 by Ian Culverwell, 8 years ago

According to CM's latest version, we should be setting PCD_offline unless the global attribute environment is either Operational or Validation.

This change tests OK, so commit at r4993.

comment:19 by Ian Culverwell, 8 years ago

There are also some changes to the software_version global attribute - namely, to use the last digit of the fractional part (mmm) to indicate the bending angle processing method in case of bufr encoding.

Problem: we effectively always use BUFR encoding now, so what to do about the lines that say

    IF (getbufr) THEN      
      SELECT CASE (TRIM(data%bangle_method))
        CASE ("FSI")
          readint3 = 1
        CASE ("GO")
          readint3 = 0
        CASE DEFAULT
          readint3 = 9
      END SELECT
      WRITE(data%software_version, '("v",i2.2,".",i2.2,i1)') readint, readint2, readint3
    ELSE
      WRITE(data%software_version, '("v",i2.2,".",i2.2)') readint, readint2
    ENDIF

getbufr doesn't exist any longer, so I suggest replacing

    IF (getbufr) THEN

by

    IF ( TRIM(ADJUSTL(getlevel1a)) == 'none' ) THEN

(ie, we don't want any lev1a data in the file at all, which is sort of the same thing). But why make the distinction at all? Ask Chris M.

comment:20 by Ian Culverwell, 8 years ago

He's not bothered. (He didn't know we had done away with the getbufr option at ROPP9.0.) Agreed with him to always write the 'augmented' software_version, and to add bangle_method to processing_software, thus:

  WRITE(data%software_version, '("v",i2.2,".",i2.2,i1)') readint, readint2, readint3 
 
  data%processing_software = TRIM(readstr)  // ' ' // & 
                             TRIM(readstr2) // ' ' // & 
                             TRIM(data%bangle_method)

Do this at r4997.

comment:21 by Ian Culverwell, 8 years ago

Resolution: fixed
Status: newclosed

Lots of work on this, which checks out fine in the test folder. Closing ticket.

Note: See TracTickets for help on using tickets.