HDF inputs

MOHID Land forum. Questions and discussion related to MOHID Land
epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 12:01

Hi all,

I am doing a simulation in which I´m entering precipitation data as a hdf file. As I press the run bottom it appears the following message:

"Maximum of 256 characters is suported.
Strings:"

Do you know where do I have to check? There is no problem opening the file in the map window but it doesnt allow me to use the file for the simulation..

Thanks!!

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 12:19

Hello Ane :)

This means that one of your keywords (in the input data files) are greater than 256 characters, which the version of the executable that you have do not supports.
If the only change is the use of an HDF file, maybe the lenght (in characters) of the path+name of the HDF file is over 256...?

You can change the file location to a place with less letters or even to the exe folder, so you can use only the file name, or you can compile a new exe with this pre-processor definitions:

_LONG_LINE_LENGTH
or
_BIG_LINE_LENGTH

The first will increase the possible line lenght to 1024 characters and the second to 6144.
In Visual Studio you have to put one of these words in the properties of the Base1, Base2 and MohidLand projects (I think only Base1 is really required, because is where is the EnterData module, but put in the trhee to be sure).

The place wher eyou have to put the keyword is the same in all projects.
Open the properties of the project and go to Fortran\General
You will find an option named "Preprocessor Definitions".
If there is already something there, you can add a comma or a semi-colon at the end and add the keyword you chose.
Usually the _LONG_LINE_LENGHT is enough.

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 14:15

Thanks eduardo! :)

It is strange because the path is not too long (in fact, just changing the "hdf5" for "srm" extension it works perfectly). wont it be related to the hdf file? I´ve tried copying the file to a even shorter path and I still get the same message..

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 14:35

Hello Ane,

No. The error message that you showed is about the lenght of strings in input file exceeding the maximun lenght alowed.
But the error message seems to be incomplete, because usually the value that exceeded the alowed lenght is displayed also, what helps to identify the keyword that is too long.

Could you please attach an image of the error?

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 14:41

of course!
Attachments
Sin título.png
Sin título.png (30.07 KiB) Viewed 5167 times

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 14:45

lol

Ok. This isn't of much help ;)
Maybe you can try to run mohid from command line?

Also, from the last successfull run, which keywords did you change in the input files?

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 14:55

ops, I thought you wanted this :)

the only thing I changed from a simulation that run was the extension of the file (as both files srm and hdf are located in the same path).

So, to see the error from command line, I have to execute the exe in cmd and how can I choose here the simulation I want to run?

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 14:58

:)

If you run from Mohid Studio, it creates the nomfich file, in the exe folder of the simulation, and you can use this file to run the model. Just copy the mohid executable to this folder (if it's not already there) and run from cmd :)

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 15:22

I got! :) It says:

File: "...path to hdf file"
Line: 3
ModuleEnterData -ConstructEnterData -ERR05

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 15:32

ok...

Seems that you have a "comment" after the path to the file, no?
Something that starts with an "!" maybe?

If yes, you have to delete the comment. :)

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 17:22

I cant find anything wrong..
After the path in which I specify the file? But the message only appears with extension of hdf5 (If I change this into srm it works) So maybe sth inside the hdf file? Or sth while its creation(in fillmatrix.dat)?

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 17:25

Hum...

Please, paste here the content of the input data file that is giving problems. Can be only the block that gives the problem, so I can take a look.
Paste both the one that works and the one that fails, please.

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 17:32

OK! :) I think you mean this.
This works:

<beginproperty>
NAME : precipitation
UNITS : mm
DESCRIPTION : precipitation
FILE_IN_TIME : TIMESERIE
!INITIALIZATION_METHOD : CONSTANT
DEFAULTVALUE : 2.0
FILENAME : ..\General Data\boundary conditions\precipitation.srm
DATA_COLUMN : 2
REMAIN_CONSTANT : 0
TIME_SERIE : 1
OUTPUT_HDF : 0
ACCUMULATE_VALUES : 1
!MIN_FOR_DT_DECREASE : 2.0
<endproperty>


And this doesn´t:

<beginproperty>
NAME : precipitation
UNITS : mm
DESCRIPTION : precipitation
FILE_IN_TIME : TIMESERIE
!INITIALIZATION_METHOD : CONSTANT
DEFAULTVALUE : 2.0
FILENAME : ..\General Data\boundary conditions\precipitation.hdf5
DATA_COLUMN : 2
REMAIN_CONSTANT : 0
TIME_SERIE : 1
OUTPUT_HDF : 0
ACCUMULATE_VALUES : 1
!MIN_FOR_DT_DECREASE : 2.0
<endproperty>

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby Jauch » Wed Feb 27, 2013 17:36

ok.

When you change the type of file from timeseries to hdf, you have to change the FILE_IN_TIME keyword to HDF

:)

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: HDF inputs

Postby epelde.ane@gmail.com » Wed Feb 27, 2013 17:39

aaaaaa!!! true!! :) :)
thank you!!


Return to “MOHID Land”

Who is online

Users browsing this forum: No registered users and 1 guest