#795 closed Bug (fixed)
limwri_2.F90: wrong average for EVP (NEMO_3.3)
Reported by: | molines | Owned by: | nemo |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | LIM2 | Version: | v3.3 |
Severity: | Keywords: | LIM* v3.3 | |
Cc: |
Description
I think that when using LIM2_EVP (standard) or LIM2_VP (option) the way the average is done should not be the same, when wriing u_ice or v_ice. Therefore I suggest to have something like
zcmo(ji,jj,4) = frld (ji,jj) zcmo(ji,jj,5) = sist (ji,jj) zcmo(ji,jj,6) = fbif (ji,jj) IF (lk_lim2_vp) THEN zcmo(ji,jj,7) = zindb * ( u_ice(ji,jj ) * tmu(ji,jj ) + u_ice(ji+1,jj ) * tmu(ji+1,jj ) & + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & / ztmu zcmo(ji,jj,8) = zindb * ( v_ice(ji,jj ) * tmu(ji,jj ) + v_ice(ji+1,jj ) * tmu(ji+1,jj ) & + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & / ztmu ELSE zcmo(ji,jj,7) = zindb * ( u_ice(ji,jj ) * tmu(ji,jj) & & + u_ice(ji-1,jj) * tmu(ji-1,jj) ) & & / 2.0 zcmo(ji,jj,8) = zindb * ( v_ice(ji,jj ) * tmv(ji,jj) & & + v_ice(ji,jj-1) * tmv(ji,jj-1) ) & & / 2.0 ENDIF zcmo(ji,jj,9) = sst_m(ji,jj) zcmo(ji,jj,10) = sss_m(ji,jj) zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj)
instead of zcmo(ji,jj,4) = frld (ji,jj)
zcmo(ji,jj,5) = sist (ji,jj)
zcmo(ji,jj,6) = fbif (ji,jj)
zcmo(ji,jj,7) = zindb * ( u_ice(ji,jj ) * tmu(ji,jj ) + u_ice(ji+1,jj ) * tmu(ji+1,jj ) &
+ u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
/ ztmu
zcmo(ji,jj,8) = zindb * ( v_ice(ji,jj ) * tmu(ji,jj ) + v_ice(ji+1,jj ) * tmu(ji+1,jj ) &
+ v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &
/ ztmu
zcmo(ji,jj,9) = sst_m(ji,jj)
zcmo(ji,jj,10) = sss_m(ji,jj)
zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj)
}}}
Of course the same apply to the counter part in limwri_dimg_2.F90
Commit History (0)
(No commits)
Change History (4)
comment:1 Changed 13 years ago by smasson
comment:2 Changed 11 years ago by rblod
- Resolution set to fixed
- Status changed from new to closed
Considering your constance in this request, I've fixed it in 3.4 trunk for next 3.4.1, despite Sebastien opposition (but with the agreement of the Master). Note you may so be a source of tension inside the NEMO team Paris . Cheers. Rachid
comment:3 Changed 6 years ago by nemo
- Keywords LIM* added
comment:4 Changed 20 months ago by nemo
- Keywords v3.3 added
We keep this piece of of code only for compatibility (or as "souvenir" of the old time?). It doesn't exist anymore when key_iomput is activated (the default).
When rewriting outputs with iom_put, I must admit that I didn't really understood the idea/the need/the pertinence of this weighted interpolation of u/v_ice by zindb (with its incredible definition in a pure LIM2 style) and tmu...
With iom_put we decided to output the u/v_ice on its original grid (knowing that, soon, we will switch to VP on C grid). Why should we output ice velocity on T point whereas we never do it for the ocean? We decided to only weight these fields by the "ice presence" variable, i.e. for example if you have ice only half of the time, its speed is not divided by 2.
btw, I will not be able to accept you correction in the current form (with the horrible "/2.") the Master would kill me :-)