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 8796 for branches/UKMO – NEMO

Changeset 8796 for branches/UKMO


Ignore:
Timestamp:
2017-11-23T16:35:00+01:00 (6 years ago)
Author:
alexwestmohc
Message:

Committing GSI8 coupling changes to the branch with which we're trying to get
NEMO4-LIM to work.

Location:
branches/UKMO/dev_r8183_ICEMODEL_svn_removed/NEMOGCM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r8183_ICEMODEL_svn_removed/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg

    r8738 r8796  
    4848&namtra_qsr    !   penetrative solar radiation 
    4949!----------------------------------------------------------------------- 
     50/ 
     51&namsbc_cpl 
    5052/ 
    5153!----------------------------------------------------------------------- 
  • branches/UKMO/dev_r8183_ICEMODEL_svn_removed/NEMOGCM/CONFIG/SHARED/namelist_ref

    r8738 r8796  
    275275   sn_snd_ifrac  =       'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
    276276   sn_snd_wlev   =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   '' 
     277   sn_snd_cond   =   'weighted ice'         ,    'no'    ,     ''      ,             ''           ,   '' 
     278   sn_snd_thick1 =   'ice and snow'         ,    'no'    ,     ''      ,             ''           ,   '' 
     279   sn_snd_mpnd   =   'weighted ice'         ,    'no'    ,     ''      ,             ''           ,   '' 
     280   sn_snd_sstfrz =   'coupled'            ,    'no'    ,     ''      ,             ''           ,   '' 
     281   sn_snd_ttilyr =   'weighted ice'           ,    'no'    ,     ''      ,             ''           ,   '' 
    277282! receive 
    278283   sn_rcv_w10m   =   'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
     
    296301   sn_rcv_wstrf  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
    297302   sn_rcv_wdrag  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
     303   sn_rcv_ts_ice =       'ice'                  ,    'no'    ,     ''      ,         ''          ,   '' 
     304   sn_rcv_isf    =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
     305   sn_rcv_icb    =       'none'                 ,    'no'    ,     ''      ,         ''          ,   '' 
    298306! 
    299307   nn_cplmodel   =     1   !  Maximum number of models to/from which NEMO is potentialy sending/receiving data 
  • branches/UKMO/dev_r8183_ICEMODEL_svn_removed/NEMOGCM/NEMO/LIM_SRC_3/iceforcing.F90

    r8752 r8796  
    294294      CASE( -1  ) 
    295295         IF(lwp) WRITE(numout,*) '   ESIM: use per-category fluxes (nn_iceflx = -1) ' 
    296          IF( ln_cpl )   CALL ctl_stop( 'ice_thd_init : the chosen nn_iceflx for ESIM in coupled mode must be 0 or 2' ) 
     296         !IF( ln_cpl )   CALL ctl_stop( 'ice_thd_init : the chosen nn_iceflx for ESIM in coupled mode must be 0 or 2' ) 
    297297      CASE(  0  ) 
    298298         IF(lwp) WRITE(numout,*) '   ESIM: use average per-category fluxes (nn_iceflx = 0) ' 
  • branches/UKMO/dev_r8183_ICEMODEL_svn_removed/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90

    r8752 r8796  
    7070   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   emp_oce        !: evap - precip over ocean                 [kg/m2/s] 
    7171   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   wndm_ice       !: wind speed module at T-point                 [m/s] 
     72   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sstfrz             !: sea surface freezing temperature 
     73   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tsfc_ice           !: sea ice surface skin temperature (on categories) 
     74   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ttlyr_ice          !: sea ice top layer temperature (on categories) 
     75   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   a_p, ht_p          ! Meltpond fraction and depth 
    7276#endif 
    7377 
     
    8690   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iu              !: ice fraction at NEMO U point 
    8791   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iv              !: ice fraction at NEMO V point 
     92 
    8893    
    8994   ! variables used in the coupled interface 
     
    131136         &      qemp_ice(jpi,jpj)     , qevap_ice(jpi,jpj,jpl) , qemp_oce (jpi,jpj) ,   & 
    132137         &      qns_oce (jpi,jpj)     , qsr_oce  (jpi,jpj)     , emp_oce (jpi,jpj)  ,   & 
    133          &      emp_ice(jpi,jpj)      ,  STAT= ierr(2) ) 
     138         &      emp_ice(jpi,jpj)      , sstfrz (jpi, jpj) , tsfc_ice(jpi,jpj,jpl), & 
     139         &      ttlyr_ice(jpi,jpj,jpl), kn_ice(jpi,jpj,jpl),     a_p(jpi,jpj,jpl),    & 
     140         &      ht_p(jpi,jpj,jpl),      STAT= ierr(2) ) 
    134141#endif 
    135142 
  • branches/UKMO/dev_r8183_ICEMODEL_svn_removed/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r8752 r8796  
    113113   INTEGER, PARAMETER ::   jpr_isf    = 52 
    114114   INTEGER, PARAMETER ::   jpr_icb    = 53 
    115  
    116    INTEGER, PARAMETER ::   jprcv      = 53   ! total number of fields received   
     115   INTEGER, PARAMETER ::   jpr_ts_ice = 54   ! Sea ice surface temp 
     116   INTEGER, PARAMETER ::   jpr_rcv    = 55    
     117 
     118   INTEGER, PARAMETER ::   jprcv      = 55   ! total number of fields received   
    117119 
    118120   INTEGER, PARAMETER ::   jps_fice   =  1   ! ice fraction sent to the atmosphere 
     
    149151   INTEGER, PARAMETER ::   jps_wlev   = 32   ! water level  
    150152   INTEGER, PARAMETER ::   jps_fice1  = 33   ! first-order ice concentration (for semi-implicit coupling of atmos-ice fluxes) 
    151    INTEGER, PARAMETER ::   jpsnd      = 33   ! total number of fields sent  
     153   INTEGER, PARAMETER ::   jps_a_p    = 34   ! meltpond area 
     154   INTEGER, PARAMETER ::   jps_ht_p   = 35   ! meltpond thickness 
     155   INTEGER, PARAMETER ::   jps_kice   = 36   ! sea ice effective conductivity 
     156   INTEGER, PARAMETER ::   jps_sstfrz = 37   ! sea surface freezing temperature 
     157   INTEGER, PARAMETER ::   jps_ttilyr = 38 ! sea ice top layer temp 
     158   INTEGER, PARAMETER ::   jpsnd      = 38   ! total number of fields sent  
    152159 
    153160   !                                  !!** namelist namsbc_cpl ** 
     
    160167   END TYPE FLD_C 
    161168   !                                   ! Send to the atmosphere   
    162    TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2, sn_snd_thick1                         
     169   TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2, sn_snd_thick1, sn_snd_cond, sn_snd_mpnd, sn_snd_sstfrz, sn_snd_ttilyr          
    163170   !                                   ! Received from the atmosphere 
    164    TYPE(FLD_C) ::   sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau, sn_rcv_dqnsdt, sn_rcv_qsr, sn_rcv_qns, sn_rcv_emp, sn_rcv_rnf 
     171   TYPE(FLD_C) ::   sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau, sn_rcv_dqnsdt, sn_rcv_qsr, sn_rcv_qns, sn_rcv_emp, sn_rcv_rnf, sn_rcv_ts_ice 
    165172   TYPE(FLD_C) ::   sn_rcv_cal, sn_rcv_iceflx, sn_rcv_co2, sn_rcv_mslp, sn_rcv_icb, sn_rcv_isf                               
    166173   ! Send to waves  
     
    236243      REAL(wp), POINTER, DIMENSION(:,:) ::   zacs, zaos 
    237244      !! 
     245      LOGICAL ::   ln_iceshelf_init_atmos 
    238246      NAMELIST/namsbc_cpl/  sn_snd_temp , sn_snd_alb  , sn_snd_thick , sn_snd_crt   , sn_snd_co2,      &  
    239247         &                  sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau   , sn_rcv_dqnsdt, sn_rcv_qsr,      &  
    240          &                  sn_snd_thick1,                                                            & 
     248         &                  sn_snd_thick1,  sn_snd_cond, sn_snd_mpnd, sn_snd_sstfrz , sn_rcv_ts_ice,   sn_snd_ttilyr, & 
    241249         &                  sn_snd_ifrac, sn_snd_crtw , sn_snd_wlev  , sn_rcv_hsig  , sn_rcv_phioc ,   &  
    242250         &                  sn_rcv_sdrfx, sn_rcv_sdrfy, sn_rcv_wper  , sn_rcv_wnum  , sn_rcv_wstrf ,   & 
    243251         &                  sn_rcv_wdrag, sn_rcv_qns  , sn_rcv_emp   , sn_rcv_rnf   , sn_rcv_cal   ,   & 
    244252         &                  sn_rcv_iceflx,sn_rcv_co2  , nn_cplmodel  , ln_usecplmask, sn_rcv_mslp  ,   & 
    245          &                  sn_rcv_icb , sn_rcv_isf 
     253         &                  sn_rcv_icb , sn_rcv_isf, ln_iceshelf_init_atmos 
    246254 
    247255      !!--------------------------------------------------------------------- 
     
    269277         WRITE(numout,*)'~~~~~~~~~~~~' 
    270278      ENDIF 
     279 
     280      !!!!! Getting NEMO4-LIM working at the Met Office: Hardcode number of ice cats to 5 during the initialisation 
     281      jpl = 5 
     282      !!!!! 
     283 
    271284      IF( lwp .AND. ln_cpl ) THEN                        ! control print 
    272285         WRITE(numout,*)'  received fields (mutiple ice categogies)' 
     
    295308         WRITE(numout,*)'      Stress frac adsorbed by waves   = ', TRIM(sn_rcv_wstrf%cldes ), ' (', TRIM(sn_rcv_wstrf%clcat ), ')'  
    296309         WRITE(numout,*)'      Neutral surf drag coefficient   = ', TRIM(sn_rcv_wdrag%cldes ), ' (', TRIM(sn_rcv_wdrag%clcat ), ')'  
     310         WRITE(numout,*)'      Sea ice surface skin temperature   = ', TRIM(sn_rcv_ts_ice%cldes ), ' (', TRIM(sn_rcv_ts_ice%clcat ), ')'  
    297311         WRITE(numout,*)'  sent fields (multiple ice categories)' 
    298312         WRITE(numout,*)'      surface temperature             = ', TRIM(sn_snd_temp%cldes  ), ' (', TRIM(sn_snd_temp%clcat  ), ')' 
     313         WRITE(numout,*)'      top ice layer temperature             = ', TRIM(sn_snd_ttilyr%cldes  ), ' (', TRIM(sn_snd_ttilyr%clcat  ), ')' 
    299314         WRITE(numout,*)'      albedo                          = ', TRIM(sn_snd_alb%cldes   ), ' (', TRIM(sn_snd_alb%clcat   ), ')' 
    300315         WRITE(numout,*)'      ice/snow thickness              = ', TRIM(sn_snd_thick%cldes ), ' (', TRIM(sn_snd_thick%clcat ), ')' 
     
    305320         WRITE(numout,*)'                      - mesh          = ', sn_snd_crt%clvgrd 
    306321         WRITE(numout,*)'      oce co2 flux                    = ', TRIM(sn_snd_co2%cldes   ), ' (', TRIM(sn_snd_co2%clcat   ), ')' 
     322         WRITE(numout,*)'      ice effective conductivity                    = ', TRIM(sn_snd_cond%cldes   ), ' (', TRIM(sn_snd_cond%clcat   ), ')' 
     323         WRITE(numout,*)'      meltponds fraction and depth                    = ', TRIM(sn_snd_mpnd%cldes   ), ' (', TRIM(sn_snd_mpnd%clcat   ), ')' 
     324         WRITE(numout,*)'      sea surface freezing temp                    = ', TRIM(sn_snd_sstfrz%cldes   ), ' (', TRIM(sn_snd_sstfrz%clcat   ), ')' 
    307325         WRITE(numout,*)'      water level                     = ', TRIM(sn_snd_wlev%cldes  ), ' (', TRIM(sn_snd_wlev%clcat  ), ')'  
    308326         WRITE(numout,*)'      mean sea level pressure         = ', TRIM(sn_rcv_mslp%cldes  ), ' (', TRIM(sn_rcv_mslp%clcat  ), ')'  
     
    502520      ! 
    503521      ! non solar sensitivity mandatory for LIM ice model 
    504       IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. k_ice /= 0 .AND. k_ice /= 3 .AND. nn_components /= jp_iam_sas ) & 
    505          CALL ctl_stop( 'sbc_cpl_init: sn_rcv_dqnsdt%cldes must be coupled in namsbc_cpl namelist' ) 
     522 
     523      !!!!! Getting NEMO4-LIM working at Met Office: Disable this check because we don't need dqnsdt for JULES-style coupling 
     524      !IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. k_ice /= 0 .AND. k_ice /= 3 .AND. nn_components /= jp_iam_sas ) & 
     525      !   CALL ctl_stop( 'sbc_cpl_init: sn_rcv_dqnsdt%cldes must be coupled in namsbc_cpl namelist' ) 
     526      !!!!! 
     527 
    506528      ! non solar sensitivity mandatory for mixed oce-ice solar radiation coupling technique 
    507529      IF( TRIM( sn_rcv_dqnsdt%cldes ) == 'none' .AND. TRIM( sn_rcv_qns%cldes ) == 'mixed oce-ice' ) & 
     
    548570         srcv(jpr_topm:jpr_botm)%laction = .TRUE. 
    549571      ENDIF 
     572      !                                                      ! ----------------------------- ! 
     573 
     574      !!!!! To get NEMO4-LIM working at Met Office 
     575      srcv(jpr_ts_ice)%clname = 'OTsfIce' 
     576      IF ( TRIM( sn_rcv_ts_ice%cldes ) == 'ice' ) srcv(jpr_ts_ice)%laction = .TRUE. 
     577      IF ( TRIM( sn_rcv_ts_ice%clcat ) == 'yes' ) srcv(jpr_ts_ice)%nct = jpl 
     578      IF ( TRIM( sn_rcv_emp%clcat ) == 'yes' ) srcv(jpr_ievp)%nct = jpl 
     579      !!!!! 
     580 
    550581      !                                                      ! ------------------------- ! 
    551582      !                                                      !      Wave breaking        !     
     
    710741      ssnd(jps_toce)%clname = 'O_SSTSST' 
    711742      ssnd(jps_tice)%clname = 'O_TepIce' 
     743      ssnd(jps_ttilyr)%clname = 'O_TtiLyr' 
    712744      ssnd(jps_tmix)%clname = 'O_TepMix' 
    713745      SELECT CASE( TRIM( sn_snd_temp%cldes ) ) 
    714746      CASE( 'none'                                 )       ! nothing to do 
    715747      CASE( 'oce only'                             )   ;   ssnd( jps_toce )%laction = .TRUE. 
    716       CASE( 'oce and ice' , 'weighted oce and ice' ) 
     748      CASE( 'oce and ice' , 'weighted oce and ice' , 'oce and weighted ice') 
    717749         ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE. 
    718750         IF ( TRIM( sn_snd_temp%clcat ) == 'yes' )  ssnd(jps_tice)%nct = jpl 
     
    748780      ssnd(jps_ficet)%clname = 'OIceFrcT'  
    749781      ssnd(jps_hice)%clname = 'OIceTck' 
     782      ssnd(jps_a_p)%clname  = 'OPndFrc' 
     783      ssnd(jps_ht_p)%clname = 'OPndTck' 
    750784      ssnd(jps_hsnw)%clname = 'OSnwTck' 
    751785      ssnd(jps_fice1)%clname = 'OIceFrd' 
     
    774808      END SELECT 
    775809 
     810      !                                                      ! ------------------------- !  
     811      !                                                      ! Ice Meltponds             !  
     812      !                                                      ! ------------------------- !  
     813 
     814 
     815      !!!!! Getting NEMO4-LIM to work at Met Office 
     816      ssnd(jps_a_p)%clname = 'OPndFrc'     
     817      ssnd(jps_ht_p)%clname = 'OPndTck'     
     818      SELECT CASE ( TRIM( sn_snd_mpnd%cldes ) )  
     819      CASE ( 'none' )  
     820         ssnd(jps_a_p)%laction = .FALSE.  
     821         ssnd(jps_ht_p)%laction = .FALSE.  
     822      CASE ( 'ice only' )   
     823         ssnd(jps_a_p)%laction = .TRUE.  
     824         ssnd(jps_ht_p)%laction = .TRUE.  
     825         IF ( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN  
     826            ssnd(jps_a_p)%nct = jpl  
     827            ssnd(jps_ht_p)%nct = jpl  
     828         ELSE  
     829            IF ( jpl > 1 ) THEN  
     830               CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_mpnd%cldes if not exchanging category fields' )  
     831            ENDIF  
     832         ENDIF  
     833      CASE ( 'weighted ice' )   
     834         ssnd(jps_a_p)%laction = .TRUE.  
     835         ssnd(jps_ht_p)%laction = .TRUE.  
     836         IF ( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN  
     837            ssnd(jps_a_p)%nct = jpl   
     838            ssnd(jps_ht_p)%nct = jpl   
     839         ENDIF  
     840      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_mpnd%cldes; '//sn_snd_mpnd%cldes )  
     841      END SELECT  
     842      !!!!! 
     843  
    776844      !                                                      ! ------------------------- ! 
    777845      !                                                      !      Surface current      ! 
     
    823891      !                                                      ! ------------------------- ! 
    824892      ssnd(jps_co2)%clname = 'O_CO2FLX' ;  IF( TRIM(sn_snd_co2%cldes) == 'coupled' )    ssnd(jps_co2 )%laction = .TRUE. 
    825  
     893      !  
     894       
     895      !!!!! Getting NEMO4-LIM to work at the Met Office 
     896      !                                                      ! ------------------------- !  
     897      !                                                      ! Sea surface freezing temp !  
     898      !                                                      ! ------------------------- !  
     899      ssnd(jps_sstfrz)%clname = 'O_SSTFrz' ; IF( TRIM(sn_snd_sstfrz%cldes) == 'coupled' )  ssnd(jps_sstfrz)%laction = .TRUE.  
     900      !!!!! 
     901 
     902      !  
     903      !                                                      ! ------------------------- !  
     904      !                                                      !    Ice conductivity       !  
     905      !                                                      ! ------------------------- !  
     906      ! Note that ultimately we will move to passing an ocean effective conductivity as well so there  
     907      ! will be some changes to the parts of the code which currently relate only to ice conductivity  
     908 
     909      ssnd(jps_ttilyr )%clname = 'O_TtiLyr'  
     910      SELECT CASE ( TRIM( sn_snd_ttilyr%cldes ) )  
     911      CASE ( 'none' )  
     912         ssnd(jps_ttilyr)%laction = .FALSE.  
     913      CASE ( 'ice only' )  
     914         ssnd(jps_ttilyr)%laction = .TRUE.  
     915         IF ( TRIM( sn_snd_ttilyr%clcat ) == 'yes' ) THEN  
     916            ssnd(jps_ttilyr)%nct = jpl  
     917         ELSE  
     918            IF ( jpl > 1 ) THEN  
     919               CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_ttilyr%cldes if not exchanging category fields' )  
     920            ENDIF  
     921         ENDIF  
     922      CASE ( 'weighted ice' )  
     923         ssnd(jps_ttilyr)%laction = .TRUE.  
     924         IF ( TRIM( sn_snd_ttilyr%clcat ) == 'yes' ) ssnd(jps_ttilyr)%nct = jpl  
     925      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_ttilyr%cldes;'//sn_snd_ttilyr%cldes )  
     926      END SELECT  
     927 
     928      ssnd(jps_kice )%clname = 'OIceKn'  
     929      SELECT CASE ( TRIM( sn_snd_cond%cldes ) )  
     930      CASE ( 'none' )  
     931         ssnd(jps_kice)%laction = .FALSE.  
     932      CASE ( 'ice only' )  
     933         ssnd(jps_kice)%laction = .TRUE.  
     934         IF ( TRIM( sn_snd_cond%clcat ) == 'yes' ) THEN  
     935            ssnd(jps_kice)%nct = jpl  
     936         ELSE  
     937            IF ( jpl > 1 ) THEN  
     938               CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_cond%cldes if not exchanging category fields' )  
     939            ENDIF  
     940         ENDIF  
     941      CASE ( 'weighted ice' )  
     942         ssnd(jps_kice)%laction = .TRUE.  
     943         IF ( TRIM( sn_snd_cond%clcat ) == 'yes' ) ssnd(jps_kice)%nct = jpl  
     944      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_cond%cldes;'//sn_snd_cond%cldes )  
     945      END SELECT  
     946      !  
     947        
    826948      !                                                      ! ------------------------- !  
    827949      !                                                      !     Sea surface height    !  
     
    11331255      IF( srcv(jpr_co2)%laction )   atm_co2(:,:) = frcv(jpr_co2)%z3(:,:,1) 
    11341256      !  
     1257 
     1258      !!!!! Getting NEMO4-LIM to work at the Met Office 
     1259      !  ! Sea ice surface skin temp:  
     1260      IF( srcv(jpr_ts_ice)%laction ) THEN  
     1261        DO jn = 1, jpl  
     1262          DO jj = 1, jpj  
     1263            DO ji = 1, jpi  
     1264              IF (frcv(jpr_ts_ice)%z3(ji,jj,jn) > 0.0) THEN  
     1265                tsfc_ice(ji,jj,jn) = 0.0  
     1266              ELSE IF (frcv(jpr_ts_ice)%z3(ji,jj,jn) < -60.0) THEN  
     1267                tsfc_ice(ji,jj,jn) = -60.0  
     1268              ELSE  
     1269                tsfc_ice(ji,jj,jn) = frcv(jpr_ts_ice)%z3(ji,jj,jn)  
     1270              ENDIF  
     1271            END DO  
     1272          END DO  
     1273        END DO  
     1274      ENDIF  
     1275      !!!!! 
     1276 
     1277 
    11351278      !                                                      ! ========================= !  
    11361279      !                                                      ! Mean Sea Level Pressure   !   (taum)  
     
    15901733      INTEGER ::   ji,jj,jl         ! dummy loop index 
    15911734      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zcptn, zcptrain, zcptsnw, ziceld, zmsk, zsnw 
    1592       REAL(wp), POINTER, DIMENSION(:,:  ) ::   zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice 
     1735      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zdevap_ice 
    15931736      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice 
    1594       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zfrqsr_tr_i 
     1737      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zfrqsr_tr_i, zevap_ice 
    15951738      !!---------------------------------------------------------------------- 
    15961739      ! 
     
    15981741      ! 
    15991742      CALL wrk_alloc( jpi,jpj,     zcptn, zcptrain, zcptsnw, ziceld, zmsk, zsnw ) 
    1600       CALL wrk_alloc( jpi,jpj,     zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice ) 
     1743      CALL wrk_alloc( jpi,jpj,     zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zdevap_ice ) 
    16011744      CALL wrk_alloc( jpi,jpj,     zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice ) 
    16021745      CALL wrk_alloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zfrqsr_tr_i ) 
     1746 
     1747      IF (sn_rcv_emp%clcat == 'yes') THEN 
     1748         CALL wrk_alloc( jpi, jpj, jpl, zevap_ice) 
     1749      ELSE 
     1750         CALL wrk_alloc( jpi, jpj, 1, zevap_ice) 
     1751      ENDIF 
    16031752 
    16041753      IF( ln_mixcpl )   zmsk(:,:) = 1. - xcplmask(:,:,0) 
     
    16391788 
    16401789      ! --- evaporation over ice (kg/m2/s) --- ! 
    1641       zevap_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) 
     1790      IF (sn_rcv_emp%clcat == 'yes') THEN 
     1791         DO jl=1,jpl 
     1792            zevap_ice(:,:,jl) = frcv(jpr_ievp)%z3(:,:,jl) 
     1793         ENDDO 
     1794      ELSE 
     1795         zevap_ice(:,:,1) = frcv(jpr_ievp)%z3(:,:,1) 
     1796      ENDIF 
     1797 
    16421798      ! since the sensitivity of evap to temperature (devap/dT) is not prescribed by the atmosphere, we set it to 0 
    16431799      ! therefore, sublimation is not redistributed over the ice categories when no subgrid scale fluxes are provided by atm. 
     
    16671823         tprecip(:,:) = tprecip(:,:) * xcplmask(:,:,0) + ztprecip(:,:) * zmsk(:,:) 
    16681824         DO jl=1,jpl 
    1669             evap_ice (:,:,jl) = evap_ice (:,:,jl) * xcplmask(:,:,0) + zevap_ice (:,:) * zmsk(:,:) 
     1825            evap_ice (:,:,jl) = evap_ice (:,:,jl) * xcplmask(:,:,0) + zevap_ice (:,:,1) * zmsk(:,:) 
    16701826            devap_ice(:,:,jl) = devap_ice(:,:,jl) * xcplmask(:,:,0) + zdevap_ice(:,:) * zmsk(:,:) 
    16711827         ENDDO 
     
    16771833         tprecip(:,:) =         ztprecip(:,:) 
    16781834         DO jl=1,jpl 
    1679             evap_ice (:,:,jl) = zevap_ice (:,:) 
     1835            IF (sn_rcv_emp%clcat == 'yes') THEN 
     1836               evap_ice (:,:,jl) = zevap_ice (:,:,jl) 
     1837            ELSE 
     1838               evap_ice (:,:,jl) = zevap_ice (:,:,1) 
     1839            ENDIF 
     1840 
     1841            !!!!! Getting NEMO4-LIM to work at the Met Office: Semi-implicit coupling 
     1842            evap_ice (:,:,:) = evap_ice (:,:,:) * a_i(:,:,:) 
     1843            !!!!! 
     1844 
    16801845            devap_ice(:,:,jl) = zdevap_ice(:,:) 
    16811846         ENDDO 
     
    19492114      !                                                      ! ========================= ! 
    19502115      CASE ('coupled') 
    1951          topmelt(:,:,:)=frcv(jpr_topm)%z3(:,:,:) 
    1952          botmelt(:,:,:)=frcv(jpr_botm)%z3(:,:,:) 
     2116         qml_ice(:,:,:)=frcv(jpr_topm)%z3(:,:,:) * a_i(:,:,:) 
     2117         qcn_ice(:,:,:)=frcv(jpr_botm)%z3(:,:,:) * a_i(:,:,:) 
     2118 
     2119         !!!!! Getting NEMO4-LIM to work at Met Office: Semi-implicit coupling 
     2120         qml_ice(:,:,:)=qml_ice(:,:,:) * a_i(:,:,:) 
     2121         qcn_ice(:,:,:)=qcn_ice(:,:,:) * a_i(:,:,:) 
    19532122      END SELECT 
    19542123 
     
    19982167 
    19992168      CALL wrk_dealloc( jpi,jpj,     zcptn, zcptrain, zcptsnw, ziceld, zmsk, zsnw ) 
    2000       CALL wrk_dealloc( jpi,jpj,     zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zevap_ice, zdevap_ice ) 
     2169      CALL wrk_dealloc( jpi,jpj,     zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip, zevap_oce, zdevap_ice ) 
    20012170      CALL wrk_dealloc( jpi,jpj,     zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice ) 
    20022171      CALL wrk_dealloc( jpi,jpj,jpl, zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zfrqsr_tr_i ) 
     2172      IF (sn_rcv_emp%clcat == 'yes') THEN 
     2173         CALL wrk_dealloc( jpi,jpj,jpl,zevap_ice) 
     2174      ELSE 
     2175         CALL wrk_dealloc( jpi,jpj,1,zevap_ice) 
     2176      ENDIF 
    20032177      ! 
    20042178      IF( nn_timing == 1 )   CALL timing_stop('sbc_cpl_ice_flx') 
     
    20712245               CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' ) 
    20722246               END SELECT 
     2247            CASE( 'oce and weighted ice')    ;   ztmp1(:,:) =   tsn(:,:,1,jp_tem) + rt0   
     2248               SELECT CASE( sn_snd_temp%clcat )  
     2249               CASE( 'yes' )     
     2250                  ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl)  
     2251               CASE( 'no' )  
     2252                  ztmp3(:,:,:) = 0.0  
     2253                  DO jl=1,jpl  
     2254                     ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl)  
     2255                  ENDDO  
     2256               CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_temp%clcat' )  
     2257               END SELECT  
    20732258            CASE( 'mixed oce-ice'        )    
    20742259               ztmp1(:,:) = ( ztmp1(:,:) + rt0 ) * zfr_l(:,:)  
     
    20832268         IF( ssnd(jps_tmix)%laction )   CALL cpl_snd( jps_tmix, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
    20842269      ENDIF 
     2270 
     2271      !!!!! Getting NEMO4-LIM working at Met Office 
     2272      ! Top layer ice temperature 
     2273      IF( ssnd(jps_ttilyr)%laction) THEN 
     2274         SELECT CASE( sn_snd_ttilyr%cldes) 
     2275         CASE ('weighted ice') 
     2276            ttlyr_ice(:,:,:) = t1_ice(:,:,:) + rt0 
     2277            ztmp3(:,:,1:jpl) = ttlyr_ice(:,:,1:jpl) * a_i(:,:,1:jpl)  
     2278         CASE default                     ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_ttilyr%cldes' ) 
     2279         END SELECT 
     2280         IF( ssnd(jps_ttilyr)%laction )   CALL cpl_snd( jps_ttilyr, isec, ztmp3, info ) 
     2281      ENDIF 
     2282      !!!!! 
     2283 
     2284 
    20852285      !                                                      ! ------------------------- ! 
    20862286      !                                                      !           Albedo          ! 
     
    21952395         IF( ssnd(jps_hsnw)%laction )   CALL cpl_snd( jps_hsnw, isec, ztmp4, info ) 
    21962396      ENDIF 
     2397 
     2398      !!!!! Getting NEMO4-LIM to work 
     2399      !  
     2400      ! Send meltpond fields   
     2401      IF( ssnd(jps_a_p)%laction .OR. ssnd(jps_ht_p)%laction ) THEN  
     2402         SELECT CASE( sn_snd_mpnd%cldes)   
     2403         CASE( 'weighted ice' )   
     2404            SELECT CASE( sn_snd_mpnd%clcat )   
     2405            CASE( 'yes' )   
     2406               ztmp3(:,:,1:jpl) =  a_p(:,:,1:jpl) * a_i(:,:,1:jpl)   
     2407               ztmp4(:,:,1:jpl) =  ht_p(:,:,1:jpl) * a_i(:,:,1:jpl)   
     2408            CASE( 'no' )   
     2409               ztmp3(:,:,:) = 0.0   
     2410               ztmp4(:,:,:) = 0.0   
     2411               DO jl=1,jpl   
     2412                 ztmp3(:,:,1) = ztmp3(:,:,1) + a_p(:,:,jpl) * a_i(:,:,jpl)   
     2413                 ztmp4(:,:,1) = ztmp4(:,:,1) + ht_p(:,:,jpl) * a_i(:,:,jpl)   
     2414               ENDDO   
     2415            CASE default    ;   CALL ctl_stop( 'sbc_cpl_mpd: wrong definition of sn_snd_mpnd%clcat' )   
     2416            END SELECT   
     2417         CASE( 'ice only' )      
     2418            ztmp3(:,:,1:jpl) = a_p(:,:,1:jpl)   
     2419            ztmp4(:,:,1:jpl) = ht_p(:,:,1:jpl)   
     2420         END SELECT   
     2421         IF( ssnd(jps_a_p)%laction )   CALL cpl_snd( jps_a_p, isec, ztmp3, info )      
     2422         IF( ssnd(jps_ht_p)%laction )   CALL cpl_snd( jps_ht_p, isec, ztmp4, info )      
     2423         !  
     2424         ! Send ice effective conductivity  
     2425         SELECT CASE( sn_snd_cond%cldes)  
     2426         CASE( 'weighted ice' )     
     2427            SELECT CASE( sn_snd_cond%clcat )  
     2428            CASE( 'yes' )     
     2429                  ztmp3(:,:,1:jpl) =  cnd_ice(:,:,1:jpl) * a_i(:,:,1:jpl)  
     2430            CASE( 'no' )  
     2431               ztmp3(:,:,:) = 0.0  
     2432               DO jl=1,jpl  
     2433                 ztmp3(:,:,1) = ztmp3(:,:,1) + cnd_ice(:,:,jl) * a_i(:,:,jl)  
     2434               ENDDO  
     2435            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_cond%clcat' )  
     2436            END SELECT  
     2437         CASE( 'ice only' )     
     2438           ztmp3(:,:,1:jpl) = cnd_ice(:,:,1:jpl)  
     2439         END SELECT  
     2440         IF( ssnd(jps_kice)%laction )   CALL cpl_snd( jps_kice, isec, ztmp3, info )  
     2441      ENDIF  
     2442      !    
     2443      !!!!! 
     2444 
     2445 
    21972446      !                                                      ! ------------------------- ! 
    21982447      !                                                      !  CO2 flux from PISCES     !  
     
    25162765      IF( ssnd(jps_taum  )%laction )  CALL cpl_snd( jps_taum  , isec, RESHAPE ( taum, (/jpi,jpj,1/) ), info ) 
    25172766 
     2767      ztmp1(:,:) = sstfrz(:,:) + rt0 
     2768      IF( ssnd(jps_sstfrz)%laction )  CALL cpl_snd( jps_sstfrz, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info) 
     2769 
    25182770      CALL wrk_dealloc( jpi,jpj,       zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 ) 
    25192771      CALL wrk_dealloc( jpi,jpj,jpl,   ztmp3, ztmp4 ) 
Note: See TracChangeset for help on using the changeset viewer.