Opened 3 years ago

Last modified 3 years ago

#276 new

Fix bug in the code used in updating satellite bias coefficients

Reported by: Jin Lee Owned by: Jin Lee
Priority: major Component: ACCESS model
Keywords: satellite radiance bias coefficients APS2 Cc: Vinod Kumar, Chris Tingwell, jfl548


A possible bug was discovered while running the set of scripts and executables used in updating bias coefficients for satellite radiances. The installation directory of the the code is,


And its corresponding repository location is,

Change History (3)

comment:1 Changed 3 years ago by Jin Lee

"input.lst" I used has following,


au-aa427 generated Bstats files for both MetOp-1 and MetOp-2. Because of the line, "IASI_SatList=!MetOp2" the final bias coefficients file ("biasdata" file) should contain MetOp-2 coefficients. But instead the resulting biasdata file contains MetOp-1 coefficents.

To demonstrate this bug the following list file is used,


The old and final bias coefficients files are under,


comment:2 Changed 3 years ago by Jin Lee

I copied the location given above and created a personal branch in which I'm putting my change,

comment:3 Changed 3 years ago by Jin Lee

It turned out the incorrect behaviour is a consequence of the maxmimum number of satellites carrying the IASI instrument being fixed to 1 in "src/iasi/mod_iasi_bstat.f90". This is now changeded to,

 integer, parameter :: Nsats  = 2        ! IMPORTANT - change if satellites area added or removed

Despite this change there is still a problem with the code. For example, suppose the coefficients file (e.g. "IASI_biasdata") contains coefficients for 1 satellite and you request the coefficients for 1 satellite to be updated. Then the code will not updated the coefficients for that requested satellite. The problem is that in "src/iasi/mod_iasi_bstat.f90" there are following lines,

       if (is /= Nsats) then

If the index of satellite read in is less than the maximum number expected then the code will try to read an unused line in the coefficients file and then move onto reading the next satellite from the coefficients file. Since there is only 1 set of coefficients and the Fortran read above tries to read past the end of the file the code hangs. Permanent fix should be put in.

I updated both the copy under the installation directory,


and its corresponding repository copy,

Note: See TracTickets for help on using tickets.