Ask Your Question

CROCO+Sediment, missing hmorph ?

asked 2022-09-08 23:52:22 +0100

andres gravatar image


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....

edit retag flag offensive close merge delete


However hmorph is not being saved in the HIS file...

andres gravatar imageandres ( 2022-09-09 00:42:30 +0100 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2022-09-09 08:35:09 +0100

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.

edit flag offensive delete link more

answered 2022-09-09 14:36:59 +0100

andres gravatar image

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?

edit flag offensive delete link more


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.

pmarches gravatar imagepmarches ( 2022-09-09 14:54:02 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2022-09-08 23:52:22 +0100

Seen: 77 times

Last updated: Sep 09 '22