-
Notifications
You must be signed in to change notification settings - Fork 0
Add tutorial #138
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
base: main
Are you sure you want to change the base?
Add tutorial #138
Conversation
sjavis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to mostly work for me locally, with the exception of TSTORMS since I don't have ifort. I have just a few suggested changes.
I think the conda environment is fine, especially since we discussed that this will probably be what we recommend. The pre-processing time also didn't seem too dreadful to me. I think, ultimately, is going to take time for the pre-processing for any reasonable.
I agree that the multiple sources and using wget can probably also be made an issue to look at improving later.
| git clone git@github.com:Cambridge-ICCS/TCTrack.git | ||
| cd TCTrack | ||
| pip install . | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instructions for initialising the conda environment for cf-python are given in the pre-processing section. Should those be moved here? Otherwise we will also need to add the pip install instruction in the pre-processing section
| # This script will clone, build, and install TSTORMS. | ||
|
|
||
| # It is assumed that the following dependencies are installed: | ||
| # - Fortran compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # - Fortran compiler | |
| # - Intel Fortran compiler (ifort) |
| This data can be obtained from the `ESGF CEDA archive <https://esgf.ceda.ac.uk/thredds/catalog/catalog.html>`_ | ||
| or direct from `CEDA <https://data.ceda.ac.uk/>`_ using the included fetch data script:: | ||
|
|
||
| ./fetch_data.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch_data.sh is not executable
|
|
||
| # zg has to be fetched direct from CEDA as not present on ESGF | ||
| wget https://dap.ceda.ac.uk/badc/cmip6/data/PRIMAVERA/HighResMIP/MOHC/HadGEM3-GC31-HM/hist-1950/r1i1p1f1/Prim3hrPt/zg7h/gn/files/d20180730/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195008010000-195008302100.nc?download=1 -O data/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195008010000-195008302100.nc | ||
| wget https://dap.ceda.ac.uk/badc/cmip6/data/PRIMAVERA/HighResMIP/MOHC/HadGEM3-GC31-HM/hist-1950/r1i1p1f1/Prim3hrPt/zg7h/gn/files/d20180730/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195009010000-195009302100.nc?download=1 -O data/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195010090000-195009302100.nc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| wget https://dap.ceda.ac.uk/badc/cmip6/data/PRIMAVERA/HighResMIP/MOHC/HadGEM3-GC31-HM/hist-1950/r1i1p1f1/Prim3hrPt/zg7h/gn/files/d20180730/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195009010000-195009302100.nc?download=1 -O data/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195010090000-195009302100.nc | |
| wget https://dap.ceda.ac.uk/badc/cmip6/data/PRIMAVERA/HighResMIP/MOHC/HadGEM3-GC31-HM/hist-1950/r1i1p1f1/Prim3hrPt/zg7h/gn/files/d20180730/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195009010000-195009302100.nc?download=1 -O data/zg7h_Prim3hrPt_HadGEM3-GC31-HM_hist-1950_r1i1p1f1_gn_195009010000-195009302100.nc |
| plt.figure(figsize=(10, 3)) | ||
| ax = plt.axes(projection=ccrs.PlateCarree()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| plt.figure(figsize=(10, 3)) | |
| ax = plt.axes(projection=ccrs.PlateCarree()) | |
| plt.figure(figsize=(8, 4)) | |
| ax = plt.axes(projection=ccrs.PlateCarree()) | |
| ax.set_extent([-180, 180, -90, 90]) |
The current plot is hard to see since the latitude range is so small and the title and legend are larger than the axes.
| pl = ax.plot( | ||
| lons[i], lats[i], "--", transform=ccrs.PlateCarree(), label=f"{label}" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pl = ax.plot( | |
| lons[i], lats[i], "--", transform=ccrs.PlateCarree(), label=f"{label}" | |
| ) | |
| mask = np.isfinite(lons[i]) | |
| pl = ax.plot( | |
| lons[i, mask], lats[i, mask], "--", transform=ccrs.PlateCarree(), label=f"{label}" | |
| ) | |
This avoids the warning appearing.
Closes #126
This adds a tutorial for new users to the docs, with associated scripts in the GitHub repo.
It works through
Potential issues:
wgetto fetch data, but I would prefer if we used OpenDAP or THREDDS. Perhaps improve later. Open an issue?On CSD3 I use the following environment:
To run the regridding script I submitted as a batch job (approx 30mins to run) using the following:
which assumes you have already cloned TCTrack and placed your miniforge installation in the
tutorial/directory.It would be good if you could work through this when back @sjavis to see how well it works or any sticking points/points for clarification/improvement.