Opened 13 years ago

Closed 13 years ago

#516 closed upgrade (Done)

Miscelaneous updates

Reported by: arango Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.5
Component: Nonlinear Version: 3.5
Keywords: Cc:

Description

Several updates are made in preparation for ROMS 3.6 release. Some changes were required to allow debugging of next ROMS major upgrade which includes phase II of nesting:

  • Introduced a new CPP option POSITIVE_ZERO to impose positive zero data in output NetCDF files. Starting F95, zero values can be signed (-0.0 or +0.0) following the IEEE 754 floating-point standard. This may produce different output data in serial and parallel applications. Changes are made to output routines nf_fwrite2d, nf_fwrite3d, nf_fwrite4d, nf_fwrite2d_bry, and nf_fwrite3d_bry to enforce positive output data when this option is activated. This essential when comparing serial and parallel solutions to guarantee a code free of parallel bugs.
  • Added calls to periodic boundary conditions in set_avg.F to guarantee periodic output in the time-averaged NetCDF file. The full ranges (IstrR,JstrR) and (IendR,JendR) have different values in periodic applications. Their values are not longer the full range of the C-grid, resulting in non-periodic boundaries with zero values instead. Many thanks to John Wilkin for bringing this to my attention. This has been in the code for years... I guess that we never looked in detail if the averaged data was really periodic. This only affects applications with periodic boundary conditions.
  • Corrected a bug in inquire.F when processing multiple files (time split data). It turns out that the local variable Fcount is not assigned after the first field is processed in a new file. For example, the temperature is processed correctly but not the salinity in a time split climatology files. The logic failed to initialize Fcount when processing salinity. Compilers treat uninitialized data differently. New logic is added to correct this problem and report uninitialized Fcount failures in the future. Many thanks Fred Castruccio for reporting this problem. I also added logic, suggested by Kate, to take into account a C-language null termination character in NetCDF string variable attributes. This occurs when creating NetCDF file with C-programs.
  • Changed the default ot the NetCDF creation mode (CMODE) to allow large file support in mod_netcdf.F:
    !
    !  Netcdf file basic creation mode flag. Its value is further modified
    !  in "netcdf_create" using the IOR function to include additional
    !  flags, like "nf90_clobber" to overwrite existing file. 
    !
    #if defined HDF5
    !     integer :: CMODE = nf90_hdf5         ! NetCDF-4/HDF5 format file
          integer :: CMODE = nf90_netcdf4      ! NetCDF-4/HDF5 format file
    #else
          integer :: CMODE = nf90_64bit_offset ! NetCDF 64-bit offset format
    !                                            (large file support)
    #endif
    
    The values of CMODE variable are further modified in netcdf_create using the IOR intrinsic function to include additional creation flags.
    #if defined PARALLEL_IO && defined DISTRIBUTE
          my_cmode=nf90_clobber
    !     my_cmode=IOR(nf90_mpiio, nf90_clobber) ! not available in old libs
          my_cmode=IOR(my_cmode, CMODE)
          ...
    #else
          my_cmode=IOR(nf90_clobber, CMODE)
          ...
    #endif
    
    The parallel I/O is still broken with the newer versions of the NetCDF/HDF libraries. It works with NetCDF version 4.1.1. The parameter nf90_mpiio is a newer parameter not available in older versions of the NetCDF library. Correcting the parallel I/O in ROMS with latest version of the NetCDF library is in my to-do list. Please be patient.
  • Removed the global NetCDF attribute header_file when DEBUGGING is activated to facilitate tracking parallel bugs in ROMS version 3.6 to be released shortly.
  • Corrected all the full I- and J-ranges in set_depths.F, tl_set_depths.F, rp_set_depths.F, and ad_set_depths.F to be IstrT:IendT and JstrT:JendT, respectively.
  • Added the sponge areas for application WC13 in routine ana_hmixcoef for backward compatibility with ROMS 3.6 and higher.

Change History (1)

comment:1 by arango, 13 years ago

Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.