Skip to content
Snippets Groups Projects
Commit 9e5219b2 authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

separate clwc and ciwc

parent 7271b6fa
No related branches found
No related tags found
No related merge requests found
...@@ -1572,9 +1572,10 @@ class EcFlexpart(object): ...@@ -1572,9 +1572,10 @@ class EcFlexpart(object):
# which are used to seperate the grib fields to, # which are used to seperate the grib fields to,
# for the Fortran program input # for the Fortran program input
# 10: U,V | 11: T | 12: lnsp | 13: D | 16: sfc fields # 10: U,V | 11: T | 12: lnsp | 13: D | 16: sfc fields
# 17: Q | 18: Q, SL, GG| 19: omega | 21: etadot | 22: clwc+ciwc # 17: Q | 18: Q, SL, GG| 19: omega | 21: etadot | 22: clwc | 23: ciwc
fdict = {'10':None, '11':None, '12':None, '13':None, '16':None, fdict = {'10':None, '11':None, '12':None, '13':None, '16':None,
'17':None, '18':None, '19':None, '21':None, '22':None} '17':None, '18':None, '19':None, '21':None, '22':None,
'23':None}
iid = None iid = None
index_vals = None index_vals = None
...@@ -1679,16 +1680,10 @@ class EcFlexpart(object): ...@@ -1679,16 +1680,10 @@ class EcFlexpart(object):
codes_write(gid, fdict['12']) codes_write(gid, fdict['12'])
elif paramId == 155 and gridtype == 'sh': # D elif paramId == 155 and gridtype == 'sh': # D
codes_write(gid, fdict['13']) codes_write(gid, fdict['13'])
elif paramId == 246 or paramId == 247: # CLWC, CIWC elif paramId == 246: # CLWC
# sum cloud liquid water and ice codes_write(gid, fdict['22'])
if scwc is None: elif paramId == 247: # CIWC
scwc = codes_get_values(gid) codes_write(gid, fdict['23'])
else:
scwc += codes_get_values(gid)
codes_set_values(gid, scwc)
codes_set(gid, 'paramId', 201031)
codes_write(gid, fdict['22'])
scwc = None
# @WRF # @WRF
# THIS IS NOT YET CORRECTLY IMPLEMENTED !!! # THIS IS NOT YET CORRECTLY IMPLEMENTED !!!
# #
...@@ -1792,7 +1787,7 @@ class EcFlexpart(object): ...@@ -1792,7 +1787,7 @@ class EcFlexpart(object):
if not c.cwc: if not c.cwc:
flist = ['fort.15', fluxfile, 'fort.16', orolsm] flist = ['fort.15', fluxfile, 'fort.16', orolsm]
else: else:
flist = ['fort.15', 'fort.22', fluxfile, 'fort.16', orolsm] flist = ['fort.15', 'fort.22', 'fort.23', fluxfile, 'fort.16', orolsm]
with open(fnout, 'wb') as fout: with open(fnout, 'wb') as fout:
for f in flist: for f in flist:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment