# General plotting settings sns.set_style('whitegrid') sns.set_context("talk", font_scale=1.5, rc={"lines.linewidth": 2.5}) # In[ ]: E = ed.EsioData.load() # Directories all_models = ['usnavygofs', 'usnavyncep', 'usnavysipn'] runType = 'forecast' updateall = False # In[ ]: stero_grid_file = E.obs['NSIDC_0051']['grid'] obs_grid = import_data.load_grid_info(stero_grid_file, model='NSIDC') # Ensure latitude is within bounds (-90 to 90) # Have to do this because grid file has 90.000001 obs_grid['lat_b'] = obs_grid.lat_b.where(obs_grid.lat_b < 90, other=90) # In[ ]: # Regridding Options # method='conservative_normed' # ['bilinear', 'conservative', 'nearest_s2d', 'nearest_d2s', 'patch'] method = 'nearest_s2d' # In[ ]: # Set models that are different var_dic = {'aice': 'sic'}
model = 'gfdlsipn' runType = 'forecast' base_dir = r'/home/disk/sipn/nicway/data/' ftp_dir = r'/home/disk/sipn/upload/' data_dir = os.path.join(ftp_dir, model, runType) data_out = os.path.join(base_dir, 'model', model, runType, 'sipn_nc') model_grid_file = os.path.join(base_dir, 'grids', 'GFDLFLOR_gridinfo.nc') stero_grid_file = os.path.join(base_dir, 'grids', 'stereo_gridinfo.nc') # In[ ]: updateall = False # In[ ]: gfdl_grid = import_data.load_grid_info(model_grid_file, model='GFDL') gfdl_grid.dims # In[ ]: # # Plot the input Grid # %matplotlib notebook # plt.figure(figsize=(10,8)); # ax1 = plt.axes(projection=ccrs.PlateCarree()) # ax1.scatter(gfdl_grid['lon_b'], gfdl_grid['lat_b'], s=6, c='r', transform=ccrs.PlateCarree()) # plot grid locations # ax1.scatter(gfdl_grid['lon'], gfdl_grid['lat'], s=3, c='b', transform=ccrs.PlateCarree()) # plot grid locations # plt.xlabel('lon') # plt.ylabel('lat') # In[ ]: