jgcri / cmip6 Goto Github PK
View Code? Open in Web Editor NEWdocumentation and processing code for JGCRI's CMIP6 archive on pic
documentation and processing code for JGCRI's CMIP6 archive on pic
Calculate the global mean temp and precip values for cmip6 model / experiment / ensemble member.
Use an apply family function and the function you made in #4 to process multiple files.
This is going to be the script that eventually we are going to submit as an sbatch
job to pic. This script it going is what is going to process a section of the CMIP6 files you downloaded on pic.
apply
family functions read up on the R documentation about the different options (lapply
, mapply
, apply
, ect.) and decide which one to use.First check out the CMIP6 errata for a list of known data problems and use this issue to track problems/inconsistencies in JGCRI's CMIP6 data archive. (TODO organize these issues by a searchable table??)
CNRM-CM6-1
Are we going to run into issues with storage space on pic / GitHub?
Potential Data to deprioritized download of
/pic/projects/GCAM/CMIP6/archive/tos/tos_Omon_IPSL-CM6A-LR_ssp245_r1i1p1f1_gn_201501-210012.nc
is having problems being regridded from its native resolution up to 2.5 degrees
When trying to regrid on pic, error cdo remapbil (Abort): Unsupported grid type: generic
is returned.
command used for regridding
/share/apps/netcdf/4.3.2/gcc/4.4.7/bin/cdo remapbil,/pic/projects/GCAM/CMIP5-CHartin/CMIP5_RCP45/tos/gridtype.txt /pic/projects/GCAM/CMIP6/archive/tos/tos_Omon_IPSL-CM6A-LR_ssp245_r1i1p1f1_gn_201501-210012.nc /pic/projects/GCAM/Abigail/regridded_cmip6_2p5deg/tos_Omon_rgr2p5-IPSL-CM6A-LR_ssp245_r1i1p1f1_gn_201501-210012.nc
Not pressing, we just ended up using other models for the project this came up in.
@claudiatebaldi requested daily tasmin/tasmax/pr to be downloaded on pic
Incorporate the scripts you developed that use R (only) and cdo (only) to calculate and plot the global annual mean for a single model / experiment.
Become familiar with git and pull requests
Translate the sequence of commands that process monthly gridded netcdf into a data frame of annual global values into a function.
This function is going to be the main function that we use to process the CMIP netcdfs from monthly gridded data to annual monthly data. This function will be used to process the sets of netcdf files (40 files or more).
Here are some things that you are going to want to think about you are working on designing this function.
system2
call.Timescale: Annual is all we need; we can process monthly to annual if that's available instead.
Variable: tos and tas (tas is needed to calculate the global average T in each year only).
Model: 2-5 distinct models. GFLD-CM4 is already on pic. We're aiming to capture a range of behavior so are ambivalent about actual model choice to start.
Experiment: sspN45 and pre-industrial control (so we can use the values to calculate delta temperatures)
It there some way that we can parse the shell script to remove files that are already downloaded on pic and are in the index?
Is there some way that we can make this into a function so that the user has the option to source it the file without modifying the inputs?
py python_script.py keep = [something]
Overview of CMIP6 activities the slide titled CMIP6: Participating Model Groups
has a list of the new modeling groups participating in CMIP6.
https://www.wcrp-climate.org/images/modelling/WGCM/WGCM20/documents/3b_Eyring_CMIP6Overview_WGCM_161101.pdf
@cahartin thought of some more variables we will want to download
We want something that we can use to look up what we have on pic / where it lives.
Now instead of developing code in #5 to find all the files to process we can use this csv file.
It turns out that some of the netcdf files that have been downloaded are ... empty! Whether this is an issue with the cmip6 portals or occurred during an incomplete download this is horrendous and must be correct.
Process all of the temperature data from the concentration runs for the future scenarios.
.R
script that can run on PIC.zsh
script that can be submitted as a PIC job.csv
file that contains global annual mean valuesThese are the temperature values that we are interested and will be used by other projects, including to calibrate Hector! Latter on we are going to visualize these results.
.zsh
script that will only process a few files)Only daily files from SSP1-1.9 appear to have been downloaded for tasmax/tasmin (there are more SSPs available for pr). Wondering if there is something that prevents updating the daily output for some variables, or if it is a problem at the source. SSP1-1.9 is a Tier 2 experiment in ScenarioMIP so I would expect other SSPs to have had daily data processed and submitted before it.
Thanks!
Problem/FUNNN fact! If the netcdf output data files does not have cell_measures
field then cdo cannot be used to calculate the weighted mean :( and the user has no ability to overwrite the gridded area using setgridarea. This is a problem because it means that even when we apply some sort of land or ocean area weights the weighted averages will be the same...
how to check to see if the output data file has the cell area information
nc <- some/cmip/output/data.nc
atts <- ncdf4::ncatt_get(ncdf4::nc_open(nc), 'var')
atts$cell_measures
Ideally the will return something like...
atts$cell_measures
[1] "area: areacella"]
but in some instances the atts$cell_measures <- NULL
ah!
Possible Solutions
cell-measures
attribute (I think we could technically do the mean in R with the specific weights applied, the downside is that those files would pretty large to open in R)As of right now there is some documentation but it needs to be improved.
This is the fun part, let's take a look at the data there are some things that we are going to need to be on the look out for. Do the results make sense if not do we think it has to do with our processing code or not?
Checkout the results we have been working to get!
facet_wrap
lapply
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.