pro read_camp2ex_hdf5 ;******************************************* ; These are the variables in the hdf file ;******************************************* ;var_str='ACCPR' & info_str='accumulated rain over the course of the simulation (kg/m2)' ;var_str='CAP' & info_str='aggregates number concentration (#/kg)' ;var_str='CCCMP' & info_str='ccn mass mixing ratio (kg/kg)' ;var_str='CCCNP' & info_str='ccn number concentration (#/kg)' ;var_str='CCP' & info_str='cloud droplet number concentration (#/kg)' ;var_str='CDP' & info_str='drizzle droplet number concentration (#/kg)' ;var_str='CGP' & info_str='graupel particle number concentration (#/kg)' ;var_str='CHP' & info_str='hailstone number concentration (#/kg)' ;var_str='CLD2RAINT' & info_str='cloud water transferred to rain via collection (kg/kg)' ;var_str='CPP' & info_str='pristine ice particle number concentration (#/kg)' ;var_str='CRP' & info_str='rain drop number concentration (#/kg)' ;var_str='CSP' & info_str='snow particle number (#/kg)' ;var_str='DN0' & info_str='reference state air density (kg/m3)' ;var_str='GLAT' & info_str='latitude' ;var_str='GLON' & info_str='longitude' ;var_str='LWDN' & info_str='downwelling longwave radiation (W/m2)' ;var_str='LWUP' & info_str='upwelling longwave radiation (W/m2)' ;var_str='NUCCLDRT' & info_str='nucleation of cloud and drizzle water mixing ratio (kg/kg)' ;var_str='PATCH_AREA' & info_str='patch fractional area' ;var_str='PC' & info_str='current perturbation exner function (PI-prime)' ;var_str='PCPRR' & info_str='surface rain precipitation rate' ;var_str='PI' & info_str='exner function * cp, where (cp=1004 j/kg/k in rams)' ;var_str='RAP' & info_str='aggregates mising ratio (kg/kg)' ;var_str='RCP' & info_str='cloud mixing ratio (kg/kg)' ;var_str='RDP' & info_str='drizzle mixing ratio (kg/kg)' ;var_str='RGP' & info_str='graupel mixing ratio (kg/kg)' ;var_str='RHP' & info_str='hail mixing ratio (kg/kg)' ;var_str='RPP' & info_str='pristine ice mixing ratio (kg/kg)' ;var_str='RRP' & info_str='rain mixing ratio (kg/kg)' ;var_str='RSP' & info_str='snow mixing ratio (kg/kg)' ;var_str='RTP' & info_str='total water mixing ratio (water vapor + condensate) (kg/kg)' var_str='RV' & info_str='water vapor mixing ratio (kg/kg)' ;var_str='SWDN' & info_str='downwelling shortwave radiation (W/m2)' ;var_str='SWUP' & info_str='upwelling shortwave radiation (W/m2)' ;var_str='THETA' & info_str='theta, potential temperature (K)' ;var_str='THP' & info_str='theta-il, ice-liquid potential temperature (K)' ;var_str='TOPT' & info_str='topography height (m)' ;var_str='UC' & info_str='current u wind component (m/s)' ;var_str='VAPCLDT' & info_str='vapor diffusion/evacporation on cloud droplets (kg/kg)' ;var_str='VC' & info_str='current v wind component (m/s)' ;var_str='WC' & info_str='current w wind component (m/s)' ;***************************************** ; Data directory ;***************************************** ;path_prefix='/uufs/chpc.utah.edu/common/home/' path_prefix='/Volumes/' fdir=path_prefix+'mace-group5/camp2ex_aero_sim/ctrlpris_hf/' ;***************************************** ; File name ;***************************************** ;fname='a-L-2018-08-21-060000-g1.h5' ;fname='a-L-2018-08-22-000036-g1.h5' fname='a-L-2018-08-22-000048-g1.h5' file_tag=strmid(fname,0,24) ;***************************************** ; Read the data from the hdf5 file ;***************************************** ; open the hdf5 file fid=h5f_open(fdir+fname) ;vid=h5d_open(fid,'LWUP') ;lwup=h5d_read(vid) ;h5d_close,vid vid=h5d_open(fid,var_str) var=h5d_read(vid) h5d_close,vid vid=h5d_open(fid,'GLAT') glat=h5d_read(vid) h5d_close,vid vid=h5d_open(fid,'GLON') glon=h5d_read(vid) h5d_close,vid h5f_close,fid end