1 | | The _FillValue attribute is not set in history file outputs for z_rho, z_u, z_v, z_w. So where those values are on land they come into MATLAB as 1e+37. |
| 1 | * 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: |
| 2 | {{{ |
| 3 | ! |
| 4 | ! Write time-varying depths of RHO-points. |
| 5 | ! |
| 6 | IF (Hout(idpthR,ng)) THEN |
| 7 | scale=1.0_dp |
| 8 | gtype=gfactor*r3dvar |
| 9 | status=nf_fwrite3d(ng, model, HIS(ng)%ncid, & |
| 10 | & HIS(ng)%Vid(idpthR), & |
| 11 | & HIS(ng)%Rindex, gtype, & |
| 12 | & LBi, UBi, LBj, UBj, 1, N(ng), scale, & |
| 13 | # ifdef MASKING |
| 14 | & GRID(ng) % rmask, & |
| 15 | # endif |
| 16 | & GRID(ng) % z_r, & |
| 17 | & SetFillVal = .FALSE.) |
| 18 | IF (FoundError(status, nf90_noerr, __LINE__, MyFile)) THEN |
| 19 | IF (Master) THEN |
| 20 | WRITE (stdout,10) TRIM(Vname(1,idpthR)), HIS(ng)%Rindex |
| 21 | END IF |
| 22 | exit_flag=3 |
| 23 | ioerror=status |
| 24 | RETURN |
| 25 | END IF |
| 26 | END IF |
| 27 | }}} |
| 28 | 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. |
| 29 | |
| 30 | * Corrected typo in **def_his.F** when defining implicit omega vertical velocity. |
| 31 | |
| 32 | * Updated metadata **varinfo.yaml** to include **omega_implicit** and added scale factor **1/rho0** for wave dissipation variables. |