Changeset 8643 for branches/NERC
- Timestamp:
- 2017-10-19T18:41:56+02:00 (7 years ago)
- Location:
- branches/NERC/dev_r5518_GO6_Carb_Debug/NEMOGCM/NEMO/TOP_SRC/MEDUSA
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_GO6_Carb_Debug/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r8642 r8643 157 157 !!! 158 158 !!! Jpalm test on atm xCO2 159 IF ( (f_xco2a(ji,jj) > 1 000 ).OR.(f_xco2a(ji,jj) < 100 ) ) THEN159 IF ( (f_xco2a(ji,jj) > 1500 ).OR.(f_xco2a(ji,jj) < 100 ) ) THEN 160 160 IF(lwp) WRITE(numout,*) ' atm xCO2 = ',f_xco2a(ji,jj), & 161 161 ' -- ji =', mig(ji),' jj = ', mjg(jj) … … 207 207 !! must be associated to air-sea flux or air xCO2...i 208 208 !! Check MOCSY inputs 209 IF ( (zsal(ji,jj) > 75.0 ).OR.(zsal(ji,jj) < 0.0 ) .OR. &210 (ztmp(ji,jj) > 50.0 ).OR.(ztmp(ji,jj) < -20.0 ) .OR. &209 IF ( (zsal(ji,jj) > 75.0 ).OR.(zsal(ji,jj) < 0.0 ) .OR. & 210 (ztmp(ji,jj) > 50.0 ).OR.(ztmp(ji,jj) < -20.0 ) .OR. & 211 211 (zalk(ji,jj) > 35.0E2 ).OR.(zalk(ji,jj) <= 0.0 ) .OR. & 212 212 (zdic(ji,jj) > 35.0E2 ).OR.(zdic(ji,jj) <= 0.0 ) .OR. & … … 226 226 WRITE(numout,*) ' MOCSY input: ji =', mig(ji),' jj = ', mjg(jj), & 227 227 ' kt = ', kt 228 WRITE(numout,*) 'MEDUSA - Air-Sea : unrealistic surface Carb. Chemistry' 229 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic surface Carb. Chemistry -- INPUTS' ) 228 WRITE(numout,*) 'MEDUSA - Air-Sea INPUT: unrealistic surface Carb. Chemistry' 229 CALL ctl_stop( 'MEDUSA - Air-Sea INPUT: ', & 230 'unrealistic surface Carb. Chemistry -- INPUTS' ) 230 231 ENDIF 231 232 ENDIF … … 277 278 WRITE(numout,*) ' MOCSY output: ji =', mig(ji),' jj = ', mjg(jj), & 278 279 ' kt = ', kt 279 WRITE(numout,*) 'MEDUSA - Air-Sea : unrealistic surface Carb. Chemistry' 280 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic surface Carb. Chemistry -- OUTPUTS' ) 280 WRITE(numout,*) 'MEDUSA - Air-Sea OUTPUT: unrealistic surface Carb. Chemistry' 281 CALL ctl_stop( 'MEDUSA - Air-Sea OUTPUT: ', & 282 'unrealistic surface Carb. Chemistry -- OUTPUTS' ) 281 283 ENDIF 282 284 ENDIF -
branches/NERC/dev_r5518_GO6_Carb_Debug/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r8642 r8643 81 81 gdepw_0, gdepw_n, & 82 82 nday_year, nsec_day, nyear, & 83 rdt, tmask 83 rdt, tmask, mig, mjg 84 84 USE in_out_manager, ONLY: lwp, numout, nn_date0 85 85 # if defined key_iomput … … 87 87 # endif 88 88 USE lbclnk, ONLY: lbc_lnk 89 USE lib_mpp, ONLY: ctl_stop 89 USE lib_mpp, ONLY: ctl_stop, ctl_warn 90 90 USE oce, ONLY: tsb, tsn 91 91 USE par_kind, ONLY: wp … … 477 477 !! AXY (28/02/14): check input fields 478 478 if (ztmp(ji,jj) .lt. -3.0 .or. ztmp(ji,jj) .gt. 40.0 ) then 479 IF(lwp) WRITE(numout,*)&480 ' trc_bio_medusa: T WARNING 3D, ', &481 tsb(ji,jj,jk,jp_tem), tsn(ji,jj,jk,jp_tem), &482 ' at (', ji, ',', jj, ',', jk, ') at time', kt 479 Call ctl_warn(' trc_bio_medusa: T WARNING 3D : ', & 480 tsn(ji,jj,jk,jp_tem), 'at I, J, K, kt :', & 481 mig(ji), mjg(jj), jk, kt ) 482 # if defined key_debug_medusa 483 483 !! temperature 484 484 ztmp(ji,jj) = tsb(ji,jj,jk,jp_tem) … … 491 491 IF(lwp) WRITE(numout,*) & 492 492 tsn(ji-1,jj-1,jk,jp_tem), tsn(ji,jj-1,jk,jp_tem), tsn(ji+1,jj-1,jk,jp_tem) 493 sumtsn = ( tmask(ji-1,jj+1,jk) * tsn(ji-1,jj+1,jk,jp_tem) ) + &494 ( tmask(ji ,jj+1,jk) * tsn(ji ,jj+1,jk,jp_tem) ) + &495 ( tmask(ji+1,jj+1,jk) * tsn(ji+1,jj+1,jk,jp_tem) ) + &496 ( tmask(ji-1,jj ,jk) * tsn(ji-1,jj ,jk,jp_tem) ) + &497 ( tmask(ji+1,jj ,jk) * tsn(ji+1,jj ,jk,jp_tem) ) + &498 ( tmask(ji-1,jj-1,jk) * tsn(ji-1,jj-1,jk,jp_tem) ) + &499 ( tmask(ji ,jj-1,jk) * tsn(ji ,jj-1,jk,jp_tem) ) + &500 ( tmask(ji+1,jj-1,jk) * tsn(ji+1,jj-1,jk,jp_tem) )501 493 IF(lwp) WRITE(numout,*) & 502 494 ' trc_bio_medusa: Abnormal T suroundings Sal' … … 532 524 IF(lwp) WRITE(numout,*) & 533 525 tmask(ji-1,jj-1,jk), tmask(ji,jj-1,jk), tmask(ji+1,jj-1,jk) 526 # endif 527 !! Correct out of range values 528 sumtsn = ( tmask(ji-1,jj+1,jk) * tsn(ji-1,jj+1,jk,jp_tem) ) + & 529 ( tmask(ji ,jj+1,jk) * tsn(ji ,jj+1,jk,jp_tem) ) + & 530 ( tmask(ji+1,jj+1,jk) * tsn(ji+1,jj+1,jk,jp_tem) ) + & 531 ( tmask(ji-1,jj ,jk) * tsn(ji-1,jj ,jk,jp_tem) ) + & 532 ( tmask(ji+1,jj ,jk) * tsn(ji+1,jj ,jk,jp_tem) ) + & 533 ( tmask(ji-1,jj-1,jk) * tsn(ji-1,jj-1,jk,jp_tem) ) + & 534 ( tmask(ji ,jj-1,jk) * tsn(ji ,jj-1,jk,jp_tem) ) + & 535 ( tmask(ji+1,jj-1,jk) * tsn(ji+1,jj-1,jk,jp_tem) ) 534 536 summask = tmask(ji-1,jj+1,jk) + tmask(ji ,jj+1,jk) + & 535 537 tmask(ji+1,jj+1,jk) + tmask(ji-1,jj ,jk) + & 536 tmask(ji+1,jj ,jk) + tmask(ji-1,jj-1,jk) + & 537 tmask(ji ,jj-1,jk) + tmask(ji+1,jj-1,jk) 538 tmask(ji+1,jj ,jk) + tmask(ji-1,jj-1,jk) + & 539 tmask(ji ,jj-1,jk) + tmask(ji+1,jj-1,jk) 538 540 tsnavg = ( sumtsn / summask ) 539 !! Correct out of range values541 !! 540 542 IF ( ( summask .EQ. 0.0 ) .OR. (tsnavg .LT. -3.0 ) .OR. & 541 543 ( tsnavg .GT. 40.0 ) ) THEN 542 544 IF (ztmp(ji,jj) .LT. -3.0 ) THEN 543 IF(lwp) WRITE(numout,*)&545 CALL ctl_warn( & 544 546 ' trc_bio_medusa: T SWITCHING 3D, ', & 545 tsn(ji,jj,jk,jp_tem), ' -> -3.0 ' 547 tsn(ji,jj,jk,jp_tem), ' -> -3.0 ' ) 546 548 ztmp(ji,jj) = -3.0 547 549 ENDIF 548 550 IF (ztmp(ji,jj) .GT. 40.0 ) THEN 549 IF(lwp) WRITE(numout,*)&551 CALL ctl_warn( & 550 552 ' trc_bio_medusa: T SWITCHING 3D, ', & 551 tsn(ji,jj,jk,jp_tem), ' -> 40.0 ' 553 tsn(ji,jj,jk,jp_tem), ' -> 40.0 ' ) 552 554 ztmp(ji,jj) = 40.0 553 555 ENDIF 554 556 ELSE 555 IF(lwp) WRITE(numout,*)&557 CALL ctl_warn( & 556 558 ' trc_bio_medusa: T SWITCHING 3D, ', & 557 tsn(ji,jj,jk,jp_tem), ' -> surounding avg : ', tsnavg 559 tsn(ji,jj,jk,jp_tem), ' -> surounding avg : ', tsnavg ) 558 560 ztmp(ji,jj) = tsnavg 559 561 ENDIF … … 561 563 !! end T chack 562 564 if (zsal(ji,jj) .lt. 1.0 .or. zsal(ji,jj) .gt. 47.0 ) then 563 IF(lwp) WRITE(numout,*)&565 CALL ctl_warn( & 564 566 ' trc_bio_medusa: S WARNING 2D, ', & 565 ts b(ji,jj,jk,jp_sal), tsn(ji,jj,jk,jp_sal),&566 ' at (', ji, ',', jj, ',', jk, ') at time', kt567 tsn(ji,jj,jk,jp_sal), & 568 ' at I, J, K, kt : ', mig(ji), mjg(jj), jk, kt) 567 569 !! Correct out of range values 568 570 IF (zsal(ji,jj) .LT. 1.0 ) THEN 569 IF(lwp) WRITE(numout,*)&571 CALL ctl_warn( & 570 572 ' trc_bio_medusa: S SWITCHING 3D, ', & 571 tsn(ji,jj,jk,jp_sal), ' -> 1.0 ' 573 tsn(ji,jj,jk,jp_sal), ' -> 1.0 ') 572 574 zsal(ji,jj) = 1.0 573 575 ENDIF 574 576 IF (zsal(ji,jj) .GT. 47.0 ) THEN 575 IF(lwp) WRITE(numout,*)&577 CALL ctl_warn( & 576 578 ' trc_bio_medusa: T SWITCHING 3D, ', & 577 tsn(ji,jj,jk,jp_sal), ' -> 47.0 ' 579 tsn(ji,jj,jk,jp_sal), ' -> 47.0 ') 578 580 zsal(ji,jj) = 47.0 579 581 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.