Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Due to past versions of E3SM initializing variables to NaNs, simulations that use older restart files will still be initializing variables, like TWS_MONTH_BEGIN, to NaN which may cause runtime errors (examples of how these errors may appear in e3sm.log.* files are included below).

Solution

  • Ensure that the initial fix is in your branch (here: commit with fix ).

  • If your simulation uses an initial condition file for land (finidat), replace the NaNs in TWS_MONTH_BEGIN with the fill value of 1.e+36. Below are methods to perform the conversion:

    • Using NCO functions:

      Code Block
      languagenone
      ncatted -a _FillValue,TWS_MONTH_BEGIN,o,f,NaN ${infile.nc}
      ncatted -a _FillValue,TWS_MONTH_BEGIN,m,f,1.0e36 ${infile.nc}
    • Using a Python script:

      Code Block
      languagepy
      from netCDF4 import Dataset
      import numpy as np
      
      ofile = Dataset('infile.nc','r+')
      var_array = f.variables['TWS_MONTH_BEGIN']
      var_array[:][np.isnan(var_array[:])] = 1.e+36
      ofile.close()

...