SCM UFS ICs from C768L65 netcdf4 related error

Submitted by Anning.Cheng on Mon, 10/26/2020 - 10:35

Grant:

The IC generator works for FV3_C96_example_ICs, but not for C768L65 ICs. Something to do with the necdf4 lib. Do you have any idea to fix it?

/scratch1/NCEPDEV/global/Anning.Cheng/gmtb-scm/scm/etc/scripts% ./UFS_IC_generator.py -l 300.00 30.0 -d 202006200000 -i ../../data/raw_case_input/FV3_C768_20200620_ICs -g ../../data/raw_case_input/FV3_C768_20200620_ICs -n fv3_model_C768_IC -oc
INFO: Self-intersection at or near point 520.04637597783653 44.565528971856615
Tile found: 5
The closest point in tile 5 has indices [78,718]
This index has a central longitude/latitude of [300.040978551,29.9860257185]
This grid cell is approximately 4.24130893181 km away from the desired location of 300.0 30.0
Traceback (most recent call last):

Traceback (most recent call last):
  File "./UFS_IC_generator.py", line 1569, in <module>
    main()
  File "./UFS_IC_generator.py", line 1547, in main
    (state_data, surface_data, oro_data) = get_UFS_IC_data(in_dir, tile, tile_i, tile_j, old_chgres)
  File "./UFS_IC_generator.py", line 286, in get_UFS_IC_data
    surface_data = get_UFS_surface_data(dir, tile, i, j, old_chgres)
  File "./UFS_IC_generator.py", line 383, in get_UFS_surface_data
    ts_in=nc_file['tsea'][j,i]
  File "netCDF4/_netCDF4.pyx", line 3342, in netCDF4._netCDF4.Variable.__getitem__ (netCDF4/_netCDF4.c:31761)
  File "netCDF4/_netCDF4.pyx", line 3997, in netCDF4._netCDF4.Variable._get (netCDF4/_netCDF4.c:40144)
IndexError

% module list

Currently Loaded Modules:
  1) intel/18.0.5.274   3) netcdf/4.7.0     5) hpss/hpss      7) ncl/6.5.0         9) grads/2.0.2
  2) impi/2018.0.4      4) anaconda/2.3.0   6) rocoto/1.3.2   8) prod_util/1.1.0
 

Hi Anning,

 

The example FV3 initial conditions were apparently generated with an older version of the chgres program. To read files generated from this older version, there is a command-line option (-oc) that is invoked. It sounds like the initial conditions that you're trying to read are generated from a newer version of chgres, yet the call to UFS_IC_generator.py that you copied is still using this flag. The first thing that I would try is to omit that flag:

./UFS_IC_generator.py -l 300.00 30.0 -d 202006200000 -i ../../data/raw_case_input/FV3_C768_20200620_ICs -g ../../data/raw_case_input/FV3_C768_20200620_ICs -n fv3_model_C768_IC