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

Yura said to look at code review #1

Open
vjugor1 opened this issue Nov 29, 2023 · 2 comments
Open

Yura said to look at code review #1

vjugor1 opened this issue Nov 29, 2023 · 2 comments
Assignees

Comments

@vjugor1
Copy link
Contributor

vjugor1 commented Nov 29, 2023

Structure

  • Please, make the project structure as in crops or wind
  • Add Dockerfile, avoid package installation from conda - use requirements.txt (Examples 2 from here -- generate requiremets.txt with pip freeze)
  • Fix README.md to be displayed in the repository
  • Add results folder that would contain figure that you are saving and tables (.csv) - push them there also

Notebooks

  • Please, cast best_models_nested to a pandas.DataFrame and save it to .csv
  • Could you please fix the warnings: FutureWarning: Index.ravel returning ndarray is deprecated; in a future version this will return a view on self. and UserWarning: CRS not set for some of the concatenation inputs. Setting output's CRS as WGS 84 (the single non-null crs provided).

correlation.py

  • Place "2015_2022" to the arguments here and further
  • Place num_models into the arguments of this function
  • Add progress bars in the loops of the optimal_ensemble function

process.py

  • Are you sure that this coordinate transform is conducted correctly? Please, give here or in youtrack ranges of original lon axes and transformed ones. I am suspicious, since we were transforming coordinates in a different way (for cmips)
  • Shouldn't it work a more elegant way like era.sel(time=slice(year, year+1))?
  • Should it also return era_year_clip? Otherwise, it look inconsistent with the docstring of this function
  • From here to there can be placed into a separate utility function - would be more nicer
  • The same elegance suggestion here
  • Shouldn't this function return something as well? Or update docstring (I guess better to update)
  • Same here and here and here and here

Data

  • Could you please add to this repository the code that you were using for CMIP downloading? Together with context.jsons, if you saved them
  • Could you also provide in the README.md locations of the data that you were using

Thanks! That's a good code

@DariaTan
Copy link
Collaborator

DariaTan commented Dec 1, 2023

Add progress bars in the loops of the optimal_ensemble function

I didn't add it, the cell executes a sec or less

Are you sure that this coordinate transform is conducted correctly? Please, give here or in youtrack ranges of original lon axes and transformed ones. I am suspicious, since we were transforming coordinates in a different way (for cmips)

Checked, works fine
original lon axes: -180.0 -179.8 -179.5 -179.2 ... 179.2 179.5 179.8
image

transformed ones: 0.0 0.25 0.5 0.75 1.0 ... 359.0 359.2 359.5 359.8
image

Shouldn't it work a more elegant way like era.sel(time=slice(year, year+1))

You are right, it looks much better
However, this slice takes both years (year and year+1) in not very pythonic way)
I did it with era.sel(time=year) for the single year of course

@vjugor1
Copy link
Contributor Author

vjugor1 commented Dec 1, 2023

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants