Changeset 6681
- Timestamp:
- 2016-06-10T12:26:35+02:00 (8 years ago)
- Location:
- branches/UKMO/dev_r5518_GSI7_GSI8_landice_bitcomp_medusa/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GSI7_GSI8_landice_bitcomp_medusa/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r6670 r6681 33 33 USE cpl_oasis3 ! OASIS3 coupling 34 34 USE geo2ocean ! 35 USE oce , ONLY : tsn, un, vn, sshn, ub, vb, sshb, fraqsr_1lev 35 USE oce , ONLY : tsn, un, vn, sshn, ub, vb, sshb, fraqsr_1lev, & 36 CO2Flux_out_cpl, DMS_out_cpl, PCO2a_in_cpl, Dust_in_cpl, & 37 ln_medusa 36 38 USE albedo ! 37 39 USE in_out_manager ! I/O manager … … 527 529 srcv(jpr_atm_pco2)%clname = 'OATMPCO2' 528 530 529 IF (TRIM(sn_rcv_atm_pco2%cldes) == ' coupled') THEN531 IF (TRIM(sn_rcv_atm_pco2%cldes) == 'medusa') THEN 530 532 srcv(jpr_atm_pco2)%laction = .TRUE. 531 533 END IF 532 534 533 535 srcv(jpr_atm_dust)%clname = 'OATMDUST' 534 IF (TRIM(sn_rcv_atm_dust%cldes) == ' coupled') THEN536 IF (TRIM(sn_rcv_atm_dust%cldes) == 'medusa') THEN 535 537 srcv(jpr_atm_dust)%laction = .TRUE. 536 538 END IF … … 812 814 ssnd(jps_co2)%clname = 'O_CO2FLX' ; IF( TRIM(sn_snd_co2%cldes) == 'coupled' ) ssnd(jps_co2 )%laction = .TRUE. 813 815 ! 816 817 ! ! ------------------------- ! 818 ! ! MEDUSA output fields ! 819 ! ! ------------------------- ! 820 ssnd(jps_co2)%clname = 'O_CO2FLX' 821 ssnd(jps_bio_dms)%clname = 'OBioDMS' 822 IF( TRIM(sn_snd_bio_dms%cldes) == 'medusa' ) ssnd(jps_bio_dms )%laction = .TRUE. 823 824 ssnd(jps_bio_co2)%clname = 'OBioCO2' 825 IF( TRIM(sn_snd_bio_co2%cldes) == 'medusa' ) ssnd(jps_bio_co2 )%laction = .TRUE. 814 826 815 827 ! ! ------------------------- ! … … 1176 1188 ENDIF 1177 1189 1178 #if defined key_medusa 1179 ! RSRH Allocate temporary arrays to receive incoming fields during testing 1180 ALLOCATE(atm_pco2(jpi,jpj)) 1181 ALLOCATE(atm_dust(jpi,jpj)) 1182 1183 IF( srcv(jpr_atm_pco2)%laction) atm_pco2(:,:) = frcv(jpr_atm_pco2)%z3(:,:,1) 1184 IF( srcv(jpr_atm_dust)%laction) atm_dust(:,:) = frcv(jpr_atm_dust)%z3(:,:,1) 1185 1186 ! RSRH Deallocate temporary arrays. 1187 DEALLOCATE(atm_pco2) 1188 DEALLOCATE(atm_dust) 1189 #endif 1190 IF (ln_medusa) THEN 1191 IF( srcv(jpr_atm_pco2)%laction) PCO2a_in_cpl(:,:) = frcv(jpr_atm_pco2)%z3(:,:,1) 1192 IF( srcv(jpr_atm_dust)%laction) Dust_in_cpl(:,:) = frcv(jpr_atm_dust)%z3(:,:,1) 1193 ENDIF 1190 1194 1191 1195 #if defined key_cpl_carbon_cycle … … 2231 2235 2232 2236 2233 #if defined key_medusa 2234 IF( ssnd(jps_bio_co2)%laction ) CALL cpl_snd( jps_bio_co2, isec, RESHAPE( f_co2flux2d, (/jpi,jpj,1/) ), info ) 2235 2236 IF( ssnd(jps_bio_dms)%laction ) THEN 2237 ! We need to multiply DMS by a conversion factor to get values in the standard units expected in 2238 ! the coupling space. 2239 ztmp1(:,: ) = dms_surf2d(:,:) * dms_unit_conv 2240 CALL cpl_snd( jps_bio_dms, isec, RESHAPE( ztmp1, (/jpi,jpj,1/) ), info ) 2241 ENDIF 2242 #endif 2237 IF (ln_medusa) THEN 2238 ! ! --------------------------------- ! 2239 ! ! CO2 flux and DMS from MEDUSA ! 2240 ! ! --------------------------------- ! 2241 IF ( ssnd(jps_bio_co2)%laction ) THEN 2242 CALL cpl_snd( jps_bio_co2, isec, RESHAPE( CO2Flux_out_cpl, (/jpi,jpj,1/) ), info ) 2243 ENDIF 2244 2245 IF ( ssnd(jps_bio_dms)%laction ) THEN 2246 CALL cpl_snd( jps_bio_dms, isec, RESHAPE( DMS_out_cpl, (/jpi,jpj,1/) ), info ) 2247 ENDIF 2248 ENDIF 2243 2249 2244 2250 ! ! ------------------------- ! -
branches/UKMO/dev_r5518_GSI7_GSI8_landice_bitcomp_medusa/NEMOGCM/NEMO/OPA_SRC/oce.F90
r6658 r6681 71 71 !! Energy budget of the leads (open water embedded in sea ice) 72 72 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fraqsr_1lev !: fraction of solar net radiation absorbed in the first ocean level [-] 73 74 !! Arrays used in coupling when MEDUSA is present. These arrays need to be declared 75 !! even if MEDUSA is not active, to allow compilation, in which case they will not be allocated. 76 !! --------------------- 77 REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: CO2Flux_out_cpl(:,:) ! Output coupling CO2 flux 78 REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: DMS_out_cpl(:,:) ! Output coupling DMS 73 79 80 REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: PCO2a_in_cpl(:,:) ! Input coupling CO2 partial pressure 81 REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: Dust_in_cpl(:,:) ! Input coupling dust 82 83 #if defined key_medusa 84 LOGICAL, PUBLIC, PARAMETER :: ln_medusa=.TRUE. ! Medusa switched on or off. 85 #else 86 LOGICAL, PUBLIC, PARAMETER :: ln_medusa=.FALSE. ! Medusa switched on or off. 87 #endif 74 88 !!---------------------------------------------------------------------- 75 89 !! NEMO/OPA 4.0 , NEMO Consortium (2011) … … 119 133 ALLOCATE( fraqsr_1lev(jpi,jpj) , STAT=ierr(4) ) 120 134 ! 135 #if defined key_oasis3 136 IF (ln_medusa) THEN 137 ! We only actually need these arrays to be allocated if coupling and MEDUSA 138 ! are enabled 139 ALLOCATE( CO2Flux_out_cpl(jpi,jpj), DMS_out_cpl(jpi,jpj), & 140 PCO2a_in_cpl(jpi,jpj), Dust_in_cpl(jpi,jpj), STAT=ierr(5) ) 141 142 ! RSRH Temporarily initialise output coupling fields while we await clarification 143 ! of exactly how these will be initialised at model startup! 144 DMS_out_cpl(:,:) = 0.0 145 CO2Flux_out_cpl(:,:) = 0.0 146 ENDIF 147 #endif 148 121 149 oce_alloc = MAXVAL( ierr ) 122 150 IF( oce_alloc /= 0 ) CALL ctl_warn('oce_alloc: failed to allocate arrays')
Note: See TracChangeset
for help on using the changeset viewer.