Ask Your Question
0

CROCO+Sediment, missing hmorph ?

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

andres gravatar image

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

edit retag flag offensive close merge delete

Comments

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

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

2 answers

Sort by ยป oldest newest most voted
0

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

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.

edit flag offensive delete link more
0

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

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

edit flag offensive delete link more

Comments

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.

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

Question Tools

1 follower

Stats

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

Seen: 13 times

Last updated: Sep 09