CROCO+Sediment, missing hmorph?

Hi,

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

I added it with

ncks -v h croco_ini_sed.nc hmorph.nc

ncrename -h -O -v h,hmorph hmorph.nc

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

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

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

ncks -h -A hmorph.nc croco_ini_sed.nc

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:

#ifdef MORPHODYN
!
! Time evolving bathymetry (only needed for restart)
!
      lvar=lenstr(vname(1,indxHm))
      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
        endif
      else
        MPI_master_only  write(stdout,3) vname(1,indxHm)(1:lvar)
     &                                          ,ininame(1:lstr)
      endif
#endif

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
model='MUSTANG';
var_hmorph='Hm';
hmorph0  =squeeze(nc{var_hmorph}(1,:,:));
hmorph   =squeeze(nc{var_hmorph}(tndx,:,:));
else

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 croco.in (auxiliary fields). But croco.in 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.