Changeset 6343 for branches/UKMO/dev_r5518_fix_global_ice/NEMOGCM/NEMO
- Timestamp:
- 2016-02-23T10:36:53+01:00 (8 years ago)
- Location:
- branches/UKMO/dev_r5518_fix_global_ice/NEMOGCM/NEMO/OPA_SRC/SBC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_fix_global_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r6342 r6343 49 49 USE limthd_dh ! for CALL lim_thd_snwblow 50 50 #endif 51 USE lib_fortran, ONLY: glob_sum 51 52 52 53 IMPLICIT NONE … … 1271 1272 zepsilon = rn_iceshelf_fluxes_tolerance 1272 1273 1274 1275 ! See if we need zmask_sum... 1276 IF ( srcv(jpr_grnm)%laction .OR. srcv(jpr_antm)%laction ) THEN 1277 zmask_sum = glob_sum( tmask(:,:,1) ) 1278 ENDIF 1279 1273 1280 IF( srcv(jpr_grnm)%laction ) THEN 1274 1281 greenland_icesheet_mass_array(:,:) = frcv(jpr_grnm)%z3(:,:,1) 1275 1282 ! take average over ocean points of input array to avoid cumulative error over time 1276 zgreenland_icesheet_mass_in = SUM( greenland_icesheet_mass_array(:,:) * tmask(:,:,1) ) 1277 IF(lk_mpp) CALL mpp_sum( zgreenland_icesheet_mass_in )1278 z mask_sum = SUM(tmask(:,:,1) )1279 IF(lk_mpp) CALL mpp_sum( zmask_sum ) 1283 1284 ! The following must be bit reproducible over different PE decompositions 1285 zgreenland_icesheet_mass_in = glob_sum( greenland_icesheet_mass_array(:,:) * tmask(:,:,1) ) 1286 1280 1287 zgreenland_icesheet_mass_in = zgreenland_icesheet_mass_in / zmask_sum 1281 1288 greenland_icesheet_timelapsed = greenland_icesheet_timelapsed + rdt … … 1302 1309 antarctica_icesheet_mass_array(:,:) = frcv(jpr_antm)%z3(:,:,1) 1303 1310 ! take average over ocean points of input array to avoid cumulative error from rounding errors over time 1304 zantarctica_icesheet_mass_in = SUM( antarctica_icesheet_mass_array(:,:) * tmask(:,:,1) ) 1305 IF(lk_mpp) CALL mpp_sum( zantarctica_icesheet_mass_in ) 1306 zmask_sum = SUM( tmask(:,:,1) ) 1307 IF(lk_mpp) CALL mpp_sum( zmask_sum ) 1311 ! The following must be bit reproducible over different PE decompositions 1312 zantarctica_icesheet_mass_in = glob_sum( antarctica_icesheet_mass_array(:,:) * tmask(:,:,1) ) 1313 1308 1314 zantarctica_icesheet_mass_in = zantarctica_icesheet_mass_in / zmask_sum 1309 1315 antarctica_icesheet_timelapsed = antarctica_icesheet_timelapsed + rdt -
branches/UKMO/dev_r5518_fix_global_ice/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r6342 r6343 26 26 USE zdfbfr 27 27 USE fldread ! read input field at current time step 28 USE lib_fortran, ONLY: glob_sum 28 29 29 30 IMPLICIT NONE … … 263 264 ! and southern hemispheres equals rate of increase of mass of greenland and antarctic ice sheets 264 265 ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 265 266 zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 267 IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 266 267 ! All related global sums must be done bit reproducibly 268 zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 269 268 270 ! use ABS function because we need to preserve the sign of fwfisf 269 271 WHERE( greenland_icesheet_mask(:,:) == 1.0 ) & … … 273 275 ! check 274 276 IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting climatology (kg/s) : ',zgreenland_fwfisf_sum 275 zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 276 IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 277 278 zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 279 277 280 IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 278 281 279 zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) )280 IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 282 zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 283 281 284 ! use ABS function because we need to preserve the sign of fwfisf 282 285 WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & … … 286 289 ! check 287 290 IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting climatology (kg/s) : ',zantarctica_fwfisf_sum 288 zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 289 IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 291 292 zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 293 290 294 IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 291 295 … … 310 314 ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 311 315 312 zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 313 IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 316 ! All related global sums must be done bit reproducibly 317 zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 318 314 319 ! use ABS function because we need to preserve the sign of fwfisf 315 320 WHERE( greenland_icesheet_mask(:,:) == 1.0 ) & … … 319 324 ! check 320 325 IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting climatology (kg/s) : ',zgreenland_fwfisf_sum 321 zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 322 IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 326 327 zgreenland_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 328 323 329 IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 324 330 325 zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) )326 IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 331 zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 332 327 333 ! use ABS function because we need to preserve the sign of fwfisf 328 334 WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & … … 332 338 ! check 333 339 IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting climatology (kg/s) : ',zantarctica_fwfisf_sum 334 zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 335 IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 340 341 zantarctica_fwfisf_sum = glob_sum( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 342 336 343 IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 337 344
Note: See TracChangeset
for help on using the changeset viewer.