Two errors: (1) .SOT file missing and (2) allocatable array and question on PRNT1501.DAT file

54 views
Skip to first unread message

Taras Lychuk

unread,
Oct 18, 2017, 4:21:34 PM10/18/17
to EPIC / APEX Modeling Forum
Hello Luca and folks,

Has anyone ever encountered the following errors, as shown on the attached screenshots.?

The first error comes up when I am trying to run two or more adjucent subareas. It says "File 00000000.1.SOT is missing" however after researching ArcAPEX and APEX manuals, it appears that the .SOT file is supposed to be calculated by the model, here is what APEX manual says " Code written automatically by .SOT (NOT USER INPUTTED)"


For the second error, it looks like the run is successful for Subarea 1, but when the model is trying to run Subarea 2, the error says "allocatable array is already allocated". The way it sounds to me is the model is trying to run Subarea 2 but this "Subarea 2" file is "busy" with some other process.


Finally, and this is not related to the previous two errors...is PRNT1501.DAT file sensitive to any user input through interface at all? Whatever I do to this file through ArcAPEX user interface is not reflected in the output files I am getting, unless I change the content of PRNT1501.DAT file manually via text editor.


I would appreciate any input on this.


Thank you.


Taras

Error6_sotfilemissing.jpg
Error7_allocatable_array.jpg

Luca

unread,
Oct 27, 2017, 12:43:58 PM10/27/17
to EPIC / APEX Modeling Forum
Hi,

My first guess is that the first error is due to the fact you set the value of ISOL to 5. As consequence the model is looking for an SOT file. (See the description of the run file in the APEX user manual). Select "non" in the ISOL variable (I would select none for IWPM and IWND also, unless you have a reason to set them).
If this doesn't solve the error, check the soil you have selected in the subarea/subareas.

For the second error, you are actually trying to run two different runs one after the other and not running different subareas (keep in mind that the subarea file contains the information of ALL the subareas created in your watershed). From what I can see from the screenshot you posted, the code is not designed to allow batch runs.
In your project what is the difference between the subarea files? Perhaps management?
Do you need to run all of them in order to make some comparisons?
Let me know and we can work to find a solution.

About the PRNT1501.DAT file, it is a bug that we have discovered some time ago. The workaround is to run the model from the ArcAPEX interface, than open the PRNT1501.DAT file with a text editor and edit it maualy. Then, run the model again using the executable that is in the same folder of the PRNT1501.DAT file.

Hope this will help.
Luca

Taras Lychuk

unread,
Nov 1, 2017, 4:09:13 PM11/1/17
to EPIC / APEX Modeling Forum
Hi Luca,

Thank you very much for your detailed response. I figured that if I do not specify ISOL variable the model will run and not give me an error with regards to SOT file. However, I was under impression that unless I specify ISOL (daily weather) station in the run, the model will start generating weather from the monthly weather file (.wp1). Isn't this the case? If this is the case, then the daily input weather file is not used in the runs. I might be wrong as when I examine .OUT file it still says that temperature, solar radiation, precipitation, RH, and wind speed are input. But I am not sure if model takes them as input from daily file or generates these variables from monthly weather files?

With regards to the "allocatable array" error. I have 27 subareas in one field (please refer to screenshot "Manitou_field_subareas.jpg" attached, they are delineated with purple colored border lines, the green circles are outlets for each subarea). I need to be able to run each subarea separately as well as run all 27 of them together when I hit "Run" button on the ArcAPEX interface. So far I can only run each subarea separately (see screenshot titled "Manitou_field_individual_run.jpg"), but whenever I try to run all subareas at once (see screenshot "Manitou_field_multiple_runs.jpg") I get the "allocatable array..." error. I do need to run all of them to make comparisons with regards to yield, as well as N and P losses. I would get the "allocatable array..." error even if I simulate identical field practices across all subareas and try to run subareas alltogether. Eventually, subareas will differ with regards to field management, N and P fertilizer rates and types of application, etc.

Thanks again for your help.

Taras
Manitou_field_individual_run.jpg
Manitou_field_multiple_runs.jpg
Manitou_field_subareas.jpg

Luca

unread,
Nov 2, 2017, 6:55:52 PM11/2/17
to EPIC / APEX Modeling Forum
Taras,

For the weather data you can easily check which weather data the model is using. In the daily subarea file (.SAD) you will find the weather data used in each day. Then you can compare the information in the .SAD file with the data in the .DLY file you are using.

For the second error, as I said before, I think that the model/interface is not designed to run batch/multiple run. What is happening (I guess) is that, at the beginning of the second run, the model is trying to allocate one variable that is already allocated from the previous run.I can try to modify the APEX code, but I have to be sure to use the same version you are using with the interface.
Last thing (just a curiosity), what is the difference between SUB0001 and SUB0002? Are those file referred to one subarea or do you have more than one subarea in each file?

Cheers,
Luca

Taras Lychuk

unread,
Nov 3, 2017, 4:48:38 PM11/3/17
to EPIC / APEX Modeling Forum
Hi Luca,

OK, after I have looked at .SAD file I can see that the model does read daily file even if I select "None" in the ApexRUN window, and that's what I just needed to confirm!! So, at least one less thing to worry about for now ))

To answer your question, SUB0001 refers to Subarea 1 and SUB0002 refers to Subarea 2. All subareas I have are in the same .mxd file and all are listed in the same attribute table (see screenshot attached) with their own attributes like elevation, area, latitude and longitude, etc. Basically, each line in that attribute table is a separate Subarea, for example on that screenshot Subarea 2 is highlighted if you look at the upper left corner of the map. Basically what I'd like to do is to run all the subareas at once rather than run them individually one by one. If you need to modify ArcAPEX code to do that, please see attached a separate screenshot which shows all the information on the version of the model I am using. I certainly appreciate all your help.

Taras
Manitou_field_subareas_highlited.jpg
ArcAPEX_version.jpg

Luca

unread,
Nov 6, 2017, 9:59:29 AM11/6/17
to EPIC / APEX Modeling Forum
Dear Taras,

APEX is reading the daily weather data because the information about the file to use are provided in the subarea file.

For the second part of the question, probably I didn't explain well what I mean or I am not understanding you...
When you create your project in ArcAPEX, you will provide information about the watershed or field you want to simulate. Then, using the GIS component, the entire watershed is divided in subareas that will be hydraulically connected (each polygon is a subarea). So, in your subarea file (*.SUB included in the TxtInOut folder) you will find one block of numbers (one subarea) or several blocks of numbers (multiple subareas) that represent the subarea/s that will be used in the simulation. Could you send me the *.SUB files you are using so I can better understand your simulation?

For the modification of the code, I am not able to modify ArcAPEX, I can only modify APEX (they are different things, ArcAPEX is just an user interface for the APEX model).

Luca

Prabesh khanal

unread,
Feb 24, 2023, 9:13:11 AM2/24/23
to EPIC / APEX Modeling Forum

Greetings,

I am also facing the "allocatable array is already allocated" when I try to run the multiple subareas in a single APEXRUN.DAT file in APEX Model. You said that you can modify the APEX. How could I fix the issue?

Sincerely,
Prabesh

Luca Doro

unread,
Feb 27, 2023, 2:11:07 AM2/27/23
to EPIC / APEX Modeling Forum
Dear Prabesh,
I think you are having the error when you try to run multiple watersheds or multiple runs, not when you run multiple subareas. Since the modification has to be done in the source code of the model, there is nothing you can do to solve this problem. Please, let me know which version of the model you are using (e.g., downloaded from the Blackland website?) and share with me the set of input files that are giving you the error and the OUT output file.

Best,
Luca

Prabesh khanal

unread,
Feb 27, 2023, 9:00:28 AM2/27/23
to EPIC / APEX Modeling Forum
Hi Dr. Doro,

Yes, I downloaded the Model from the Blackland website. 

I want to determine the crop yield (soybean) yield of each watershed.  For that, I have the soil files from the WinAPEX SSURGO database in APEX Model format. I also loaded the CDL 2021 land map use and SSURGO Soil map in ArcGIS to extract only those fields on the ground which was a soybean field. I then converted the each field having the same soil MUSYM to a polygon giving me the area, latitude longitude, and elevation of the field. With coordinates, I generated the day-met weather files for daily weather files. For monthly and wind files, I want to use the database one. So, when I try to run more than one run in APEXRUN.DAT. I get the error.  I have attached the google drive link to all the input files I have. I really appreciate your help.


Thanks,
Prabesh
RFDTLST.DAT
7.OPS
SUBA.DAT
33.28681882-88.36959524.SIT
APEXRUN.DAT
TR55.DAT
SOIL.DAT
33.28681882-88.36959524.dly
WDLST.DAT
crop.dat
33.28681882-88.36959524.SUB
WIND.DAT
pest.dat
APEXDIM.DAT
33.28721373-88.37132214.dly
APEXFILE.DAT
1.ACY
fort.128
PRINT.DAT
WPM1.DAT
till.dat
HERD.DAT
33.28721373-88.37132214.SUB
MLRN2110.DAT
82.WP1
fert.dat
parms.dat
3086.sol
14.WND
SITE.DAT
OPSC.DAT
33.28721373-88.37132214.SIT
3074.sol
1.OUT
APEXCONT.DAT

Luca Doro

unread,
Feb 28, 2023, 5:03:58 AM2/28/23
to EPIC / APEX Modeling Forum
Dear Prabesh,

You are facing a different problem. The error you are having is because in some of the input files you have a wrong format. Here is a short list of what I have seen after two hours working on it (yes, it is time-consuming).

The program reads the site file (*.SIT) with 10 values per line, with each value having maximum eight characters. In your site file, latitude and longitude take more than eight characters.
The first line of the subarea file (*.SUB) requires two values (numbers without decimal) with eight characters each. You have assigned more than eight characters to the first value, and then you have letters in the second field.

The biggest problem I see is in the subarea configuration. For instance, for the first run in your APEXRUN.DAT file, the subarea file is called 33.28721373-88.37132214.SUB is used. This subarea file has four subareas with the same values used for all of them. While this looks strange, the real problem is that because of the setting used, all the subareas are considered extremes and with independent outlet (four subareas with four outlets). This is something that the model is not designed to simulate. In the APEX user manual, see the section on subarea file, how it works, and how the variables WSA, CHL, and RCHL are used.

Best,
Luca

Prabesh khanal

unread,
Mar 1, 2023, 10:51:17 PM3/1/23
to EPIC / APEX Modeling Forum
Greetings Dr. Luca,

I honestly appreciate your help in finding the errors. I corrected the long characters to the proper values which the model requires. I also corrected the subarea file values by deleting the other three subareas. My intention is to run only a single subarea per file. I still get the same error. Do you think the error is because I used the same monthly weather, wind and .OPS file for the same subarea? Could you please provide me with the modified version of the source code of the APEX Model? 

Sincerely,
Prabesh

Prabesh khanal

unread,
Mar 1, 2023, 11:11:04 PM3/1/23
to EPIC / APEX Modeling Forum
The apex model that I am using is from https://epicapex.tamu.edu/software/.   I get the same error, even on the preinstalled input files of the APEX Model when I try to do multiple runs by creating two sites, subareas, and other input files required for the subareas.
 
Could you please provide me with the  APEX Model with a modified version of the source code of APEX that can do multiple runs? 

Thanks,
Prabesh

Luca Doro

unread,
Mar 2, 2023, 5:13:09 AM3/2/23
to EPIC / APEX Modeling Forum
I will send you an updated executable. You will receive an email from the Filex system with a link to download the executable.

Luca

Prabesh khanal

unread,
Mar 6, 2023, 3:05:25 PM3/6/23
to EPIC / APEX Modeling Forum

Thank you much, I am now able to do multiple runs. 
Reply all
Reply to author
Forward
0 new messages