Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#814 closed Bug (fixed)

bug with work_2d_xx in sbcblk_core.F90 when ln_2m=true

Reported by: cbricaud Owned by: cbricaud
Priority: low Milestone:
Component: OCE Version: release-3.3
Severity: Keywords:
Cc:

Description

blk_oce_core uses wrk_2d_1 to wrk_2d_13.

If ln_2m=false, blk_oce_core calls TURB_CORE_1Z and TURB_CORE_1Z uses wrk_2d_14 to wrk_2d_32.

But, if ln_2m=true, blk_oce_core calls TURB_CORE_2Z and TURB_CORE_2Z uses wrk_2d_1 to wrk_2d_21

==⇒need to change names of work_2d_xx working arrays in TURB_CORE_2Z

Commit History (1)

ChangesetAuthorTimeChangeLog
2749smasson2011-04-22T10:32:02+02:00

finish bugfix done in changeset:2748, see ticket #814

Change History (5)

comment:1 Changed 10 years ago by cbricaud

  • Owner changed from NEMO team to cbricaud

comment:2 Changed 10 years ago by cbricaud

Error message:

==⇒>> : E R R O R

===========

TURB_CORE_2Z: requested workspace arrays unavailable

comment:3 Changed 10 years ago by cbricaud

resolution: trunk rev number 2748.

===================================================================
—- NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90 (revision 2740)
+++ NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90 (working copy)
@@ -754,23 +754,23 @@

!! References : Large & Yeager, 2004 : ???
!!———————————————————————————————————
USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, iwrk_in_use, iwrk_not_released

  • USE wrk_nemo, ONLY: dU10 ⇒ wrk_2d_1 ! dU [m/s]
  • USE wrk_nemo, ONLY: dT ⇒ wrk_2d_2 ! air/sea temperature difference [K]
  • USE wrk_nemo, ONLY: dq ⇒ wrk_2d_3 ! air/sea humidity difference [K]
  • USE wrk_nemo, ONLY: Cd_n10 ⇒ wrk_2d_4 ! 10m neutral drag coefficient
  • USE wrk_nemo, ONLY: Ce_n10 ⇒ wrk_2d_5 ! 10m neutral latent coefficient
  • USE wrk_nemo, ONLY: Ch_n10 ⇒ wrk_2d_6 ! 10m neutral sensible coefficient
  • USE wrk_nemo, ONLY: sqrt_Cd_n10 ⇒ wrk_2d_7 ! root square of Cd_n10
  • USE wrk_nemo, ONLY: sqrt_Cd ⇒ wrk_2d_8 ! root square of Cd
  • USE wrk_nemo, ONLY: T_vpot ⇒ wrk_2d_9 ! virtual potential temperature [K]
  • USE wrk_nemo, ONLY: T_star ⇒ wrk_2d_10 ! turbulent scale of tem. fluct.
  • USE wrk_nemo, ONLY: q_star ⇒ wrk_2d_11 ! turbulent humidity of temp. fluct.
  • USE wrk_nemo, ONLY: U_star ⇒ wrk_2d_12 ! turb. scale of velocity fluct.
  • USE wrk_nemo, ONLY: L ⇒ wrk_2d_13 ! Monin-Obukov length [m]
  • USE wrk_nemo, ONLY: zeta_u ⇒ wrk_2d_14 ! stability parameter at height zu
  • USE wrk_nemo, ONLY: zeta_t ⇒ wrk_2d_15 ! stability parameter at height zt
  • USE wrk_nemo, ONLY: U_n10 ⇒ wrk_2d_16 ! neutral wind velocity at 10m [m]
  • USE wrk_nemo, ONLY: xlogt ⇒ wrk_2d_17, xct ⇒ wrk_2d_18, zpsi_hu ⇒ wrk_2d_19, zpsi_ht ⇒ wrk_2d_20, zpsi_m ⇒ wrk_2d_21

+ USE wrk_nemo, ONLY: dU10 ⇒ wrk_2d_14 ! dU [m/s]
+ USE wrk_nemo, ONLY: dT ⇒ wrk_2d_15 ! air/sea temperature difference [K]
+ USE wrk_nemo, ONLY: dq ⇒ wrk_2d_16 ! air/sea humidity difference [K]
+ USE wrk_nemo, ONLY: Cd_n10 ⇒ wrk_2d_17 ! 10m neutral drag coefficient
+ USE wrk_nemo, ONLY: Ce_n10 ⇒ wrk_2d_18 ! 10m neutral latent coefficient
+ USE wrk_nemo, ONLY: Ch_n10 ⇒ wrk_2d_19 ! 10m neutral sensible coefficient
+ USE wrk_nemo, ONLY: sqrt_Cd_n10 ⇒ wrk_2d_20 ! root square of Cd_n10
+ USE wrk_nemo, ONLY: sqrt_Cd ⇒ wrk_2d_21 ! root square of Cd
+ USE wrk_nemo, ONLY: T_vpot ⇒ wrk_2d_22 ! virtual potential temperature [K]
+ USE wrk_nemo, ONLY: T_star ⇒ wrk_2d_23 ! turbulent scale of tem. fluct.
+ USE wrk_nemo, ONLY: q_star ⇒ wrk_2d_24 ! turbulent humidity of temp. fluct.
+ USE wrk_nemo, ONLY: U_star ⇒ wrk_2d_25 ! turb. scale of velocity fluct.
+ USE wrk_nemo, ONLY: L ⇒ wrk_2d_26 ! Monin-Obukov length [m]
+ USE wrk_nemo, ONLY: zeta_u ⇒ wrk_2d_27 ! stability parameter at height zu
+ USE wrk_nemo, ONLY: zeta_t ⇒ wrk_2d_28 ! stability parameter at height zt
+ USE wrk_nemo, ONLY: U_n10 ⇒ wrk_2d_29 ! neutral wind velocity at 10m [m]
+ USE wrk_nemo, ONLY: xlogt ⇒ wrk_2d_30, xct ⇒ wrk_2d_31, zpsi_hu ⇒ wrk_2d_32, zpsi_ht ⇒ wrk_2d_33, zpsi_m ⇒ wrk_2d_34

USE wrk_nemo, ONLY: stab ⇒ iwrk_2d_1 ! 1st guess stability test integer
!!

REAL(wp), INTENT(in)
&

@@ -797,10 +797,12 @@

!!———————————————————————————————————
!! * Start


  • IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21) .OR. &
  • iwrk_in_use(2, 1) ) THEN

+ IF( wrk_in_use(2, 14,15,16,17,18,19, &
+ 20,21,22,23,24,25,26,27,28,29, &
+ 30,31,32,33,34) .OR. &
+ iwrk_in_use(2, 1) ) THEN

CALL ctl_stop('TURB_CORE_2Z: requested workspace arrays unavailable') ; RETURN

  • END IF

+ ENDIF

!! Initial air/sea differences
dU10 = max(0.5, dU) ! we don't want to fall under 0.5 m/s

@@ -875,8 +877,11 @@

!!

END DO
!!

  • IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21) .OR. &
  • iwrk_not_released(2, 1) ) CALL ctl_stop('TURB_CORE_2Z: requested workspace arrays unavailable')

+ IF( wrk_not_released(2, 14,15,16,17,18,19, &
+ & 20,21,22,23,24,25,26,27,28,29, &
+ & 30,31,32,33,34 ) .OR. &
+ iwrk_not_released(2, 1) ) &
+ CALL ctl_stop('TURB_CORE_1Z: failed to release workspace arrays')

!

END SUBROUTINE TURB_CORE_2Z


@@ -884,9 +889,9 @@

FUNCTION psi_m(zta) !! Psis, L & Y eq. (8c), (8d), (8e)

!———————————————————————————————————————-
USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released

  • USE wrk_nemo, ONLY: X2 ⇒ wrk_2d_33
  • USE wrk_nemo, ONLY: X ⇒ wrk_2d_34
  • USE wrk_nemo, ONLY: stabit ⇒ wrk_2d_35

+ USE wrk_nemo, ONLY: X2 ⇒ wrk_2d_35
+ USE wrk_nemo, ONLY: X ⇒ wrk_2d_36
+ USE wrk_nemo, ONLY: stabit ⇒ wrk_2d_37

!!

REAL(wp), DIMENSION(jpi,jpj), INTENT(in)
zta

@@ -894,7 +899,7 @@

REAL(wp), DIMENSION(jpi,jpj)
psi_m !———————————————————————————————————————-

IF( wrk_in_use(2, 33,34,35) ) THEN

+ IF( wrk_in_use(2, 35,36,37) ) THEN

CALL ctl_stop('psi_m: requested workspace arrays unavailable') ; RETURN

ENDIF


@@ -903,7 +908,7 @@

psi_m = -5.*zta*stabit & ! Stable

& + (1. - stabit)*(2*log((1. + X)/2) + log((1. + X2)/2) - 2*atan(X) + pi/2) ! Unstable


  • IF( wrk_not_released(2, 33,34,35) ) CALL ctl_stop('psi_m: failed to release workspace arrays')

+ IF( wrk_not_released(2, 35,36,37) ) CALL ctl_stop('psi_m: failed to release workspace arrays')

!

END FUNCTION psi_m


@@ -911,16 +916,16 @@

FUNCTION psi_h( zta ) !! Psis, L & Y eq. (8c), (8d), (8e)

!———————————————————————————————————————-
USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released

  • USE wrk_nemo, ONLY: X2 ⇒ wrk_2d_33
  • USE wrk_nemo, ONLY: X ⇒ wrk_2d_34
  • USE wrk_nemo, ONLY: stabit ⇒ wrk_2d_35

+ USE wrk_nemo, ONLY: X2 ⇒ wrk_2d_35
+ USE wrk_nemo, ONLY: X ⇒ wrk_2d_36
+ USE wrk_nemo, ONLY: stabit ⇒ wrk_2d_37

!

REAL(wp), DIMENSION(jpi,jpj), INTENT(in)
zta !
REAL(wp), DIMENSION(jpi,jpj)
psi_h !———————————————————————————————————————-
IF( wrk_in_use(2, 33,34,35) ) THEN

+ IF( wrk_in_use(2, 35,36,37) ) THEN

CALL ctl_stop('psi_h: requested workspace arrays unavailable') ; RETURN

ENDIF


@@ -929,7 +934,7 @@

psi_h = -5.*zta*stabit & ! Stable

& + (1. - stabit)*(2.*log( (1. + X2)/2. )) ! Unstable


  • IF( wrk_not_released(2, 33,34,35) ) CALL ctl_stop('psi_h: failed to release workspace arrays')

+ IF( wrk_not_released(2, 35,36,37) ) CALL ctl_stop('psi_h: failed to release workspace arrays')

!

END FUNCTION psi_h

comment:4 Changed 10 years ago by cbricaud

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 10 years ago by smasson

finish bugfix, see changeset:2749

Note: See TracTickets for help on using tickets.