artificially generated current along the strait ...
-
- Posts: 128
- Joined: Tue Feb 01, 2005 8:21 pm
- Location: Istanbul Technical University (ITU)
- Contact:
artificially generated current along the strait ...
Dear All,
I would like to modify surface averaged E-P-R in the model to keep the net freshwater contribution as zero in the domain. The idealised domain have two basin connected by a narrow strait (similar to dogbone example). In this case, the calculated E-P-R in a part (let's say part A, left of the dogbone example) of the domain and will be applied to a another part (part B, right of the dogbone example) with negative sign. So, the total E-P-R will be zero in whole domain but this will generate a current from one part to other part (from part A to B) due to the height difference. So, what is the best way to implement this kind of idealised application? Any suggestion might help.
I also tested the implementation with following methods,
1 - The total volume of domain is calculated in drag.F. Then, i modified the zeta by getting unit difference using following formula in each time step (in set_zeta.F),
dV = ([actual volume of domain] - [initial volume of domain])/[area of part B]
zeta = zeta-dV (only over part B)
2 - I calculated total EmPmR flux using FORCES(ng)%stflx(i,j,isalt)*Hscale (in diag.F) for whole domain and applied to the part B using following formula,
dV = ([EmPmR(TIME1)*Total Surface Area]-[EmPmR(TIME0)*Total Surface Area])/[area of part B]
zeta = zeta-dV (only over part B)
In this case, TIME1 is the value for the current time and TIME0 is the EmPmR in previous time step.
Anyway, i am not sure about these methods. Are they correct? One might be superior to another. By the way, applying unit difference could be zeta = -dV but in this case model crashes.
I would like to modify surface averaged E-P-R in the model to keep the net freshwater contribution as zero in the domain. The idealised domain have two basin connected by a narrow strait (similar to dogbone example). In this case, the calculated E-P-R in a part (let's say part A, left of the dogbone example) of the domain and will be applied to a another part (part B, right of the dogbone example) with negative sign. So, the total E-P-R will be zero in whole domain but this will generate a current from one part to other part (from part A to B) due to the height difference. So, what is the best way to implement this kind of idealised application? Any suggestion might help.
I also tested the implementation with following methods,
1 - The total volume of domain is calculated in drag.F. Then, i modified the zeta by getting unit difference using following formula in each time step (in set_zeta.F),
dV = ([actual volume of domain] - [initial volume of domain])/[area of part B]
zeta = zeta-dV (only over part B)
2 - I calculated total EmPmR flux using FORCES(ng)%stflx(i,j,isalt)*Hscale (in diag.F) for whole domain and applied to the part B using following formula,
dV = ([EmPmR(TIME1)*Total Surface Area]-[EmPmR(TIME0)*Total Surface Area])/[area of part B]
zeta = zeta-dV (only over part B)
In this case, TIME1 is the value for the current time and TIME0 is the EmPmR in previous time step.
Anyway, i am not sure about these methods. Are they correct? One might be superior to another. By the way, applying unit difference could be zeta = -dV but in this case model crashes.
Re: artificially generated current along the strait ...
Someone was asking about applying e-p with a volume change not too long ago...
Meanwhile, the code as I know it applies e-p as a salt flux without change of volume. Using the diag volume computation is irrelevant to this question. You want to be adjusting the FORCES(ng) % stflx(isalt) over part B based on that over part A.
Meanwhile, the code as I know it applies e-p as a salt flux without change of volume. Using the diag volume computation is irrelevant to this question. You want to be adjusting the FORCES(ng) % stflx(isalt) over part B based on that over part A.
-
- Posts: 128
- Joined: Tue Feb 01, 2005 8:21 pm
- Location: Istanbul Technical University (ITU)
- Contact:
Re: artificially generated current along the strait ...
Thanks Kate. I confirm that the volume is not changing in the original code unless applying rivers as a source points. So, your suggestion is the second one. Right? By the way, what do you think about zeta = zeta-dV. I think that it is not correct way to apply the correction. It seems that zeta = -dV is better solution. Otherwise, the correction will accumulate. What do you think?
Re: artificially generated current along the strait ...
No, no, don't mess with zeta. Mess with stflx.
Or is this about river sources?
Or is this about river sources?
-
- Posts: 128
- Joined: Tue Feb 01, 2005 8:21 pm
- Location: Istanbul Technical University (ITU)
- Contact:
Re: artificially generated current along the strait ...
Okay. Thanks. Sometimes, it is hard to find the correct way and place for these kind of custom setup. So, can i modify FORCES(ng)%stflx(salt) in set_vbc.F. The salt and temp correction or relaxation are applied in here. By the way, where is the correct place to calculate total stflx? diag.F is still fine in this case.
Re: artificially generated current along the strait ...
diag.F is nice in that it shows you how to do these sort of global sums. Look at the flow of where things happen in main3d.F. diag gets called before set_vbc. You need to be ready with your stflx before rhs3d gets called.
-
- Posts: 128
- Joined: Tue Feb 01, 2005 8:21 pm
- Location: Istanbul Technical University (ITU)
- Contact:
Re: artificially generated current along the strait ...
Hi Kate,
I stated to implement the idea but i have one more minor question. Do i need to multiply surface flux with surface salinity (like t(i,j,N(ng),nrhs,salt) in SCORRECTION or SRELAXATION)? If i don't want to change the salinity in the modified region what is the best way? I also put my fresh water modification just after the code SCORRECTION and SRELAXATION in set_vbc.F. Is it correct place?
Thanks again.
I stated to implement the idea but i have one more minor question. Do i need to multiply surface flux with surface salinity (like t(i,j,N(ng),nrhs,salt) in SCORRECTION or SRELAXATION)? If i don't want to change the salinity in the modified region what is the best way? I also put my fresh water modification just after the code SCORRECTION and SRELAXATION in set_vbc.F. Is it correct place?
Thanks again.
Re: artificially generated current along the strait ...
Yes, the location is good.
I don't know about the factor of surface salinity - perhaps this is in the realm of "try it and see".
If you don't want to change salinity, you might want to look at the Qsrc option. I've never used it and can't answer questions about it.
I don't know about the factor of surface salinity - perhaps this is in the realm of "try it and see".
If you don't want to change salinity, you might want to look at the Qsrc option. I've never used it and can't answer questions about it.
-
- Posts: 128
- Joined: Tue Feb 01, 2005 8:21 pm
- Location: Istanbul Technical University (ITU)
- Contact:
Re: artificially generated current along the strait ...
I implemented code and tested with and without "factor of surface salinity" but code crashes after couple of time step. It seems that it is not stable and error grows. Qsrc option is related with rivers. Right? If i use Qsrc options then i have to define source points along the coastline and it won't create the result that i want to achieve. Anyway, i'll look at more carefully to find the source of the problem.
Re: artificially generated current along the strait ...
Qsrc is a vertical river. They don't have to just be at the coast, but you would need one for each gridpoint - scripting is your friend.
-
- Posts: 128
- Joined: Tue Feb 01, 2005 8:21 pm
- Location: Istanbul Technical University (ITU)
- Contact:
Re: artificially generated current along the strait ...
okay. i implemented it. in this case i used ANA_SOURCE to define number of source point, their locations, direction, vertical shape (just 1 in surface and 0 in rest), qbar (as zero). Then, i calculate EmPmR and surface area in drag.F. I also modify qbar and qsrc in drag.F based on the values of EmPmR change. In this case, the direction is little bit confusing because i don't want to generate artificial current in the region. In nameless file (*.in), i set LuvSrc == T, LwSrc == F, LtracerSrc == F F because LwSrc uses source point salinity and temperature and LtracerSrc modifies tracers. Anyway, the code does not crash but i am not sure about it is working or not. ubar and vbar shows some changes but again i don't want to add artificial current due to the source points. i just need to movement due to the water mass.
Re: artificially generated current along the strait ...
You want all of these to be the opposite. LuvSrc is for lateral sources while LwSrc is for vertical sources. As for tracers, you want the stable upstream advection condition, not the unstable downwind condition. If the source is entering the domain, you need to provide tracer values. If the source is leaving the domain, you don't.LuvSrc == T, LwSrc == F, LtracerSrc == F F