HARPgroup / HARParchive

This repo houses HARP code development items, resources, and intermediate work products.
1 stars 0 forks source link

2021/10/25 and 2021/11/01 HARP Work Session #133

Open rburghol opened 2 years ago

rburghol commented 2 years ago
kylewlowe commented 2 years ago

CLC algorithm update:

rburghol commented 2 years ago

Hmm. Well, RNMAX could be the max radiation I suppose. But to give you some hints on this, the lines that you have identified are just declarations, in other words, in Fortran (and many other languages) you have to declare what kind of variable something is before you can use it -- unlike in R which usually infers what a variable is by the way that you declare it.

So, next steps would be to:

  1. post up the command that you are using that gets the error (just for grins)
  2. Search the code for occurrence of RNMAX, since it seems that we might be on the hook for supplying that! If so, we want to know what the format it expects is.
  3. See if you can find (via searches), any code that works with the CLC variable, for that matter, have you found a CLC variable in there?
  4. I think you can omit step 3 above, since I indicated the block of code that calculates that. My read on this is that line 954 is where CLC is being calculated. Because solar radiation will vary by latitude day of the year, and hour of the day, somewhere they are storing the maximum solar radiation observed in the entire dataset for each hour of each day of the year in the variable RNMAX, then calculating the cloud cover at any time based on the percentage of the maximum ever observed for that location. Thus, I suppose that we must do that too -- or search the code Gopal has already given us for this thing. I think the process would be
    1. we can simply load our solar radiation file for each land segment in R
    2. use sqldf to do this: select month, day, hour, max(solar_rad) as RNMAX from solar_rad_dataframe GROUP BY month, day, hour
    3. save that in our data directory that the fortran file is trying to load (described in line 854)
alexwlowe commented 2 years ago

^Here is the command that gets the error:

 ./wdm_insert_ALL
A51175 nldas2 harp2021 1984010100-1984123123 1984 1984 1 1 1 1 1 1 1

The error says:

STOP ERROR opening .RNMax file

Which means it occurs on line 857

katealbi11 commented 2 years ago

Graph for Multiple Land Segments

Screen Shot 2021-11-02 at 3 26 52 PM Screen Shot 2021-11-01 at 11 36 03 AM Screen Shot 2021-11-02 at 3 32 09 PM
katealbi11 commented 2 years ago

Graphs with Summer and Winter Data Only

Screen Shot 2021-11-02 at 3 16 07 PM Screen Shot 2021-11-02 at 3 19 33 PM
alexwlowe commented 2 years ago

11/2/2021 Update:

Kyle finished the RNMax script yesterday and pushed the script to github, and was able to get all the files on the terminal.

Upon attempting to create full WDMs, I received an couple of errors:

The first error stated "error opening RNMax file" and I was able to past this by switching the directories for which the RNMax files where stored.

The second error stated "error reading RNMax file". I received this error writhe before the end of the day yesterday and did not get a chance to investigate why it occurred, but will take a look at it when the new server is up and running. I'm thinking it could be some differences in formatting between our RNMax csvs and the csvs the wdm populating function expects.

Once we have Gopal's LongTermAvgRNMax.cpp function compiled and running we may just use that instead.

katealbi11 commented 2 years ago

La Nina Updates:

alexwlowe commented 2 years ago

TO DO AFTER 11/3: