soilwater / crnpy

A Python toolbox for handling common tasks with cosmic-ray neutron probes
https://soilwater.github.io/crnpy/
Other
10 stars 1 forks source link

Incoming Neutron Intensity #7

Closed danpower101 closed 7 months ago

danpower101 commented 11 months ago

This is part of the review of the https://github.com/openjournals/joss-reviews/issues/6025

Reference Date

Firstly, I would suggest setting the reference date for Incoming Neutron Intensity to be 1 May 2011. Your current method can cause different reference dates for each site.

The 1 May 2011 date is used by all the large networks (Zreda et a., 2012, Hawdon et al., 2014, Bogena et al., 2022). It is somewhat arbitrary, but it makes comparing sites easier and keeps things to a standard (especially if a user wants to compare their sensor to another from other networks). It wouldn’t impact the outputted soil moisture, but it would make it harder to compare intensity corrections between sites processed in CRNPy and sites processed by the networks. This could be provided as a hard coded data point that you collect for each potential NMDB sensor.

Methods

Your current method of selecting NMDB with nearest cutoff rigidity was initially used by CosmOz (add the reference for this: Hawdon et al., 2014). Although note, they’ve recently changes their method to use a revised calculation (McJannet and Desilets, 2023) (https://cosmoz.csiro.au/about).

COSMOS-EUROPE use a slightly different method which adjusts the differences between the reference NMDB tower (usually JUNG) and the specific CRNS cutoff rigidity (equations 4 and 5 in the Hawdon et al., 2014 paper).

I think it would be good to add these options in your code base. Until the CRNS community agrees on the "correct" method it would be good to provide users the options to match commonly used methods.

Filling missing data

There is a step that fills the fi column with a 1 when NMDB data is missing. This should be removed. This could lead to corrected neutron quantities suddenly changing by several % which will translate to changes in soil moisture. A user wouldn't know that this is due to gap filling and could misinterpret events.

joaquinperaza commented 9 months ago

@danpower101 Thanks for your valuable feedback! I implemented the suggested changes. I slightly changed the approach in the reference date comment. Our solution in this iteration was to include the method get_reference_neutron_flux(station, date = pd.to_datetime("2011-05-01")), allowing by default pulling the value for the station on 1 May 2011, but if needed, we ensure the library is still flexible, allowing to specify a different date, e.g. due to having a different calibration approach, NM availability, etc.

danpower101 commented 7 months ago

Great, happy with the revisions here.