ORAC-CC / orac

Optimal Retrieval of Aerosol and Cloud
GNU General Public License v3.0
28 stars 19 forks source link

nwp_time_factor will always be 6 #88

Open simonrp84 opened 1 year ago

simonrp84 commented 1 year ago

In commit #dd387e9, logic was added to determine if the time factor for NWP data should be 6 hours or 1 hour (in support of the hourly data available in ERA5) in orac_preproc.F90:

   ! If we're reading BADC ERA5 data, we default to one file every hour,
   ! otherwise assume it's one every six hours.
   if (nwp_flag .eq. 2) then
      preproc_opts%nwp_time_factor       = 1.
   else
      preproc_opts%nwp_time_factor       = 6.
   end if

This code is too early, and it's called before nwp_flag is read from the driver file. Therefore, nwp_time_factor will always be 6. I can't fix it myself right now, but I suggest moving the above lines to somewhere around line number 620. At that point the driver file is read and nwp_flag will be correct.