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 11107 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2019-06-14T11:50:40+02:00 (5 years ago)
Author:
frrh
Message:

Commit changes from Dan Copsey's sea ice heat coupling
flux fixes in branch:
branches/UKMO/dev_r5518_GO6_fix_zemp_ice_10681
revisions 11028:11088.

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

Legend:

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

    r9975 r11107  
    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_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r11101 r11107  
    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#endif 
     60 
    5761   IMPLICIT NONE 
    5862   PRIVATE 
     
    156160                                                 ! i.e. specifically nmol/L (= umol/m3) 
    157161 
     162#if ! defined key_oasis3 
     163   ! Dummy variables to enable compilation when oasis3 is not being used 
     164   INTEGER                    ::   OASIS_Sent        = -1 
     165   INTEGER                    ::   OASIS_SentOut     = -1 
     166   INTEGER                    ::   OASIS_ToRest      = -1 
     167   INTEGER                    ::   OASIS_ToRestOut   = -1 
     168#endif 
     169 
    158170   !                                                         !!** namelist namsbc_cpl ** 
    159171   TYPE ::   FLD_C 
     
    177189   LOGICAL     ::   ln_usecplmask          !  use a coupling mask file to merge data received from several models 
    178190                                           !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel) 
     191   LOGICAL, PUBLIC ::   ln_fix_sea_ice_fluxes     ! Apply sea ice flux bug fixes (GMED#449) 
    179192 
    180193   TYPE ::   DYNARR      
     
    203216      !!             ***  FUNCTION sbc_cpl_alloc  *** 
    204217      !!---------------------------------------------------------------------- 
    205       INTEGER :: ierr(3) 
     218      INTEGER :: ierr(4) 
    206219      !!---------------------------------------------------------------------- 
    207220      ierr(:) = 0 
     
    215228      ! Hardwire only two models as nn_cplmodel has not been read in 
    216229      ! from the namelist yet. 
    217       ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )    
     230      ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )  
     231#if defined key_cice 
     232      ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) )  
     233#endif 
    218234      ! 
    219235      sbc_cpl_alloc = MAXVAL( ierr ) 
     
    250266         &                  ln_usecplmask, nn_coupled_iceshelf_fluxes, ln_iceshelf_init_atmos,        & 
    251267         &                  rn_greenland_total_fw_flux, rn_greenland_calving_fraction, & 
    252          &                  rn_antarctica_total_fw_flux, rn_antarctica_calving_fraction, rn_iceshelf_fluxes_tolerance 
     268         &                  rn_antarctica_total_fw_flux, rn_antarctica_calving_fraction, rn_iceshelf_fluxes_tolerance, & 
     269         &                  ln_fix_sea_ice_fluxes 
    253270      !!--------------------------------------------------------------------- 
    254271 
     
    321338         WRITE(numout,*)'  nn_cplmodel                         = ', nn_cplmodel 
    322339         WRITE(numout,*)'  ln_usecplmask                       = ', ln_usecplmask 
     340         WRITE(numout,*)'  ln_fix_sea_ice_fluxes               = ', ln_fix_sea_ice_fluxes 
    323341         WRITE(numout,*)'  nn_coupled_iceshelf_fluxes          = ', nn_coupled_iceshelf_fluxes 
    324342         WRITE(numout,*)'  ln_iceshelf_init_atmos              = ', ln_iceshelf_init_atmos 
     
    18441862         IF ( TRIM(sn_rcv_emp%clcat) == 'yes' ) THEN 
    18451863            ! zemp_ice is the sum of frcv(jpr_ievp)%z3(:,:,1) over all layers - snow 
    1846             zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) 
     1864            IF ( ln_fix_sea_ice_fluxes ) THEN 
     1865               zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) * zicefr(:,:) 
     1866            ELSE 
     1867               zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) 
     1868            ENDIF 
    18471869            DO jl=1,jpl 
    1848                zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) 
     1870               IF ( ln_fix_sea_ice_fluxes ) THEN 
     1871                  zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) * a_i_last_couple(:,:,jl) 
     1872               ELSE 
     1873                  zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) 
     1874               ENDIF 
    18491875            ENDDO 
    18501876            ! latent heat coupled for each category in CICE 
     
    23572383         END SELECT 
    23582384         IF( ssnd(jps_fice)%laction )   CALL cpl_snd( jps_fice, isec, ztmp3, info ) 
     2385 
     2386#if defined key_lim2 || defined key_cice 
     2387         ! If this coupling was successful then save ice fraction for use between coupling points. 
     2388         ! This is needed for some calculations where the ice fraction at the last coupling point 
     2389         ! is needed. 
     2390         IF( info == OASIS_Sent     .OR. info == OASIS_ToRest .OR.   & 
     2391                     & info == OASIS_SentOut  .OR. info == OASIS_ToRestOut ) THEN 
     2392           IF ( sn_snd_thick%clcat == 'yes' ) THEN 
     2393             a_i_last_couple(:,:,:) = a_i(:,:,:) 
     2394           ENDIF 
     2395         ENDIF 
     2396#endif 
     2397          
    23592398      ENDIF 
    23602399       
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r11101 r11107  
    401401         ELSE IF (ksbc == jp_purecpl) THEN 
    402402            DO jl=1,ncat 
    403                ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 
     403               IF ( ln_fix_sea_ice_fluxes ) THEN 
     404                  ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i_last_couple(:,:,jl) 
     405               ELSE 
     406                  ztmpn(:,:,jl)=qla_ice(:,:,jl)*a_i(:,:,jl) 
     407               ENDIF 
    404408            ENDDO 
    405409    ELSE 
     
    414418!  Convert to GBM 
    415419            IF (ksbc == jp_flx .OR. ksbc == jp_purecpl) THEN 
    416                ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 
     420               IF ( ln_fix_sea_ice_fluxes ) THEN 
     421                  ztmp(:,:) = botmelt(:,:,jl)*a_i_last_couple(:,:,jl) 
     422               ELSE 
     423                  ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 
     424               ENDIF 
    417425            ELSE 
    418426               ztmp(:,:) = botmelt(:,:,jl) 
     
    423431!  Convert to GBM 
    424432            IF (ksbc == jp_flx .OR. ksbc == jp_purecpl) THEN 
    425                ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl)  
     433               IF ( ln_fix_sea_ice_fluxes ) THEN 
     434                  ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i_last_couple(:,:,jl)  
     435               ELSE 
     436                  ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 
     437               ENDIF 
    426438            ELSE 
    427439               ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl)) 
Note: See TracChangeset for help on using the changeset viewer.