#946 closed bug (Fixed)

SetFillVal argument missing when writing vertical coordinates

Reported by: wilkin Owned by:
Priority: minor Milestone: Release ROMS/TOMS 4.2
Component: Nonlinear Version: 4.1
Keywords: Cc:

Description (last modified by arango)

  • The variables associated with depth are special in ROMS because of wetting/drying and other algorithms. We cannot add a _FillValue in output NetCDF files. Although the output variables z_rho, z_u, z_v, and z_w are defined with SetFillVal = .FALSE. in module def_his.F, the same optional variable is missing when writing in wrt_his.F and wrt_quick. For example, we need to have in wrt_his.F instead:
    !
    !  Write time-varying depths of RHO-points.
    !
          IF (Hout(idpthR,ng)) THEN
            scale=1.0_dp
            gtype=gfactor*r3dvar
            status=nf_fwrite3d(ng, model, HIS(ng)%ncid,                     &
         &                     HIS(ng)%Vid(idpthR),                         &
         &                     HIS(ng)%Rindex, gtype,                       &
         &                     LBi, UBi, LBj, UBj, 1, N(ng), scale,         &
    # ifdef MASKING
         &                     GRID(ng) % rmask,                            &
    # endif
         &                     GRID(ng) % z_r,                              &
         &                     SetFillVal = .FALSE.)
            IF (FoundError(status, nf90_noerr, __LINE__, MyFile)) THEN
              IF (Master) THEN
                WRITE (stdout,10) TRIM(Vname(1,idpthR)), HIS(ng)%Rindex
              END IF
              exit_flag=3
              ioerror=status
              RETURN
            END IF
          END IF
    
    To avoid those land values being read in MATLAB as 1e+37. Those variables were written correctly in wrt_dai.F, which is used for EnKF and 4D-Var.
  • Corrected typo in def_his.F when defining implicit omega vertical velocity.
  • Updated metadata varinfo.yaml to include omega_implicit and added scale factor 1/rho0 for wave dissipation variables.

Change History (1)

comment:1 by arango, 11 months ago

Description: modified (diff)
Resolution: Fixed
Status: newclosed
Summary: _FillValue attribute for coordinates z_rho etc.SetFillVal argument missing when writing vertical coordinates
Note: See TracTickets for help on using tickets.