NOAA-EMC / RTOFS_GLO

0 stars 1 forks source link

Improve GFS/GDAS input data checking in RTOFS analysis and forecast pre jobs (bugzilla #1138) #17

Open DanIredell-NOAA opened 2 years ago

DanIredell-NOAA commented 2 years ago

http://www2.spa.ncep.noaa.gov/bugzilla/show_bug.cgi?id=1138

Please Improve GFS/GDAS input data checking in RTOFS analysis and forecast pre jobs at next upgrade.

When tested the RTOFS analysis and forecast pre jobs with 0 bytes or short GDAS/GFS flux grib2 files, it failed to detected and used them. The jobs failed later with error message "Error message “getgb2 error = 99”".

Improved the 0 byte data input data checking before use - In ush/rtofs_atmforcing_stage.sh, use “ -z “ to check 0 byte file seems not working, suggest to use “ ! -s “ instead. Also add logic to check short grib files.

for example -

[Simon.Hsiao@m71a2 ~]$ ffile=/gpfs/dell1/nco/ops/com/gfs/test/gdas.20201117/13/gdas.t13z.sfluxgrbf002.grib2 [Simon.Hsiao@m71a2 ~]$ ls -ltrd /gpfs/dell1/nco/ops/com/gfs/test/gdas.20201117/13/gdas.t13z.sfluxgrbf002.grib2 ls: cannot access /gpfs/dell1/nco/ops/com/gfs/test/gdas.20201117/13/gdas.t13z.sfluxgrbf002.grib2: No such file or directory

[Simon.Hsiao@m71a2 ~]$ if [ -z $ffile ] || [ $ffile == 'none' ]; then echo empty or none; else echo good ; fi good

[Simon.Hsiao@m71a2 ~]$ if [ ! -s $ffile ] || [ $ffile == 'none' ]; then echo empty or none; else echo good ; fi empty or none

DanIredell-NOAA commented 11 months ago

Bugfixes branch - Changed "-z" to "! -s" so that it will fail out on zero-byte and non-existent files.

Info - "-z" check if a string is of zero length, not the file. So this test was on the string $ffile