Changeset 14388
- Timestamp:
- 2021-02-03T17:16:01+01:00 (4 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package_FOAMv14_readchl/NEMOGCM/NEMO
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_FOAMv14_readchl/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
r13725 r14388 35 35 USE stopack 36 36 #if defined key_medusa 37 USE trc, ONLY: trn ! MEDUSA variables37 USE trc, ONLY: trn, chl_for_qsr ! MEDUSA variables 38 38 USE par_medusa, ONLY: & ! MEDUSA parameters 39 39 & jpchn, & … … 221 221 ! 222 222 CALL fld_read( kt, 1, sf_chl ) ! Read Chl data and provides it at the current time step 223 !CDIR NOVERRCHK ! 224 DO jj = 1, jpj 225 !CDIR NOVERRCHK 226 DO ji = 1, jpi 227 zchl = sf_chl(1)%fnow(ji,jj,1) 228 zCtot = 40.6 * zchl**0.459 229 zze = 568.2 * zCtot**(-0.746) 230 IF( zze > 102. ) zze = 200.0 * zCtot**(-0.293) 231 zlogc = LOG( zchl ) 232 zlogc2 = zlogc * zlogc 233 zlogc3 = zlogc * zlogc * zlogc 234 zCb = 0.768 + 0.087 * zlogc - 0.179 * zlogc2 - 0.025 * zlogc3 235 zCmax = 0.299 - 0.289 * zlogc + 0.579 * zlogc2 236 zpsimax = 0.6 - 0.640 * zlogc + 0.021 * zlogc2 + 0.115 * zlogc3 237 zdelpsi = 0.710 + 0.159 * zlogc + 0.021 * zlogc2 238 zCze = 1.12 * (zchl)**0.803 239 DO jk = 1, nksr + 1 240 zpsi = fsdept(ji,jj,jk) / zze 241 zchl3d(ji,jj,jk) = zCze * ( zCb + zCmax * EXP( -( (zpsi - zpsimax) / zdelpsi )**2 ) ) 242 END DO 243 ! 244 END DO 245 END DO 246 ! 223 DO jk = 1, nksr + 1 224 zchl3d(:,:,jk) = sf_chl(1)%fnow(:,:,jk) 225 ENDDO 226 chl_for_qsr(:,:,:) = zchl3d(:,:,:) 227 ! 247 228 ELSE IF( nn_chldta == 3 ) THEN 248 229 ! … … 259 240 DO jk = 1, nksr + 1 260 241 zchl3d(:,:,jk) = 0.05 242 ENDDO 243 CALL fld_read( kt, 1, sf_chl ) ! Read Chl data and provides it at the current time step 244 ! 245 DO jk = 1, nksr + 1 246 chl_for_qsr(:,:,jk) = sf_chl(1)%fnow(:,:,jk) 261 247 ENDDO 262 248 ENDIF … … 559 545 CALL ctl_stop( 'tra_qsr_init: unable to allocate sf_chl structure' ) ; RETURN 560 546 ENDIF 561 ALLOCATE( sf_chl(1)%fnow(jpi,jpj,1) ) 562 IF( sn_chl%ln_tint )ALLOCATE( sf_chl(1)%fdta(jpi,jpj,1,2) ) 563 ! ! fill sf_chl with sn_chl and control print 547 IF( nn_chldta == 1 ) THEN 548 ALLOCATE( sf_chl(1)%fnow(jpi,jpj,1) ) 549 IF( sn_chl%ln_tint )ALLOCATE( sf_chl(1)%fdta(jpi,jpj,1,2) ) 550 ! ! fill sf_chl with sn_chl and control print 551 ELSE IF( nn_chldta == 2 ) THEN 552 ALLOCATE( sf_chl(1)%fnow(jpi,jpj,jpk) ) 553 IF( sn_chl%ln_tint )ALLOCATE( sf_chl(1)%fdta(jpi,jpj,jpk,2) ) 554 ! 555 ENDIF 564 556 CALL fld_fill( sf_chl, (/ sn_chl /), cn_dir, 'tra_qsr_init', & 565 557 & 'Solar penetration function of read chlorophyll', 'namtra_qsr' ) … … 568 560 IF(lwp) WRITE(numout,*) 569 561 IF(lwp) WRITE(numout,*) ' Chlorophyll will be taken from model at each time step' 570 ELSE !* constant Chl : compute once for all the distribution of light (etot3) 562 ELSE 563 ALLOCATE( sf_chl(1), STAT=ierror ) 564 IF( ierror > 0 ) THEN 565 CALL ctl_stop( 'tra_qsr_init: unable to allocate sf_chl structure' ) ; RETURN 566 ENDIF 567 ALLOCATE( sf_chl(1)%fnow(jpi,jpj,jpk) ) 568 IF( sn_chl%ln_tint )ALLOCATE( sf_chl(1)%fdta(jpi,jpj,jpk,2) ) 569 CALL fld_fill( sf_chl, (/ sn_chl /), cn_dir, 'tra_qsr_init', & 570 & 'Solar penetration function of read chlorophyll', 'namtra_qsr' ) 571 571 IF(lwp) WRITE(numout,*) 572 572 IF(lwp) WRITE(numout,*) ' Constant Chlorophyll concentration = 0.05' -
branches/UKMO/dev_r5518_GO6_package_FOAMv14_readchl/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcopt_medusa.F90
r13725 r14388 126 126 DO jj = 1, jpj 127 127 DO ji = 1, jpi 128 totchl = trn(ji,jj,jk,jpchn) + trn(ji,jj,jk,jpchd) 128 !totchl = trn(ji,jj,jk,jpchn) + trn(ji,jj,jk,jpchd) 129 totchl = chl_for_qsr(ji,jj,jk) 129 130 totchl = MIN( 10. , MAX( 0.05, totchl ) ) 130 131 irgb = NINT( 41 + 20.* LOG10( totchl ) + 1.e-15 ) -
branches/UKMO/dev_r5518_GO6_package_FOAMv14_readchl/NEMOGCM/NEMO/TOP_SRC/trc.F90
r13725 r14388 20 20 21 21 PUBLIC trc_alloc ! called by nemogcm.F90 22 23 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: chl_for_qsr 22 24 23 25 !! parameters for the control of passive tracers … … 276 278 & cycletot(6), cycletot2(6) , & 277 279 # endif 278 & ln_trc_ini(jptra) , ln_trc_wri(jptra) , qsr_mean(jpi,jpj) , STAT = trc_alloc )280 & ln_trc_ini(jptra) , ln_trc_wri(jptra) , qsr_mean(jpi,jpj), chl_for_qsr(jpi,jpj,jpk) , STAT = trc_alloc ) 279 281 280 282 IF( trc_alloc /= 0 ) CALL ctl_warn('trc_alloc: failed to allocate arrays')
Note: See TracChangeset
for help on using the changeset viewer.