Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Formats module error with "netcdf forecast_model" data structure #426

Open
ejlevine opened this issue Sep 5, 2023 · 1 comment
Open
Labels
content Content related issue

Comments

@ejlevine
Copy link
Contributor

ejlevine commented Sep 5, 2023

I am working through the Pythia Foundations Data Formats module. When I run with the following code block:

netcdf forecast_model {
attributes:
:Conventions = "CF-1.7" ;
:title = "Forecast model run" ;
:institution = "Unidata" ;
:source = "WRF-1.5" ;
:history = "2019-07-16 02:21:52.005718 Python" ;
:references = "" ;
:comment = "" ;
}

I get an error message:

runfile('/pythia/NetCDF/ProjectPythiaNetCDF.py', wdir='/pythia/NetCDF')
File :59
netcdf forecast_model {
^
SyntaxError: invalid syntax

This happens in both spyder and ipython.

I'm in the right environment and netcdf is installed:

(pythia-book-dev) ejlevine@callisto:~/pythia/NetCDF$ conda env list

conda environments:

base /home/ejlevine/miniconda3
pythia-book-dev * /home/ejlevine/miniconda3/envs/pythia-book-dev

(pythia-book-dev) ejlevine@callisto:~/pythia/NetCDF$ conda list netcdf

packages in environment at /home/ejlevine/miniconda3/envs/pythia-book-dev:

Name Version Build Channel

libnetcdf 4.9.2 nompi_h7e745eb_109 conda-forge
netcdf4 1.6.4 nompi_py311h9a7c333_101 conda-forge

I'm running on openSUSE Leap 15.4.

Can someone please help me fix this?

thanks,
-eric

@ejlevine ejlevine added the content Content related issue label Sep 5, 2023
@ktyle
Copy link
Contributor

ktyle commented Sep 6, 2023

Hi @ejlevine,

It looks like you are trying to run a block of Markdown text:

netcdf forecast_model {
attributes:
:Conventions = "CF-1.7" ;
:title = "Forecast model run" ;
:institution = "Unidata" ;
:source = "WRF-1.5" ;
:history = "2019-07-16 02:21:52.005718 Python" ;
:references = "" ;
:comment = "" ;
}

i.e., that block is not executable Python code.

I agree that the way it is rendered and written in our Jupyterbook does not easily distinguish it from the code block that immediately precedes it, although if one downloads the tutorial as a Jupyter notebook and runs it via Jupyter Lab, it won't be treated as a code cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Content related issue
Projects
Status: Backlog
Development

No branches or pull requests

2 participants