Errors in EFDC Model

EFDC model is quite a complex model and can be used for several applications. However, at the same time it is very difficult to debug the model.

In several instances, you may encounter the error messages such as “Negative depth in Cell Centers” and “Maximum Iterations Exceeded in External Solution”. These error mean that the model is not stable. So the things you need to go back and look are initial conditions, bathymetry. Another thing you may try to do is to decrease the time step. By decreasing the time step the model would be able to model for sudden increase in flows.

Another thing you may try is to increase the Smagorinsky coefficient to make the model stable. You may also disable the HMD and you may get the model working fairly.

I think this tip would be very handy to all the EFDC users since I have been a EFDC user for a while.

Do you know any other methods or parameters you can adjust so that you can make your model stable ? Please share your ideas in the comments.

Advertisements

15 comments on “Errors in EFDC Model

  1. Hi,
    Thanks for sharing this blog for all EFDC users. I am a beginner user in EFDC and have been trying desperately to work with it for my project. I have got a sample dataset from Dr. Hamrick which runs in EFDC But when I tried to modify one input parameter, say Cloud Cover in ASER.INP file, EFDC is not running (to modify the input parameter, I wrote a matlab program to read the input file, then change the cloud cover parameters, and then writing back the changed values to the input file). But EFDC is not running with the modified value.
    I believe some possible source of error is what my matlab program is writing – that I might be formatting the output in a way EFDC cannot read into? Without much documentation on the format (that is, the input format for EFDC), I am not entirely sure how to write the changed input file…
    Do you have any idea why this is happening? Any help is appreciated. If you need a sample output, I’ve attached a small file that I am trying to feed into EFDC but with no luck.
    matlab program:

    fid = fopen(filename1);
    fout = fopen(‘TestASER.INP’,’w’);

    tline = fgetl(fid);
    while strncmp(‘#’,tline,1)
    fprintf(fout, ‘%s\n’, tline);
    disp (tline)
    tline = fgetl(fid);
    end

    n = 1;
    for j=1:n,
    tline = fgetl(fid);
    fprintf(fout, ‘%s\n’, tline);
    disp(tline)
    end
    fclose(fout);

    C = textscan(fid, ‘%f %f %f %f %f %f %f %f’);
    A = cell2mat(C);

    sz = size(A);
    rz = sz(:,1); % no. of rows
    lz = sz(:,2); % no. of columns

    C1= A(:,1);
    C2= A(:,2);
    C3= A(:,3);
    C4= A(:,4);
    C5= A(:,5);
    C6= A(:,6);
    C7= A(:,7);
    C8= A(:,8);

    cmax = 1;

    for c=1:1
    for r=1:rz
    a= C8(r,1);
    C8(r,1)=0.7;

    end
    end
    fclose(fid);

    A = [C1, C2, C3, C4, C5, C6, C7, C8];
    dlmwrite(‘TestASER.INP’, A, ‘-append’, ‘delimiter’, ‘\t’, ‘newline’, ‘pc’);

    Original Input File (partial sample):
    # ASER.INP: 1/1/2001 to 12/31/2007
    # Lake Lanier Project Made By Ed Moye
    # JD 0 = 12/31/2000
    # ATMOSPHERIC FORCING FILE, USE WITH 28 JULY 96 AND LATER VERSIONS OF EFDC
    #
    # CLOUD = FRATIONAL CLOUD COVER
    #
    #
    #
    # MASER TCASER TAASER IRELH RAINCVT EVAPCVT SOLRCVT CLDCVT
    # IASWRAD REVC RCHC SWRATNF SWRATNS FSWRATF DABEDT TBEDIT HTBED1 HTBED2
    # TASER(M) PATM(M) TDRY(M) TWET(M) RAIN(M) EVAP(M) SOLSWR(M) CLOUD(M)
    # /TEQ /RELH /HTCOEF
    61347 86400. 0. 1 7.05556E-06 -1. 0.80 1.00
    0 -1.0 -1.0 2.0 0.0 1.0 14.0 10.0 0.001 3.0E-5
    -1000 977.66 -4.44 0.62 0.0 0.0 0.0 0.0
    0.0 977.66 -4.44 0.62 0.0 0.0 0.0 0.0
    0.0 977.66 -4.44 0.62 0.0 0.0 0.0 0.0
    1. 977.66 -4.44 0.62 0.0 0.0 0.0 0.0
    1.0417 977.32 -4.44 0.65 0.0 0.0 0.0 1.0
    1.0833 976.3 -3.89 0.66 0.0 0.0 0.0 1.0
    1.125 978.0 -3.89 0.69 0.0 0.0 0.0 1.0

    Modified Input File: (modified cloud cover parameter)
    # ASER.INP: 1/1/2001 to 12/31/2007
    # Lake Lanier Project Made By Ed Moye
    # JD 0 = 12/31/2000
    # ATMOSPHERIC FORCING FILE, USE WITH 28 JULY 96 AND LATER VERSIONS OF EFDC
    #
    # CLOUD = FRATIONAL CLOUD COVER
    #
    #
    #
    # MASER TCASER TAASER IRELH RAINCVT EVAPCVT SOLRCVT CLDCVT
    # IASWRAD REVC RCHC SWRATNF SWRATNS FSWRATF DABEDT TBEDIT HTBED1 HTBED2
    # TASER(M) PATM(M) TDRY(M) TWET(M) RAIN(M) EVAP(M) SOLSWR(M) CLOUD(M)
    # /TEQ /RELH /HTCOEF
    0 -1.0 -1.0 2.0 0.0 1.0 14.0 10.0 0.001 3.0E-5
    -1000 977.66 -4.44 0.62 0 0 0 0.7
    0 977.66 -4.44 0.62 0 0 0 0.7
    0 977.66 -4.44 0.62 0 0 0 0.7
    1 977.66 -4.44 0.62 0 0 0 0.7
    1.0417 977.32 -4.44 0.65 0 0 0 0.7
    1.0833 976.3 -3.89 0.66 0 0 0 0.7
    1.125 978 -3.89 0.69 0 0 0 0.7

    Here the files may not display correctly. If anyone is willing to share his/her email address, I can send the input files and the matlab code as attachment.
    counting on your response.

    Thanks,
    Rumana

    • HI Rumana,

      Thank you for commeting on this blog. Yes, EFDC is sometimes very annoying and difficult to figure out everything at first. For the weather parameters what I do is input all the data into excel. Do you use EFDC Explorer ? If you haven’t used this tool then please do so. It is very easy to setup EFDC files for EFDC using EFDC Explorer. You can download EFDC Explorer from http://www.efdc-explorer.com
      After downloading EFDC Explorer you simply copy the input data you created on excel and paste into EFDC Explorers input field.

  2. Hi

    I was wondering if you understood the “Floating divide by zero error”. I expected it was to do with the depth of water in flume. I have changed this an the time step and the BC’s but have had no luck.

    Thank you

    Ed

    • Hi, Sorry I was little busy so didn’t get time to reply your comment. The error you mentioned is caused due to incorrect initial / boundary conditions. So, I strongly suggest you to go a head and then check your boundary conditions and initial conditions. Second, thing you might check is your time step. Sometimes, if your time step is large, then the model cannot converge and can give errors such as floating invalid or floating divided by zero sth. like that.

  3. I need to some helps to run EFDC model to simulate the salinity, water level and velocity in a tidal river. I prepared the cell.inp, dxdy.inp and lxly.inp. I copy these files from the available examples and made my files. Do I need to generate these files by using gefdc. I am looking for a person who can check my files and help me! please

    • Mohammad, using gefdc and creating the files may be little bit time consuming. I have used that approach before. The best and easiest way is to use EFDC Explorer . This is the EFDC version which has the user interface and developed by dynamic solutions. You can create the grid for your river and then import that grid in EFDC explorer and EFDC explorer will create all the files such as cell.inp, dxdy.inp and lxly.inp for you. So go to http://www.efdc-explorer.com and download the web version which is free and try to use. Let me know if this helps.

      • Dear Mohammad,
        What efdchelp said is right.
        They have 30 day free trial version available which you can use for 30 days. Also if you need to purchase there are some student discount available. You will also get EFDC Explorer Forum in there where you can ask and share questions about EFDC (http://efdc-explorer.com/en/efdcexplorerforum). In the website there are some test models which you can download to have a reference to make your models (http://efdc-explorer.com/en/applications/examples).
        Once you start using EFDC Explorer I can provide you more help if needed. I often check their forum and post questions.

      • So so thanks for your comments. I made the cell , dxdy and lxly inp files using the available data. Regarding your suggestions I am downloading the efdc- explorer and I will try to make the inp files using this program.
        Anyway, my purpose is simulating of salinity variations in a tidal channel due to water level and freshwater changes at the downstream and upstream, respectively. I am filling the efdc.inp fileI. Is it possible to send the map of site area for you to give me some helps in this step.I don’t know how should I fill some card image and also I have problem with some errors.

  4. Hi Mohammad,
    I am glad my suggestions helped out to get into track. The first step you need to do before using EFDC Explorer is to create a grid. You can use third party softwares to create the grid and use EFDC Explorer to import the grid. EFDC Explorer itself has an option to create the grid. Would you please be specific about errors that you encountered ?

    Regarding, the efdc.inp file you can download input files from efdc-explorer.com. Good luck.

  5. Hi. I am having a problem when I am trying to create the Grid for a part of Michigan Lake using EFDC. I found the bathymetry Data for the Great Lakes on a website page and I was able to import the bathymetry data (interior points) (just the part I am working with). After that, I create the boundary points, however when I am trying to generate the orthogonal grid I have an error #24 saying that “end-of-file- during read, unit=1… vogg.. unknow, unknow… Any idea that might help me to avoid this error?

      • I haven’t used visual EFDC 1.2 version. I have experience with EFDC Explorer as I have used this software for the past 6 years and I would be able to help only if you were using EFDC Explorer. I would encourage you to go to their website and go to look at forums where they have several questions answered. You can ask any type of questions there as the forum is very active.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s