Commit 1c9897e9 authored by Kennedy, Joseph H's avatar Kennedy, Joseph H
Browse files

Provide data for clouds extension MWE

The necessary data files have been added to the LEX data directory for the
clouds extension to provide a full minimal working example on any machine.
Additionally, the config file and plotting modules have been updated to
reflect this change.

Fixes #17
parent e788d578
......@@ -10,15 +10,12 @@ from livvkit.util import elements as el
describe = """CESM_cldhgh_ANN plot."""
def make_plot(config=None, out_path='.',
cloud_path='/lustre/atlas1/cli115/world-shared/4ue/obs_data/',
cism_path='/lustre/atlas1/cli115/world-shared/4ue/',
cesm_path='/lustre/atlas1/cli115/world-shared/4ue/b.e10.BG20TRCN.f09_g16.002/'):
def make_plot(config, out_path='.'):
# ---------------- Data source in TITAN ------------------------
f_cism = os.path.join(cism_path, 'Greenland_5km_v1.1_SacksRev_c110629.nc')
f_cesm_atm_climo_jja = os.path.join(cesm_path, 'postproc/atm/climos/b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc')
f_isccp = os.path.join(cloud_path, 'ISCCP_ANN_climo.nc')
f_cloudsat = os.path.join(cloud_path, 'CLOUDSAT_ANN_climo.nc')
f_cism = os.path.join(config['cism_data'], 'Greenland_5km_v1.1_SacksRev_c110629.nc')
f_cesm_atm_climo_jja = os.path.join(config['cesm_atm_climos'], 'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc')
f_isccp = os.path.join(config['cloud_data'], 'ISCCP_ANN_climo.nc')
f_cloudsat = os.path.join(config['cloud_data'], 'CLOUDSAT_ANN_climo.nc')
# --------------------------------------------------------------
img_list = []
......@@ -190,12 +187,7 @@ def make_plot(config=None, out_path='.',
img_elem = el.image('CESM_cldhgh_ANN',
' '.join(describe.split()),
img_link)
if config:
img_elem['Height'] = config['image_height']
img_elem['Height'] = config['image_height']
img_list.append(img_elem)
return img_list
if __name__ == '__main__':
make_plot()
......@@ -10,15 +10,12 @@ from livvkit.util import elements as el
describe = """CESM_cldlow_ANN plot."""
def make_plot(config=None, out_path='.',
cloud_path='/lustre/atlas1/cli115/world-shared/4ue/obs_data/',
cism_path='/lustre/atlas1/cli115/world-shared/4ue/',
cesm_path='/lustre/atlas1/cli115/world-shared/4ue/b.e10.BG20TRCN.f09_g16.002/'):
def make_plot(config, out_path='.'):
# ---------------- Data source in TITAN ------------------------
f_cism = os.path.join(cism_path, 'Greenland_5km_v1.1_SacksRev_c110629.nc')
f_cesm_atm_climo_jja = os.path.join(cesm_path, 'postproc/atm/climos/b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc')
f_isccp = os.path.join(cloud_path, 'ISCCP_ANN_climo.nc')
f_cloudsat = os.path.join(cloud_path, 'CLOUDSAT_ANN_climo.nc')
f_cism = os.path.join(config['cism_data'], 'Greenland_5km_v1.1_SacksRev_c110629.nc')
f_cesm_atm_climo_jja = os.path.join(config['cesm_atm_climos'], 'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc')
f_isccp = os.path.join(config['cloud_data'], 'ISCCP_ANN_climo.nc')
f_cloudsat = os.path.join(config['cloud_data'], 'CLOUDSAT_ANN_climo.nc')
# --------------------------------------------------------------
img_list = []
......@@ -190,12 +187,7 @@ def make_plot(config=None, out_path='.',
img_elem = el.image('CESM_cldlow_ANN',
' '.join(describe.split()),
img_link)
if config:
img_elem['Height'] = config['image_height']
img_elem['Height'] = config['image_height']
img_list.append(img_elem)
return img_list
if __name__ == '__main__':
make_plot()
......@@ -10,15 +10,12 @@ from livvkit.util import elements as el
describe = """CESM_cldtot_ANN plot."""
def make_plot(config=None, out_path='.',
cloud_path='/lustre/atlas1/cli115/world-shared/4ue/obs_data/',
cism_path='/lustre/atlas1/cli115/world-shared/4ue/',
cesm_path='/lustre/atlas1/cli115/world-shared/4ue/b.e10.BG20TRCN.f09_g16.002/'):
def make_plot(config, out_path='.'):
# ---------------- Data source in TITAN ------------------------
f_cism = os.path.join(cism_path, 'Greenland_5km_v1.1_SacksRev_c110629.nc')
f_cesm_atm_climo_jja = os.path.join(cesm_path, 'postproc/atm/climos/b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc')
f_isccp = os.path.join(cloud_path, 'ISCCP_ANN_climo.nc')
f_cloudsat = os.path.join(cloud_path, 'CLOUDSAT_ANN_climo.nc')
f_cism = os.path.join(config['cism_data'], 'Greenland_5km_v1.1_SacksRev_c110629.nc')
f_cesm_atm_climo_jja = os.path.join(config['cesm_atm_climos'], 'b.e10.BG20TRCN.f09_g16.002_JJA_climo.nc')
f_isccp = os.path.join(config['cloud_data'], 'ISCCP_ANN_climo.nc')
f_cloudsat = os.path.join(config['cloud_data'], 'CLOUDSAT_ANN_climo.nc')
# --------------------------------------------------------------
img_list = []
......@@ -190,12 +187,7 @@ def make_plot(config=None, out_path='.',
img_elem = el.image('CESM_cldtot_ANN',
' '.join(describe.split()),
img_link)
if config:
img_elem['Height'] = config['image_height']
img_elem['Height'] = config['image_height']
img_list.append(img_elem)
return img_list
if __name__ == '__main__':
make_plot()
......@@ -10,9 +10,7 @@ from livvkit.util import elements as el
describe = """yearly_cycle_cldhgh plot."""
def make_plot(config=None, out_path='.',
cloud_path='/lustre/atlas1/cli115/world-shared/4ue/obs_data/',
cesm_path='/lustre/atlas1/cli115/world-shared/4ue/b.e10.BG20TRCN.f09_g16.002/'):
def make_plot(config, out_path='.'):
img_list = []
......@@ -24,18 +22,18 @@ def make_plot(config=None, out_path='.',
for month in months:
# CESM1
f_cesm = os.path.join(cesm_path, "postproc", "atm", "climos",
f_cesm = os.path.join(config['cesm_atm_climos'],
"b.e10.BG20TRCN.f09_g16.002_{:02d}_aavg_climo.nc".format(month))
ncid1 = Dataset(f_cesm, mode='r')
model_cld = ncid1.variables['CLDHGH'][0]
# CLDSAT
f_cloudsat = os.path.join(cloud_path, "CLOUDSAT_{:02d}_aavg_climo.nc".format(month))
f_cloudsat = os.path.join(config['cloud_data'], "CLOUDSAT_{:02d}_aavg_climo.nc".format(month))
ncid2 = Dataset(f_cloudsat, mode='r')
cldsat_cld = ncid2.variables['CLDHGH'][0]
# ISCCP
f_isccp = os.path.join(cloud_path, "ISCCP_{:02d}_aavg_climo.nc".format(month))
f_isccp = os.path.join(config['cloud_data'], "ISCCP_{:02d}_aavg_climo.nc".format(month))
ncid3 = Dataset(f_isccp, mode='r')
isccp_cld = ncid3.variables['CLDHGH'][0]
......@@ -74,8 +72,3 @@ def make_plot(config=None, out_path='.',
img_list.append(img_elem)
return img_list
if __name__ == '__main__':
plt.switch_backend('agg')
make_plot()
......@@ -10,9 +10,7 @@ from livvkit.util import elements as el
describe = """yearly_cycle_cldlow plot."""
def make_plot(config=None, out_path='.',
cloud_path='/lustre/atlas1/cli115/world-shared/4ue/obs_data/',
cesm_path='/lustre/atlas1/cli115/world-shared/4ue/b.e10.BG20TRCN.f09_g16.002/'):
def make_plot(config, out_path='.'):
img_list = []
......@@ -25,18 +23,18 @@ def make_plot(config=None, out_path='.',
for month in months:
# ---------------- Data source at OLCF ------------------------
# CESM1
input_file1 = os.path.join(cesm_path, "postproc", "atm", "climos",
input_file1 = os.path.join(config['cesm_atm_climos'],
"b.e10.BG20TRCN.f09_g16.002_{:02d}_aavg_climo.nc".format(month))
ncid1 = Dataset(input_file1, mode='r')
model_cld = ncid1.variables['CLDLOW'][0]
# CLDSAT
f_cloudsat = os.path.join(cloud_path, "CLOUDSAT_{:02d}_aavg_climo.nc".format(month))
f_cloudsat = os.path.join(config['cloud_data'], "CLOUDSAT_{:02d}_aavg_climo.nc".format(month))
ncid2 = Dataset(f_cloudsat, mode='r')
cldsat_cld = ncid2.variables['CLDLOW'][0]
# ISCCP
f_isccp = os.path.join(cloud_path, "ISCCP_{:02d}_aavg_climo.nc".format(month))
f_isccp = os.path.join(config['cloud_data'], "ISCCP_{:02d}_aavg_climo.nc".format(month))
ncid3 = Dataset(f_isccp, mode='r')
isccp_cld = ncid3.variables['CLDLOW'][0]
......@@ -75,8 +73,3 @@ def make_plot(config=None, out_path='.',
img_list.append(img_elem)
return img_list
if __name__ == '__main__':
plt.switch_backend('agg')
make_plot()
......@@ -10,9 +10,7 @@ from livvkit.util import elements as el
describe = """yearly_cycle_cldtot plot."""
def make_plot(config=None, out_path='.',
cloud_path='/lustre/atlas1/cli115/world-shared/4ue/obs_data/',
cesm_path='/lustre/atlas1/cli115/world-shared/4ue/b.e10.BG20TRCN.f09_g16.002/'):
def make_plot(config, out_path='.'):
img_list = []
......@@ -25,18 +23,18 @@ def make_plot(config=None, out_path='.',
for month in months:
# ---------------- Data source at OLCF ------------------------
# CESM1
f_cesm = os.path.join(cesm_path, "postproc", "atm", "climos",
f_cesm = os.path.join(config['cesm_atm_climos'],
"b.e10.BG20TRCN.f09_g16.002_{:02d}_aavg_climo.nc".format(month))
ncid1 = Dataset(f_cesm, mode='r')
model_cld = ncid1.variables['CLDTOT'][0]
# CLDSAT
f_cloudsat = os.path.join(cloud_path, "CLOUDSAT_{:02d}_aavg_climo.nc".format(month))
f_cloudsat = os.path.join(config['cloud_data'], "CLOUDSAT_{:02d}_aavg_climo.nc".format(month))
ncid2 = Dataset(f_cloudsat, mode='r')
cldsat_cld = ncid2.variables['CLDTOT'][0]
# ISCCP
f_isccp = os.path.join(cloud_path, "ISCCP_{:02d}_aavg_climo.nc".format(month))
f_isccp = os.path.join(config['cloud_data'], "ISCCP_{:02d}_aavg_climo.nc".format(month))
ncid3 = Dataset(f_isccp, mode='r')
isccp_cld = ncid3.variables['CLDTOT'][0]
......@@ -75,8 +73,3 @@ def make_plot(config=None, out_path='.',
img_list.append(img_elem)
return img_list
if __name__ == '__main__':
plt.switch_backend('agg')
make_plot()
......@@ -2,6 +2,9 @@
"clouds_cesm" : {
"module" : "clouds/clouds_cesm.py",
"references" : "clouds/clouds_cesm.bib",
"cesm_atm_climos": "data/cesm/atm",
"cism_data": "data/cism/glissade",
"cloud_data": "data/clouds",
"image_height" : 300
}
}
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment