OzFlux / PyFluxPro

PyFluxPro V3.4 is a significant upgrade from previous versions. It has several new features, improved stability and is introduced ahead of the 2021 OzFlux Data Workshop.
GNU General Public License v3.0
21 stars 5 forks source link

Partition the NEE to GPP and ER without using Fco2 #110

Open lzhzlw opened 1 year ago

lzhzlw commented 1 year ago

Hi Peter, I'm attempting to analyze site flux data from open platform contributed by other scientists using PyFluxPro. This data includes the NEE but does not contain the Fco2. I'm wondering whether I can directly partition the NEE to GPP and ER without using Fco2? Maybe REddyProc can do that, but for consistency with other analyses, I want to use PyFluxPro. Best regards, Zhenhai Liu

pisaac-ozflux commented 1 year ago

Hi Zhenhai Liu, I'll try replying to your question via email. If that doesn't reach you then I'll post the answer here. Cheers, Peter

pisaac-ozflux commented 1 year ago

Hi Zhenhai Liu,

Many thanks for using PyFluxPro.

Based on your post, you have a flux tower data set that has a variable called NEE and you would like to partition that variable into GPP and ER. It is hard to give a complete answer without more detail but I'll try and give some important points below:

  1. PyFluxPro (PFP) does partitioning at Level 6 (L6) and uses the CO2 flux (Fco2) as the starting point.
  2. Before the partitioning stage at L6, the flux tower data has been quality controlled (L2), corrections and post-processing applied as required (L3), had gaps in the meteorological variables filled (L4) and had gaps in the fluxes filled (L5). If you are using files from an external process then you will need to know what level of processing has been applied to the data by that external process so you can skip the appropriate levels in PFP. For example, has the data been gap filled?
  3. A variable called NEE from an external (non-PFP) process can be used by renaming NEE to Fco2 when the file created by the external process is converted into a format that PFP uses;
    1. The process of converting from a file created outside of PFP to the netCDF format used by PFP is done at L1. This stage of processing is used to convert Excel workbooks (.xls or .xlsx) or CSV files (.csv) to the netCDF files used by PFP.
    2. The L1 process uses information in the L1 control file to rename variables and add the required global and variable metadata. See the templates for the L1 control files in PyFluxPro/controlfiles/templates/L1 for details.
    3. If you are reading an Excel workbook or CSV file that has a variable called NEE then you can use the L1 process to rename that variable to Fco2.
    4. This assumes that NEE and Fco2 are equivalent, which may not be true depending on what processing has been done to the NEE variable by the external processing.
  4. In PFP, the following distinction is made between the Fco2 and NEE variables:
  5. Fco2 is the CO2 flux measured by a combination of eddy covariance and storage (if applied at L3) instruments. Fco2 is filtered at L5 to remove low turbulence conditions (ustar filter) before gap filling.
    1. Ecosystem respiration (ER) is obtained by using the nocturnal (night time, Fsd <= 10 W/m^2) values of Fco2 after the ustar filter has been applied.
    2. The resulting ER has gaps due to low turbulence conditions and the removal of day time hours. These gaps are filled using a neural network (ER_SOLO), the Lloyd-Taylor respiration model (ER_LT) and the Lasslop et al (2010) model (ER_LL).
    3. NEE is obtained by using the gap filled Fco2 during the day time hours (Fsd > 10 W/m^2), the ER observations where these are present (night time Fsd < =10 W/m^2, ustar-filtered Fco2) and modelled ER (ER_SOLO, ER_LT and ER_LL) where ER observations are missing. This gives 3 NEE variables called NEE_SOLO, NEE_LT and NEE_LL depending on which ER variable has been used.
    4. GPP is then calculated as GPP = -1*NEE + ER. This gives 3 GPP variables;
      1. GPP_SOLO = -1*NEE_SOLO + ER_SOLO
      2. GPP_LT = -1*NEE_LT + ER_LT
      3. GPP_LL = -1*NEE_LL + ER_LL

I hope this helps. Feel free to email me if you have more questions.

Cheers, Peter

On Wed, 1 Nov 2023 at 19:44, 刘侦海 @.***> wrote:

Hi Peter, I'm attempting to analyze site flux data from open platform contributed by other scientists using PyFluxPro. This data includes the NEE but does not contain the Fco2. I'm wondering whether I can directly partition the NEE to GPP and ER without using Fco2? Maybe REddyProc can do that, but for consistency with other analyses, I want to use PyFluxPro. Best regards, Zhenhai Liu

— Reply to this email directly, view it on GitHub https://github.com/OzFlux/PyFluxPro/issues/110, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSJCKAMFGFLOXTJ72SZADYCIDW7AVCNFSM6AAAAAA6Y6NJ2CVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TCOJUHA4TMNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Peter Isaac Ph: +61 3 59685998 Mob: 0429053970 Skype: pisaac.ozflux Email: @.***

"Vita brevis, ars longa, occasio praeceps, experimentum periculosum, iudicium difficile" - Hippocrates 400BC "What's the go o'that?" - James Clerk Maxwell c1835 "'Reality,' sa Molesworth 2,' is so unspekeably sordid it make me shuder.'"

lzhzlw commented 1 year ago

Hi Peter,

Thank you for your reply.

You fixed my problem, and your guidance improved my comprehension of PyFluxPro's processing procedure. Thank you again.

Details of my data: The data is provided in FluxNET format including NEE, GPP, ER and meteorological data after it has been gap filled and partitioned. To ensure it was consistent with what I had done on other sites, I also wanted to partition it using PyFluxPro. Or perhaps all I need is the L1 and L6 processing stages?

One more query. I want to use ERA5 and MODIS data for gap fill in the L4 and L5 stages. Your provided code indicates that the site information is stored in site_master.xls. But the site_master.xls template was nowhere to be seen. Its fundamental information appears to contain Site, Latitude, Longitude, Altitude, Time zone, Time step, Start year, and End year, based on the code. For L4 and L5, that ought to be sufficient information, right?

Best regards, Zhenhai Liu

pisaac-ozflux commented 1 year ago

Hi Zhenhai Liu,

All you should need are the L1 and L6 stages. L1 to get the data from the FluxNet CSV file into a netCDF file that can be read by PyFluxPro and L6 to do the partitioning. I have L1 control files that allow PFP convert the FluxNet SUBSET HH CSV files to netCDF files. These would do the conversion from FluxNet to PFP variable names with minor changes and would save you the time of constructing your own L1 control files. I will dig them out and send them to you.

Do you have an email address that I can use rather than continue this conversation via GitHub?

ERA5 is used at L4 and MODIS is used at L5. If you can send me an email address to use then I will copy my colleague into our conversation and they will be able to supply instructions for downloading the ERA5 and MODIS data, the Python scripts we use to process the ERA5 and MODIS and an example of the site_master.xls file.

Cheers, Peter

On Thu, 2 Nov 2023 at 13:51, 刘侦海 @.***> wrote:

Hi Peter,

Thank you for your reply.

You fixed my problem, and your guidance improved my comprehension of PyFluxPro's processing procedure. Thank you again.

Details of my data: The data is provided in FluxNET format including NEE, GPP, ER and meteorological data after it has been gap filled and partitioned. To ensure it was consistent with what I had done on other sites, I also wanted to partition it using PyFluxPro. Or perhaps all I need is the L1 and L6 processing stages?

One more query. I want to use ERA5 and MODIS data for gap fill in the L4 and L5 stages. Your provided code indicates that the site information is stored in site_master.xls. But the site_master.xls template was nowhere to be seen. Its fundamental information appears to contain Site, Latitude, Longitude, Altitude, Time zone, Time step, Start year, and End year, based on the code. For L4 and L5, that ought to be sufficient information, right?

Best regards, Zhenhai Liu

— Reply to this email directly, view it on GitHub https://github.com/OzFlux/PyFluxPro/issues/110#issuecomment-1789979531, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSJCIY7RC6JO54FV4OKLDYCMDDZAVCNFSM6AAAAAA6Y6NJ2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZHE3TSNJTGE . You are receiving this because you commented.Message ID: @.***>

-- Peter Isaac Ph: +61 3 59685998 Mob: 0429053970 Skype: pisaac.ozflux Email: @.***

"Vita brevis, ars longa, occasio praeceps, experimentum periculosum, iudicium difficile" - Hippocrates 400BC "What's the go o'that?" - James Clerk Maxwell c1835 "'Reality,' sa Molesworth 2,' is so unspekeably sordid it make me shuder.'"

lzhzlw commented 1 year ago

Hi Peter,

Thank you for your guidance. This is my email address: liuzhenhai5436@igsnrr.ac.cn

I have downloaded and processed the ERA5 data using /PyFluxPro/external/process_era52nc_new.py. However, the MODIS data has not yet been processed. Your advice will save me a lot of time.

Thanks a lot. Zhenhai Liu