[TRNSYS-users] File handling
marcello.caciolo at aximaseitha-gdfsuez.com
marcello.caciolo at aximaseitha-gdfsuez.com
Wed Oct 5 02:18:54 PDT 2011
Dear TRNSYS users,
I would like to write a component for TRNSYS 17 which reads its parameters from an external file. In the proforma of my type, I specified a parameter "Logical unit", linked to the name of the file in the "File" tab.
In the FORTRAN code, at the iteration zero, my type simply use the read instruction as it follows:
unit_fichier_sortie = jfix(getParameterValue(4) + 0.1)
! Lecture de la version du fichier
read(unit_fichier_descriptif,*, iostat = erreur_lecture) par_1
However, instead of reading in the correct file, this instruction reads in a file called "fort.30" (where 30 is the logical unit number assigned by TRNSYS).
If I write my parameters in "fort.30", the type reads its parameters correctly. However, I would really like that it reads in the file I specify in the proforma ("exemple.in")!
If I debug the code, the function getLUfileName(unit_fichier_descriptif) returns the correct name of the file (example.in).
Has someone experienced the same kind of problem? For information, I use Compaq Visual Fortran.
Thank you for your help!
Marcello CACIOLO
Responsable Outils et Méthodes d'Analyse Energétique
___________________________________________________
[cid:image001.jpg at 01CC834F.2D981B60]
Cellule Efficacité Energétique
Direction Commerciale
46 Boulevard de la Prairie au Duc BP 40119
44000 Nantes Cédex 2
Tel. 02 40 41 06 57
mail: marcello.caciolo at aximaseitha-gdfsuez.com
www.aximaseitha-gdfsuez.com
P Pensez à l'environnement avant d'imprimer ce message
GDF SUEZ Mail Disclaimer: http://www.gdfsuez.com/disclaimer/disclaimer-fr.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20111005/4acb12df/attachment-0005.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3512 bytes
Desc: image001.jpg
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20111005/4acb12df/attachment-0005.jpg>
More information about the TRNSYS-users
mailing list