#1033 closed Bug (fixed)
bug in diahth.F90
Reported by: | stortignauz | Owned by: | nemo |
---|---|---|---|
Priority: | lowest | Milestone: | Unscheduled |
Component: | OCE | Version: | trunk |
Severity: | Keywords: | heat | |
Cc: |
Description
Hello,
just found a small bug in the heat content computation
(diahth.F90, please refer to the trunk version):
314 IF( lk_vvl ) THEN ; zthick(:,:) = 0._wp ; htc3(:,:) = 0._wp
315 ELSE ; zthick(:,:) = sshn(:,:) ; htc3(:,:) = tsn(:,:,jk,jp_tem) * sshn(:,:) * tmask(:,:,jk)
316 ENDIF
line 315 should be replaced by
315 ELSE ; zthick(:,:) = sshn(:,:) ; htc3(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,jk)
namely when no variable volume the sshn is accounted for
in within the first level thickness, but the computation
is wrongly performed by using tsn relative to the level
jk, which is actually jpkm1 from the DO-loop in line 309-312
Best,
Andrea Storto
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
3721 | gm | 2012-12-05T07:23:56+01:00 | trunk: #1033 : diahth.F90, correct a bug in the computation of the 300m heat content |
Change History (4)
comment:1 Changed 11 years ago by gm
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 8 years ago by nicolasmartin
- Keywords content removed
comment:3 Changed 6 years ago by nemo
- Keywords Misc. added
comment:4 Changed 6 years ago by nemo
- Keywords Misc. removed
Thanks !
Note that, in the same 315 line, jk must also be replace by 1 in the index used for tmask:
315 ELSE ; zthick(:,:) = sshn(:,:) ; htc3(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,1)
This has been corrected, see Changeset 3721