NCAR / NCAR/DART

note on netcdf 64bit vs netcdf-4 file creation DART

Open
#287 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

IO pmo
Dominant language
Fortran
Stars
263
Forks
182
Avg merge
11d 12h
Merged PRs (30d)
7

Description

noticed this when testing:

direct_netcdf_mod.f90 creates netcdf files in 64bit offset mode:
https://github.com/NCAR/DART/blob/62ecfa2a2b4c7de55f98f434de49e076060fd82c/assimilation_code/modules/io/direct_netcdf_mod.f90#L1617

netcdf_utilities_mod.f90 creates netcdf files in classic mode
https://github.com/NCAR/DART/blob/62ecfa2a2b4c7de55f98f434de49e076060fd82c/assimilation_code/modules/utilities/netcdf_utilities_mod.f90#L2409

Do we care about this? I don't know. Just making a note.

running perfect_model_obs:
input state file is netCDF-4 time as unlimited
dart created file from perfect_model_obs has a time dimension but not unlimited. 64-bit offset.

If you create the dart file as netCDF-4 (same as the template file) you get

message: nf90_enddef end define mode: NetCDF: One or more variable sizes viola
 te format constraints

so the 64 bit offset is getting around not having the unlimited dimension.

Originally posted by @hkershaw-brown in https://github.com/NCAR/DART/issues/278#issuecomment-917251539

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the file-creation paths in assimilation_code/modules/io/direct_netcdf_mod.f90 around line 1617 and assimilation_code/modules/utilities/netcdf_utilities_mod.f90 around line 2409. Run perfect_model_obs with a netCDF-4 input and reproduce the nf90_enddef format-constraint message. Done should establish the intended creation mode and resolve or document the mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
data
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.