Changeset 4748


Ignore:
Timestamp:
2014-08-18T10:33:45+02:00 (6 years ago)
Author:
timgraham
Message:

Added key_cice5 to select use of CICE5 model. This is used so that the correct variable names are used in the CICE5 version
Modified all references to key_cice to an "or" so that they will be triggered by the key_cice5 key as well (assuming the code sections don't require chanegs for CICE5).

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

    r4624 r4748  
    10091009#endif 
    10101010 
    1011 #if defined key_cice && defined key_asminc 
     1011#if ( defined key_cice || defined key_cice5 ) && 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_asminc 
     1022#if ( defined key_cice || defined key_cice5 ) && 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_asminc 
     1066#if ( defined key_cice || defined key_cice5 ) && 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_asminc 
     1076#if ( defined key_cice || defined key_cice5 ) && 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 
     1083!#if defined defined key_lim2 || defined key_cice || defined key_cice5 
    10841084! 
    10851085!            IF (ln_seaicebal ) THEN        
  • branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90

    r3625 r4748  
    4747   REAL(wp), PUBLIC ::   rt0_ice  = 273.05_wp        !: melting point of ice          [Kelvin] 
    4848#endif 
    49 #if defined key_cice 
     49#if defined key_cice || defined key_cice5 
    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 
     69#if defined key_lim3 || defined key_cice || defined key_cice5 
    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 
     138#if defined key_cice || key_cice5 
    139139      omega  = 7.292116e-05 
    140140#else 
     
    174174 
    175175 
    176 #if defined key_lim3 || defined key_cice 
     176#if defined key_lim3 || defined key_cice || key_cice5 
    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 
     189#if defined key_lim3 || defined key_cice || key_cice5 
    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

    r4306 r4748  
    99   !!            3.4  ! 2011-11  (C. Harris) CICE added as an option 
    1010   !!---------------------------------------------------------------------- 
    11 #if defined key_lim3 || defined key_lim2 || defined key_cice 
     11#if defined key_lim3 || defined key_lim2 || defined key_cice || defined key_cice5 
    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  
     23# if defined key_cice || defined key_cice5 
    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 
     50# if defined  key_cice || defined key_cice5 
    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 
     77#elif defined key_cice || key_cice5 
    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 
     129#elif defined key_cice || defined key_cice5 
    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

    r4624 r4748  
    3939   USE prtctl          ! Print control 
    4040   USE sbcwave,ONLY :  cdn_wave !wave module  
    41 #if defined key_lim3 || defined key_cice 
     41#if defined key_lim3 || defined key_cice | defined key_cice5 
    4242   USE sbc_ice         ! Surface boundary condition: ice fields 
    4343#endif 
     
    194194      IF( ltrcdm2dc )   CALL blk_bio_meanqsr 
    195195 
    196 #if defined key_cice 
     196#if defined key_cice || defined key_cice5 
    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

    r4624 r4748  
    5353#endif 
    5454   USE diaar5, ONLY :   lk_diaar5 
    55 #if defined key_cice 
     55#if defined key_cice || defined key_cice5 
    5656   USE ice_domain_size, only: ncat 
    5757#endif 
     
    145145#endif 
    146146 
    147 #if defined key_cice 
     147#if defined key_cice || defined key_cice5 
    148148   INTEGER, PARAMETER ::   jpl = ncat 
    149149#elif ! defined key_lim2   &&   ! defined key_lim3 
     
    153153#endif 
    154154 
    155 #if ! defined key_lim3   &&  ! defined key_cice 
     155#if ! defined key_lim3   &&  ! defined key_cice && ! defined key_cice5 
    156156   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i 
    157157#endif 
     
    161161#endif 
    162162 
    163 #if ! defined key_cice 
     163#if ! defined key_cice && ! defined key_cice5 
    164164   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  topmelt, botmelt 
    165165#endif 
     
    192192#endif 
    193193 
    194 #if ! defined key_lim3 && ! defined key_cice 
     194#if ! defined key_lim3 && ! defined key_cice && ! defined key_cice5 
    195195      ALLOCATE( a_i(jpi,jpj,jpl) , STAT=ierr(3) ) 
    196196#endif 
    197197 
    198 #if defined key_cice || defined key_lim2 
     198#if defined key_cice || defined key_cice5 || 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

    r4347 r4748  
    8585         area = glob_sum( e1e2t(:,:) )           ! interior global domain surface 
    8686         ! 
    87 #if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice  
     87#if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice && ! defined key_cice5 
    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

    r4627 r4748  
    44   !! To couple with sea ice model CICE (LANL) 
    55   !!===================================================================== 
    6 #if defined key_cice 
     6#if defined key_cice || defined key_cice5 
    77   !!---------------------------------------------------------------------- 
    88   !!   'key_cice' :                                     CICE sea-ice model 
     
    2323   USE daymod          ! calendar 
    2424   USE fldread         ! read input fields 
    25  
    2625   USE sbc_oce         ! Surface boundary condition: ocean fields 
    2726   USE sbc_ice         ! Surface boundary condition: ice   fields 
     
    3837   USE ice_calendar, only: dt 
    3938   USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen 
     39# if defined key_cice5 
     40   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
     41                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_ai,     & 
     42                fresh_ai,fhocn_ai,fswthru_ai,frzmlt,          & 
     43                flatn_f,fsurfn_f,fcondtopn_f,                    & 
     44                uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   & 
     45                swvdr,swvdf,swidr,swidf 
     46   USE ice_therm_shared, only: calc_Tsfc 
     47#else 
    4048   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  & 
    4149                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     & 
     
    4452                uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   & 
    4553                swvdr,swvdf,swidr,swidf 
     54   USE ice_therm_vertical, only: calc_Tsfc 
     55#endif 
    4656   USE ice_forcing, only: frcvdr,frcvdf,frcidr,frcidf 
    4757   USE ice_atmo, only: calc_strair 
    48    USE ice_therm_vertical, only: calc_Tsfc 
    4958 
    5059   USE CICE_InitMod 
     
    524533      ENDIF 
    525534 
     535#if defined key_cice5 
     536      CALL cice2nemo(fresh_ai,ztmp1,'T', 1. ) 
     537      CALL cice2nemo(fsalt_ai,ztmp2,'T', 1. ) 
     538#else 
    526539      CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. ) 
    527540      CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. ) 
     541#endif 
    528542 
    529543! Check to avoid unphysical expression when ice is forming (ztmp1 negative) 
     
    557571! Now add in ice / snow related terms 
    558572! [fswthru will be zero unless running with calc_Tsfc=T in CICE] 
     573#if defined key_cice5 
     574      CALL cice2nemo(fswthru_ai,ztmp1,'T', 1. ) 
     575#else 
    559576      CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. ) 
     577#endif 
    560578      qsr(:,:)=qsr(:,:)+ztmp1(:,:) 
    561579      CALL lbc_lnk( qsr , 'T', 1. ) 
     
    567585      ENDDO 
    568586 
     587#if defined key_cice5 
     588      CALL cice2nemo(fhocn_ai,ztmp1,'T', 1. ) 
     589#else 
    569590      CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. ) 
     591#endif 
    570592      qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:) 
    571593 
Note: See TracChangeset for help on using the changeset viewer.