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 6488 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90 – NEMO

Ignore:
Timestamp:
2016-04-20T11:42:09+02:00 (8 years ago)
Author:
davestorkey
Message:

Commit changes from dev_r5518_coupling_GSI7_GSI8_landice and its ancestor branch dev_r5518_CICE_coupling_GSI7_GSI8.
Custom merge into /branches/UKMO/dev_r5518_GO6_package/NEMOGCM: r6023 cf. r5668 of /branches/UKMO/dev_r5518_coupling_GSI7_GSI8_landice/NEMOGCM@6487

Custom merge into /branches/UKMO/dev_r5518_GO6_package/NEMOGCM: r5668 cf. r5662 of /branches/UKMO/dev_r5518_CICE_coupling_GSI7_GSI8/NEMOGCM@6487

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90

    r6487 r6488  
    2727   USE fldread         ! read input field at current time step 
    2828 
    29  
    30  
    3129   IMPLICIT NONE 
    3230   PRIVATE 
     
    8482    INTEGER                      ::   ji, jj, jk, ijkmin, inum, ierror 
    8583    INTEGER                      ::   ikt, ikb   ! top and bottom level of the isf boundary layer 
     84    REAL(wp)                     ::   zgreenland_fwfisf_sum, zantarctica_fwfisf_sum 
    8685    REAL(wp)                     ::   rmin 
    8786    REAL(wp)                     ::   zhk 
     
    250249            CALL fld_read ( kt, nn_fsbc, sf_rnfisf   ) 
    251250            fwfisf(:,:) = - sf_rnfisf(1)%fnow(:,:,1)         ! fresh water flux from the isf (fwfisf <0 mean melting)  
     251 
     252            IF( lk_oasis) THEN 
     253            ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 
     254            IF( ln_coupled_iceshelf_fluxes ) THEN 
     255 
     256              ! Adjust total iceshelf melt rates so that sum of iceberg calving and iceshelf melting in the northern 
     257              ! and southern hemispheres equals rate of increase of mass of greenland and antarctic ice sheets 
     258              ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 
     259 
     260               zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     261               IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 
     262               ! use ABS function because we need to preserve the sign of fwfisf 
     263               WHERE( greenland_icesheet_mask(:,:) == 1.0 )                                                                  & 
     264              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( greenland_icesheet_mass_rate_of_change * (1.0-rn_greenland_calving_fraction) & 
     265              &                           / ( zgreenland_fwfisf_sum + 1.0e-10_wp ) ) 
     266 
     267               ! check 
     268               IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting climatology (kg/s) : ',zgreenland_fwfisf_sum 
     269               zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     270               IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 
     271               IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 
     272 
     273               zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     274               IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 
     275               ! use ABS function because we need to preserve the sign of fwfisf 
     276               WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & 
     277              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( antarctica_icesheet_mass_rate_of_change * (1.0-rn_antarctica_calving_fraction) & 
     278              &                           / ( zantarctica_fwfisf_sum + 1.0e-10_wp ) ) 
     279       
     280               ! check 
     281               IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting climatology (kg/s) : ',zantarctica_fwfisf_sum 
     282               zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     283               IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 
     284               IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 
     285 
     286            ENDIF 
     287            ENDIF 
     288 
    252289            qisf(:,:)   = fwfisf(:,:) * lfusisf              ! heat        flux 
    253290            stbl(:,:)   = soce 
     
    258295            !CALL fld_read ( kt, nn_fsbc, sf_qisf   ) 
    259296            fwfisf(:,:) = sf_fwfisf(1)%fnow(:,:,1)            ! fwf 
     297 
     298            IF( lk_oasis) THEN 
     299            ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 
     300            IF( ln_coupled_iceshelf_fluxes ) THEN 
     301 
     302              ! Adjust total iceshelf melt rates so that sum of iceberg calving and iceshelf melting in the northern 
     303              ! and southern hemispheres equals rate of increase of mass of greenland and antarctic ice sheets 
     304              ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 
     305 
     306               zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     307               IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 
     308               ! use ABS function because we need to preserve the sign of fwfisf 
     309               WHERE( greenland_icesheet_mask(:,:) == 1.0 )                                                                  & 
     310              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( greenland_icesheet_mass_rate_of_change * (1.0-rn_greenland_calving_fraction) & 
     311              &                           / ( zgreenland_fwfisf_sum + 1.0e-10_wp ) ) 
     312 
     313               ! check 
     314               IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting climatology (kg/s) : ',zgreenland_fwfisf_sum 
     315               zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     316               IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 
     317               IF(lwp) WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 
     318 
     319               zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     320               IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 
     321               ! use ABS function because we need to preserve the sign of fwfisf 
     322               WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & 
     323              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( antarctica_icesheet_mass_rate_of_change * (1.0-rn_antarctica_calving_fraction) & 
     324              &                           / ( zantarctica_fwfisf_sum + 1.0e-10_wp ) ) 
     325       
     326               ! check 
     327               IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting climatology (kg/s) : ',zantarctica_fwfisf_sum 
     328               zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     329               IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 
     330               IF(lwp) WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 
     331 
     332            ENDIF 
     333            ENDIF 
     334 
    260335            qisf(:,:)   = fwfisf(:,:) * lfusisf              ! heat        flux 
    261336            !qisf(:,:)   = sf_qisf(1)%fnow(:,:,1)              ! heat flux 
Note: See TracChangeset for help on using the changeset viewer.