CROCO+Sediment, missing hmorph?


When running CROCO with sediments, the hmorph variable seems missing from the INI file.

I added it with

ncks -v h

ncrename -h -O -v h,hmorph

ncatted -O -a long_name,hmorph,o,c,"moving bathymetry "

ncatted -O -a field,hmorph,o,c,"moving bathymetry, scalar, series "

ncatted -O -a standard_name,hmorph,o,c,"moving bathymetry "

ncks -h -A

and it work, but I wonder if I missed the step where it was created…

However hmorph is not being saved in the HIS file…

The problem was a bad logic in get_initial.F (which I thought was already corrected). You should have this code for hmorph in get_initial.F:

! Time evolving bathymetry (only needed for restart)
      ierr=nf_inq_varid (ncid, vname(1,indxHm)(1:lvar), varid)
      if (ierr .eq. nf_noerr) then
        ierr=nf_fread (h, ncid, varid, record, r2dvar)
        if (ierr .ne. nf_noerr) then
          MPI_master_only write(stdout,2) vname(1,indxHm)(1:lvar)
     &                                   , record,ininame(1:lstr)
          goto 99                                         !--> ERROR
        MPI_master_only  write(stdout,3) vname(1,indxHm)(1:lvar)
     &                                          ,ininame(1:lstr)

This is now corrected in the Master git branch, but you can just replace the code above.

Hi Patrick, thanks for the quick reply

I was expecting also 3D (time+2D) Hm variable in the HIS and AVG file, as the one read for the DUNE3D case

if usgs ~= 1
hmorph0  =squeeze(nc{var_hmorph}(1,:,:));
hmorph   =squeeze(nc{var_hmorph}(tndx,:,:));

Is there a way to save it for REGIONAL simulations?

Hi Andres, yes hmorph is output as long as MORPHODYN is defined and wrthis(indxHm) or wrtavg(indxHm) flags are T in (auxiliary fields). But is not up to date and the Hm label does not appear. We need to clean this up but in the mean time we left all the last flags as T.