Skip to content

Commit

Permalink
Fix history single/double precision issues (CICE-Consortium#628)
Browse files Browse the repository at this point in the history
* Fix history single/double precision issues

- Fix io_netcdf.  Double precision output was passed thru a single precision variable
  before writing so the precision in the output was lost.  This is now fixed.  Single
  and double precision netcdf output now reflects the internal model data correctly.

- Fix io_pio2.  Single precision output with pio2 was producing garbage for both netcdf
  and pnetcdf cases.  This is not the case with pio1.  Several changes were needed.
  - The iodesc initialization has to differentiate single or double target variables
  - The write_darray has to explicitly send a single or double array

- Migrated to spval_dbl fills everywhere data is a double type, mostly in ice_history.F90.

- Created a ice_write_hist_fill method in both io_netcdf and io_pio2 to improve reuse.

Ran io_suite on cheyenne and checked that values are produced correctly for each case.

* update formatting
  • Loading branch information
apcraig authored Aug 31, 2021
1 parent 26d917a commit cb7d616
Show file tree
Hide file tree
Showing 5 changed files with 417 additions and 511 deletions.
Loading

0 comments on commit cb7d616

Please sign in to comment.