Ticket #276: netcdf_output_mod.f90.patch

File netcdf_output_mod.f90.patch, 3.4 KB (added by rrigby, 2 years ago)
  • netcdf_output_mod.f90

    diff -ur a/netcdf_output_mod.f90 b/netcdf_output_mod.f90
    a b  
    7070!  include 'netcdf.inc'
    7171
    7272  ! parameter for data compression (1-9, 9 = most aggressive)
    73   integer, parameter :: deflate_level = 9
     73  integer, parameter :: deflate_level = 4
    7474  logical, parameter :: min_size = .false.   ! if set true, redundant fields (topography) are not written to minimize file size
    7575  character(len=255), parameter :: institution = 'NILU'
    7676
     
    315315  !   size_type x nx x ny x nz
    316316  ! create file
    317317
    318   call nf90_err(nf90_create(trim(fname), cmode = nf90_hdf5, ncid = ncid, &
    319     cache_size = cache_size)) 
     318  call nf90_err(nf90_create(trim(fname), cmode = nf90_netcdf4, ncid = ncid))
    320319
    321320  ! create dimensions:
    322321  !*************************
     
    455454  ! output orography
    456455  if (.not. min_size) then
    457456    call nf90_err(nf90_def_var(ncid, 'ORO', nf90_int, (/ lonDimID, latDimID /), oroID,  &
    458       deflate_level=deflate_level, chunksizes= (/ nnx, nny /)))
     457      deflate_level=deflate_level))
    459458    call nf90_err(nf90_put_att(ncid, oroID, 'standard_name', 'surface altitude'))
    460459    call nf90_err(nf90_put_att(ncid, oroID, 'long_name', 'outgrid surface altitude'))
    461460    call nf90_err(nf90_put_att(ncid, oroID, 'units', 'm'))
     
    485484     ! concentration output
    486485     if (iout.eq.1.or.iout.eq.3.or.iout.eq.5) then
    487486        call nf90_err(nf90_def_var(ncid,'spec'//anspec//'_mr', nf90_float, dIDs, sID , &
    488              deflate_level = deflate_level,  &
    489              chunksizes = chunksizes ))
     487             deflate_level = deflate_level))
    490488        call nf90_err(nf90_put_att(ncid, sID, 'units', units))
    491489        call nf90_err(nf90_put_att(ncid, sID, 'long_name', species(i)))
    492490        call nf90_err(nf90_put_att(ncid, sID, 'decay', decay(i)))
     
    506504     ! mixing ratio output
    507505     if (iout.eq.2.or.iout.eq.3) then
    508506        call nf90_err(nf90_def_var(ncid,'spec'//anspec//'_pptv', nf90_float, dIDs, sID , &
    509              deflate_level = deflate_level,  &
    510              chunksizes = chunksizes ))
     507             deflate_level = deflate_level))
    511508        call nf90_err(nf90_put_att(ncid, sID, 'units', 'pptv'))
    512509        call nf90_err(nf90_put_att(ncid, sID, 'long_name', species(i)))
    513510        call nf90_err(nf90_put_att(ncid, sID, 'decay', decay(i)))
     
    527524     ! wet and dry deposition fields for forward runs
    528525     if (wetdep) then
    529526        call nf90_err(nf90_def_var(ncid,'WD_spec'//anspec, nf90_float, depdIDs, &
    530              wdsID, deflate_level = deflate_level, &
    531              chunksizes = dep_chunksizes))
     527             wdsID, deflate_level = deflate_level))
    532528        call nf90_err(nf90_put_att(ncid, wdsID, 'units', '1e-12 kg m-2'))
    533529        call nf90_err(nf90_put_att(ncid, wdsID, 'weta_gas', weta_gas(i)))
    534530        call nf90_err(nf90_put_att(ncid, wdsID, 'wetb_gas', wetb_gas(i)))
     
    546542     endif
    547543     if (drydep) then
    548544        call nf90_err(nf90_def_var(ncid,'DD_spec'//anspec, nf90_float, depdIDs, &
    549              ddsID, deflate_level = deflate_level, &
    550              chunksizes = dep_chunksizes))
     545             ddsID, deflate_level = deflate_level))
    551546        call nf90_err(nf90_put_att(ncid, ddsID, 'units', '1e-12 kg m-2'))
    552547        call nf90_err(nf90_put_att(ncid, ddsID, 'dryvel', dryvel(i)))
    553548        call nf90_err(nf90_put_att(ncid, ddsID, 'reldiff', reldiff(i)))
hosted by ZAMG