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

Ignore:
Timestamp:
2015-08-26T14:49:08+02:00 (9 years ago)
Author:
davestorkey
Message:

Commit changes for icesheet freshwater input code for coupled models without an active icesheet model.

File:
1 edited

Legend:

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

    r5662 r5708  
    2727   USE fldread         ! read input field at current time step 
    2828 
    29  
    30  
    3129   IMPLICIT NONE 
    3230   PRIVATE 
     
    9088    INTEGER                      ::   ji, jj, jk, ijkmin, inum, ierror 
    9189    INTEGER                      ::   ikt, ikb   ! top and bottom level of the isf boundary layer 
     90    REAL(wp)                     ::   zgreenland_fwfisf_sum, zantarctica_fwfisf_sum 
    9291    REAL(wp)                     ::   rmin 
    9392    REAL(wp)                     ::   zhk 
     
    256255            CALL fld_read ( kt, nn_fsbc, sf_rnfisf   ) 
    257256            fwfisf(:,:) = - sf_rnfisf(1)%fnow(:,:,1)         ! fresh water flux from the isf (fwfisf <0 mean melting)  
     257 
     258            IF( lk_oasis) THEN 
     259            ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 
     260            IF( ln_coupled_iceshelf_fluxes ) THEN 
     261 
     262              ! Adjust total iceshelf melt rates so that sum of iceberg calving and iceshelf melting in the northern 
     263              ! and southern hemispheres equals rate of increase of mass of greenland and antarctic ice sheets 
     264              ! 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 ) 
     268               ! use ABS function because we need to preserve the sign of fwfisf 
     269               WHERE( greenland_icesheet_mask(:,:) == 1.0 )                                                                  & 
     270              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( greenland_icesheet_mass_rate_of_change * (1.0-rn_greenland_calving_fraction) & 
     271              &                           / ( zgreenland_fwfisf_sum + 1.0e-10_wp ) ) 
     272 
     273               ! check 
     274               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               WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 
     278 
     279               zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     280               IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 
     281               ! use ABS function because we need to preserve the sign of fwfisf 
     282               WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & 
     283              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( antarctica_icesheet_mass_rate_of_change * (1.0-rn_antarctica_calving_fraction) & 
     284              &                           / ( zantarctica_fwfisf_sum + 1.0e-10_wp ) ) 
     285       
     286               ! check 
     287               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 ) 
     290               WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 
     291 
     292            ENDIF 
     293            ENDIF 
     294 
    258295            qisf(:,:)   = fwfisf(:,:) * lfusisf              ! heat        flux 
    259296            stbl(:,:)   = soce 
     
    264301            !CALL fld_read ( kt, nn_fsbc, sf_qisf   ) 
    265302            fwfisf(:,:) = sf_fwfisf(1)%fnow(:,:,1)            ! fwf 
     303 
     304            IF( lk_oasis) THEN 
     305            ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 
     306            IF( ln_coupled_iceshelf_fluxes ) THEN 
     307 
     308              ! Adjust total iceshelf melt rates so that sum of iceberg calving and iceshelf melting in the northern 
     309              ! and southern hemispheres equals rate of increase of mass of greenland and antarctic ice sheets 
     310              ! to preserve total freshwater conservation in coupled models without an active ice sheet model. 
     311 
     312               zgreenland_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * greenland_icesheet_mask(:,:) ) 
     313               IF( lk_mpp ) CALL mpp_sum( zgreenland_fwfisf_sum ) 
     314               ! use ABS function because we need to preserve the sign of fwfisf 
     315               WHERE( greenland_icesheet_mask(:,:) == 1.0 )                                                                  & 
     316              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( greenland_icesheet_mass_rate_of_change * (1.0-rn_greenland_calving_fraction) & 
     317              &                           / ( zgreenland_fwfisf_sum + 1.0e-10_wp ) ) 
     318 
     319               ! check 
     320               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 ) 
     323               WRITE(numout, *) 'Greenland iceshelf melting adjusted value (kg/s) : ',zgreenland_fwfisf_sum 
     324 
     325               zantarctica_fwfisf_sum = SUM( fwfisf(:,:) * e1t(:,:) * e2t(:,:) * antarctica_icesheet_mask(:,:) ) 
     326               IF( lk_mpp ) CALL mpp_sum( zantarctica_fwfisf_sum ) 
     327               ! use ABS function because we need to preserve the sign of fwfisf 
     328               WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & 
     329              &    fwfisf(:,:) = fwfisf(:,:)  * ABS( antarctica_icesheet_mass_rate_of_change * (1.0-rn_antarctica_calving_fraction) & 
     330              &                           / ( zantarctica_fwfisf_sum + 1.0e-10_wp ) ) 
     331       
     332               ! check 
     333               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 ) 
     336               WRITE(numout, *) 'Antarctica iceshelf melting adjusted value (kg/s) : ',zantarctica_fwfisf_sum 
     337 
     338            ENDIF 
     339            ENDIF 
     340 
    266341            qisf(:,:)   = fwfisf(:,:) * lfusisf              ! heat        flux 
    267342            !qisf(:,:)   = sf_qisf(1)%fnow(:,:,1)              ! heat flux 
Note: See TracChangeset for help on using the changeset viewer.