USGS-R / river-dl

Deep learning model for predicting environmental variables on river systems
Creative Commons Zero v1.0 Universal
21 stars 15 forks source link

reversing deltaPhi order, scaling GW inputs for val and tst partitions #150

Closed janetrbarclay closed 2 years ago

janetrbarclay commented 2 years ago

This PR makes 3 changes:

  1. It reverses the order of the deltaPhi calculation so that the phase of the water signal is subtracted from the phase of the air signal and does not convert the phase to the day of the year with the maximum temperature. This yields a positive phase difference when the air signal precedes the water signal.
  2. It scales the calculated GW inputs for the validation and testing partitions. Previously scaled values were only calculated for the training partition, but scaled values are needed for the new training function that calculates the validation loss for each epoch (from #141)
  3. It adds an option to the config file to specify the calculation method for the GW loss (fft or linalg)
SimonTopp commented 2 years ago

Sounds good. I'll take a look at this today or tomorrow between AGU talks!

janetrbarclay commented 2 years ago

Thanks! Subtracting the phase from (3/2)*pi/2 converts the phase to the day of the year with the max temp. We could do this, but then we'd need to subtract the air temp day from the water temp day to get a positive lag, rather than water phase from air phase as we're currently doing. There's a few more details on this in the ExaSheds_meeting_notes.docx file (on sharepoint in 40.1 Data-driven temperature / Meeting Notes)