Changeset 9309
- Timestamp:
- 2018-02-06T12:22:05+01:00 (7 years ago)
- Location:
- branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r9257 r9309 153 153 IF (tmask(ji,jj,1) == 1) then 154 154 IF (lk_oasis) THEN 155 !! use 2D atm xCO2 from atm coupling156 f_xco2a(ji,jj) = PCO2a_in_cpl(ji,jj)157 !!!158 155 !!! Jpalm test on atm xCO2 159 156 IF ( (f_xco2a(ji,jj) > 1500.0 ).OR.(f_xco2a(ji,jj) < 100.0 ) ) THEN … … 162 159 ' -- ji =', mig(ji),' jj = ', mjg(jj) 163 160 ENDIF 164 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic atm xCO2 ' )161 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic coupled atm xCO2 ' ) 165 162 ENDIF 166 163 ENDIF -
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/carb_chem.F90
r8441 r9309 103 103 !! OPEN wet point IF..THEN loop 104 104 IF (tmask(ji,jj,jk).eq.1) THEN 105 IF (lk_oasis) THEN106 !! use 2D atm xCO2 from atm coupling107 f_xco2a(ji,jj) = PCO2a_in_cpl(ji,jj)108 ENDIF109 105 !! Do carbonate chemistry 110 106 !! -
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/sms_medusa.F90
r9298 r9309 289 289 INTEGER :: co2_rec 290 290 REAL(wp) :: co2_yinit, co2_yend 291 #endif 292 293 !!---------------------------------------------------------------------- 294 !! JPALM -- PI CO2 key 295 !!---------------------------------------------------------------------- 296 !! 297 #if defined key_axy_pi_co2 298 LOGICAL , PUBLIC :: lk_pi_co2 = .TRUE. !: OASIS used 299 #else 300 LOGICAL , PUBLIC :: lk_pi_co2 = .FALSE. !: OASIS unused 291 301 #endif 292 302 -
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r9304 r9309 93 93 mpp_min, mpp_minloc, & 94 94 ctl_stop, ctl_warn, lk_mpp 95 USE oce, ONLY: tsb, tsn 95 USE oce, ONLY: tsb, tsn, PCO2a_in_cpl 96 96 USE par_kind, ONLY: wp 97 97 USE par_medusa, ONLY: jpalk, jpchd, jpchn, jpdet, & … … 103 103 !! JPALM (27-06-2016): add lk_oasis for CO2 and DMS coupling with atm 104 104 USE sbc_oce, ONLY: lk_oasis 105 USE sms_medusa, ONLY: hist_pco2, co2_yinit, co2_yend 105 USE sms_medusa, ONLY: hist_pco2, co2_yinit, co2_yend, & 106 lk_pi_co2 106 107 USE trc, ONLY: ln_rsttr, nittrc000, trn 107 108 USE bio_medusa_init_mod, ONLY: bio_medusa_init … … 295 296 !!------------------------------------------------------------------ 296 297 !! 297 !! what's atmospheric pCO2 doing? (data start in 1859) 298 !! AXY - JPALM new interpolation scheme usinf nyear_len 299 this_y = real(nyear) 300 this_d = real(nday_year) 301 this_s = real(nsec_day) 302 !! 303 fyear = this_y + ((this_d - 1) + (this_s / (60. * 60. * 24.))) / real(nyear_len(1)) 304 !! 305 IF ( ( kt == nittrc000 ) .AND. lwp ) THEN 306 WRITE(numout,*) ' MEDUSA year =', this_y 307 WRITE(numout,*) ' Year length =', real(nyear_len(1)) 308 WRITE(numout,*) ' MEDUSA nday_year =', this_d 309 WRITE(numout,*) ' MEDUSA nsec_day =', this_s 310 ENDIF 311 !! 312 !! different case test 313 IF (fyear .LE. co2_yinit) THEN 314 !! before first record -- pre-industrial value 315 f_xco2a(:,:) = hist_pco2(1) 316 ELSEIF (fyear .GE. co2_yend) THEN 317 !! after last record - continue to use the last value 318 f_xco2a(:,:) = hist_pco2(int(co2_yend - co2_yinit + 1.) ) 319 ELSE 320 !! just right 321 iyr1 = int(fyear - co2_yinit) + 1 322 iyr2 = iyr1 + 1 323 fq3 = fyear - real(iyr1) - co2_yinit + 1. 324 fq4 = ((1 - fq3) * hist_pco2(iyr1)) + (fq3 * hist_pco2(iyr2)) 325 f_xco2a(:,:) = fq4 298 IF (lk_oasis) THEN 299 !! xCO2 from coupled 300 IF ( ( kt == nittrc000 ) .AND. lwp ) & 301 WRITE(numout,*) '** MEDUSA Atm xCO2 given by the UM **' 302 f_xco2a(:,:) = PCO2a_in_cpl(:,:) 303 ELSEIF (lk_pi_co2) THEN 304 !! OCMIP pre-industrial xCO2 305 IF ( ( kt == nittrc000 ) .AND. lwp ) & 306 WRITE(numout,*) '** MEDUSA Atm xCO2 fixed to pre-industrial value **' 307 !! f_xco2a(:,:) = 284.725 !! CMIP5 pre-industrial pCO2 308 f_xco2a(:,:) = 284.317 !! CMIP6 pre-industrial pCO2 309 ELSE 310 !! xCO2 from file 311 !! AXY - JPALM new interpolation scheme usinf nyear_len 312 this_y = real(nyear) 313 this_d = real(nday_year) 314 this_s = real(nsec_day) 315 !! 316 fyear = this_y + ((this_d - 1) + (this_s / (60. * 60. * 24.))) / real(nyear_len(1)) 326 317 !! 327 318 IF ( ( kt == nittrc000 ) .AND. lwp ) THEN 328 WRITE(numout,*) ' MEDUSA year1 =', iyr1 329 WRITE(numout,*) ' MEDUSA year2 =', iyr2 330 WRITE(numout,*) ' xCO2 year1 =', hist_pco2(iyr1) 331 WRITE(numout,*) ' xCO2 year2 =', hist_pco2(iyr2) 332 WRITE(numout,*) ' Year2 weight =', fq3 319 WRITE(numout,*) '** MEDUSA Atm xCO2 from file **' 320 WRITE(numout,*) ' MEDUSA year =', this_y 321 WRITE(numout,*) ' Year length =', real(nyear_len(1)) 322 WRITE(numout,*) ' MEDUSA nday_year =', this_d 323 WRITE(numout,*) ' MEDUSA nsec_day =', this_s 324 ENDIF 325 !! 326 !! different case test 327 IF (fyear .LE. co2_yinit) THEN 328 !! before first record -- pre-industrial value 329 f_xco2a(:,:) = hist_pco2(1) 330 ELSEIF (fyear .GE. co2_yend) THEN 331 !! after last record - continue to use the last value 332 f_xco2a(:,:) = hist_pco2(int(co2_yend - co2_yinit + 1.) ) 333 ELSE 334 !! just right 335 iyr1 = int(fyear - co2_yinit) + 1 336 iyr2 = iyr1 + 1 337 fq3 = fyear - real(iyr1) - co2_yinit + 1. 338 fq4 = ((1 - fq3) * hist_pco2(iyr1)) + (fq3 * hist_pco2(iyr2)) 339 f_xco2a(:,:) = fq4 340 !! 341 IF ( ( kt == nittrc000 ) .AND. lwp ) THEN 342 WRITE(numout,*) ' MEDUSA year1 =', iyr1 343 WRITE(numout,*) ' MEDUSA year2 =', iyr2 344 WRITE(numout,*) ' xCO2 year1 =', hist_pco2(iyr1) 345 WRITE(numout,*) ' xCO2 year2 =', hist_pco2(iyr2) 346 WRITE(numout,*) ' Year2 weight =', fq3 347 ENDIF 333 348 ENDIF 334 349 ENDIF 335 # if defined key_axy_pi_co2 336 !! OCMIP pre-industrial pCO2 337 !! f_xco2a(:,:) = 284.725 !! CMIP5 pre-industrial pCO2 338 f_xco2a(:,:) = 284.317 !! CMIP6 pre-industrial pCO2 339 # endif 340 !! AXY (29/01/14): remove surplus diagnostics 341 IF ( ( kt == nittrc000 ) .AND. lwp ) & 350 IF ( ( kt == nittrc000 ) .AND. lwp ) & 342 351 WRITE(numout,*) ' final atm xCO2 =', f_xco2a(1,1) 343 352 # endif -
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
r9298 r9309 329 329 !! initially done in trcsms_medusa 330 330 !!---------------------------------------------------------------------- 331 !! 332 IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisating atm CO2 record' 333 CALL trc_ini_medusa_co2atm 334 331 !! 332 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) ) THEN 333 IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisating atm CO2 record' 334 CALL trc_ini_medusa_co2atm 335 ENDIF 335 336 336 337 END SUBROUTINE trc_ini_medusa
Note: See TracChangeset
for help on using the changeset viewer.