Changeset 2228
- Timestamp:
- 2010-10-12T16:33:06+02:00 (14 years ago)
- Location:
- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r2198 r2228 177 177 ENDIF 178 178 179 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 180 181 IF( ln_dm2dc ) CALL sbc_dcy ( kt , sf(jp_qsr)%fnow ) ! modify now Qsr to include the diurnal cycle 179 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 182 180 183 181 #if defined key_lim3 … … 264 262 ! ----------------------------------------------------------------------------- ! 265 263 264 IF( ln_dm2dc ) THEN ; qsr(:,:) = sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) ! modify now Qsr to include the diurnal cycle 265 ELSE ; qsr(:,:) = sf(jp_qsr)%fnow(:,:,1) 266 ENDIF 266 267 ! ocean albedo assumed to be 0.066 267 !CDIR COLLAPSE 268 qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:,1) * tmask(:,:,1) ! Short Wave 268 qsr (:,:) = ( 1. - 0.066 ) * qsr(:,:) * tmask(:,:,1) ! Short Wave 269 269 !CDIR COLLAPSE 270 270 zqlw(:,:) = ( sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:) ) * tmask(:,:,1) ! Long Wave -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbccpl.F90
r2224 r2228 23 23 USE sbc_oce ! Surface boundary condition: ocean fields 24 24 USE sbc_ice ! Surface boundary condition: ice fields 25 USE sbcdcy ! surface boundary condition: diurnal cycle 25 26 USE phycst ! physical constants 26 27 #if defined key_lim3 … … 728 729 IF( srcv(jpr_qsroce)%laction ) qsr(:,:) = frcv(:,:,jpr_qsroce) 729 730 IF( srcv(jpr_qsrmix)%laction ) qsr(:,:) = frcv(:,:,jpr_qsrmix) 731 IF( ln_dm2dc ) qsr(:,:) = sbc_dcy( qsr ) ! modify qsr to include the diurnal cycle 730 732 ! 731 733 ! ! total freshwater fluxes over the ocean (emp, emps) … … 1159 1161 & + palbi (:,:,1) * zicefr(:,:,1) ) ) 1160 1162 END SELECT 1163 IF( ln_dm2dc ) THEN ! modify qsr to include the diurnal cycle 1164 pqsr_tot(:,: ) = sbc_dcy( pqsr_tot(:,: ) ) 1165 pqsr_ice(:,:,1) = sbc_dcy( pqsr_ice(:,:,1) ) 1166 ENDIF 1161 1167 1162 1168 SELECT CASE( TRIM( cn_rcv_dqnsdt ) ) -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcdcy.F90
r2198 r2228 16 16 USE phycst ! ocean physics 17 17 USE dom_oce ! ocean space and time domain 18 USE sbc_oce ! Surface boundary condition: ocean fields 18 19 USE in_out_manager ! I/O manager 19 20 20 21 IMPLICIT NONE 21 22 PRIVATE 22 INTEGER 23 INTEGER, PUBLIC :: nday_qsr ! day when parameters were computed 23 24 REAL(wp), DIMENSION(jpi,jpj) :: raa , rbb , rcc , rab ! parameters used to compute the diurnal cycle 24 25 REAL(wp), DIMENSION(jpi,jpj) :: rtmd, rdawn, rdusk, rscal ! - - - - - 25 REAL(wp), DIMENSION(jpi,jpj) :: qsr_daily ! to hold daily mean QSR26 26 27 27 PUBLIC sbc_dcy ! routine called by sbc … … 34 34 CONTAINS 35 35 36 SUBROUTINE sbc_dcy( kt, pqsr)36 FUNCTION sbc_dcy( pqsrin ) RESULT( zqsrout ) 37 37 !!---------------------------------------------------------------------- 38 38 !! *** ROUTINE sbc_dcy *** … … 48 48 !! Part 1: a diurnally forced OGCM. Climate Dynamics 29:6, 575-590. 49 49 !!---------------------------------------------------------------------- 50 INTEGER, INTENT(in ) :: kt ! ocean time-step index 51 REAL(wp), DIMENSION(jpi,jpj,1), INTENT(inout) :: pqsr ! QSR flux with diurnal cycle 52 !! 53 INTEGER :: ji, jj ! dummy loop indices 50 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqsrin ! input daily QSR flux 51 !! 52 INTEGER :: ji, jj ! dummy loop indices 54 53 REAL(wp) :: ztwopi, zinvtwopi, zconvrad 55 54 REAL(wp) :: zlo, zup, zlousd, zupusd 56 REAL(wp) :: zdsws, zdecrad, ztx 55 REAL(wp) :: zdsws, zdecrad, ztx, zsin, zcos 57 56 REAL(wp) :: ztmp, ztmp1, ztmp2, ztest 57 REAL(wp), DIMENSION(jpi,jpj) :: zqsrout ! output QSR flux with diurnal cycle 58 58 !---------------------------statement functions------------------------ 59 REAL(wp) :: fintegral, pt1, pt2, paaa, pbbb, pccc ! dummy statement function arguments59 REAL(wp) :: fintegral, pt1, pt2, paaa, pbbb, pccc ! dummy statement function arguments 60 60 fintegral( pt1, pt2, paaa, pbbb, pccc ) = & 61 61 & paaa * pt2 + zinvtwopi * pbbb * SIN(pccc + ztwopi * pt2) & … … 70 70 71 71 ! When are we during the day (from 0 to 1) 72 zlo = MOD( rdt / rday * REAL( kt-nit000, wp ), 1.)73 zup = zlo + rdt/ rday72 zlo = ( REAL(nsec_day, wp) - 0.5 * rdttra(1) ) / rday 73 zup = zlo + ( REAL(nn_fsbc, wp) * rdttra(1) ) / rday 74 74 75 75 ! 76 IF( kt == nit000) THEN ! first time step only76 IF( nday_qsr == -1 ) THEN ! first time step only 77 77 IF(lwp) THEN 78 78 WRITE(numout,*) … … 81 81 WRITE(numout,*) 82 82 ENDIF 83 nday_qsr = 084 83 ! Compute rcc needed to compute the time integral of the diurnal cycle 85 84 rcc(:,:) = zconvrad * glamt(:,:) - rpi … … 99 98 nday_qsr = nday 100 99 ! number of days since the previous winter solstice (supposed to be always 21 December) 101 zdsws = 11 + nday_year100 zdsws = REAL(11 + nday_year, wp) 102 101 ! declination of the earths orbit 103 102 zdecrad = (-23.5 * zconvrad) * COS( zdsws * ztwopi / REAL(nyear_len(1),wp) ) 104 ! save the daily QSR for nest hours of the day105 qsr_daily(:,:) = pqsr(:,:,1)106 103 ! Compute A and B needed to compute the time integral of the diurnal cycle 107 104 105 zsin = SIN( zdecrad ) ; zcos = COS( zdecrad ) 108 106 DO jj = 1, jpj 109 107 DO ji = 1, jpi 110 108 ztmp = zconvrad * gphit(ji,jj) 111 raa(ji,jj) = SIN( ztmp ) * SIN( zdecrad )112 rbb(ji,jj) = COS( ztmp ) * COS( zdecrad )109 raa(ji,jj) = SIN( ztmp ) * zsin 110 rbb(ji,jj) = COS( ztmp ) * zcos 113 111 END DO 114 112 END DO … … 140 138 rdawn(:,:) = MOD((rdawn(:,:) + 1.), 1.) 141 139 rdusk(:,:) = MOD((rdusk(:,:) + 1.), 1.) 142 143 140 144 141 ! 2.2 Compute the scalling function: … … 166 163 END DO 167 164 ! 168 ztmp = rday / rdt165 ztmp = rday / ( rdttra(1) * REAL(nn_fsbc, wp) ) 169 166 rscal(:,:) = rscal(:,:) * ztmp 170 167 … … 184 181 zupusd = MAX(zupusd, zlo) 185 182 ztmp = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 186 pqsr(ji,jj,1) = qsr_daily(ji,jj) * ztmp * rscal(ji,jj)183 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 187 184 ! 188 185 ELSE ! day time in two parts … … 194 191 ztmp2 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 195 192 ztmp = ztmp1 + ztmp2 196 pqsr(ji,jj,1) = qsr_daily(ji,jj) * ztmp * rscal(ji,jj)193 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 197 194 ENDIF 198 195 ELSE ! 24h light or 24h night 199 196 ! 200 IF( raa(ji,jj) > rbb(ji,jj) ) THEN ! 24h day197 IF( raa(ji,jj) > rbb(ji,jj) ) THEN ! 24h day 201 198 ztmp = fintegral(zlo, zup, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 202 pqsr(ji,jj,1) = qsr_daily(ji,jj) * ztmp * rscal(ji,jj)199 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 203 200 ! 204 201 ELSE ! No day 205 pqsr(ji,jj,1) = 0.e0202 zqsrout(ji,jj) = 0.e0 206 203 ENDIF 207 204 ENDIF … … 209 206 END DO 210 207 ! 211 END SUBROUTINEsbc_dcy208 END FUNCTION sbc_dcy 212 209 213 210 !!====================================================================== -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcflx.F90
r2198 r2228 123 123 ENDIF 124 124 125 CALL fld_read( kt, nn_fsbc, sf )! input fields provided at the current time-step126 127 IF( ln_dm2dc ) CALL sbc_dcy( kt , sf(jp_qsr)%fnow ) ! modify now Qsr to include the diurnal cycle125 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 126 127 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN ! update ocean fluxes at each SBC frequency 128 128 129 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN ! update ocean fluxes at each SBC frequency 129 IF( ln_dm2dc ) THEN ; qsr(:,:) = sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) ! modify now Qsr to include the diurnal cycle 130 ELSE ; qsr(:,:) = sf(jp_qsr)%fnow(:,:,1) 131 ENDIF 130 132 !CDIR COLLAPSE 131 133 DO jj = 1, jpj ! set the ocean fluxes from read fields … … 134 136 vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1) 135 137 qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1) 136 qsr (ji,jj) = sf(jp_qsr )%fnow(ji,jj,1)137 138 emp (ji,jj) = sf(jp_emp )%fnow(ji,jj,1) 138 139 END DO -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcmod.F90
r2198 r2228 19 19 USE sbc_oce ! Surface boundary condition: ocean fields 20 20 USE sbc_ice ! Surface boundary condition: ice fields 21 USE sbcdcy ! surface boundary condition: diurnal cycle 21 22 USE sbcssm ! surface boundary condition: sea-surface mean variables 22 23 USE sbcana ! surface boundary condition: analytical formulation … … 134 135 & CALL ctl_stop( 'sea-ice model requires a bulk formulation or coupled configuration' ) 135 136 137 IF( ln_dm2dc ) nday_qsr = -1 ! initialisation flag 138 136 139 IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) ) & 137 140 & CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' )
Note: See TracChangeset
for help on using the changeset viewer.