Opened 7 years ago

Closed 7 years ago

#495 closed defect (fixed)

Modify ropp_io_read_ncdf_get.f90 so that ucar2ropp can read atmPhs MTPA files.

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: 9.1
Component: ropp_io Version: 9.0
Keywords: UCAR, MTPA Cc:

Description

ucar2ropp currently fails to read atmPhs.MTPA*_nc files because the 'xmdl' ("PhaseLoop Open Model") is missing from the file. This results in

/data/users/idculv/ROPP/ifort/bin/ucar2ropp  data/atmPhs_MTPA.2017.001.00.04.G29_2016.0120_nc  -o data/atmPhs_MTPA.2017.001.00.04.G29_2016.0120_ropp.nc  -d

---------------------------------------------------------------------
                  UCAR to ROPP netCDF Converter
---------------------------------------------------------------------

INFO (from ucar2ropp):  Reading file data/atmPhs_MTPA.2017.001.00.04.G29_2016.0120_nc
ERROR: Variable not found: xmdl

According to http://cdaac-www.cosmic.ucar.edu/cdaac/cgi_bin/fileFormats.cgi?type=atmPhs this variable should be present, but that's life.

We should enable ROPP to read existing atmPhs.MTPA*_nc files, even if we can persuade CDAAC to include xmdl in more recent ones. One possible solution, as done at DMI, is outlined in r5016.

Helpdesk enq 333 shows that at least one user has had a problem with this.

Attachments (3)

test1.sh (2.1 KB ) - added by Ian Culverwell 7 years ago.
test1.sh
atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.out (4.6 KB ) - added by Ian Culverwell 7 years ago.
atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.out
atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.png (41.3 KB ) - added by Ian Culverwell 7 years ago.
atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.png

Download all attachments as: .zip

Change history (9)

comment:1 by Ian Culverwell, 7 years ago

Milestone: 10.09.1

comment:2 by Ian Culverwell, 7 years ago

There are two aspects to this: reading in xmdldd instead of xmdl if the GRAS data come from CDAAC, and some changes (based on those in r5016) to make sure such data undergo the 'COSMIC' preprocessing rather than the 'EUMETSAT' preprocessing. There are also quite a few overlaps with the changes needed by the GNOS data processing (see #488), which will have to merged in eventually, so do some of that now.

First attempt committed at r5520. ROPP builds and runs OK on it; more testing needed.

comment:3 by Ian Culverwell, 7 years ago

r5521 allows ropp_pp/preprocess/ropp_pp_preprocess.f90 to process Metop data from 'DMI' as well as 'EUM'. This is the case for occ*nc date from the ROM SAF website - although it probably won't work anyway. For example, occ20160608_235011_M01_2260600399_N0023_XXXX.nc causes the code to hang or crash, depending on the compiler. Eventually this was traced to a floating point overflow in ropp_pp/bangle/ropp_pp_bangle_go.f90:

  ! 3.4 Spline interpolation at each time point to obtain excess phase trend

  DO ic = 1,nc
     CALL ropp_pp_init_spline(trs, b(ic,:), d(ic,:))

     DO i=1,npoints
        CALL ropp_pp_interpol_spline(trs, b(ic,:), d(ic,:), time(i), &
                                       ST(ic,i), DST(ic,i))
        ST(ic,i) = EXP(ST(IC,i)) + S0(IC)          ! Trend of excess phase
     ENDDO
   ENDDO

produces, with ifort

 342a i           6
 time(i) =    95.2953970000000     
 ST(ic,i) =    1700.78835879385     
 EXP(ST(ic,i)) =  Infinity               
 DST(ic,i) =    2522.44196200222     

and, with nagfor52

 342a i           6
 time(i) =   95.2953969999999941
 ST(ic,i) =    1.7007883587938445E+03

and a segmentation fault. This can of worms doesn't need to be opened now. (Note that r5521 just allows some pre-preprocessing of occ*nc Metop data, and not applying it does not prevent this crash.)

comment:4 by Ian Culverwell, 7 years ago

Running atmPhs_MTPA.2017.001.00.04.G29_2016.0120_nc through ROPP9.0 with the attached script test1.sh produces

ERROR: Variable not found: xmdl
 
FATAL ERROR (from ropp_io_read_ucardata):  NetCDF: Variable not found

ROPP9.1's ucar2ropp generates a valid ROPP-format netCDF file, which can then be successfully passed through ropp_pp_occ_tool. See the attached atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.out log file. Note the correct diagnostic information:

INFO (from ropp_pp_preprocess):  COSMIC data preprocessing
INFO (from ropp_pp_preprocess):  Reading lost carrier flag data from input file
INFO (from ropp_pp_preprocess):  No external NDM data read
INFO (from ropp_pp_preprocess):  GRAS data: openloop preprocessing

The output looks OK too: atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.png.

by Ian Culverwell, 7 years ago

Attachment: test1.sh added

test1.sh

by Ian Culverwell, 7 years ago

atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.out

by Ian Culverwell, 7 years ago

atmPhs_MTPA.2017.001.00.04.G29_2016.0120_test1.png

comment:5 by Ian Culverwell, 7 years ago

Running test1.sh shows that these changes correctly make no difference when applied to the UCAR-generated COSMIC dataset atmPhs_C001.2017.001.14.15.G08_0001.0001_nc. Nor do they have any effect on the ROM-SAF-generated Metop dataset occ20160608_235011_M01_2260600399_N0023_XXXX.nc - ROPP9.0 and ROPP9.1 both hang/crash, as explained above.

comment:6 by Ian Culverwell, 7 years ago

Resolution: fixed
Status: newclosed

I think that's probably good enough for now. Closing ticket.

Note: See TracTickets for help on using tickets.