test_str = 'Test 12\n' #run this from command line to get the files required example = "./diagtest12.py --datadir ~/uvcmetrics_test_data/ --baseline ~/uvcdat-testdata/baselines/metrics/ --keep True" plotset = 12 filterid = 'f_startswith' obsid = 'RAOBS' varid = 'T' seasonid = 'JAN' modeldir = 'model_data_12' obsdir = 'obs_data_12' dt = diags_test.DiagTest(modeldir, obsdir, plotset, filterid, obsid, varid, seasonid, extra_parts=['--varopts "SanFrancisco_CA" ']) # Test of graphics (png) file match: # This just looks at combined plot, aka summary plot, which is a compound of three plots. imagefilename = 'figure-set12_Global_JAN_T_plot-combined.png' imagethreshold = None ncfiles = {} # Test of NetCDF data (nc) file match: rtol = 1.0e-3 atol = 1.0e-2 # suitable for temperatures dt.execute(test_str, imagefilename, imagethreshold, ncfiles, rtol, atol)
from metrics.packages.amwg.amwg4 import amwg_plot_set4 print amwg_plot_set4.name test_str = 'Test 4\n' #run this from command line to get the files required example = "./diagtest04.py --datadir ~/uvcmetrics_test_data/ --baseline ~/uvcdat-testdata/baselines/metrics/ --keep True" plotset = 4 filterid = 'f_startswith' obsid = 'NCEP' varid = 'T' seasonid = 'ANN' modeldir = 'cam35_data_smaller' obsdir = 'obs' dt = diags_test.DiagTest(modeldir, obsdir, plotset, filterid, obsid, varid, seasonid) # Test of graphics (png) file match: # This just looks at combined plot, aka summary plot, which is a compound of three plots. imagefilename = 'set4_ANN_T-combined-cam3_5_fv1.9x2.5_NCEP.png' imagethreshold = None ncfiles = {} ncfiles['set4_ANN_T-cam35_data_smaller_model.nc'] = [ 'dv_T_levlat_ANN_ft1_cam35_data_smaller_model' ] ncfiles['set4_ANN_T-NCEP_obs.nc'] = ['rv_T_ANN_NCEP'] # Test of NetCDF data (nc) file match: rtol = 1.0e-3 atol = 1.0e-2 # suitable for temperatures
test_str = 'Test 14\n' #run this from command line to get the files required example = "./diagtest14.py --datadir ~/uvcmetrics_test_data/ --baseline ~/uvcdat-testdata/baselines/metrics/ --keep True" plotset = 14 filterid = 'f_contains' obsid = 'NCEP' varid = 'T' seasonid = 'JAN' modeldir = 'cam_output' obsdir = 'obs_atmos' dt = diags_test.DiagTest(modeldir, obsdir, plotset, filterid, obsid, varid, seasonid, extra_parts=['--varopts "200 mbar" ']) # Test of graphics (png) file match: # This just looks at combined plot, aka summary plot, which is a compound of three plots. imagefilename = 'set7_Global_ANN_T-combined.png' imagethreshold = 1.0e6 ncfiles = {} ncfiles['rv_T_ANN_ft0_None__ANN_.nc'] = ['rv_T_ANN_ft0_None'] ncfiles['rv_T_ANN_ft1_None__ANN_.nc'] = ['rv_T_ANN_ft1_None'] # Test of NetCDF data (nc) file match: rtol = 1.0e-3 atol = 1.0e-2 # suitable for temperatures