skygering/land-ocean-warming-ratio

CDO and R

Opened this issue · 1 comments

Objectives

Become comfortable with executing cdo operators via R and start using pic!

CMIP6 Archive

Information about where the CMIP6 data is stored on pic, https://github.com/jgcri/CMIP6. You won't be using this yet but it will come up in the CDOR example code.

CDO and CDO-R

  • Use the system2 call in R to calculate the temp weighted average
    • You will use system2 and will need the full path to the cdo executable (mine was installed at /usr/local/Cellar/cdo/1.9.8/bin/cdo)
  • Add comments to this script
    • You are going to want to checkout the Rcdo_example branch, make edits, and push your commits back to this branch.
    • The idea here is to give you some practice with using git, improve your cdo-R literacy, and give you an idea of what your land/ocean warming code might look like. This is NOT a test and should not be frustrating. Give it a fairly quick look over (50% effort) see what you understand want what you don't then we will go over it together.
  • Set up a simple script (the paths to the files to process can be hardcoded) to calculate the global mean, land, and ocean temp. Create a line plot comparing the three temperature time series. Your option to do this purely in cdo or in cdo-R

PIC

  • Follow to set up putty for accessing pic
  • Learn how to navigate to the CMIP6 directory
  • Learn how/when one should launch and interactive session in R (this will be something we do together)
  • Learn how to submit a job to slurm, submit a baby test job (a hello world script)

Next step will be to figure out a plan for how to code up the

Alrighty so the files that I'd like you to process with your very simple script. Turns out they are too large to post on a github issue. Instead what I am going to do is give you the links to where they live on pic. We are going to work with E3SM data because it is the DOE model that @bpbond and Kate Calvin work on!

/pic/projects/GCAM/CMIP6/archive/areacella/areacella_fx_E3SM-1-0_1pctCO2_r1i1p1f1_gr.nc
/pic/projects/GCAM/CMIP6/archive/sftlf/sftlf_fx_E3SM-1-0_1pctCO2_r1i1p1f1_gr.nc
/pic/projects/GCAM/CMIP6/archive/tas/tas_Amon_E3SM-1-0_1pctCO2_r1i1p1f1_gr_000101-002512.nc
(Checkout the www.github.com/jgcri/cmip6 wiki for helpful resources and references if you have data questions (but also please feel free to ask)!)

You can have two options, you can either write the script to process the files on the pic log in node or you can download the files to your local machine and work them there.