# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from IPython.display import IFrame

# ### Use Birdy to access WPS

from birdy import WPSClient
url = 'http://localhost:5000/wps'
cli = WPSClient(url)

# ### Run CF checker on remote NetCDF file

nc_url = 'https://www.esrl.noaa.gov/psd/thredds/fileServer/Datasets/ncep.reanalysis.derived/surface/air.mon.ltm.nc'


# +
# cli.cchecker?
# -

response1 = cli.cchecker(
    test='cf', 
    dataset=nc_url)


response1.get()

IFrame(response1.get().output, width=800, height=500)

# ### Run ncdump on remote NetCDF file

# +
# cli.ncdump?
# -

response2 = cli.ncdump(dataset=nc_url)

response2.get()

IFrame(response2.get().output, width=800, height=500)

# ### Run CF checker on ncdump/CDL output

response3 = cli.cchecker(dataset=response2.get().output)

response3.get()

IFrame(response3.get().output, width=800, height=500)

# ### Run CEDA CF Checker

# +
# cli.cfchecker?
# -

response4 = cli.cfchecker(cf_version='auto', dataset=nc_url)

response4.get()

IFrame(response4.get().output, width=800, height=500)

StarcoderdataJupyterScriptsDedupFiltered