CollinWoo / daynight-Q10

MIT License
2 stars 0 forks source link

First steps #1

Open bpbond opened 4 years ago

bpbond commented 4 years ago

Hi @10aDing -

What a sparkling clean new repository! đź‘Ź

I would suggest start by familiarizing yourself with the COSORE database and cosore package:

Let me know if you have questions.

bpbond commented 4 years ago

Overall medium-term goal is to calculate temperature sensitivity (Q10) across datasets, temperature measurements, and time (e.g. week of each year).

We want to:

> csr_database()
# A tibble: 88 x 11
   CSR_DATASET       CSR_LONGITUDE CSR_LATITUDE CSR_ELEVATION CSR_IGBP         CSR_PRIMARY_PUB        CSR_RECORDS CSR_GASES CSR_DATE_BEGIN CSR_DATE_END CSR_MSMT_VAR
   <chr>                     <dbl>        <dbl>         <dbl> <chr>            <chr>                        <int> <chr>     <date>         <date>       <chr>       
 1 d20190409_ANJILE…       -118.           33.7            2  Wetland          10.1029/2018JG004640         46271 CO2       2016-02-05     2017-04-21   Rs          
 2 d20190409_ZOU             -7.25         53.0          260  Evergreen needl… NA                           82314 CO2       2013-11-22     2015-02-17   Rs          
 3 d20190415_VARNER         -72.2          42.5          340  Deciduous broad… 10.1029/2008JG000858         34641 CO2       2003-04-20     2006-12-12   Rs          
 4 d20190424_ZHANG_…        -86.4          39.3          275  Deciduous broad… 10.1016/j.agrformet.2…       56701 CO2       2012-01-01     2013-11-15   Rh, Rs      
 5 d20190424_ZHANG_…        -86.4          39.3          275  Deciduous broad… 10.1016/j.agrformet.2…       59181 CO2       2011-07-19     2012-12-06   Rh, Rs      
 6 d20190430_DESAI          -90.1          45.8          520  Deciduous broad… 10.5194/bg-10-7999-20…       53886 CO2       2011-07-10     2012-12-22   Rs, Rh      
 7 d20190504_SAVAGE…        -72.2          42.5          352. Deciduous broad… 10.1111/j.1365-2435.2…       43656 CO2       2003-05-17     2003-11-11   Rs          
 8 d20190504_SAVAGE…        -72.2          42.5          352. Deciduous broad… 10.1111/j.1365-2435.2…      124461 CO2       2012-05-19     2014-11-17   Rh, Rs      
 9 d20190517_MAURITZ       -117.           33.4          393  Open shrubland   10.5194/bgd-10-6335-2…       33340 CO2       2010-02-11     2011-08-02   Rh, Rs      
10 d20190520_RUEHR         -122.           44.3          998  Evergreen needl… 10.1016/j.agrformet.2…       23756 CO2       2010-05-13     2010-10-21   Rs  
bpbond commented 4 years ago

Goal 1: identify which rows in csr_database() output have "Rh" (heterotrophic respiration) Goal 2: load in those datasets using csr_dataset(). I would suggest something like this:

results <- list()
for(rhds in rh_dataset_names) {
  ds_data <- csr_dataset(rhds)

  # only some entries in each dataset with be "Rh", and we want to identify those
  ports_table <- ds_data$ports
  # Find which entries have "Rh"

  # for right now, just print out WHICH ports are measuring Rh

  # then filter the data table for those ports

  # and process
  results[[rhds]] <-   tibble(port_numbers = port_numbers_measuring_Rh)

}

final_results <- bind_rows(results, .id = "Dataset")
bpbond commented 4 years ago

The notation I'm using here assumes you're using the dplyr package for data processing. You don't have to, but it's handy.

bpbond commented 4 years ago

So, for this week:

jinshijian commented 4 years ago

An interesting paper: https://www.nature.com/articles/s41559-019-0809-2