Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release/gfsda.v16.30 updates #474

Closed
RussTreadon-NOAA opened this issue Sep 6, 2022 · 2 comments
Closed

release/gfsda.v16.30 updates #474

RussTreadon-NOAA opened this issue Sep 6, 2022 · 2 comments
Assignees

Comments

@RussTreadon-NOAA
Copy link
Contributor

RussTreadon-NOAA commented Sep 6, 2022

This issue is opened to document two updates in forked branch RussTreadon-NOAA/GSI/release/gfsda.v16.3.0:

  1. NCO requested that GFS v16.3.0 use bufr/11.7.0
  2. Tests of gsi.x compiled with -check all seg faulted in read_prepbufr.f90 due to VADWND quality control

bufr/11.7.0
The GSI references bufr routine isetprm which exercise dynamic allocation. When gsi.x is built using non-DA versions of bufr/11.5.0 or lower, the following run time message is generated

 ++++++++++++++++++++WARNING+++++++++++++++++++++
 BUFRLIB: ISETPRM - DYNAMIC MEMORY ALLOCATION IS NOT SUPPORTED FOR THIS BUILD OF BUFRLIB
 ++++++++++++++++++++WARNING+++++++++++++++++++++

bufr/11.6.0 and above include dynamic allocation in the standard modules. Tests thus far indicate that moving to bufr/11.7.0 does not alter analysis results. To build gsi.x with bufr/11.7.0, the default bufr version in modulefiles/gsi_common.lua is changed from 11.5.0 to 11.7.0. With the switch to bufr/11.7.0 the above warning message is not generated at run time.

VADWND quality control
The GFS v16.3.0 gsi.x was built with the -check all compiler option. NCO performs this test in their pre-implementation IT testing. The 2021121400 gdas was run on Cactus. gsi.x aborts in read_prepbufr.f90 when processing observation type kx=224 (VADWND) with newvad=.true.

The section in read_prepbufr.f90 which loads the cdata_all array for uv observations includes VADWND quality control.

                 !* thin new VAD wind and generate VAD superob                                                                           
                 if(kx==224.and.newvad)then
                         klev=k+5 !*average over 6 points                                                                                
                       !  klev=k    !* no average                                                                                        
                         if(klev>levs) cycle loop_readsb
                         diffuu=obsdat(5,k)-fcstdat(1,k)
                         diffvv=obsdat(6,k)-fcstdat(2,k)
                         if(sqrt(diffuu**2+diffvv**2)>10.0_r_kind) cycle loop_k_levs

Quality control tests if .true. cause program execution to jump to the top of loop_k_levs or loop_readsb. This is problematic.

The observation counter iout is incremented prior to these quality control tests. If VADWND quality control tiggers a cycle, the observation counter iout is not decremented. As a result, there are iout for which cdata_all is not loaded with actual data. In this case cdata_all(:,iout) retains the 0.0 to which the entire array was initialized. This, in turn, causes the -check all gsi.x to fail when it executes the following block later on in read_prepbufr.f90

        do k=1,ndata
           ikx=nint(cdata_out(10,k))
           itype=ictype(ikx)
           if( itype ==230 .or. itype ==231 .or. itype ==233) then
              prest=r10*exp(cdata_out(4,k))

cdata_out(10,k)=0.0 so ikx=0. Array element ictype(0) is out of bounds. Execution aborts.

A check of read_prepbufr.f90 shows that for all obstype except uv, cycle_loop_k_levs and cycle loop_readsb occur before iout is incremented. Only kx==224.and.newvad has cycle lines after iout is incremented.

The following short term patch is proposed

        do k=1,ndata
           ikx=nint(cdata_out(10,k))
           if (ikx>0) then
              itype=ictype(ikx)
           else
              itype=0
           endif
           if( itype ==230 .or. itype ==231 .or. itype ==233) then
              prest=r10*exp(cdata_out(4,k))

Tests of this patch have shown that it does not alter analysis results.

@RussTreadon-NOAA
Copy link
Contributor Author

getsigensmeanp_smooth_ncep.f90 bug

Examination of parallel output found that getsigensmeanp_smooth.x is NOT generating atmfXXX ensemble spread files. This is due to a bug reported in GSI issue #419. PR #420 merged the bug fix into develop on June 23, 2022. This bug fix did not make it into release/gfsda.v16.3.0

The one character bug fix was added to a working copy of release/gfsda.v16.3.0 getsigensmeanp_smooth_ncep.f90. The code was recompiled and run. The atmfXXX ensemble spread files were created. This fix was committed to the forked release/gfsda.v16.3.0 at 314736c.

RussTreadon-NOAA added a commit to RussTreadon-NOAA/GSI that referenced this issue Sep 7, 2022
@RussTreadon-NOAA
Copy link
Contributor Author

Close this issue with merge of PR #475 into authoritative release/gfsda.v16.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant