intro story Coast / Estuary

Coast / Estuary

Coastal systems are among the most dynamic physical systems on earth and are subject to a large variety of forces. The morphodynamic changes occurring to coastlines worldwide are of great interest and importance. These changes occur as a result of the erosion of sediments, its subsequent transport as bed load or suspended load, and eventual deposition. 
 
Estuaries are partly enclosed water bodies that have an open connection to the coast. Estuaries generally have one or more branching channels, intertidal mudflats and/or salt marshes. Intertidal areas are of high ecological importance and trap sediments (sands, silts, clays and organic matter).
Within the Delft3D modelling package a large variation of coastal and estuarine physical and chemical processes can be simulated. These include waves, tidal propagation, wind- or wave-induced water level setup, flow induced by salinity or temperature gradients, sand and mud transport, water quality and changing bathymetry (morphology). Delft3D can also be used operationally e.g. storm, surge and algal bloom forecasting. 
 
On this discussion page you can post questions, research discussions or just share your experience about modelling coastal and/or estuarine systems with Delft3D FM. 
 

** PLEASE TAG YOUR POST! **

 

 

Sub groups
D-Flow Flexible Mesh
DELWAQ
Cohesive sediments & muddy systems

 

 

Message Boards

Problems converting a Spherical coordinate run into a Cartesian one

EM
Ernesto Molinas, modified 7 Years ago.

Problems converting a Spherical coordinate run into a Cartesian one

Youngling Posts: 8 Join Date: 1/27/12 Recent Posts
Hi,

I already have a calibrated yearlong run (DFLOW) working pretty well into spherical coordinates and using space varying wind and pressure inputs. Recently i had access to Delft3D PART and found out that i needed to convert my hydrodynamics into Cartesian coordinates.

Converting all files and successfully performing the new run, i found out that the model was producing some absurd results after a few months of model time. I tried to reproduce the same run without meteo input files and the absurd results did NOT occurred. I couldn't find any remaining errors at meteo input files, so i'm sending a example of old (U2011.amu) and new files (utmU2011.amu) been used.

Maybe there is a problem related to the big dimensions associated to the domain, although i'm not sure this is it. The Cartesian file is in UTM 22N and more than one zone is involved (22N, 22S, 23N and 23S), is there any problem with negative Cartesian coordinates?.

Grateful for the attention,

Ernesto Molinas
Qinghua Ye, modified 7 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Jedi Council Member Posts: 612 Join Date: 3/2/11 Recent Posts
Hi Ernesto,

For such a big area (45 degrees), I wound suggest you use the Spherical coordinate. You always have to keep in mind about the projection methods for the transforming.

Hope this help a bit,

Qinghua
EM
Ernesto Molinas, modified 7 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Youngling Posts: 8 Join Date: 1/27/12 Recent Posts
I already have a model working in spherical coordinates.
Is it possible to use deft3d-PART into spherical coordinates?
KL
K Liu, modified 6 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Padawan Posts: 48 Join Date: 10/23/13 Recent Posts
Just encounter the same question. Andbody has a hint for that?

Ernesto Molinas:
I already have a model working in spherical coordinates.
Is it possible to use deft3d-PART into spherical coordinates?
MJ
Michel Jeuken, modified 6 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Jedi Knight Posts: 156 Join Date: 1/21/13 Recent Posts
It is not possible directly, but there is a work around. The only file that needs to me changed is the cco-file, a fiel contaiing the coordinates. This can be done in several ways, for example using Matlab and a small FORTRAN program. You will need the Matlab tools from Open Earth (https://svn.oss.deltares.nl/repos/openearthtools/trunk/matlab/) and Matlab of course. You can execute the following commands in Matlab:

# this script needs wlsettings and oetsettings active
# it saves a grid file which can be coverted to a new cco file by grd2cco.exe

filcco = qpfopen('com-c41a.cco');
lon = filcco.X;
lat = filcco.Y;

[x,y]=convertCoordinates(lon,lat,'persistent','CS1.code',4326,'CS2.code',28992);
ok = wlgrid('write','X',x,'Y',y);


To convert the resulting grd in a cco-file use the program grd2cco (EDIT: removed, accidently uploaded the wrong version, sorry. The correct version is in post bellow) with the comandline arguments <grd-file name> <number of layers in WAQ/PART>. You can use the resulting cco in combination with the original lga to get the right segment numbering.

Michel
KL
K Liu, modified 6 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Padawan Posts: 48 Join Date: 10/23/13 Recent Posts
Michel,

Thank you so much for your sharing!

Everything works well except the last step: grd2cco.I run this exe in windows commands (after changing to the directory with *.exe and mygrid.grd):
grd2cco.exe mygrid.grd 1

Then error comes:
forrtl: severe (24): end-of-file during read, unit 10, file mydirectory\com-xy.grd

Also, I write the grid file as
ok = wlgrid('write','X',x,'Y',y, 'FileName', 'mygrid.grd');

Should I rename the grd as com-xy.grd? But I tried, it doesn't work. Could you give some hint?

Thanks!

Michel Jeuken:
It is not possible directly, but there is a work around. The only file that needs to me changed is the cco-file, a fiel contaiing the coordinates. This can be done in several ways, for example using Matlab and a small FORTRAN program. You will need the Matlab tools from Open Earth (https://svn.oss.deltares.nl/repos/openearthtools/trunk/matlab/) and Matlab of course. You can execute the following commands in Matlab:

# this script needs wlsettings and oetsettings active
# it saves a grid file which can be coverted to a new cco file by grd2cco.exe

filcco = qpfopen('com-c41a.cco');
lon = filcco.X;
lat = filcco.Y;

[x,y]=convertCoordinates(lon,lat,'persistent','CS1.code',4326,'CS2.code',28992);
ok = wlgrid('write','X',x,'Y',y);


To convert the resulting grd in a cco-file use the program grd2cco with the comandline arguments <grd-file name> <number of layers in WAQ/PART>. You can use the resulting cco in combination with the original lga to get the right segment numbering.

Michel
MJ
Michel Jeuken, modified 6 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Jedi Knight Posts: 156 Join Date: 1/21/13 Recent Posts
Hi K Lui,

I'm sorry I haven't seen your reply earlier. The posted version was not the right one, I accidentally picked an old version. There is some variation in the header of the grd file, and this version should be quite flexible with this. The attached version should be the right one.

So, to convert the resulting grd in a cco-file use the program grd2cco with the comandline arguments <grd-file name> <number of layers in WAQ/PART>. You can use the resulting cco in combination with the original lga-file to get the right segment numbering.

Would be nice to hear if this works for you!

Michel
KL
K Liu, modified 6 Years ago.

RE: Problems converting a Spherical coordinate run into a Cartesian one

Padawan Posts: 48 Join Date: 10/23/13 Recent Posts
Michel,

Thank you so much for your help! First, this version of grd2cco works without any problem. But when I read the hydrodynamic in PART input GUI, an error pops out:

"Error reading grid file(*.lga). Note that grid file are platform dependent. Please check!"

What platform does this mean?

I can continue with this error, but the view window doesn't show anything.
1. I checked the transformed *.grd file, which has been transformed to cartisian coordinate successfully.
2. I noticed the new *.cco file is slightly larger than the original one. Does that indicate something to do with my PART version?

Look forward to your reply.

Best regards,
Ke