import os
from plot_diff import var_diff, graphics

if __name__ == "__main__":
    rootdir = os.path.join('/', 'global', 'cscratch1', 'sd', 'twhilton',
                           'WRFv3.9_Sensitivity', 'FromScratch')
    ctl_dir = os.path.join(rootdir, 'WRFV3_Ctl', 'run')
    ctl2_dir = os.path.join(rootdir, 'WRFV3_Ctl2', 'run')

    vd = var_diff(os.path.join(ctl_dir, 'summen_sensitivity_ctl',
                               '*d01_2009-06*'),
                  os.path.join(ctl2_dir, 'summen_sensitivity_ctl2',
                               '*d01_2009-06*'),
                  label_A='ctl',
                  label_B='ctl2',
                  varname='QCLOUD')
    read_data = True
    if read_data:
        vd.read_files()
        # vd.mask_land_or_water(mask_water=True)
    for this_t in range(0, 120):  # 255
        fig = graphics(vd, t_idx=this_t, layer=0, domain=1, pfx='ctl2')
import os
from plot_diff import var_diff, graphics

if __name__ == "__main__":
    rootdir = os.path.join('/', 'global', 'cscratch1', 'sd',
                           'twhilton', 'WRFv3.9_Sensitivity', 'FromScratch')
    ctl_dir = os.path.join(rootdir, 'WRFV3_Ctl', 'run')
    dry_dir = os.path.join(rootdir, 'WRFV3_Dry', 'run')
    # vd = var_diff(os.path.join(ctl_dir, 'met_em.d01.2009-06-02_00:00:00.nc'),
    #               os.path.join(dry_dir, 'met_em.d01.2009-06-02_00:00:00.nc'),
    #               label_A='ctl met_em',
    #               label_B='dry met_em',
    #               varname='SM000010')

    vd = var_diff(os.path.join(ctl_dir, 'summen_sensitivity_ctl',
                               'wrfsees_ccs3pb1_ls2_d02_2009-06-02_00:00:00'),
                  os.path.join(dry_dir, 'summen_sensitivity_dry',
                               'wrfsees_ccs3pb1_ls2_d02_2009-06-02_00:00:00'),
                  label_A='ctl out',
                  label_B='dry out',
                  varname='SMOIS')
    read_data = True
    if read_data:
        vd.read_files()
        # vd.mask_land_or_water(mask_water=True)
    for this_t in range(0, 6):  # 255
        fig = graphics(vd, t_idx=this_t, layer=0, domain=2)
import os
from plot_diff import var_diff, graphics

if __name__ == "__main__":
    rootdir = os.path.join('/', 'global', 'cscratch1', 'sd', 'twhilton',
                           'WRFv3.9_Sensitivity', 'FromScratch')
    ctl_dir = os.path.join(rootdir, 'WRFV3_Ctl', 'run')
    urb_dir = os.path.join(rootdir, 'WRFV3_urban', 'run')
    # vd = var_diff(os.path.join(ctl_dir, 'met_em.d01.2009-06-02_00:00:00.nc'),
    #               os.path.join(urb_dir, 'met_em.d01.2009-06-02_00:00:00.nc'),
    #               label_A='ctl met_em',
    #               label_B='dry met_em',
    #               varname='SM000010')

    vd = var_diff(os.path.join(ctl_dir, 'summen_sensitivity_ctl',
                               '*d01_2009-06*'),
                  os.path.join(urb_dir, 'summen_sensitivity_urban',
                               '*d01_2009-06*'),
                  label_A='ctl out',
                  label_B='urban out',
                  varname='QCLOUD')
    read_data = True
    if read_data:
        vd.read_files()
        # vd.mask_land_or_water(mask_water=True)
    for this_t in range(20, 120):  # 255
        fig = graphics(vd, t_idx=this_t, layer=0, domain=1, pfx='urban')
Example #4
0
from plot_diff import var_diff, graphics

if __name__ == "__main__":
    rootdir = os.path.join('/', 'global', 'cscratch1', 'sd', 'twhilton',
                           'WRFv3.9_Sensitivity', 'FromScratch')
    ctl_dir = os.path.join(rootdir, 'WRFV3_Ctl', 'run')
    dry_dir = os.path.join(rootdir, 'WRFV3_Dry', 'run')
    # vd = var_diff(os.path.join(ctl_dir, 'met_em.d01.2009-06-02_00:00:00.nc'),
    #               os.path.join(dry_dir, 'met_em.d01.2009-06-02_00:00:00.nc'),
    #               label_A='ctl met_em',
    #               label_B='dry met_em',
    #               varname='SM000010')

    vd = var_diff(os.path.join(ctl_dir, 'summen_sensitivity_ctl_d01_3hr',
                               'wrfinput_ctl_3hr_d01_2009-06*'),
                  os.path.join(dry_dir, 'summen_sensitivity_dry_d01_3hr',
                               'wrfinput_dry_3hr_d01_2009-06*'),
                  label_A='ctl out',
                  label_B='dry out',
                  varname='QCLOUD')
    read_data = True
    if read_data:
        vd.read_files()
        # vd.mask_land_or_water(mask_water=True)
    for this_t in range(0, 20):  # 255
        fig = graphics(vd,
                       t_idx=this_t,
                       layer=0,
                       domain=1,
                       pfx='fromscratch_nomatch_t')
                                         'summen_sensitivity_0.7dry',
                                         '*d01_2009-06-0[12]*'),
                            label_A='dry 0.05',
                            label_B='dry 0.70',
                            varname='QCLOUD')

    vd_d0p7_ctl = var_diff(os.path.join(dry0p70_dir,
                                        'summen_sensitivity_0.7dry',
                                        '*d02_2009-06-0[12]*'),
                           os.path.join(ctl_dir, 'summen_sensitivity_ctl',
                                        '*d02_2009-06-0[12]*'),
                           label_A='dry 0.70',
                           label_B='control',
                           varname='QCLOUD')
    read_data = True
    if read_data:
        vd_0p05_0p70.read_files()
        vd_d0p7_ctl.read_files()
        # vd_0p05_0p70.mask_land_or_water(mask_water=True)
    for this_t in range(0, 95):  # 255
        fig = graphics(vd_0p05_0p70,
                       t_idx=this_t,
                       layer=0,
                       domain=2,
                       pfx='dry_0p05_0p70_diff')
        fig2 = graphics(vd_d0p7_ctl,
                        t_idx=this_t,
                        layer=0,
                        domain=2,
                        pfx='dry_0p70_ctl_diff')