Skip to content

Commit d476482

Browse files
authored
Merge pull request #143 from arulalant/master
Fixed TIGGE : OLR negative sign bug
2 parents 5ce0b60 + f0bd8fd commit d476482

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

bsubScripts/ncumeps_global_post/ncumeps_global_vsdb_anl.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ localTable_relative_dir="$DIR/../../tables/local/ncmr/v1/"
2020
localTable_absolute_dir="$( cd "$localTable_relative_dir" && pwd )"
2121
localTable=$localTable_absolute_dir/ncmr_grib2_local_table
2222

23-
export UMRIDER_STARTDATE=20160920
23+
2424
export GRIB2TABLE=$localTable
2525
echo "export GRIB2TABLE="$GRIB2TABLE
2626

bsubScripts/ncumeps_global_tigge/ncumeps_global_tigge_2ds1_fcst_00Z.bash

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#BSUB -x # exclusive mode
99
#BSUB -R span[ptile=16] # task per node
1010
#BSUB -q ensemble # queue
11-
#BSUB -L /bin/bash
1211
#BSUB -e /gpfs3/home/umeps/UMRiderLogs/tigge/bsub/um2grb2.tig2d1.err.%J.%I.hybrid # error file name in which %J is replaced by the job ID
1312
#BSUB -o /gpfs3/home/umeps/UMRiderLogs/tigge/bsub/um2grb2.tig2d1.out.%J.%I.hybrid # output file name in which %J is replaced by the job ID
1413

bsubScripts/ncumeps_global_tigge/tigge_create_tarball_g2files.py

+11-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
## Arulalan.T
1515
## 04-Mar-2016.
1616

17-
import os, subprocess, datetime, getopt, sys, glob
17+
import os, subprocess, datetime, getopt, sys, glob, time
1818

1919
pbzip2 = '/gpfs1/home/Libs/GNU/ZIPUTIL/pbzip2'
2020
pigz = '/gpfs1/home/Libs/GNU/ZIPUTIL/pigz'
@@ -84,15 +84,16 @@ def createTarBalls(path, today, member):
8484
print "gzip_cmd = ", gzip_cmd
8585
subprocess.call(gzip_cmd, shell=True)
8686
time.sleep(5)
87-
88-
# remove yesterday directory!!!
89-
yDayPath = os.path.join(path, '../../%s' % yDay)
90-
if os.path.exists(yDayPath):
91-
cmd = "rm -rf %s" % yDayPath
92-
print cmd
93-
subprocess.call(cmd, shell=True)
94-
# end of if os.path.exists(yDayPath):
95-
87+
print os.getcwd(), member
88+
if member == '000':
89+
# remove today directory!!!
90+
print "path", path
91+
if os.path.exists(path):
92+
cmd = "rm -rf %s" % path
93+
print cmd
94+
subprocess.call(cmd, shell=True)
95+
# end of if os.path.exists(yDayPath):
96+
# end of if member == '000':
9697
os.chdir(cdir)
9798
# end of def createTarBalls(path, today, ...):
9899

g2utils/um2grb2tigge.py

+10
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,16 @@ def packEnsembles(arg, **kwarg):
20592059
print regdCube.data.min(), regdCube.data.max()
20602060
# end of if varName.endswith('_flux'):
20612061

2062+
if (varName, varSTASH) == ('toa_outgoing_longwave_flux', 'm01s02i205'):
2063+
# https://software.ecmwf.int/wiki/display/TIGGE/Rules+for+data+encoding+and+exchange
2064+
# as per the tigge statndard, The flux sign convention will be positive downwards.
2065+
# So, here toa-olr shoule be negative, but ncum model just gives the magnitude. So
2066+
# lets fix this by ourself.
2067+
if regdCube.data.max() > 0 and regdCube.data.min() > 0:
2068+
# convert to negative if only this data sign is positive.
2069+
regdCube.data *= -1 # multiply with -1 to indicate this is upward flux.
2070+
# end of if (varName, varSTASH) == ('toa_outgoing_longwave_flux', 'm01s02i205'):
2071+
20622072
if (varName, varSTASH) in _precipVars_:
20632073
# Since we are not using 'mask' option for extrapolate while
20642074
# doing linear regrid, which bring -ve values after regrid in

0 commit comments

Comments
 (0)