NWTlter / NWT_climate_infilling

Code repository for climate infilling project
1 stars 1 forks source link

Transform code that makes station hierarchies (e.g., by coords, elev) into a function #6

Open caitlintwhite opened 11 months ago

caitlintwhite commented 11 months ago

Currently code to make station hierarchies (for each station, rank reference/source stations in pool of regional stations available by x,y coords and elevation) lives halfway down the qc R scripts for precip and temp respectively (under section "GRAB SITE INFO"). Instrument similarity to target (when source station instrumentation is known, e.g., a D1 hmp sensor is prioritized over D1 chart for qcing and gapfilling SDL hmps) would be good to incorporate in the hierarchy decision (I manually adjusted hierarchy order afterwards).

The nice thing is unless new stations are being incorporated, this hierarchy look up table only needs to be made once, so workflow users could just use the tables that already exist from when I made them for V1 of Saddle (in this way, this is an optional task). On the other hand, making this a function could be a general utility function for gap-filling other met time series datasets (e.g., sensor node array, other requests I've gotten from NWT researchers interested in gap-filling their HOBO data).

While the code to make this lives in the qc scripts, it's really more part of the prep work before initiating qc and gapfilling.