- Timestamp:
- 2016-08-03T16:04:57+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_convadj/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r6836 r6839 1029 1029 ssu_m(:,:) = frcv(jpr_ocx1)%z3(:,:,1) 1030 1030 ub (:,:,1) = ssu_m(:,:) ! will be used in sbcice_lim in the call of lim_sbc_tau 1031 un (:,:,1) = ssu_m(:,:) ! will be used in sbc_cpl_snd if atmosphere coupling 1031 1032 CALL iom_put( 'ssu_m', ssu_m ) 1032 1033 ENDIF … … 1034 1035 ssv_m(:,:) = frcv(jpr_ocy1)%z3(:,:,1) 1035 1036 vb (:,:,1) = ssv_m(:,:) ! will be used in sbcice_lim in the call of lim_sbc_tau 1037 vn (:,:,1) = ssv_m(:,:) ! will be used in sbc_cpl_snd if atmosphere coupling 1036 1038 CALL iom_put( 'ssv_m', ssv_m ) 1037 1039 ENDIF … … 1333 1335 !! *** ROUTINE sbc_cpl_ice_flx *** 1334 1336 !! 1335 !! ** Purpose : provide the heat and freshwater fluxes of the 1336 !! ocean-ice system. 1337 !! ** Purpose : provide the heat and freshwater fluxes of the ocean-ice system 1337 1338 !! 1338 1339 !! ** Method : transform the fields received from the atmosphere into 1339 1340 !! surface heat and fresh water boundary condition for the 1340 1341 !! ice-ocean system. The following fields are provided: 1341 !! * total non solar, solar and freshwater fluxes (qns_tot,1342 !! * total non solar, solar and freshwater fluxes (qns_tot, 1342 1343 !! qsr_tot and emp_tot) (total means weighted ice-ocean flux) 1343 1344 !! NB: emp_tot include runoffs and calving. 1344 !! * fluxes over ice (qns_ice, qsr_ice, emp_ice) where1345 !! * fluxes over ice (qns_ice, qsr_ice, emp_ice) where 1345 1346 !! emp_ice = sublimation - solid precipitation as liquid 1346 1347 !! precipitation are re-routed directly to the ocean and 1347 !! runoffs and calving directly enter the ocean.1348 !! * solid precipitation (sprecip), used to add to qns_tot1348 !! calving directly enter the ocean (runoffs are read but included in trasbc.F90) 1349 !! * solid precipitation (sprecip), used to add to qns_tot 1349 1350 !! the heat lost associated to melting solid precipitation 1350 1351 !! over the ocean fraction. 1351 !! ===>> CAUTION here this changes the net heat flux received from 1352 !! the atmosphere 1353 !! 1354 !! - the fluxes have been separated from the stress as 1355 !! (a) they are updated at each ice time step compare to 1356 !! an update at each coupled time step for the stress, and 1357 !! (b) the conservative computation of the fluxes over the 1358 !! sea-ice area requires the knowledge of the ice fraction 1359 !! after the ice advection and before the ice thermodynamics, 1360 !! so that the stress is updated before the ice dynamics 1361 !! while the fluxes are updated after it. 1352 !! * heat content of rain, snow and evap can also be provided, 1353 !! otherwise heat flux associated with these mass flux are 1354 !! guessed (qemp_oce, qemp_ice) 1355 !! 1356 !! - the fluxes have been separated from the stress as 1357 !! (a) they are updated at each ice time step compare to 1358 !! an update at each coupled time step for the stress, and 1359 !! (b) the conservative computation of the fluxes over the 1360 !! sea-ice area requires the knowledge of the ice fraction 1361 !! after the ice advection and before the ice thermodynamics, 1362 !! so that the stress is updated before the ice dynamics 1363 !! while the fluxes are updated after it. 1364 !! 1365 !! ** Details 1366 !! qns_tot = pfrld * qns_oce + ( 1 - pfrld ) * qns_ice => provided 1367 !! + qemp_oce + qemp_ice => recalculated and added up to qns 1368 !! 1369 !! qsr_tot = pfrld * qsr_oce + ( 1 - pfrld ) * qsr_ice => provided 1370 !! 1371 !! emp_tot = emp_oce + emp_ice => calving is provided and added to emp_tot (and emp_oce) 1372 !! river runoff (rnf) is provided but not included here 1362 1373 !! 1363 1374 !! ** Action : update at each nf_ice time step: 1364 1375 !! qns_tot, qsr_tot non-solar and solar total heat fluxes 1365 1376 !! qns_ice, qsr_ice non-solar and solar heat fluxes over the ice 1366 !! emp_tot total evaporation - precipitation(liquid and solid) (-runoff)(-calving)1367 !! emp_ice 1368 !! dqns_ice 1369 !! sprecip 1377 !! emp_tot total evaporation - precipitation(liquid and solid) (-calving) 1378 !! emp_ice ice sublimation - solid precipitation over the ice 1379 !! dqns_ice d(non-solar heat flux)/d(Temperature) over the ice 1380 !! sprecip solid precipitation over the ocean 1370 1381 !!---------------------------------------------------------------------- 1371 1382 REAL(wp), INTENT(in ), DIMENSION(:,:) :: p_frld ! lead fraction [0 to 1] … … 1376 1387 ! 1377 1388 INTEGER :: jl ! dummy loop index 1378 REAL(wp), POINTER, DIMENSION(:,: ) :: zcptn, ztmp, zicefr, zmsk 1379 REAL(wp), POINTER, DIMENSION(:,: ) :: zemp_tot, zemp_ice, z sprecip, ztprecip, zqns_tot, zqsr_tot1380 REAL(wp), POINTER, DIMENSION(:,: ,:) :: zqns_ice, zqsr_ice, zdqns_ice1381 REAL(wp), POINTER, DIMENSION(:,: ) :: zevap, zsnw, zqns_oce, zqsr_oce, zqprec_ice, zqemp_oce ! for LIM31389 REAL(wp), POINTER, DIMENSION(:,: ) :: zcptn, ztmp, zicefr, zmsk, zsnw 1390 REAL(wp), POINTER, DIMENSION(:,: ) :: zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice 1391 REAL(wp), POINTER, DIMENSION(:,: ) :: zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice 1392 REAL(wp), POINTER, DIMENSION(:,:,:) :: zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice 1382 1393 !!---------------------------------------------------------------------- 1383 1394 ! 1384 1395 IF( nn_timing == 1 ) CALL timing_start('sbc_cpl_ice_flx') 1385 1396 ! 1386 CALL wrk_alloc( jpi,jpj, zcptn, ztmp, zicefr, zmsk, zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot ) 1387 CALL wrk_alloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice ) 1397 CALL wrk_alloc( jpi,jpj, zcptn, ztmp, zicefr, zmsk, zsnw ) 1398 CALL wrk_alloc( jpi,jpj, zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice ) 1399 CALL wrk_alloc( jpi,jpj, zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice ) 1400 CALL wrk_alloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice ) 1388 1401 1389 1402 IF( ln_mixcpl ) zmsk(:,:) = 1. - xcplmask(:,:,0) … … 1392 1405 ! 1393 1406 ! ! ========================= ! 1394 ! ! freshwater budget ! (emp )1407 ! ! freshwater budget ! (emp_tot) 1395 1408 ! ! ========================= ! 1396 1409 ! 1397 ! ! total Precipitation - total Evaporation (emp_tot)1398 ! ! solid precipitation - sublimation (emp_ice)1399 ! ! solid Precipitation (sprecip)1400 ! ! liquid + solid Precipitation (tprecip)1410 ! ! solid Precipitation (sprecip) 1411 ! ! liquid + solid Precipitation (tprecip) 1412 ! ! total Evaporation - total Precipitation (emp_tot) 1413 ! ! sublimation - solid precipitation (cell average) (emp_ice) 1401 1414 SELECT CASE( TRIM( sn_rcv_emp%cldes ) ) 1402 CASE( 'conservative' 1403 zsprecip(:,:) = frcv(jpr_snow)%z3(:,:,1) ! May need to ensure positive here1404 ztprecip(:,:) = frcv(jpr_rain)%z3(:,:,1) + zsprecip(:,:) ! May need to ensure positive here1405 zemp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - ztprecip(:,:)1406 zemp_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1)1407 CALL iom_put( 'rain' , frcv(jpr_rain)%z3(:,:,1) )! liquid precipitation1415 CASE( 'conservative' ) ! received fields: jpr_rain, jpr_snow, jpr_ievp, jpr_tevp 1416 zsprecip(:,:) = frcv(jpr_snow)%z3(:,:,1) ! May need to ensure positive here 1417 ztprecip(:,:) = frcv(jpr_rain)%z3(:,:,1) + zsprecip(:,:) ! May need to ensure positive here 1418 zemp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - ztprecip(:,:) 1419 zemp_ice(:,:) = ( frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) ) * zicefr(:,:) 1420 CALL iom_put( 'rain' , frcv(jpr_rain)%z3(:,:,1) ) ! liquid precipitation 1408 1421 IF( iom_use('hflx_rain_cea') ) & 1409 CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) ) ! heat flux from liq. precip. 1410 IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) & 1411 ztmp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) 1422 & CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) ) ! heat flux from liq. precip. 1412 1423 IF( iom_use('evap_ao_cea' ) ) & 1413 CALL iom_put( 'evap_ao_cea' , ztmp )! ice-free oce evap (cell average)1424 & CALL iom_put( 'evap_ao_cea' , frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) ! ice-free oce evap (cell average) 1414 1425 IF( iom_use('hflx_evap_cea') ) & 1415 CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * zcptn(:,:) )! heat flux from from evap (cell average)1416 CASE( 'oce and ice' 1426 & CALL iom_put( 'hflx_evap_cea', ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) * zcptn(:,:) ) ! heat flux from from evap (cell average) 1427 CASE( 'oce and ice' ) ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp 1417 1428 zemp_tot(:,:) = p_frld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + zicefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1) 1418 zemp_ice(:,:) = frcv(jpr_semp)%z3(:,:,1) 1429 zemp_ice(:,:) = frcv(jpr_semp)%z3(:,:,1) * zicefr(:,:) 1419 1430 zsprecip(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_semp)%z3(:,:,1) 1420 1431 ztprecip(:,:) = frcv(jpr_semp)%z3(:,:,1) - frcv(jpr_sbpr)%z3(:,:,1) + zsprecip(:,:) 1421 1432 END SELECT 1422 1433 1423 IF( iom_use('subl_ai_cea') ) & 1424 CALL iom_put( 'subl_ai_cea', frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) ! Sublimation over sea-ice (cell average) 1425 ! 1426 ! ! runoffs and calving (put in emp_tot) 1434 #if defined key_lim3 1435 ! zsnw = snow fraction over ice after wind blowing 1436 zsnw(:,:) = 0._wp ; CALL lim_thd_snwblow( p_frld, zsnw ) 1437 1438 ! --- evaporation minus precipitation corrected (because of wind blowing on snow) --- ! 1439 zemp_ice(:,:) = zemp_ice(:,:) + zsprecip(:,:) * ( zicefr(:,:) - zsnw(:,:) ) ! emp_ice = A * sublimation - zsnw * sprecip 1440 zemp_oce(:,:) = zemp_tot(:,:) - zemp_ice(:,:) ! emp_oce = emp_tot - emp_ice 1441 1442 ! --- evaporation over ocean (used later for qemp) --- ! 1443 zevap_oce(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) 1444 1445 ! --- evaporation over ice (kg/m2/s) --- ! 1446 zevap_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) 1447 ! since the sensitivity of evap to temperature (devap/dT) is not prescribed by the atmosphere, we set it to 0 1448 ! therefore, sublimation is not redistributed over the ice categories in case no subgrid scale fluxes are provided by atm. 1449 zdevap_ice(:,:) = 0._wp 1450 1451 ! --- runoffs (included in emp later on) --- ! 1452 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1453 1454 ! --- calving (put in emp_tot and emp_oce) --- ! 1455 IF( srcv(jpr_cal)%laction ) THEN 1456 zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) 1457 zemp_oce(:,:) = zemp_oce(:,:) - frcv(jpr_cal)%z3(:,:,1) 1458 CALL iom_put( 'calving_cea', frcv(jpr_cal)%z3(:,:,1) ) 1459 ENDIF 1460 1461 IF( ln_mixcpl ) THEN 1462 emp_tot(:,:) = emp_tot(:,:) * xcplmask(:,:,0) + zemp_tot(:,:) * zmsk(:,:) 1463 emp_ice(:,:) = emp_ice(:,:) * xcplmask(:,:,0) + zemp_ice(:,:) * zmsk(:,:) 1464 emp_oce(:,:) = emp_oce(:,:) * xcplmask(:,:,0) + zemp_oce(:,:) * zmsk(:,:) 1465 sprecip(:,:) = sprecip(:,:) * xcplmask(:,:,0) + zsprecip(:,:) * zmsk(:,:) 1466 tprecip(:,:) = tprecip(:,:) * xcplmask(:,:,0) + ztprecip(:,:) * zmsk(:,:) 1467 DO jl=1,jpl 1468 evap_ice (:,:,jl) = evap_ice (:,:,jl) * xcplmask(:,:,0) + zevap_ice (:,:) * zmsk(:,:) 1469 devap_ice(:,:,jl) = devap_ice(:,:,jl) * xcplmask(:,:,0) + zdevap_ice(:,:) * zmsk(:,:) 1470 ENDDO 1471 ELSE 1472 emp_tot(:,:) = zemp_tot(:,:) 1473 emp_ice(:,:) = zemp_ice(:,:) 1474 emp_oce(:,:) = zemp_oce(:,:) 1475 sprecip(:,:) = zsprecip(:,:) 1476 tprecip(:,:) = ztprecip(:,:) 1477 DO jl=1,jpl 1478 evap_ice (:,:,jl) = zevap_ice (:,:) 1479 devap_ice(:,:,jl) = zdevap_ice(:,:) 1480 ENDDO 1481 ENDIF 1482 1483 IF( iom_use('subl_ai_cea') ) CALL iom_put( 'subl_ai_cea', zevap_ice(:,:) * zicefr(:,:) ) ! Sublimation over sea-ice (cell average) 1484 CALL iom_put( 'snowpre' , sprecip(:,:) ) ! Snow 1485 IF( iom_use('snow_ao_cea') ) CALL iom_put( 'snow_ao_cea', sprecip(:,:) * ( 1._wp - zsnw(:,:) ) ) ! Snow over ice-free ocean (cell average) 1486 IF( iom_use('snow_ai_cea') ) CALL iom_put( 'snow_ai_cea', sprecip(:,:) * zsnw(:,:) ) ! Snow over sea-ice (cell average) 1487 #else 1488 ! runoffs and calving (put in emp_tot) 1427 1489 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1428 1490 IF( srcv(jpr_cal)%laction ) THEN … … 1443 1505 ENDIF 1444 1506 1445 CALL iom_put( 'snowpre' , sprecip ) ! Snow1446 IF( iom_use('snow_ao_cea') ) &1447 CALL iom_put( 'snow_ao_cea', sprecip(:,:) * p_frld(:,:) ) ! Snowover ice-free ocean (cell average)1448 IF( iom_use('snow_ai_cea') ) &1449 CALL iom_put( 'snow_ai_cea', sprecip(:,:) * zicefr(:,:) ) ! Snow over sea-ice (cell average) 1507 IF( iom_use('subl_ai_cea') ) CALL iom_put( 'subl_ai_cea', frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) ) ! Sublimation over sea-ice (cell average) 1508 CALL iom_put( 'snowpre' , sprecip(:,:) ) ! Snow 1509 IF( iom_use('snow_ao_cea') ) CALL iom_put( 'snow_ao_cea', sprecip(:,:) * p_frld(:,:) ) ! Snow over ice-free ocean (cell average) 1510 IF( iom_use('snow_ai_cea') ) CALL iom_put( 'snow_ai_cea', sprecip(:,:) * zicefr(:,:) ) ! Snow over sea-ice (cell average) 1511 #endif 1450 1512 1451 1513 ! ! ========================= ! 1452 1514 SELECT CASE( TRIM( sn_rcv_qns%cldes ) ) ! non solar heat fluxes ! (qns) 1453 1515 ! ! ========================= ! 1454 CASE( 'oce only' ) 1455 zqns_tot(:,: 1456 CASE( 'conservative' ) 1457 zqns_tot(:,: 1516 CASE( 'oce only' ) ! the required field is directly provided 1517 zqns_tot(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) 1518 CASE( 'conservative' ) ! the required fields are directly provided 1519 zqns_tot(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 1458 1520 IF ( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN 1459 1521 zqns_ice(:,:,1:jpl) = frcv(jpr_qnsice)%z3(:,:,1:jpl) 1460 1522 ELSE 1461 ! Set all category values equal for the moment1462 1523 DO jl=1,jpl 1463 zqns_ice(:,:,jl) = frcv(jpr_qnsice)%z3(:,:,1) 1524 zqns_ice(:,:,jl) = frcv(jpr_qnsice)%z3(:,:,1) ! Set all category values equal 1464 1525 ENDDO 1465 1526 ENDIF 1466 CASE( 'oce and ice' ) 1467 zqns_tot(:,: 1527 CASE( 'oce and ice' ) ! the total flux is computed from ocean and ice fluxes 1528 zqns_tot(:,:) = p_frld(:,:) * frcv(jpr_qnsoce)%z3(:,:,1) 1468 1529 IF ( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN 1469 1530 DO jl=1,jpl … … 1472 1533 ENDDO 1473 1534 ELSE 1474 qns_tot(:,: 1535 qns_tot(:,:) = qns_tot(:,:) + zicefr(:,:) * frcv(jpr_qnsice)%z3(:,:,1) 1475 1536 DO jl=1,jpl 1476 1537 zqns_tot(:,: ) = zqns_tot(:,:) + zicefr(:,:) * frcv(jpr_qnsice)%z3(:,:,1) … … 1478 1539 ENDDO 1479 1540 ENDIF 1480 CASE( 'mixed oce-ice' ) 1541 CASE( 'mixed oce-ice' ) ! the ice flux is cumputed from the total flux, the SST and ice informations 1481 1542 ! ** NEED TO SORT OUT HOW THIS SHOULD WORK IN THE MULTI-CATEGORY CASE - CURRENTLY NOT ALLOWED WHEN INTERFACE INITIALISED ** 1482 1543 zqns_tot(:,: ) = frcv(jpr_qnsmix)%z3(:,:,1) 1483 1544 zqns_ice(:,:,1) = frcv(jpr_qnsmix)%z3(:,:,1) & 1484 1545 & + frcv(jpr_dqnsdt)%z3(:,:,1) * ( pist(:,:,1) - ( (rt0 + psst(:,: ) ) * p_frld(:,:) & 1485 & + pist(:,:,1)* zicefr(:,:) ) )1546 & + pist(:,:,1) * zicefr(:,:) ) ) 1486 1547 END SELECT 1487 1548 !!gm … … 1493 1554 !! similar job should be done for snow and precipitation temperature 1494 1555 ! 1495 IF( srcv(jpr_cal)%laction ) THEN ! Iceberg melting 1496 ztmp(:,:) = frcv(jpr_cal)%z3(:,:,1) * lfus ! add the latent heat of iceberg melting 1497 zqns_tot(:,:) = zqns_tot(:,:) - ztmp(:,:) 1498 IF( iom_use('hflx_cal_cea') ) & 1499 CALL iom_put( 'hflx_cal_cea', ztmp + frcv(jpr_cal)%z3(:,:,1) * zcptn(:,:) ) ! heat flux from calving 1500 ENDIF 1501 1502 ztmp(:,:) = p_frld(:,:) * zsprecip(:,:) * lfus 1503 IF( iom_use('hflx_snow_cea') ) CALL iom_put( 'hflx_snow_cea', ztmp + sprecip(:,:) * zcptn(:,:) ) ! heat flux from snow (cell average) 1504 1505 #if defined key_lim3 1506 CALL wrk_alloc( jpi,jpj, zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce ) 1507 1508 ! --- evaporation --- ! 1509 ! clem: evap_ice is set to 0 for LIM3 since we still do not know what to do with sublimation 1510 ! the problem is: the atm. imposes both mass evaporation and heat removed from the snow/ice 1511 ! but it is incoherent WITH the ice model 1512 DO jl=1,jpl 1513 evap_ice(:,:,jl) = 0._wp ! should be: frcv(jpr_ievp)%z3(:,:,1) 1514 ENDDO 1515 zevap(:,:) = zemp_tot(:,:) + ztprecip(:,:) ! evaporation over ocean 1516 1517 ! --- evaporation minus precipitation --- ! 1518 emp_oce(:,:) = emp_tot(:,:) - emp_ice(:,:) 1519 1556 IF( srcv(jpr_cal)%laction ) THEN ! Iceberg melting 1557 zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) * lfus ! add the latent heat of iceberg melting 1558 ! we suppose it melts at 0deg, though it should be temp. of surrounding ocean 1559 IF( iom_use('hflx_cal_cea') ) CALL iom_put( 'hflx_cal_cea', - frcv(jpr_cal)%z3(:,:,1) * lfus ) ! heat flux from calving 1560 ENDIF 1561 1562 #if defined key_lim3 1520 1563 ! --- non solar flux over ocean --- ! 1521 1564 ! note: p_frld cannot be = 0 since we limit the ice concentration to amax … … 1523 1566 WHERE( p_frld /= 0._wp ) zqns_oce(:,:) = ( zqns_tot(:,:) - SUM( a_i * zqns_ice, dim=3 ) ) / p_frld(:,:) 1524 1567 1525 ! --- heat flux associated with emp --- !1526 z snw(:,:) = 0._wp1527 CALL lim_thd_snwblow( p_frld, zsnw ) ! snow distribution over ice after wind blowing1528 zqemp_oce(:,:) = - zevap(:,:) * p_frld(:,:) * zcptn(:,:) & ! evap1529 & + ( ztprecip(:,:) - zsprecip(:,:) ) * zcptn(:,:) & ! liquid precip1530 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptn(:,:) - lfus ) ! solid precip over ocean 1531 qemp_ice(:,:) = - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) * zcptn(:,:) & ! ice evap1532 & + zsprecip(:,:) * zsnw * ( zcptn(:,:) - lfus ) ! solid precip over ice1533 1534 ! --- heat content ofprecip over ice in J/m3 (to be used in 1D-thermo) --- !1568 ! --- heat flux associated with emp (W/m2) --- ! 1569 zqemp_oce(:,:) = - zevap_oce(:,:) * zcptn(:,:) & ! evap 1570 & + ( ztprecip(:,:) - zsprecip(:,:) ) * zcptn(:,:) & ! liquid precip 1571 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptn(:,:) - lfus ) ! solid precip over ocean + snow melting 1572 ! zqemp_ice(:,:) = - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) * zcptn(:,:) & ! ice evap 1573 ! & + zsprecip(:,:) * zsnw * ( zcptn(:,:) - lfus ) ! solid precip over ice 1574 zqemp_ice(:,:) = zsprecip(:,:) * zsnw * ( zcptn(:,:) - lfus ) ! solid precip over ice (only) 1575 ! qevap_ice=0 since we consider Tice=0degC 1576 1577 ! --- enthalpy of snow precip over ice in J/m3 (to be used in 1D-thermo) --- ! 1535 1578 zqprec_ice(:,:) = rhosn * ( zcptn(:,:) - lfus ) 1536 1579 1537 ! --- total non solar flux --- ! 1538 zqns_tot(:,:) = zqns_tot(:,:) + qemp_ice(:,:) + zqemp_oce(:,:) 1580 ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- ! 1581 DO jl = 1, jpl 1582 zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * cpic ) but we do not have Tice, so we consider Tice=0degC 1583 END DO 1584 1585 ! --- total non solar flux (including evap/precip) --- ! 1586 zqns_tot(:,:) = zqns_tot(:,:) + zqemp_ice(:,:) + zqemp_oce(:,:) 1539 1587 1540 1588 ! --- in case both coupled/forced are active, we must mix values --- ! … … 1543 1591 qns_oce(:,:) = qns_oce(:,:) * xcplmask(:,:,0) + zqns_oce(:,:)* zmsk(:,:) 1544 1592 DO jl=1,jpl 1545 qns_ice(:,:,jl) = qns_ice(:,:,jl) * xcplmask(:,:,0) + zqns_ice(:,:,jl)* zmsk(:,:) 1593 qns_ice (:,:,jl) = qns_ice (:,:,jl) * xcplmask(:,:,0) + zqns_ice (:,:,jl)* zmsk(:,:) 1594 qevap_ice(:,:,jl) = qevap_ice(:,:,jl) * xcplmask(:,:,0) + zqevap_ice(:,:,jl)* zmsk(:,:) 1546 1595 ENDDO 1547 1596 qprec_ice(:,:) = qprec_ice(:,:) * xcplmask(:,:,0) + zqprec_ice(:,:)* zmsk(:,:) 1548 1597 qemp_oce (:,:) = qemp_oce(:,:) * xcplmask(:,:,0) + zqemp_oce(:,:)* zmsk(:,:) 1549 !!clem evap_ice(:,:) = evap_ice(:,:) * xcplmask(:,:,0)1598 qemp_ice (:,:) = qemp_ice(:,:) * xcplmask(:,:,0) + zqemp_ice(:,:)* zmsk(:,:) 1550 1599 ELSE 1551 1600 qns_tot (:,: ) = zqns_tot (:,: ) 1552 1601 qns_oce (:,: ) = zqns_oce (:,: ) 1553 1602 qns_ice (:,:,:) = zqns_ice (:,:,:) 1554 qprec_ice(:,:) = zqprec_ice(:,:) 1555 qemp_oce (:,:) = zqemp_oce (:,:) 1556 ENDIF 1557 1558 CALL wrk_dealloc( jpi,jpj, zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce ) 1603 qevap_ice(:,:,:) = zqevap_ice(:,:,:) 1604 qprec_ice(:,: ) = zqprec_ice(:,: ) 1605 qemp_oce (:,: ) = zqemp_oce (:,: ) 1606 qemp_ice (:,: ) = zqemp_ice (:,: ) 1607 ENDIF 1608 1609 !! clem: we should output qemp_oce and qemp_ice (at least) 1610 IF( iom_use('hflx_snow_cea') ) CALL iom_put( 'hflx_snow_cea', sprecip(:,:) * ( zcptn(:,:) - Lfus ) ) ! heat flux from snow (cell average) 1611 !! these diags are not outputed yet 1612 !! IF( iom_use('hflx_rain_cea') ) CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * zcptn(:,:) ) ! heat flux from rain (cell average) 1613 !! IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put( 'hflx_snow_ao_cea', sprecip(:,:) * ( zcptn(:,:) - Lfus ) * (1._wp - zsnw(:,:)) ) ! heat flux from snow (cell average) 1614 !! IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put( 'hflx_snow_ai_cea', sprecip(:,:) * ( zcptn(:,:) - Lfus ) * zsnw(:,:) ) ! heat flux from snow (cell average) 1615 1559 1616 #else 1560 1561 1617 ! clem: this formulation is certainly wrong... but better than it was... 1562 1618 zqns_tot(:,:) = zqns_tot(:,:) & ! zqns_tot update over free ocean with: 1563 1619 & - ztmp(:,:) & ! remove the latent heat flux of solid precip. melting 1564 1620 & - ( zemp_tot(:,:) & ! remove the heat content of mass flux (assumed to be at SST) 1565 & - zemp_ice(:,:) * zicefr(:,:)) * zcptn(:,:)1621 & - zemp_ice(:,:) ) * zcptn(:,:) 1566 1622 1567 1623 IF( ln_mixcpl ) THEN … … 1575 1631 qns_ice(:,:,:) = zqns_ice(:,:,:) 1576 1632 ENDIF 1577 1578 1633 #endif 1579 1634 … … 1626 1681 1627 1682 #if defined key_lim3 1628 CALL wrk_alloc( jpi,jpj, zqsr_oce )1629 1683 ! --- solar flux over ocean --- ! 1630 1684 ! note: p_frld cannot be = 0 since we limit the ice concentration to amax … … 1634 1688 IF( ln_mixcpl ) THEN ; qsr_oce(:,:) = qsr_oce(:,:) * xcplmask(:,:,0) + zqsr_oce(:,:)* zmsk(:,:) 1635 1689 ELSE ; qsr_oce(:,:) = zqsr_oce(:,:) ; ENDIF 1636 1637 CALL wrk_dealloc( jpi,jpj, zqsr_oce )1638 1690 #endif 1639 1691 … … 1686 1738 fr2_i0(:,:) = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice ) 1687 1739 1688 CALL wrk_dealloc( jpi,jpj, zcptn, ztmp, zicefr, zmsk, zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot ) 1689 CALL wrk_dealloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice ) 1740 CALL wrk_dealloc( jpi,jpj, zcptn, ztmp, zicefr, zmsk, zsnw ) 1741 CALL wrk_dealloc( jpi,jpj, zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice ) 1742 CALL wrk_dealloc( jpi,jpj, zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice ) 1743 CALL wrk_dealloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice ) 1690 1744 ! 1691 1745 IF( nn_timing == 1 ) CALL timing_stop('sbc_cpl_ice_flx') … … 1743 1797 ztmp3(:,:,1) = SUM( tn_ice * a_i, dim=3 ) / SUM( a_i, dim=3 ) 1744 1798 ELSEWHERE 1745 ztmp3(:,:,1) = rt0 ! TODO: Is freezing point a good default? (Maybe SST is better?)1799 ztmp3(:,:,1) = rt0 1746 1800 END WHERE 1747 1801 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) … … 1774 1828 ! ! ------------------------- ! 1775 1829 IF( ssnd(jps_albice)%laction ) THEN ! ice 1776 SELECT CASE( sn_snd_alb%cldes ) 1777 CASE( 'ice' ) ; ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) 1778 CASE( 'weighted ice' ) ; ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 1779 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_alb%cldes' ) 1830 SELECT CASE( sn_snd_alb%cldes ) 1831 CASE( 'ice' ) 1832 SELECT CASE( sn_snd_alb%clcat ) 1833 CASE( 'yes' ) 1834 ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) 1835 CASE( 'no' ) 1836 WHERE( SUM( a_i, dim=3 ) /= 0. ) 1837 ztmp1(:,:) = SUM( alb_ice (:,:,1:jpl) * a_i(:,:,1:jpl), dim=3 ) / SUM( a_i(:,:,1:jpl), dim=3 ) 1838 ELSEWHERE 1839 ztmp1(:,:) = albedo_oce_mix(:,:) 1840 END WHERE 1841 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_alb%clcat' ) 1842 END SELECT 1843 CASE( 'weighted ice' ) ; 1844 SELECT CASE( sn_snd_alb%clcat ) 1845 CASE( 'yes' ) 1846 ztmp3(:,:,1:jpl) = alb_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 1847 CASE( 'no' ) 1848 WHERE( fr_i (:,:) > 0. ) 1849 ztmp1(:,:) = SUM ( alb_ice(:,:,1:jpl) * a_i(:,:,1:jpl), dim=3 ) 1850 ELSEWHERE 1851 ztmp1(:,:) = 0. 1852 END WHERE 1853 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_ice%clcat' ) 1854 END SELECT 1855 CASE default ; CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_alb%cldes' ) 1780 1856 END SELECT 1781 CALL cpl_snd( jps_albice, isec, ztmp3, info ) 1782 ENDIF 1857 1858 SELECT CASE( sn_snd_alb%clcat ) 1859 CASE( 'yes' ) 1860 CALL cpl_snd( jps_albice, isec, ztmp3, info ) !-> MV this has never been checked in coupled mode 1861 CASE( 'no' ) 1862 CALL cpl_snd( jps_albice, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 1863 END SELECT 1864 ENDIF 1865 1783 1866 IF( ssnd(jps_albmix)%laction ) THEN ! mixed ice-ocean 1784 1867 ztmp1(:,:) = albedo_oce_mix(:,:) * zfr_l(:,:)
Note: See TracChangeset
for help on using the changeset viewer.