Changeset 9245
- Timestamp:
- 2018-01-16T16:57:50+01:00 (7 years ago)
- Location:
- branches/NERC/dev_r5518_GO6_Carb_Fail_from_GO6_9163/NEMOGCM/NEMO
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_GO6_Carb_Fail_from_GO6_9163/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
r9182 r9245 58 58 INTEGER :: ii, ij, ik ! temporary integers 59 59 REAL(wp) :: zumax, zsmin, zssh2 ! temporary scalars 60 REAL(wp) :: ztmax, ztmin ! temporary scalars 60 REAL(wp) :: ztmax, ztmin ! Scalar to get temperature extreme 61 ! values and warn if they're out of Range 61 62 INTEGER, DIMENSION(3) :: ilocu ! 62 63 INTEGER, DIMENSION(2) :: ilocs ! -
branches/NERC/dev_r5518_GO6_Carb_Fail_from_GO6_9163/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r9182 r9245 92 92 # endif 93 93 USE lib_mpp, ONLY: ctl_stop 94 USE trcstat 94 USE trcstat, ONLY: trc_rst_dia_stat 95 95 96 96 !!* Substitution … … 157 157 !!! 158 158 !!! Jpalm test on atm xCO2 159 IF ( (f_xco2a(ji,jj) > 1500 ).OR.(f_xco2a(ji,jj) < 100 ) ) THEN159 IF ( (f_xco2a(ji,jj) > 1500.0 ).OR.(f_xco2a(ji,jj) < 100.0 ) ) THEN 160 160 IF(lwp) THEN 161 161 WRITE(numout,*) ' atm xCO2 = ',f_xco2a(ji,jj), & 162 162 ' -- ji =', mig(ji),' jj = ', mjg(jj) 163 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic atm xCO2 ' )164 ENDIF163 ENDIF 164 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic atm xCO2 ' ) 165 165 ENDIF 166 166 ENDIF … … 207 207 !! Jpalm -- 12-09-2017 -- add extra check after reccurent 208 208 !! carbonate failure in the coupled run. 209 !! must be associated to air-sea flux or air xCO2... i209 !! must be associated to air-sea flux or air xCO2... 210 210 !! Check MOCSY inputs 211 211 IF ( (zsal(ji,jj) > 75.0 ).OR.(zsal(ji,jj) < 0.0 ) .OR. & … … 229 229 ' kt = ', kt 230 230 WRITE(numout,*) 'MEDUSA - Air-Sea INPUT: unrealistic surface Carb. Chemistry' 231 CALL ctl_stop( 'MEDUSA - Air-Sea INPUT: ', &232 'unrealistic surface Carb. Chemistry -- INPUTS' )233 231 ENDIF 232 CALL ctl_stop( 'MEDUSA - Air-Sea INPUT: ', & 233 'unrealistic surface Carb. Chemistry -- INPUTS' ) 234 234 ENDIF 235 235 !! … … 259 259 !! Jpalm -- 12-09-2017 -- add extra check after reccurent 260 260 !! carbonate failure in the coupled run. 261 !! must be associated to air-sea flux or air xCO2... i262 !! Check MOCSY inputs261 !! must be associated to air-sea flux or air xCO2... 262 !! Check MOCSY outputs 263 263 IF ( (f_pco2w(ji,jj) > 1.E4 ).OR.(f_pco2w(ji,jj) < 0.0 ) .OR. & 264 264 (f_fco2w(ji,jj) > 1.E4 ).OR.(f_fco2w(ji,jj) < 0.0 ) .OR. & … … 281 281 ' kt = ', kt 282 282 WRITE(numout,*) 'MEDUSA - Air-Sea OUTPUT: unrealistic surface Carb. Chemistry' 283 CALL ctl_stop( 'MEDUSA - Air-Sea OUTPUT: ', &284 'unrealistic surface Carb. Chemistry -- OUTPUTS' )285 283 ENDIF 284 CALL ctl_stop( 'MEDUSA - Air-Sea OUTPUT: ', & 285 'unrealistic surface Carb. Chemistry -- OUTPUTS' ) 286 286 ENDIF 287 287 ENDIF -
branches/NERC/dev_r5518_GO6_Carb_Fail_from_GO6_9163/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r9182 r9245 89 89 # endif 90 90 USE lbclnk, ONLY: lbc_lnk 91 USE lib_mpp 91 USE lib_mpp, ONLY: mpp_max, mpp_maxloc, 92 mpp_min, mpp_minloc, & 93 ctl_stop, ctl_warn 92 94 USE oce, ONLY: tsb, tsn 93 95 USE par_kind, ONLY: wp … … 117 119 118 120 PUBLIC trc_bio_medusa ! called in trcsms_medusa.F90 119 PUBLIC trc_bio_exception al_fix ! here121 PUBLIC trc_bio_exceptionnal_fix ! here 120 122 121 123 !!* Substitution … … 497 499 !! --------------------------------------------- 498 500 !! JPALM -- 14-12-2017 -- Here, before any exeptionnal crazy value is 499 !! removed, we want to tell to the Master Nodethat this501 !! removed, we want to tell to the Master Processor that this 500 502 !! Exceptionnal value did exist 501 503 !! … … 514 516 !! ocean.output file; the error reporting below is strictly local 515 517 !! to the relevant ocean.output_XXXX file so will not be visible 516 !! unless all nodes are reporting output518 !! unless all processors are reporting output 517 519 !!================================================================ 518 520 !! … … 527 529 !! 528 530 !! all tracer values are reported in the event of any excursion 529 write(charout,*) ' Tmp = ', ztmp(ji,jj) 530 write(charout2,*) ' Sal = ', zsal(ji,jj) 531 write(charout3,*) ' DIC = ', zdic(ji,jj) 532 write(charout4,*) ' Alk = ', zalk(ji,jj) 533 write(charout5,*) mig(ji), mjg(jj), jk, kt 534 IF (lwp) CALL ctl_warn( 'trc_bio_medusa: carbonate chemistry WARNING:', & 535 TRIM(charout),TRIM(charout2),TRIM(charout3),TRIM(charout4), & 536 'at i, j, k, kt:', TRIM(charout5) ) 531 IF (lwp) THEN 532 WRITE(charout,*) ' Tmp = ', ztmp(ji,jj) 533 WRITE(charout2,*) ' Sal = ', zsal(ji,jj) 534 WRITE(charout3,*) ' DIC = ', zdic(ji,jj) 535 WRITE(charout4,*) ' Alk = ', zalk(ji,jj) 536 WRITE(charout5,*) mig(ji), mjg(jj), jk, kt 537 CALL ctl_warn( 'trc_bio_medusa: carbonate chemistry WARNING:', & 538 TRIM(charout),TRIM(charout2),TRIM(charout3),TRIM(charout4), & 539 'at i, j, k, kt:', TRIM(charout5) ) 540 ENDIF 537 541 !! 538 542 !! Detect, report and correct tracer excursions 539 543 IF ( (ztmp(ji,jj) .LT. -3.0) .OR. (ztmp(ji,jj) .GT. 40.0) ) & 540 CALL trc_bio_exception al_fix( &544 CALL trc_bio_exceptionnal_fix( & 541 545 tsn(ji-1:ji+1,jj-1:jj+1,jk,jp_tem), tmask(ji-1:ji+1,jj-1:jj+1,jk), & 542 546 'Tmp', -3.0, 40.0, ztmp(ji,jj) ) 543 547 !! 544 548 IF ( (zsal(ji,jj) .LE. 0.0) .OR. (zsal(ji,jj) .GT. 50.0) ) & 545 CALL trc_bio_exception al_fix( &549 CALL trc_bio_exceptionnal_fix( & 546 550 tsn(ji-1:ji+1,jj-1:jj+1,jk,jp_sal), tmask(ji-1:ji+1,jj-1:jj+1,jk), & 547 551 'Sal', 1.0, 50.0, zsal(ji,jj) ) 548 552 !! 549 553 IF ( (zdic(ji,jj) .LE. 0.0) .OR. (zdic(ji,jj) .GT. 4.0E3) ) & 550 CALL trc_bio_exception al_fix( &554 CALL trc_bio_exceptionnal_fix( & 551 555 trn(ji-1:ji+1,jj-1:jj+1,jk,jpdic), tmask(ji-1:ji+1,jj-1:jj+1,jk), & 552 556 'DIC', 100.0, 4.0E3, zdic(ji,jj) ) 553 557 !! 554 558 IF ( (zalk(ji,jj) .LE. 0.0) .OR. (zalk(ji,jj) .GT. 4.0E3) ) & 555 CALL trc_bio_exception al_fix( &559 CALL trc_bio_exceptionnal_fix( & 556 560 trn(ji-1:ji+1,jj-1:jj+1,jk,jpalk), tmask(ji-1:ji+1,jj-1:jj+1,jk), & 557 561 'Alk', 100.0, 4.0E3, zalk(ji,jj) ) … … 719 723 720 724 721 SUBROUTINE trc_bio_exception al_fix(tiny_var, tiny_mask, var_nm, mini, maxi, varout)725 SUBROUTINE trc_bio_exceptionnal_fix(tiny_var, tiny_mask, var_nm, mini, maxi, varout) 722 726 !! JPALM (27/10/17): This function is called only when abnormal values that 723 727 !! could break the model's carbonate system are fed to MEDUSA … … 745 749 !! Print surounding values to check if isolated Crazy value or 746 750 !! General error 747 IF(lwp) WRITE(numout,*) & 748 '----------------------------------------------------------------------' 749 IF(lwp) WRITE(numout,*) & 750 'trc_bio_medusa: 3x3 neighbourhood surrounding abnormal ', TRIM(var_nm) 751 IF(lwp) WRITE(numout,9100) & 752 3, tiny_var(ii-1,ij+1), tiny_var(ii ,ij+1), tiny_var(ii+1,ij+1) 753 IF(lwp) WRITE(numout,9100) & 754 2, tiny_var(ii-1,ij ), tiny_var(ii ,ij ), tiny_var(ii+1,ij ) 755 IF(lwp) WRITE(numout,9100) & 756 1, tiny_var(ii-1,ij-1), tiny_var(ii ,ij-1), tiny_var(ii+1,ij-1) 757 IF(lwp) WRITE(numout,*) & 758 'trc_bio_medusa: 3x3 land-sea neighbourhood, tmask' 759 IF(lwp) WRITE(numout,9100) & 760 3, tiny_mask(ii-1,ij+1), tiny_mask(ii ,ij+1), tiny_mask(ii+1,ij+1) 761 IF(lwp) WRITE(numout,9100) & 762 2, tiny_mask(ii-1,ij ), tiny_mask(ii ,ij ), tiny_mask(ii+1,ij ) 763 IF(lwp) WRITE(numout,9100) & 764 1, tiny_mask(ii-1,ij-1), tiny_mask(ii ,ij-1), tiny_mask(ii+1,ij-1) 765 751 IF(lwp) THEN 752 WRITE(numout,*) & 753 '----------------------------------------------------------------------' 754 WRITE(numout,*) & 755 'trc_bio_medusa: 3x3 neighbourhood surrounding abnormal ', TRIM(var_nm) 756 WRITE(numout,9100) & 757 3, tiny_var(ii-1,ij+1), tiny_var(ii ,ij+1), tiny_var(ii+1,ij+1) 758 WRITE(numout,9100) & 759 2, tiny_var(ii-1,ij ), tiny_var(ii ,ij ), tiny_var(ii+1,ij ) 760 WRITE(numout,9100) & 761 1, tiny_var(ii-1,ij-1), tiny_var(ii ,ij-1), tiny_var(ii+1,ij-1) 762 WRITE(numout,*) & 763 'trc_bio_medusa: 3x3 land-sea neighbourhood, tmask' 764 WRITE(numout,9100) & 765 3, tiny_mask(ii-1,ij+1), tiny_mask(ii ,ij+1), tiny_mask(ii+1,ij+1) 766 WRITE(numout,9100) & 767 2, tiny_mask(ii-1,ij ), tiny_mask(ii ,ij ), tiny_mask(ii+1,ij ) 768 WRITE(numout,9100) & 769 1, tiny_mask(ii-1,ij-1), tiny_mask(ii ,ij-1), tiny_mask(ii+1,ij-1) 770 ENDIF 766 771 !! Correct out of range values 767 772 sumtsn = ( tiny_mask(ii-1,ij+1) * tiny_var(ii-1,ij+1) ) + & … … 787 792 ENDIF 788 793 !! 789 write(charout1,9200) tiny_var(ii,ij)790 write(charout2,9200) varout791 write(charout3,*) ' ', charout1, ' -> ', charout2792 write(charout4,*) ' Tracer: ', trim(var_nm)793 IF(lwp) WRITE(numout,*) 'trc_bio_medusa: ** EXCEPTIONAL VALUE SWITCHING **'794 IF(lwp) WRITE(numout,*) charout4795 IF(lwp) WRITE(numout,*) charout3796 IF(lwp) WRITE(numout,*) &797 '----------------------------------------------------------------------'798 IF(lwp) WRITE(numout,*) &799 ' '794 IF (lwp) THEN 795 WRITE(charout1,9200) tiny_var(ii,ij) 796 WRITE(charout2,9200) varout 797 WRITE(charout3,*) ' ', charout1, ' -> ', charout2 798 WRITE(charout4,*) ' Tracer: ', trim(var_nm) 799 !! 800 WRITE(numout,*) 'trc_bio_medusa: ** EXCEPTIONAL VALUE SWITCHING **' 801 WRITE(numout,*) charout4 802 WRITE(numout,*) charout3 803 WRITE(numout,*) '----------------------------------------------------------------------' 804 WRITE(numout,*) ' ' 800 805 9100 FORMAT('Row:', i1, ' ', e16.6, ' ', e16.6, ' ', e16.6) 801 806 9200 FORMAT(e16.6) 802 807 803 END SUBROUTINE trc_bio_exception al_fix808 END SUBROUTINE trc_bio_exceptionnal_fix 804 809 805 810 SUBROUTINE trc_bio_check(kt) … … 808 813 !! problem. The model is now able to correct a local 809 814 !! crazy value. but does it silently. 810 !! We need to spread the word to the master node. we815 !! We need to spread the word to the master processor. we 811 816 !! don't want the model to correct values without telling us 812 817 !! This module will tell at least when crazy DIC or
Note: See TracChangeset
for help on using the changeset viewer.