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 11029 – NEMO

Changeset 11029


Ignore:
Timestamp:
2019-05-21T18:03:51+02:00 (5 years ago)
Author:
dancopsey
Message:

Upgraded previous version of this branch.

Location:
branches/UKMO/dev_r5518_GO6_fix_zemp_ice_10681/NEMOGCM/NEMO/OPA_SRC/SBC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_fix_zemp_ice_10681/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90

    r9975 r11029  
    124124#if defined key_lim2 || defined key_cice 
    125125   ! already defined in ice.F90 for LIM3 
    126    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i 
     126   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i                ! Sea ice fraction on categories 
     127   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i_last_couple    ! Sea ice fraction on categories at the last coupling point 
    127128   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ht_i, ht_s 
    128129#endif 
  • branches/UKMO/dev_r5518_GO6_fix_zemp_ice_10681/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r10269 r11029  
    5555   USE lib_fortran, ONLY: glob_sum 
    5656 
     57#if defined key_oasis3 
     58   USE mod_oasis, ONLY : OASIS_Sent, OASIS_ToRest, OASIS_SentOut, OASIS_ToRestOut 
     59#else 
     60   INTEGER                    ::   OASIS_Sent        = -1 
     61   INTEGER                    ::   OASIS_SentOut     = -1 
     62   INTEGER                    ::   OASIS_ToRest      = -1 
     63   INTEGER                    ::   OASIS_ToRestOut   = -1 
     64#endif 
     65 
    5766   IMPLICIT NONE 
    5867   PRIVATE 
     
    177186   LOGICAL     ::   ln_usecplmask          !  use a coupling mask file to merge data received from several models 
    178187                                           !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 
     188   LOGICAL, PUBLIC ::   ln_fix_sea_ice_fluxes     ! Apply sea ice flux bug fixes (GMED#449) 
    179189 
    180190   TYPE ::   DYNARR      
     
    203213      !!             ***  FUNCTION sbc_cpl_alloc  *** 
    204214      !!---------------------------------------------------------------------- 
    205       INTEGER :: ierr(3) 
     215      INTEGER :: ierr(4) 
    206216      !!---------------------------------------------------------------------- 
    207217      ierr(:) = 0 
     
    215225      ! Hardwire only two models as nn_cplmodel has not been read in 
    216226      ! from the namelist yet. 
    217       ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )    
     227      ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )  
     228#if defined key_cice 
     229      ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) )  
     230#endif 
    218231      ! 
    219232      sbc_cpl_alloc = MAXVAL( ierr ) 
     
    250263         &                  ln_usecplmask, nn_coupled_iceshelf_fluxes, ln_iceshelf_init_atmos,        & 
    251264         &                  rn_greenland_total_fw_flux, rn_greenland_calving_fraction, & 
    252          &                  rn_antarctica_total_fw_flux, rn_antarctica_calving_fraction, rn_iceshelf_fluxes_tolerance 
     265         &                  rn_antarctica_total_fw_flux, rn_antarctica_calving_fraction, rn_iceshelf_fluxes_tolerance, & 
     266         &                  ln_fix_sea_ice_fluxes 
    253267      !!--------------------------------------------------------------------- 
    254268 
     
    321335         WRITE(numout,*)'  nn_cplmodel                         = ', nn_cplmodel 
    322336         WRITE(numout,*)'  ln_usecplmask                       = ', ln_usecplmask 
     337         WRITE(numout,*)'  ln_fix_sea_ice_fluxes               = ', ln_fix_sea_ice_fluxes 
    323338         WRITE(numout,*)'  nn_coupled_iceshelf_fluxes          = ', nn_coupled_iceshelf_fluxes 
    324339         WRITE(numout,*)'  ln_iceshelf_init_atmos              = ', ln_iceshelf_init_atmos 
     
    18301845         IF ( TRIM(sn_rcv_emp%clcat) == 'yes' ) THEN 
    18311846            ! zemp_ice is the sum of frcv(jpr_ievp)%z3(:,:,1) over all layers - snow 
    1832             zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) 
     1847            IF ( ln_fix_sea_ice_fluxes ) THEN 
     1848               zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) * zicefr(:,:) 
     1849            ELSE 
     1850               zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) 
     1851            ENDIF 
    18331852            DO jl=1,jpl 
    1834                zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) 
     1853               IF ( ln_fix_sea_ice_fluxes ) THEN 
     1854                  zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) * a_i_last_couple(:,:,jl) 
     1855               ELSE 
     1856                  zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) 
     1857               ENDIF 
    18351858            ENDDO 
    18361859            ! latent heat coupled for each category in CICE 
     
    23432366         END SELECT 
    23442367         IF( ssnd(jps_fice)%laction )   CALL cpl_snd( jps_fice, isec, ztmp3, info ) 
     2368 
     2369         ! If this coupling was successful then save ice fraction for use between coupling points. 
     2370         ! This is needed for some calculations where the ice fraction at the last coupling point 
     2371         ! is needed. 
     2372         IF( info == OASIS_Sent     .OR. info == OASIS_ToRest .OR.   & 
     2373                     & info == OASIS_SentOut  .OR. info == OASIS_ToRestOut ) THEN 
     2374           IF ( sn_snd_thick%clcat == 'yes' ) THEN 
     2375             a_i_last_couple(:,:,:) = a_i(:,:,:) 
     2376           ENDIF 
     2377         ENDIF 
     2378          
    23452379      ENDIF 
    23462380       
  • branches/UKMO/dev_r5518_GO6_fix_zemp_ice_10681/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r9975 r11029  
    395395         ELSE IF (ksbc == jp_purecpl) THEN 
    396396            DO jl=1,ncat 
    397                ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 
     397               IF ( ln_fix_sea_ice_fluxes ) THEN 
     398                  ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i_last_couple(:,:,jl) 
     399               ELSE 
     400                  ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 
     401               ENDIF 
    398402            ENDDO 
    399403    ELSE 
     
    408412!  Convert to GBM 
    409413            IF (ksbc == jp_flx .OR. ksbc == jp_purecpl) THEN 
    410                ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 
     414               IF ( ln_fix_sea_ice_fluxes ) THEN 
     415                  ztmp(:,:) = botmelt(:,:,jl)*a_i_last_couple(:,:,jl) 
     416               ELSE 
     417                  ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 
     418               ENDIF 
    411419            ELSE 
    412420               ztmp(:,:) = botmelt(:,:,jl) 
     
    417425!  Convert to GBM 
    418426            IF (ksbc == jp_flx .OR. ksbc == jp_purecpl) THEN 
    419                ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl)  
     427               IF ( ln_fix_sea_ice_fluxes ) THEN 
     428                  ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i_last_couple(:,:,jl)  
     429               ELSE 
     430                  ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 
     431               ENDIF 
    420432            ELSE 
    421433               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl)) 
Note: See TracChangeset for help on using the changeset viewer.