Changeset 3465 for trunk/LMDZ.MARS/util


Ignore:
Timestamp:
Oct 21, 2024, 12:28:45 PM (2 months ago)
Author:
jbclement
Message:

Mars PCM:

  • Small update in "analyse_netcdf.py".
  • Putting the 1D launching scripts back to the "deftank" folder.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/util/analyse_netcdf.py

    r3459 r3465  
    3737   
    3838    # Calculate min, max and mean
    39     data_min = np.nanmin(data) # Min value ignoring NaN
    40     data_max = np.nanmax(data) # Max value ignoring NaN
    41     data_mean = np.nanmean(data) # Mean value ignoring NaN
     39    if np.isnan(data).all():
     40        min_val = np.nan
     41        max_val = np.nan
     42        mean_val = np.nan
     43    else:
     44        data_min = np.nanmin(data) # Min value ignoring NaN
     45        data_max = np.nanmax(data) # Max value ignoring NaN
     46        data_mean = np.nanmean(data) # Mean value ignoring NaN
    4247   
    4348    # Check if there are any NaN values
Note: See TracChangeset for help on using the changeset viewer.