meterological forcing

Everything related to the preinstalled test cases in COHERENS. Additionally, you can find here the necessary files to setup a test case.If you have developed a new test case and you want to share it with other users, feel free to post a new thread.

Moderator: Katrijn

Post Reply
sara.oceanography
Posts: 5
Joined: Fri Jul 13, 2018 7:54 am
Full name: sara salehi

meterological forcing

Post by sara.oceanography »

Hi everybody,
I am new to coherens and this forum, I hope to get much useful information here.
I could install coherens V2.11 and define my gride and tidal constituents, Now I am going to define meteorological forcing from ECMWf database. I know coherens can read Net CDF format, too. I did not see any example to read this format in the test cases.
I would be grateful if you could help me to do it. if someone did it, please put your code in the forum. I really need it immediately. Please help :|
Kind Regards,
Sara
Katrijn
Posts: 87
Joined: Fri Nov 29, 2013 3:04 pm
Full name: Katrijn Baetens

Re: meterological forcing

Post by Katrijn »

Hi Sara,
Here a piece of code I'm using to read bathymetry data in netcdf:
Notice that the fact that it's already in netCDF is determined when defining modfiles(io_modgrd,1,1)%form = 'N'
in the subroutine usrdef_mod_params.
Do not forget this USE statement:
USE inout_routines, ONLY: close_file, close_filepars, open_file, open_filepars

CALL open_filepars(modfiles(io_modgrd,1,1))
iunit = modfiles(io_modgrd,1,1)%iunit

!2. Water depths [m]
!-------------------
!
CALL cf90_inquire(iunit,nvariables=nvars)

DO ivar=1,nvars
CALL cf90_inquire_variable(iunit,ivar,varname)
IF (varname.EQ.'DEPTH_OOST') THEN
CALL cf90_get_var(iunit,ivar,xdat,1)
depmeanglb(1:250,1:125) = xdat(:,:)
END IF
ENDDO

Hope this helps!!!
Katrijn
sara.oceanography
Posts: 5
Joined: Fri Jul 13, 2018 7:54 am
Full name: sara salehi

Re: meterological forcing

Post by sara.oceanography »

Dear Katrin,
Thank you so much for sharing your information. sorry, I was not able to delete the extra post.
I used the text format to create the meteorological file, I think This format It is easier, but I have a problem with the temperature results, minimum depth of my bathymetry is 6 meters, the temperature results in the regions with minimum depth have unusual values, for example, it reaches 31 degrees in May , and It is impossible for my region. In other regions the temperature is good. I am sure about my input files, but I don t know something is wrong about this.
I would be grateful if you could help me.
Kind regards,
sarah
Katrijn
Posts: 87
Joined: Fri Nov 29, 2013 3:04 pm
Full name: Katrijn Baetens

Re: meterological forcing

Post by Katrijn »

Hi Sara,
That looks indeed suspicious, i will have a look at it on monday and hope I'll be able to help. You're sure your initial temp conditions are all right?

Cheers,
Katrijn
sara.oceanography
Posts: 5
Joined: Fri Jul 13, 2018 7:54 am
Full name: sara salehi

Re: meterological forcing

Post by sara.oceanography »

Hi Katrin,
Thank you so much for your quick reply. Yes, I am sure about my initial conditions.
Pooran helped me so much to set up the coherens, I have understood she has my problem too, the minimum of her grid is 5 meters and her temperature results in those regions are unusual and high, she said to me " Soudeh from Canada and Sameer( works in red sea) have had the problems
in the temperature results like me"
Maybe the model has a bug . and coherens calculates the unusual heat flux in these regions.
I would be grateful if you could consider this problem because many users have had the same problem. I do not have enough time to end my thesis.
looking forward to any suggestions and ideas.
Kind regards,
sarah.
Katrijn
Posts: 87
Joined: Fri Nov 29, 2013 3:04 pm
Full name: Katrijn Baetens

Re: meterological forcing

Post by Katrijn »

Hi Sarah (with an h, sorry I forgot in my previous messages!)
I have checked a set-up of me with temperature data and I don't have these strange temperature values. Do you have the drying and wetting scheme switched on? I know that Pooran had an issue with her boundary conditions, but this is probably not the case with you. I asked our lead developer for some info. If you want me to have a look directly at your code, pm me and I'll have a look.
Cheers,
Katrijn
sara.oceanography
Posts: 5
Joined: Fri Jul 13, 2018 7:54 am
Full name: sara salehi

Re: meterological forcing

Post by sara.oceanography »

Dear Katrin,
Thank you so much for your reply. I used the drying and wetting scheme, but I do not know I enabled it correctly or not, In below I wrote the piece of my code about it , I can not attach all my code, because my virtual machine has had a problem and it does not connect to the internet and I can't install any USB on it, if I will solve the problem I will send it for you.


!---flooding/drying scheme
iopt_fld = 2
!---drying/flooding depth parameters
dcrit_fld = 0.5; dthd_fld = 0.1; dmin_fld = 0.02
!3. Water depths [m]


CALL open_filepars(modfiles(io_modgrd,1,1))
iunit = modfiles(io_modgrd,1,1)%iunit

j_310: DO j=1,nr-1
READ (iunit,*) depmeanglb(1:nc-1,j)
ENDDO j_310

depmin = MERGE(10.0,1.0,iopt_fld.EQ.0)
j_220: DO j=1,nr-1
i_220: DO i=1,nc-1
IF (depmeanglb(i,j).GT.0.0.AND.depmeanglb(i,j).LT.depmin) THEN
depmeanglb(i,j) = depmin
ENDIF
ENDDO i_220
ENDDO j_220

I used the implicit scheme as well,

!---multigrid
nomglevels = MERGE(4,3,iopt_MPI.EQ.0)
mg_tol = 1.0E-04
ur_smooth = 0.8
!---model grid
sigstar_DJ = 0.2
sig0_DJ = 0.1



I would be grateful if you could consider this piece of my code.
Thank you so much in advance,
Kind regards,
Sarah.
Katrijn
Posts: 87
Joined: Fri Nov 29, 2013 3:04 pm
Full name: Katrijn Baetens

Re: meterological forcing

Post by Katrijn »

Hi Sarah,
It is difficult to say here from a distance. The model is running, so the set-up must be ok. If you want you can send me the whole code (kbaetens@naturalsciences.be) and we can have a look into more detail. We have a run for three years now and nothing seems to be wrong with the results. Some suggestions:

version 2.11.2 will be available soon on the web-site, maybe this will help
did you check your meteo-data above the points with a minimum depth, maybe something went wrong there?
your overall set-up seems to be fine, so that shouldn't be an issue.

Hope to here from you soon,
Kind regards,
Katrijn
rawand
Posts: 2
Joined: Wed Sep 26, 2018 6:57 am
Full name: kamkaran

Re: meterological forcing

Post by rawand »

Great post.thanks so much for sharing it.
Graduated from Soran University with First Class Degree with Honours in Computer Science.
Post Reply