New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13778 for NEMO/branches/UKMO/NEMO_4.0.3_icesheet_and_river_coupling/src/OCE/ICB/icbclv.F90 – NEMO

Ignore:
Timestamp:
2020-11-11T14:27:17+01:00 (3 years ago)
Author:
dancopsey
Message:

Merge in existing changes from NEMO_4.0.1 version of this branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.3_icesheet_and_river_coupling/src/OCE/ICB/icbclv.F90

    r13587 r13778  
    2626   USE icb_oce        ! iceberg parameters  
    2727 
     28   USE sbc_oce        ! for icesheet freshwater input variables  
     29   USE in_out_manager  
     30   USE iom  
     31 
    2832   IMPLICIT NONE 
    2933   PRIVATE 
     
    4953      ! 
    5054      REAL(wp)      ::   zcalving_used, zdist, zfact 
     55      REAL(wp), DIMENSION(1)      ::   zgreenland_calving_sum, zantarctica_calving_sum  
     56      LOGICAL       ::   ll_write 
    5157      INTEGER       ::   jn, ji, jj                    ! loop counters 
    5258      INTEGER       ::   imx                           ! temporary integer for max berg class 
     
    6369      ! Heat in units of W/m2, and mask (just in case) 
    6470      berg_grid%calving_hflx(:,:) = src_calving_hflx(:,:) * tmask_i(:,:) * tmask(:,:,1) 
     71 
     72      IF( lk_oasis) THEN 
     73        ! nn_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 
     74        IF( nn_coupled_iceshelf_fluxes .gt. 0 ) THEN 
     75          ll_write = ((MOD( kt, sn_cfctl%ptimincr ) == 0) .OR. ( kt == nitend )) .AND. lwp .AND. ((nn_print>0)) 
     76          ! Adjust total calving rates so that sum of iceberg calving and iceshelf melting in the northern 
     77          ! and southern hemispheres equals rate of increase of mass of greenland and antarctic ice sheets 
     78          ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 
     79 
     80           zgreenland_calving_sum(1) = SUM( berg_grid%calving(:,:) * greenland_icesheet_mask(:,:) ) 
     81           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zgreenland_calving_sum ) 
     82           WHERE( greenland_icesheet_mask(:,:) == 1.0 )                                                                                 & 
     83          &    berg_grid%calving(:,:) = berg_grid%calving(:,:) * greenland_icesheet_mass_rate_of_change * rn_greenland_calving_fraction & 
     84          &                                     / ( zgreenland_calving_sum(1) + 1.0e-10_wp ) 
     85 
     86           ! check 
     87           IF(ll_write) WRITE(numout, *) 'Greenland iceberg calving climatology (kg/s) : ',zgreenland_calving_sum(1) 
     88           zgreenland_calving_sum(1) = SUM( berg_grid%calving(:,:) * greenland_icesheet_mask(:,:) ) 
     89           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zgreenland_calving_sum ) 
     90           IF(ll_write) WRITE(numout, *) 'Greenland iceberg calving adjusted value (kg/s) : ',zgreenland_calving_sum(1) 
     91 
     92           zantarctica_calving_sum(1) = SUM( berg_grid%calving(:,:) * antarctica_icesheet_mask(:,:) ) 
     93           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zantarctica_calving_sum ) 
     94           WHERE( antarctica_icesheet_mask(:,:) == 1.0 )                                                                              & 
     95           berg_grid%calving(:,:) = berg_grid%calving(:,:) * antarctica_icesheet_mass_rate_of_change * rn_antarctica_calving_fraction & 
     96          &                           / ( zantarctica_calving_sum(1) + 1.0e-10_wp ) 
     97 
     98           ! check 
     99           IF(ll_write) WRITE(numout, *) 'Antarctica iceberg calving climatology (kg/s) : ',zantarctica_calving_sum(1) 
     100           zantarctica_calving_sum(1) = SUM( berg_grid%calving(:,:) * antarctica_icesheet_mask(:,:) ) 
     101           IF( lk_mpp ) CALL mpp_sum( 'icbclv', zantarctica_calving_sum ) 
     102           IF(ll_write) WRITE(numout, *) 'Antarctica iceberg calving adjusted value (kg/s) : ',zantarctica_calving_sum(1) 
     103 
     104        ENDIF 
     105      ENDIF 
     106    
     107      CALL iom_put( 'berg_calve', berg_grid%calving(:,:) ) 
     108 
    65109 
    66110      IF( ll_first_call .AND. .NOT. l_restarted_bergs ) THEN      ! This is a hack to simplify initialization 
Note: See TracChangeset for help on using the changeset viewer.