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 4881 for branches/2014/dev_r4650_UKMO13_CICE_changes_take2 – NEMO

Ignore:
Timestamp:
2014-11-21T11:25:19+01:00 (9 years ago)
Author:
timgraham
Message:

Changes suggested by reviewer:
1) Changed behaviour so that key_cice defaults to cice5. Running with cice4 will require bot key_cice and key_cice4.
2) Other small changes in sbcice_cice.F90

Location:
branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r4748 r4881  
    10091009#endif 
    10101010 
    1011 #if ( defined key_cice || defined key_cice5 ) && defined key_asminc 
     1011#if defined key_cice && defined key_asminc 
    10121012            ! Sea-ice : CICE case. Pass ice increment tendency into CICE 
    10131013            ndaice_da(:,:) = seaice_bkginc(:,:) * zincwgt / rdt 
     
    10201020         ELSE 
    10211021 
    1022 #if ( defined key_cice || defined key_cice5 ) && defined key_asminc 
     1022#if defined key_cice && defined key_asminc 
    10231023            ! Sea-ice : CICE case. Zero ice increment tendency into CICE 
    10241024            ndaice_da(:,:) = 0.0_wp 
     
    10641064#endif 
    10651065  
    1066 #if ( defined key_cice || defined key_cice5 ) && defined key_asminc 
     1066#if defined key_cice && defined key_asminc 
    10671067            ! Sea-ice : CICE case. Pass ice increment tendency into CICE 
    10681068           ndaice_da(:,:) = seaice_bkginc(:,:) / rdt 
     
    10741074         ELSE 
    10751075 
    1076 #if ( defined key_cice || defined key_cice5 ) && defined key_asminc 
     1076#if defined key_cice && defined key_asminc 
    10771077            ! Sea-ice : CICE case. Zero ice increment tendency into CICE  
    10781078            ndaice_da(:,:) = 0.0_wp 
     
    10811081         ENDIF 
    10821082 
    1083 !#if defined defined key_lim2 || defined key_cice || defined key_cice5 
     1083!#if defined defined key_lim2 || defined key_cice 
    10841084! 
    10851085!            IF (ln_seaicebal ) THEN        
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90

    r4748 r4881  
    4747   REAL(wp), PUBLIC ::   rt0_ice  = 273.05_wp        !: melting point of ice          [Kelvin] 
    4848#endif 
    49 #if defined key_cice || defined key_cice5 
     49#if defined key_cice 
    5050   REAL(wp), PUBLIC ::   rau0     = 1026._wp         !: volumic mass of reference     [kg/m3] 
    5151#else 
     
    6767   REAL(wp), PUBLIC ::   stefan   =    5.67e-8_wp    !: Stefan-Boltzmann constant  
    6868 
    69 #if defined key_lim3 || defined key_cice || defined key_cice5 
     69#if defined key_lim3 || defined key_cice 
    7070   REAL(wp), PUBLIC ::   rhoic    =  917._wp         !: volumic mass of sea ice                               [kg/m3] 
    7171   REAL(wp), PUBLIC ::   rcdic    =    2.034396_wp   !: thermal conductivity of fresh ice 
     
    136136      rsiyea = 365.25_wp * rday * 2._wp * rpi / 6.283076_wp 
    137137      rsiday = rday / ( 1._wp + rday / rsiyea ) 
    138 #if defined key_cice || key_cice5 
     138#if defined key_cice 
    139139      omega  = 7.292116e-05 
    140140#else 
     
    174174 
    175175 
    176 #if defined key_lim3 || defined key_cice || key_cice5 
     176#if defined key_lim3 || defined key_cice 
    177177      xlsn = lfus * rhosn        ! volumetric latent heat fusion of snow [J/m3] 
    178178#else 
     
    187187         WRITE(numout,*) '          fresh ice specific heat                   = ', cpic    , ' J/kg/K' 
    188188         WRITE(numout,*) '          latent heat of fusion of fresh ice / snow = ', lfus    , ' J/kg' 
    189 #if defined key_lim3 || defined key_cice || key_cice5 
     189#if defined key_lim3 || defined key_cice 
    190190         WRITE(numout,*) '          latent heat of subl.  of fresh ice / snow = ', lsub    , ' J/kg' 
    191191#else 
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90

    r4748 r4881  
    99   !!            3.4  ! 2011-11  (C. Harris) CICE added as an option 
    1010   !!---------------------------------------------------------------------- 
    11 #if defined key_lim3 || defined key_lim2 || defined key_cice || defined key_cice5 
     11#if defined key_lim3 || defined key_lim2 || defined key_cice 
    1212   !!---------------------------------------------------------------------- 
    1313   !!   'key_lim2' or 'key_lim3' :             LIM-2 or LIM-3 sea-ice model 
     
    2121   USE ice_2 
    2222# endif 
    23 # if defined key_cice || defined key_cice5 
     23# if defined key_cice 
    2424   USE ice_domain_size, only: ncat  
    2525#endif 
     
    4848   CHARACTER(len=1), PUBLIC, PARAMETER ::   cp_ice_msh = 'C'      !: 'C'-grid ice-velocity 
    4949# endif 
    50 # if defined  key_cice || defined key_cice5 
     50# if defined  key_cice 
    5151   LOGICAL         , PUBLIC, PARAMETER ::   lk_lim2    = .FALSE.  !: no LIM-2 
    5252   LOGICAL         , PUBLIC, PARAMETER ::   lk_lim3    = .FALSE.  !: no LIM-3 
     
    7575# endif 
    7676 
    77 #elif defined key_cice || key_cice5 
     77#elif defined key_cice 
    7878   ! 
    7979   ! for consistency with LIM, these are declared with three dimensions 
     
    127127         &      emp_ice(jpi,jpj)                              , STAT= ierr(1) ) 
    128128#endif 
    129 #elif defined key_cice || defined key_cice5 
     129#elif defined key_cice 
    130130      ALLOCATE( qla_ice(jpi,jpj,1)    , qlw_ice(jpi,jpj,1)    , qsr_ice(jpi,jpj,1)    , & 
    131131                wndi_ice(jpi,jpj)     , tatm_ice(jpi,jpj)     , qatm_ice(jpi,jpj)     , & 
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r4809 r4881  
    3939   USE prtctl          ! Print control 
    4040   USE sbcwave,ONLY :  cdn_wave !wave module  
    41 #if defined key_lim3 || defined key_cice || defined key_cice5 
     41#if defined key_lim3 || defined key_cice 
    4242   USE sbc_ice         ! Surface boundary condition: ice fields 
    4343#endif 
     
    194194      IF( ltrcdm2dc )   CALL blk_bio_meanqsr 
    195195 
    196 #if defined key_cice || defined key_cice5 
     196#if defined key_cice 
    197197      IF( MOD( kt - 1, nn_fsbc ) == 0 )   THEN 
    198198         qlw_ice(:,:,1)   = sf(jp_qlw)%fnow(:,:,1)  
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r4748 r4881  
    5353#endif 
    5454   USE diaar5, ONLY :   lk_diaar5 
    55 #if defined key_cice || defined key_cice5 
     55#if defined key_cice 
    5656   USE ice_domain_size, only: ncat 
    5757#endif 
     
    145145#endif 
    146146 
    147 #if defined key_cice || defined key_cice5 
     147#if defined key_cice 
    148148   INTEGER, PARAMETER ::   jpl = ncat 
    149149#elif ! defined key_lim2   &&   ! defined key_lim3 
     
    153153#endif 
    154154 
    155 #if ! defined key_lim3   &&  ! defined key_cice && ! defined key_cice5 
     155#if ! defined key_lim3   &&  ! defined key_cice 
    156156   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i 
    157157#endif 
     
    161161#endif 
    162162 
    163 #if ! defined key_cice && ! defined key_cice5 
     163#if ! defined key_cice 
    164164   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  topmelt, botmelt 
    165165#endif 
     
    192192#endif 
    193193 
    194 #if ! defined key_lim3 && ! defined key_cice && ! defined key_cice5 
     194#if ! defined key_lim3 && ! defined key_cice 
    195195      ALLOCATE( a_i(jpi,jpj,jpl) , STAT=ierr(3) ) 
    196196#endif 
    197197 
    198 #if defined key_cice || defined key_cice5 || defined key_lim2 
     198#if defined key_cice || defined key_lim2 
    199199      ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(4) ) 
    200200#endif 
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r4748 r4881  
    8585         area = glob_sum( e1e2t(:,:) )           ! interior global domain surface 
    8686         ! 
    87 #if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice && ! defined key_cice5 
     87#if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice 
    8888         snwice_mass_b(:,:) = 0.e0               ! no sea-ice model is being used : no snow+ice mass 
    8989         snwice_mass  (:,:) = 0.e0 
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r4748 r4881  
    44   !! To couple with sea ice model CICE (LANL) 
    55   !!===================================================================== 
    6 #if defined key_cice || defined key_cice5 
     6#if defined key_cice 
    77   !!---------------------------------------------------------------------- 
    88   !!   'key_cice' :                                     CICE sea-ice model 
     
    1717   USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic 
    1818   USE in_out_manager  ! I/O manager 
     19   USE iom, only : iom_put              ! I/O manager library !!Joakim edit 
    1920   USE lib_mpp         ! distributed memory computing library 
    2021   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     
    3738   USE ice_calendar, only: dt 
    3839   USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen 
    39 # if defined key_cice5 
     40# if defined key_cice4 
     41   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
     42                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     & 
     43                fresh_gbm,fhocn_gbm,fswthru_gbm,frzmlt,          & 
     44                flatn_f,fsurfn_f,fcondtopn_f,                    & 
     45                uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   & 
     46                swvdr,swvdf,swidr,swidf 
     47   USE ice_therm_vertical, only: calc_Tsfc 
     48#else 
    4049   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
    4150                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_ai,     & 
     
    4554                swvdr,swvdf,swidr,swidf 
    4655   USE ice_therm_shared, only: calc_Tsfc 
    47 #else 
    48    USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
    49                 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     & 
    50                 fresh_gbm,fhocn_gbm,fswthru_gbm,frzmlt,          & 
    51                 flatn_f,fsurfn_f,fcondtopn_f,                    & 
    52                 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   & 
    53                 swvdr,swvdf,swidr,swidf 
    54    USE ice_therm_vertical, only: calc_Tsfc 
    5556#endif 
    5657   USE ice_forcing, only: frcvdr,frcvdf,frcidr,frcidf 
     
    158159      REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 
    159160      REAL(wp) ::   zcoefu, zcoefv, zcoeff            ! local scalar 
    160       INTEGER  ::   ji, jj, jl                        ! dummy loop indices 
     161      INTEGER  ::   ji, jj, jl, jk                    ! dummy loop indices 
    161162      !!--------------------------------------------------------------------- 
    162163 
     
    227228         snwice_mass_b(:,:) = 0.0_wp         ! no mass exchanges 
    228229      ENDIF 
    229       IF( nn_ice_embd == 2 .AND.          &  ! full embedment (case 2) & no restart :  
    230          &   .NOT.ln_rstart ) THEN           ! deplete the initial ssh belew sea-ice area 
    231          sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    232          sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    233          ! 
     230      IF( .NOT. ln_rstart ) THEN 
     231         IF( nn_ice_embd == 2 ) THEN            ! full embedment (case 2) deplete the initial ssh below sea-ice area 
     232            sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
     233            sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
     234#if defined key_vvl             
     235           ! key_vvl necessary? clem: yes for compilation purpose 
     236            DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
     237               fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     238               fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     239            ENDDO 
     240            fse3t_a(:,:,:) = fse3t_b(:,:,:) 
     241            ! Reconstruction of all vertical scale factors at now and before time 
     242            ! steps 
     243            ! ============================================================================= 
     244            ! Horizontal scale factor interpolations 
     245            ! -------------------------------------- 
     246            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' ) 
     247            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' ) 
     248            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' ) 
     249            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' ) 
     250            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' ) 
     251            ! Vertical scale factor interpolations 
     252            ! ------------------------------------ 
     253            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  ) 
     254            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' ) 
     255            CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' ) 
     256            CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' ) 
     257            CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' ) 
     258            ! t- and w- points depth 
     259            ! ---------------------- 
     260            fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1) 
     261            fsdepw_n(:,:,1) = 0.0_wp 
     262            fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:) 
     263            DO jk = 2, jpk 
     264               fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk) 
     265               fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1) 
     266               fsde3w_n(:,:,jk) = fsdept_n(:,:,jk  ) - sshn   (:,:) 
     267            END DO 
     268#endif 
     269         ENDIF 
    234270      ENDIF 
    235271  
     
    384420 
    385421! Snowfall 
    386 ! Ensure fsnow is positive (as in CICE routine prepare_forcing)   
     422! Ensure fsnow is positive (as in CICE routine prepare_forcing) 
     423      CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit   
    387424      ztmp(:,:)=MAX(fr_i(:,:)*sprecip(:,:),0.0)   
    388425      CALL nemo2cice(ztmp,fsnow,'T', 1. )  
    389426 
    390427! Rainfall 
     428      CALL iom_put('precip', (1.0-fr_i(:,:))*(tprecip(:,:)-sprecip(:,:)) ) !!Joakim edit 
    391429      ztmp(:,:)=fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 
    392430      CALL nemo2cice(ztmp,frain,'T', 1. )  
     
    533571      ENDIF 
    534572 
    535 #if defined key_cice5 
     573#if defined key_cice4 
     574      CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. ) 
     575      CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. ) 
     576#else 
    536577      CALL cice2nemo(fresh_ai,ztmp1,'T', 1. ) 
    537578      CALL cice2nemo(fsalt_ai,ztmp2,'T', 1. ) 
    538 #else 
    539       CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. ) 
    540       CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. ) 
    541579#endif 
    542580 
     
    549587      sfx(:,:)=ztmp2(:,:)*1000.0 
    550588      emp(:,:)=emp(:,:)-ztmp1(:,:) 
    551   
     589      fmmflx(:,:) = ztmp1(:,:) !!Joakim edit 
     590       
    552591      CALL lbc_lnk( emp , 'T', 1. ) 
    553592      CALL lbc_lnk( sfx , 'T', 1. ) 
     
    571610! Now add in ice / snow related terms 
    572611! [fswthru will be zero unless running with calc_Tsfc=T in CICE] 
    573 #if defined key_cice5 
     612#if defined key_cice4 
     613      CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. ) 
     614#else 
    574615      CALL cice2nemo(fswthru_ai,ztmp1,'T', 1. ) 
    575 #else 
    576       CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. ) 
    577616#endif 
    578617      qsr(:,:)=qsr(:,:)+ztmp1(:,:) 
     
    585624      ENDDO 
    586625 
    587 #if defined key_cice5 
     626#if defined key_cice4 
     627      CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. ) 
     628#else 
    588629      CALL cice2nemo(fhocn_ai,ztmp1,'T', 1. ) 
    589 #else 
    590       CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. ) 
    591630#endif 
    592631      qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:) 
     
    735774      IF( kt == nit000 ) THEN                   !  First call kt=nit000  ! 
    736775         !                                      ! ====================== ! 
     776         ! namsbc_cice is not yet in the reference namelist 
     777         ! set file information (default values) 
     778         cn_dir = './'       ! directory in which the model is executed 
     779 
     780         ! (NB: frequency positive => hours, negative => months) 
     781         !            !    file          ! frequency !  variable    ! time intep !  clim   ! 'yearly' or ! weights  ! rotation   ! landmask 
     782         !            !    name          !  (hours)  !   name       !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs      ! file 
     783         sn_snow = FLD_N( 'snowfall_1m'  ,    -1.    ,  'snowfall'  ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    )  
     784         sn_rain = FLD_N( 'rainfall_1m'  ,    -1.    ,  'rainfall'  ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    )  
     785         sn_sblm = FLD_N( 'sublim_1m'    ,    -1.    ,  'sublim'    ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     786         sn_top1 = FLD_N( 'topmeltn1_1m' ,    -1.    ,  'topmeltn1' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     787         sn_top2 = FLD_N( 'topmeltn2_1m' ,    -1.    ,  'topmeltn2' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     788         sn_top3 = FLD_N( 'topmeltn3_1m' ,    -1.    ,  'topmeltn3' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     789         sn_top4 = FLD_N( 'topmeltn4_1m' ,    -1.    ,  'topmeltn4' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     790         sn_top5 = FLD_N( 'topmeltn5_1m' ,    -1.    ,  'topmeltn5' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     791         sn_bot1 = FLD_N( 'botmeltn1_1m' ,    -1.    ,  'botmeltn1' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     792         sn_bot2 = FLD_N( 'botmeltn2_1m' ,    -1.    ,  'botmeltn2' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     793         sn_bot3 = FLD_N( 'botmeltn3_1m' ,    -1.    ,  'botmeltn3' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     794         sn_bot4 = FLD_N( 'botmeltn4_1m' ,    -1.    ,  'botmeltn4' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     795         sn_bot5 = FLD_N( 'botmeltn5_1m' ,    -1.    ,  'botmeltn5' ,  .true.    , .true.  ,  ' yearly'  , ''       , ''         ,  ''    ) 
     796 
    737797         REWIND( numnam_ref )              ! Namelist namsbc_cice in reference namelist :  
    738798         READ  ( numnam_ref, namsbc_cice, IOSTAT = ios, ERR = 901) 
Note: See TracChangeset for help on using the changeset viewer.