ClimateGlobalChange / tempestextremes

Extreme weather detection and characterization
83 stars 30 forks source link

Exception in NodeFileEditor - "Time (...) does not exist in input data fileset" #84

Open tonyrafter opened 3 weeks ago

tonyrafter commented 3 weeks ago

Hello! I'm looking for some help/ideas to track down the cause of a strange exception produced when running NodeFileEditor.

I am using NodeFileEditor to calculate TC energetics (ACE, PDI etc.) following tracking and stitching with DetectNodes/StitchNodes. This has worked for quite a few simulations so far, so I am reasonably confident the workflow is okay.

However, for one model run I am getting an error when trying to produce ACE.

The input commands are (with some filenames replaced):

Arguments:
  --in_nodefile <string> [(StitchNodes output file with tracks)] 
  --in_nodefile_type <string> ["SN"] [DN|SN]
  --in_data <string> [""] 
  --in_data_list <string> [(file with lists of model outputs, one month per line)] 
  --in_connect <string> [""] 
  --diag_connect <bool> [false] 
  --regional <bool> [true] 
  --in_fmt <string> ["lon,lat,mslp,wind,zs,sst2deg_min,sst2deg_avg,sst2deg_max"] 
  --out_fmt <string> ["lon,lat,mslp,wind,ACE,PDI,IKE,rsize,rprof"] 
  --out_nodefile <string> [(output file containing energetics alongside each track)] 
  --out_nodefile_format <string> ["csv"] [gfdl|csv|csvnohead]
  --timefilter <string> [""] 
  --colfilter <string> [""] [col,op,value;...]
  --calculate <string> ["ACE=eval_ace(uas,vas,5);PDI=eval_pdi(uas,vas,5);IKE=eval_ike(uas,vas,5);rprof=radial_wind_profile(uas,vas,159,0.125);rsize=lastwhere(rprof,>,8)"] 
  --apply_time_delta <string> [""] 
  --lonname <string> ["lon"] 
  --latname <string> ["lat"] 

...and the error produced looks like this:

..Calculating "ACE=eval_ace(uas,vas,5)"
....EXCEPTION (/[path_to_installation]/tempestextremes/src/nodes/NodeFileEditor.cpp, Line 1687) Time (2020-12-06 12:00:00) does not exist in input data fileset

...which I see in the output once for each CPU used in the call to NodeFileEditor.

This exception sounds like it's telling me the input files (from the model) are missing a timestep or the like, however:

Do you have any idea what might be causing this error? Happy to supply any other info if needed.

paullric commented 3 weeks ago

Hmm… Do you have a copy of one of the input data files? This issue can pop up when the time is stored as a double because of floating point rounding leading to the input dataset storing 2020-12-06 11:59:59 instead.

Are you using TE from conda or from source?

On Aug 23, 2024, at 7:32 AM, tonyrafter @.***> wrote:

Hello! I'm looking for some help/ideas to track down the cause of a strange exception produced when running NodeFileEditor.

I am using NodeFileEditor to calculate TC energetics (ACE, PDI etc.) following tracking and stitching with DetectNodes/StitchNodes. This has worked for quite a few simulations so far, so I am reasonably confident the workflow is okay.

However, for one model run I am getting an error when trying to produce ACE.

The input commands are (with some filenames replaced):

Arguments: --in_nodefile [(StitchNodes output file with tracks)] --in_nodefile_type ["SN"] [DN|SN] --in_data [""] --in_data_list [(file with lists of model outputs, one month per line)] --in_connect [""] --diag_connect [false] --regional [true] --in_fmt ["lon,lat,mslp,wind,zs,sst2deg_min,sst2deg_avg,sst2deg_max"] --out_fmt ["lon,lat,mslp,wind,ACE,PDI,IKE,rsize,rprof"] --out_nodefile [(output file containing energetics alongside each track)] --out_nodefile_format ["csv"] [gfdl|csv|csvnohead] --timefilter [""] --colfilter [""] [col,op,value;...] --calculate ["ACE=eval_ace(uas,vas,5);PDI=eval_pdi(uas,vas,5);IKE=eval_ike(uas,vas,5);rprof=radial_wind_profile(uas,vas,159,0.125);rsize=lastwhere(rprof,>,8)"] --apply_time_delta [""] --lonname ["lon"] --latname ["lat"] ...and the error produced looks like this:

..Calculating "ACE=eval_ace(uas,vas,5)" ....EXCEPTION (/[path_to_installation]/tempestextremes/src/nodes/NodeFileEditor.cpp, Line 1687) Time (2020-12-06 12:00:00) does not exist in input data fileset ...which I see in the output once for each CPU used in the call to NodeFileEditor.

This exception sounds like it's telling me the input files (from the model) are missing a timestep or the like, however:

The program seems to have run okay to this point, including the tracking. I have run several checks on the input files (uas and vas) in the eval_ace call, and I can't see any issues with the data or metadata. The other model fields also look normal at the problematic time step (as well as before and after that). Other netCDF tools have no issues working with the data. The output of StitchNodes looks normal, in both csv and gfdl formats, and has a row/track starting at the above time (2020-12-06 12:00:00). Do you have any idea what might be causing this error? Happy to supply any other info if needed.

— Reply to this email directly, view it on GitHub https://github.com/ClimateGlobalChange/tempestextremes/issues/84, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIVPZCDZZ2YVHBOXED752DZS5BZLAVCNFSM6AAAAABNAJWZYWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4DGMRYGI3TAMQ. You are receiving this because you are subscribed to this thread.

tonyrafter commented 2 weeks ago

Thanks for the quick reply!

I'm using TE from source, though I installed it 2+ years ago... I think it is v2.1. Have there been updates that might influence this behaviour?

As for the input files, time is stored as a double, as 'days since 1950-01-01'. The time step in question renders properly (i.e. to the same time as in DetectNodes ouput) using several netCDF tools (ncdump, ncview, nco, cdo).

The input files from the model are ~400+MB so I'm reluctant to upload here... Perhaps I can serve sample files somewhere for you to look at and DM/email you the location?

Edit: I've emailed you a path to download the input files used for the month in question.