Welcome, Guest
Username: Password: Remember me

TOPIC: Accumulated initial and continuing abstractions in the result file

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40294

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi,
I'm using the rainfall-runoff module in the telemac2D.
I have the variables 'CN coefficient', 'accumulated rainfall' and 'accumulated runoff' along with the other default variables in the result file but I also want to see the 'accumulated initial abstractions' and the 'accumulated continuing abstractions' in my results file.
So, I added the last four lines in the following piece of code in the runoff_scs_cn.f file:
!       COEFFICIENT CN                     => USER VARIABLE 'O' (NO. 24)
        PRIVE%ADR(2)%P%R(I)=CN%R(I)
!       ACCUMULATED RAINFALL               => USER VARIABLE 'R' (NO. 25)
        PRIVE%ADR(3)%P%R(I)=T22%R(I)
!       ACCUMULATED RUNOFF                 => USER VARIABLE 'Z' (NO. 26)
        PRIVE%ADR(4)%P%R(I)=ACCROFF(I)
! 
!       ACCUMULATED initial abstraction    => USER VARIABLE 'P1'(NO. ??)		
	PRIVE%ADR(5)%P%R(I)=ACCIA(I)
!       ACCUMULATED continuing abstraction => USER VARIABLE 'P2'(NO. ??)
	PRIVE%ADR(6)%P%R(I)=ACCFA(I)
and did the following changes in the file user_nomvar_telemac2d.f (I don't know if nr.35 and 36 are available):
      TEXTE(24) = 'CN COEFFICIENT                  '
      TEXTE(25) = 'ACC. RAINFALL   M               '
      TEXTE(26) = 'ACC. RUNOFF     M               '
!
      TEXTE(35) = 'ACC. Initial Abstractions       M             '
      TEXTE(36) = 'ACC. Continuing Abstractions      M             '
!
      TEXTPR(24) = 'CN COEFFICIENT                  '
      TEXTPR(25) = 'ACC. RAINFALL   M               '
      TEXTPR(26) = 'ACC. RUNOFF     M               '
!
      TEXTPR(35) = 'ACC. Initial Abstractions        M            '
      TEXTPR(36) = 'ACC. Continuing Abstractions       M             '
!
In the end, I changed the 'NUMBER OF PRIVATE ARRAYS= 6' instead of 4
and added P1 and P2 to the 'VARIABLES FOR GRAPHIC PRINTOUTS= H,B,N,O,R,U,V,S,Z,I,J,P1,P2,MAXV' in the steering .cas file.
I still see no changes in the list of variables in the results file.
Where do I need to define that the additional 2 variables are P1 and P2.
Attached are my edited file.

Regards,
Nitesh
Attachments:
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40322

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Nitesh,

Unfortunetaly, with standard TELEMAC-2D, you are limited to 4 private arrays 1 to 4 with variables N, O, R, Z as you have already done).
You should limit the use of them to what is essential for your results.

Otherwise, you have to change your own release of TELEMAC and change several things in the source code.

Chi-Tuan
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40329

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi Chi-Tuan,

I want to give up then the variable 'ACC. RAINFALL' in the results file and replace it with another variable which is sum of the initial and continuing abstractions 'ACC. ABSTRACTIONS'.
I got the desired variables in the result file now but I want to confirm if the following code I used is correct for doing this.
In the runoff_scs_cn.f file:
!*****VALIDATION: SAVING PARAMETERS TO RESULTS FILE**********
      DO I=1,NPOIN
!       COEFFICIENT CN                     => USER VARIABLE 'O' (NO. 24)
        PRIVE%ADR(2)%P%R(I)=CN%R(I)
!
!       ACCUMULATED RUNOFF                 => USER VARIABLE 'Z' (NO. 26)
        PRIVE%ADR(4)%P%R(I)=ACCROFF(I)
!
!       ACCUMULATED INITIAL AND CONTINUING ABSTRACTIONS => USER VARIABLE 'R' (NO. 25)		
! is it correct to add these two like this?
        PRIVE%ADR(3)%P%R(I)=ACCIA(I)+ACCFA(I) 
      ENDDO

Thanks and Regards,
Nitesh
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40331

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Nitesh,

Your implementation seems OK. You can try to compile it and run to check it is OK.

Chi-Tuan
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40337

  • jtravert
  • jtravert's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 36
  • Thank you received: 23
Hello Nitesh,
I think that I have a solution for you even if they are perhaps better way, but you can use it if you want to get 6 private variables.
For the run-off_scs fortran file you can keep the 6 private variables as you did in the first post.
For the file user_nomvar_telemac2d.f : try to use 36 and 37 because 35 is already used (at least on V8P3).

And for the declaration of P1 and P2 :
- in nomvar_telemac2d.f : Add aliases for the steering file MNEMO(36)='P1 ' and MNEMO(37)='P2 ' and change NVAR_T2D from 35 to 37.
- in point_telemac2d.f : compute the blocks whichconnects to a variable name to is array for instance CALL ADDBLO (VARSOR, PRIVE$ADR(6)%P)

You can find in attachment the three fortran files if you want to check more precisely the added lines and the differences with the sources files.

I have tried this solution and it seems to work well.
The administrator has disabled public write access.
The following user(s) said Thank You: nitesh

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40341

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi jtravert, your solution seems promising but I am getting the following error when compiling the telemac with the new files with changes.
Then I again tried to compile with the same files as before and I still got the same error. So, the error may not be because of your suggested changes but something else that I don't understand.
wing64mpi:

    +> root:    C:\opentelemac-mascaret\v8p2
    +> module: ad / api / artemis / bief
               damocles  / gaia  / gretel  / hermes
               identify_liq_bnd  / khione  / nestor  / parallel
               partel  / postel3d  / sisyphe  / special
               stbtel  / telemac2d  / telemac3d  / tomawac
               waqtel


Compiling from the tree top api plus dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        +> Compile / Assemble / Link
gfortran: error: [fflags]: No such file or directory             ]   0%  | ---s
gfortran: error: [fflags]: No such file or directory
Traceback (most recent call last):
  File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 143, in <module>
    main()
  File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 129, in main
    compile_cmdf(options.ncsize, modules, options.verbose)
  File "C:\opentelemac-mascaret\v8p2\scripts\python3\compilation\compil_tools.py", line 1295, in compile_cmdf
    raise TelemacException(\
utils.exceptions.TelemacException:
        +> failed: ...\v8p2\sources\telemac2d\point_telemac2d.f
... The following command failed for the reason in the listing
gfortran -c -O0 -fPIC [fflags]  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\special  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\damocles  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\parallel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\hermes  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\bief  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\nestor  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\ad  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\sisyphe  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\tomawac  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\khione  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\waqtel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\gaia  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\telemac2d  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\gretel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\partel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\telemac3d  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\artemis  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\api   -I C:\opentelemac-mascaret\mpich2\include C:\opentelemac-mascaret\v8p2\sources\telemac2d\point_telemac2d.f
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40345

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Nitesh,

If you change point_telemac2d subroutine, as you touch memory allocation, you have to compile with --clean option.

Anyway, there is an error message with fflags. You should also solve this issue in your systel.cfg file I think.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40349

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi Chi_Tuan,

I am using the old files again without any change. Now it is showing some error in declarations_special.F which I never changed.
Compiling from the tree top api plus dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        +> Compile / Assemble / Link
gfortran: error: [fflags]: No such file or directory             ]   0%  | ---s
Traceback (most recent call last):
  File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 143, in <module>
    main()
  File "C:\opentelemac-mascaret\v8p2\scripts\python3\compile_telemac.py", line 129, in main
    compile_cmdf(options.ncsize, modules, options.verbose)
  File "C:\opentelemac-mascaret\v8p2\scripts\python3\compilation\compil_tools.py", line 1285, in compile_cmdf
    raise TelemacException(\
utils.exceptions.TelemacException:
        +> failed: ...\v8p2\sources\utils\special\declarations_special.F
... The following command failed for the reason in the listing
gfortran -c -O0 -fPIC [fflags]  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\special  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\damocles  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\parallel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\hermes  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\bief  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\nestor  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\ad  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\sisyphe  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\tomawac  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\khione  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\waqtel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\gaia  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\telemac2d  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\gretel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\utils\partel  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\telemac3d  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\artemis  -I C:\opentelemac-mascaret\v8p2\builds\wing64mpi\obj\api   -I C:\opentelemac-mascaret\mpich2\include C:\opentelemac-mascaret\v8p2\sources\utils\special\declarations_special.F

Attached the my configuration file I'm using. Can you please help me to resolve the error regarding configuration file?

Regards,
Nitesh
Attachments:
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40350

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
I fixed it. Thanks.
The administrator has disabled public write access.

Accumulated initial and continuing abstractions in the result file 2 years 6 months ago #40354

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
The modified files uploaded by jtravert works perfectly if I put them only in the fortran file instead of the sources folder.
The only additional thing to be changed was number of private variable = 6 instead of 4 in the steering file.

Thanks!! :)
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.