Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: heat exchange with atmosphere

heat exchange with atmosphere 7 years 11 months ago #24474

  • Matta
  • Matta's Avatar
Dear all,

I really need support for heat exchange with atmosphere.
Currently I am using v7p0r1 to be able to receive support from the forum.

I need to simulate variable air temperature and wind (each 3 hours), I tried to use EXCHANGE WITH ATMOSPHERE 1 or 2, but I keep getting different errors.

Regarding the example in the folder "heat exchange"
I have very specific questions:

1) CORRXY.f can be deleted if one does not have coordinates variations? Was it just mentioned for the example?

2) I modified e.g. ISKYTYPE and water density inside the module EXCHANGE WITH ATMOSPHERE and I included in the fortran file, at the start of the file. Is it correct?

3) Otherwise, if all stays 'hard coded', one can avoid to include the module EXCHANGE WITH ATMOSPHERE in the fortran file and then only CALL it in BORD3D?

4) in my fortran file I have: BORD3D.f, SOURCE_TRAC.f (where I only included "my" latitude, longitude and secchi depth, CONDIM.f (because I have mesh transformation =2) and INTERPMETEO (because otherwise seems that Telemac cannot find it - it is not in the sources under telemac3D, only in telemac2D)

5) it seems that telemac has problems reading my input data in the formatted file, then I created a formatted file as meteo_data.txt is done in the example, but it is still not working. What is in fact the "standard format"?
In INTERPMETEO one can modify the number of variables to be considered here:
"NINPUTVAR = 8"
right?
For example, one can also not give precipitation or evaporation? and then set 7 instead of 8?

6) do we have to set in the cas file:
AIR PRESSURE = YES
WIND = YES
RAIN OR EVAPORATION = YES
to make heat exchange with atmosphere work and take those variables into account?

Important: for my case, I can also only consider ATMOSPHERE-WATER EXCHANGE MODEL = 1 and avoid rain and evaporation and radiation penetration in the water column, but it is also not 100% clear to me how it works even in this case. I tried with a reduced input data file but also did not work. For example, should I call anyway EXCHANGE WITH ATMOSPHERE module also for option 1? Including it in my fortran file? Can I have a reduced INPUT DATA file and keep the order of variables and have NINPUTVAR = 4 for example instead of 8?

7) Is it important to include always

ORIGINAL DATE OF TIME : 2006;10;1
ORIGINAL HOUR OF TIME : 0;0;0

or only in case of the complete balance of heat exchange (option 2)?

8) should I also include meteo.f in my fortran file?

Thanks a lot in advance. Any ideas/directions are very helpful.
I can also post the files if needed. Regards
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 11 months ago #24476

  • riadh
  • riadh's Avatar
Hello

Hereafter my answers


1) CORRXY.f can be deleted if one does not have coordinates variations? Was it just mentioned for the example? YES you can delete it

2) I modified e.g. ISKYTYPE and water density inside the module EXCHANGE WITH ATMOSPHERE and I included in the fortran file, at the start of the file. Is it correct? YES, But you can have some issues when compiling the module. You need to put it in the top of your fortran file. or maybe better change it in the source folder and recompile all the system. In last release, the type od Sky is now managed by a keyword

3) Otherwise, if all stays 'hard coded', one can avoid to include the module EXCHANGE WITH ATMOSPHERE in the fortran file and then only CALL it in BORD3D? But if you have changed something in it you should recompile

4) in my fortran file I have: BORD3D.f, SOURCE_TRAC.f (where I only included "my" latitude, longitude and secchi depth, CONDIM.f (because I have mesh transformation =2) and INTERPMETEO (because otherwise seems that Telemac cannot find it - it is not in the sources under telemac3D, only in telemac2D) Why you introduce long and lat and secchi ? you can introduce secchi in meteo file and you can manage long/lat with keywords. This is strange that telemac does not find interpmeteo

5) it seems that telemac has problems reading my input data in the formatted file, then I created a formatted file as meteo_data.txt is done in the example, but it is still not working. What is in fact the "standard format"?
In INTERPMETEO one can modify the number of variables to be considered here:
"NINPUTVAR = 8"
right?
For example, one can also not give precipitation or evaporation? and then set 7 instead of 8? The easy way is to give everything (this will lead to no changes in the fortran), if you don't have a variable you can give 0 everywhere

6) do we have to set in the cas file:
AIR PRESSURE = YES
WIND = YES
RAIN OR EVAPORATION = YES
to make heat exchange with atmosphere work and take those variables into account? This is explaned in the user manual, you have to use the keyword: ATMOSPHERE-WATER EXCHANGE MODEL =1 or 2 and optionnaly edit bor3D subroutine

Important: for my case, I can also only consider ATMOSPHERE-WATER EXCHANGE MODEL = 1 and avoid rain and evaporation and radiation penetration in the water column, but it is also not 100% clear to me how it works even in this case. I tried with a reduced input data file but also did not work. For example, should I call anyway EXCHANGE WITH ATMOSPHERE module also for option 1? Including it in my fortran file? Can I have a reduced INPUT DATA file and keep the order of variables and have NINPUTVAR = 4 for example instead of 8? Look at bord3D subroutine to understand the differences between option 1 and 2

7) Is it important to include always

ORIGINAL DATE OF TIME : 2006;10;1
ORIGINAL HOUR OF TIME : 0;0;0

or only in case of the complete balance of heat exchange (option 2)? it is also used elsewhere in the code (for instance for Tide)

8) should I also include meteo.f in my fortran file? it depends, if you change it, yes you have to. Otherwise it is not


With my best regards

Riadh
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 11 months ago #24484

  • Matta
  • Matta's Avatar
Thank you so much for answering! It is very useful for me!
I have now a direction how to make this case working...

Still very briefly about:

4) If I write then secchi depth in meteo file and lat and long with keywords, can I skip to add SOURCE_TRAC.f in the fortran file?


6) Yes, I did read carefully the manual and also bord3d and I did use the keyword: ATMOSPHERE-WATER EXCHANGE MODEL =1 or 2. But I have not yet clear if then telemac includes automatically WIND/RAIN and AIR PRESSURE without adding new keywords in the cas file?

Thanks and best regards
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 11 months ago #24486

  • riadh
  • riadh's Avatar
Hello

source_trac is useful is you want to introduce source terms to tracer (temperatrue in your case). Thus, if you have edited source_trac, you need to add it in the fortran file in all cases.

If you add these 3 keywords this could be safer, but I think that if you activate only the heat-exchange keyword, this will trigger wind, atmospheric pressure and rain.

I hope that this helps

with my best regards

Riadh
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 11 months ago #24504

  • Matta
  • Matta's Avatar
Hello

to briefly sum up:

- ATMOSPHERE-WATER EXCHANGE MODEL : 1 worked and gave reliable results (still have to analyze in detail though), considering variation of air temp and wind during 1 day

- ATMOSPHERE-WATER EXCHANGE MODEL : 2 does not work.
I guess there is an error in EVAP (EXCHANGE WITH ATMOSPHERE MODULE).

I always get this error:

starts like this -->

"t3dfort.f:657:35:

DOUBLE PRECISION WW,TREEL,A,B,LAMB,RO,SAL
1
Warning: Unused variable ‘b’ declared at (1) [-Wunused-variable]
t3dfort.f:547:20:

&(TIME,LT,ENTET,NPTFR2_DIM,NFRLIQ)
1
Warning: Unused dummy argument ‘entet’ at (1) [-Wunused-dummy-argument]
t3dfort.f:547:31:

&(TIME,LT,ENTET,NPTFR2_DIM,NFRLIQ)
1
Warning: Unused dummy argument ‘nptfr2_dim’ at (1) [-Wunused-dummy-argument]
t3dfort.f:547:11:

&(TIME,LT,ENTET,NPTFR2_DIM,NFRLIQ)
1
Warning: Unused dummy argument ‘time’ at (1) [-Wunused-dummy-argument]"

which I guess it is ok..?!

[...]

and it ends like this -->

"mpiexec noticed that process rank 21 with PID 32364 on node wahyd03 exited on signal

8 (Floating point exception).
_____________
runcode::main:
:
|runCode: Fail to run
|/usr/bin/mpiexec -wdir

/projekte/ematta/3D/CVandPrandtl/heat_airTvar_20161123/heat_exchange/test_20161202/ca

s_test6.12.txt_2016-12-06-13h00min39s -n 24

/projekte/ematta/3D/CVandPrandtl/heat_airTvar_20161123/heat_exchange/test_20161202/ca

s_test6.12.txt_2016-12-06-13h00min39s/out_t3d_heat_exchange_20161206
|~~~~~~~~~~~~~~~~~~
|Program received signal SIGFPE: Floating-point exception - erroneous arithmetic

operation.
|
|Backtrace for this error:
|#0 0x7F31941A5E08
|#1 0x7F31941A4F90
|#2 0x7F31938D74AF
|#3 0x7F3193EE5F14
|#4 0x7F3193EA25CE
|#5 0x412881 in __exchange_with_atmosphere_MOD_evapo
|#6 0x40F946 in bord3d_
|#7 0x45347B in telemac3d_
|#8 0x41A7D2 in MAIN__ at homere_telemac3d.f:?
"

I think in the specific it has problems to calculate FLUX EVAP, SENS and DEBVAP, all functions of FWW, which is function of W2 (wind at 2 m). Although, I noticed that in the module we have W2 and in the fortran file bord3d.f (HEAT EXCHANGE) we have WW2, calculated in function of magnitude of the wind WW. Is it a mistake? I tried also to change all the WW2 in bord3d in W2 but is still giving the same error. I also thought there is some error given to B, the calibration coefficient, I tried to change the numerics in the cas file, solvers etc, also setting all as default, as in telemac example, but still does not work.

Do you have any idea where I have been wrong?

At the end in the fortran file I only have bord3d, condim (for z*) and interpmeteo. I did not modify any source.
Last but not least, I have zero rain in the meteo file (attached)

File Attachment:

File Name: meteo_data_20161202.txt
File Size: 0 KB



Thanks in advance.

Best regards
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 11 months ago #24602

  • Matta
  • Matta's Avatar
Hello,

I am using ATMOSPHERE-WATER EXCHANGE MODEL : 1, version 7.0.1
considering hourly changes of air temperature over one day.

I have one question regarding how wind is taken into account in option 1.
We have WW (10 m) and WW2 (2 m). We have the logaritmic formula and the simpler formula (WW2=0.85WW). But in bord3d we see that if we use option 1 --> A=4.48D0+0.049D0*TREEL)+2021.5D0*C_ATMOS*(1.D0+WW)*
& (1.12D0+0.018D0*TREEL+0.00158D0*TREEL**2)
This means that A is function of WW and not WW2. Am I right? If one wants to consider WW2, can one just substitute there the reduced variable WW2 (=0.85WW) where there is WW?
Although, I do not expect that the influence will be big, since when temperature changes are taken into account, they have much higher impact compared to wind impact on the flow field. What do you think?

Thanks

Regards
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 11 months ago #24628

  • riadh
  • riadh's Avatar
Hello
Yes you can change WW by WW2 and add Bord3d to the fortran user file.

With my best regards

Riadh
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 7 months ago #26049

  • Matta
  • Matta's Avatar
Hello,

I am computing at the moment a scenario reflecting a daily cycle of heat exchange with atmosphere in a lake.
I have measurements of temperature over the water column in 2 points of the lake and I would like to compare them with TELEMAC results in the same locations, using the 2nd option of heat exchange with atmosphere.

I gave as input in TELEMAC the same conditions at the time of the measurements: initial cond. constant water elevation of that day, same as outflow b.c. (Dirichlet).
Inflow boundary condition is given with constant discharge of that day (Neumann) and for tracer constant temperature of water given (Dirichlet) and outflow Neumann dT/ds=0.
As input data file I prepared a formatted data file called meteo_data.txt
with wind, dirW, Tair, RH, etc
Nebu is 0 and skytipe is pure sky
I attach the files in this message.
For turbulence I use constant viscosity in the horizontal and Prandtl in the vertical

The case works, but I do not really understand the results...

e.g. Tair given in the formatted file varies first decreasing and then increasing again with a total delta of ca. 18 degrees (very big daily delta in the region). In the results, water gains instead lower and lower temperature, lower than the initial value given (it doesn't increase again together with the air)

I tried to change the calibration coefficient b using 0.0017. 0.0026 and 0.0035 and the results are only slightly different.
The profile of temperature is still different from measurements, even if it keeps similar values, and both TELEMAC results and measurements show that the lake is vertically mixed - no stratification

Can you please check if you think the results make sense compared to the meteo_data.txt and the fortran file? I still think that this decrease of temperature is not really correct (in water), but maybe I am not considering all other processes occurring concerning heat exchange

Thanks in advance

Regards


File Attachment:

File Name: meteo_data.txt
File Size: 0 KB


File Attachment:

File Name: t3d_heat_exchange_20170322.f
File Size: 57 KB


File Attachment:

File Name: cas_2017-04-10.txt
File Size: 7 KB
The administrator has disabled public write access.

heat exchange with atmosphere 7 years 7 months ago #26053

  • Sokolov
  • Sokolov's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 38
  • Thank you received: 13
It seems you don't take into account a solar radiation. Subroutine SOLRAD is supposed to be called in the source_trac.f and it is commented out by default.
The administrator has disabled public write access.
The following user(s) said Thank You: Matta

heat exchange with atmosphere 7 years 7 months ago #26050

  • Matta
  • Matta's Avatar
...since it does not send the results, I attach the output file and some figures of the results where the problem I mentioned is visible:


File Attachment:

File Name: output.txt
File Size: 27 KB


surface_VTMW_0.0026.png


vertical_profiles_central_and_outer_bay.png
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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