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 5352 for branches/2015 – NEMO

Changeset 5352 for branches/2015


Ignore:
Timestamp:
2015-06-04T17:01:01+02:00 (9 years ago)
Author:
smasson
Message:

dev_r5218_CNRS17_coupling: update for fraqsr

Location:
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/ARCH/arch-macport_osx.fcm

    r5220 r5352  
    5252%CPP               cpp-mp-4.8 
    5353%FC                mpif90  
    54 %FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer  
     54###%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer  
     55%FCFLAGS             -fdefault-real-8 -O0 -g -fbacktrace -fbounds-check -funroll-all-loops -fcray-pointer  
    5556%FFLAGS              %FCFLAGS 
    5657%LD                  %FC 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef.xml

    r5127 r5352  
    2121    --> 
    2222     
    23     <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 
    24      
    25       <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     23    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 
     24     
     25      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."> <!-- 1 time step files --> 
     26    
     27   <file id="file11" name_suffix="_grid_T" description="ocean T grid variables" > 
     28     <field_group  prec="8"  operation="instant" > 
     29       <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       /> 
     30       <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          /> 
     31       <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                /> 
     32       <field field_ref="saltflx"      /> 
     33       <field field_ref="taum"         name="taum" /> 
     34       <field field_ref="wspd"         name="windsp"  /> 
     35       <field field_ref="precip"       name="precip" /> 
     36       <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     /> 
     37       <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           /> 
     38       <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          /> 
     39            <field field_ref="sst_m"  /> 
     40            <field field_ref="sss_m"  /> 
     41            <field field_ref="ssu_m"  /> 
     42            <field field_ref="ssv_m"  /> 
     43            <field field_ref="ssh_m"  /> 
     44            <field field_ref="e3t_m"  /> 
     45            <field field_ref="frq_m"  /> 
     46            <field field_ref="qsr_oce"  /> 
     47            <field field_ref="qsr_ice"  /> 
     48            <field field_ref="qns_oce"  /> 
     49            <field field_ref="qns_ice"  /> 
     50            <field field_ref="sfxbri"  /> 
     51            <field field_ref="sfxdyn"  /> 
     52            <field field_ref="sfxres"  /> 
     53            <field field_ref="sfxbog"  /> 
     54            <field field_ref="sfxbom"  /> 
     55            <field field_ref="sfxsum"  /> 
     56            <field field_ref="sfxsni"  /> 
     57            <field field_ref="sfxopw"  /> 
     58            <field field_ref="sfx"  /> 
     59 
     60     </field_group> 
     61   </file> 
     62    
     63      </file_group> 
    2664 
    2765      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files --> 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg

    r4995 r5352  
    66&namrun        !   parameters of the run 
    77!----------------------------------------------------------------------- 
     8   nn_it000    =       1   !  first time step 
     9   nn_itend    =     24    !  last  time step (std 5475) 
     10   ln_clobber  =  .true.   !  clobber (overwrite) an existing file 
    811/ 
    912!----------------------------------------------------------------------- 
     
    2831&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    2932!----------------------------------------------------------------------- 
     33   rn_rdt      = 3600.     !  time step for the dynamics (and tracer if nn_acc=0) 
    3034   jphgr_msh   =       0               !  type of horizontal mesh 
    3135   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1) 
     
    6367&namsbc        !   Surface Boundary Condition (surface module) 
    6468!----------------------------------------------------------------------- 
     69   nn_fsbc     = 1         !  frequency of surface boundary condition computation 
     70                           !     (also = the frequency of sea-ice model call) 
     71   ln_ana      = .false.   !  analytical formulation                    (T => fill namsbc_ana ) 
     72   ln_flx      = .false.   !  flux formulation                          (T => fill namsbc_flx ) 
     73   ln_blk_clio = .false.   !  CLIO bulk formulation                     (T => fill namsbc_clio) 
     74   ln_blk_core = .true.    !  CORE bulk formulation                     (T => fill namsbc_core) 
     75   ln_blk_mfs  = .false.   !  MFS bulk formulation                      (T => fill namsbc_mfs ) 
     76   ln_cpl      = .false.   !  atmosphere coupled   formulation          ( requires key_oasis3 ) 
     77   ln_mixcpl   = .false.   !  forced-coupled mixed formulation          ( requires key_oasis3 ) 
     78   nn_components = 0       !  configuration of the opa-sas OASIS coupling 
     79                           !  =0 no opa-sas OASIS coupling: default single executable configuration 
     80                           !  =1 opa-sas OASIS coupling: multi executable configuration, OPA component 
     81                           !  =2 opa-sas OASIS coupling: multi executable configuration, SAS component  
     82   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr ) 
     83   nn_ice      = 2         !  =0 no ice boundary condition   , 
     84                           !  =1 use observed ice-cover      , 
     85                           !  =2 ice-model used                         ("key_lim3" or "key_lim2") 
     86   nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect) 
     87                           !  =1 levitating ice with mass and salt exchange but no presure effect 
     88                           !  =2 embedded sea-ice (full salt and mass exchanges and pressure) 
     89   ln_dm2dc    = .false.   !  daily mean to diurnal cycle on short wave 
     90   ln_rnf      = .false.   !  runoffs                                   (T   => fill namsbc_rnf) 
     91   nn_isf      = 0         !  ice shelf melting/freezing                (/=0 => fill namsbc_isf) 
     92                           !  0 =no isf                  1 = presence of ISF  
     93                           !  2 = bg03 parametrisation   3 = rnf file for isf    
     94                           !  4 = ISF fwf specified 
     95                           !  option 1 and 4 need ln_isfcav = .true. (domzgr) 
     96   ln_ssr      = .flase.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr) 
     97   nn_fwb      = 2         !  FreshWater Budget: =0 unchecked 
     98                           !     =1 global mean of e-p-r set to zero at each time step 
     99                           !     =2 annual global mean of e-p-r set to zero 
     100   ln_wave = .false.       !  Activate coupling with wave (either Stokes Drift or Drag coefficient, or both)  (T => fill namsbc_wave) 
     101   ln_cdgw = .false.       !  Neutral drag coefficient read from wave model (T => fill namsbc_wave) 
     102   ln_sdw  = .false.       !  Computation of 3D stokes drift                (T => fill namsbc_wave) 
     103   nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) , 
     104                           !  =1:n number of iterations of land/sea mask application for input fields (fill land/sea mask filename field) 
     105   nn_limflx = -1          !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used) 
     106                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled 
     107                           !  = 0  Average per-category fluxes (forced and coupled mode) 
     108                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled 
     109                           !  = 2  Redistribute a single flux over categories (coupled mode only) 
    65110/ 
    66111!----------------------------------------------------------------------- 
     
    71116&namtra_qsr    !   penetrative solar radiation 
    72117!----------------------------------------------------------------------- 
     118   ln_qsr_ice  = .true.    !  light penetration for ice-model LIM3 
    73119/ 
    74120!----------------------------------------------------------------------- 
     
    111157&nameos        !   ocean physical parameters 
    112158!----------------------------------------------------------------------- 
     159   ln_useCT    = .false.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm 
    113160/ 
    114161!----------------------------------------------------------------------- 
     
    127174&namtra_dmp    !   tracer: T & S newtonian damping 
    128175!----------------------------------------------------------------------- 
     176   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F) 
     177   nn_zdmp     =    0      !  vertical   shape =0    damping throughout the water column 
     178                           !                   =1 no damping in the mixing layer (kz  criteria) 
     179                           !                   =2 no damping in the mixed  layer (rho crieria) 
     180   cn_resto    = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this) 
    129181/ 
    130182!----------------------------------------------------------------------- 
     
    145197   ln_hpg_prj  = .true.    !  s-coordinate (Pressure Jacobian scheme) 
    146198   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    147                                  !           centered      time scheme  (F) 
     199                           !           centered      time scheme  (F) 
    148200/ 
    149201!----------------------------------------------------------------------- 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_ice_cfg

    r4690 r5352  
    1010&namiceini     !   ice initialisation 
    1111!----------------------------------------------------------------------- 
     12   ln_iceini      = .true.         !  activate ice initialization (T) or not (F) 
    1213/ 
    1314!----------------------------------------------------------------------- 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm

    r4994 r5352  
    1  bld::tool::fppkeys key_trabbl key_lim3 key_vvl key_dynspg_ts key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc 
     1 bld::tool::fppkeys key_trabbl key_lim3 key_vvl key_dynspg_ts key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc key_nosignedzero 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/field_def.xml

    r5343 r5352  
    348348         <field id="ssh_m"    unit="m"    /> 
    349349         <field id="e3t_m"    unit="m"    /> 
     350         <field id="frq_m"    unit="-"    /> 
    350351 
    351352      </field_group> 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/namelist_ref

    r5343 r5352  
    385385   sn_ssh      = 'sas_grid_T' ,    120           , 'sossheig' ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    386386   sn_e3t      = 'sas_grid_T' ,    120           , 'e3t_m'    ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
     387   sn_frq      = 'sas_grid_T' ,    120           , 'frq_m'    ,  .true.    , .true. ,   'yearly'  , ''       , ''             , '' 
    387388 
    388389   ln_3d_uve   = .true.    !  specify whether we are supplying a 3D u,v and e3 field 
     390   ln_read_frq = .true.    !  specify whether we must read frq or not 
    389391   cn_dir      = './'      !  root directory for the location of the bulk files are 
    390392/ 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/cfg.txt

    r5147 r5352  
    1010ISOMIP OPA_SRC 
    1111GYRE OPA_SRC 
     12ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 
    1213ORCA2_LIM3 OPA_SRC LIM_SRC_3 NST_SRC 
    13 ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 
     14ORCA2_SAS_LIM3 OPA_SRC SAS_SRC LIM_SRC_3 NST_SRC 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r5220 r5352  
    3030   USE sbc_oce          ! Surface boundary condition: ocean fields 
    3131   USE sbccpl 
    32    USE oce       , ONLY : fraqsr_1lev, sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass 
     32   USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass 
    3333   USE albedo           ! albedo parameters 
    3434   USE lbclnk           ! ocean lateral boundary condition - MPP exchanges 
     
    346346            sice_0(:,:) = 2._wp 
    347347         END WHERE 
    348       ENDIF 
    349        
    350       IF( .NOT. ln_rstart ) THEN 
    351          fraqsr_1lev(:,:) = 1._wp 
    352348      ENDIF 
    353349      ! 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90

    r5299 r5352  
    2222   USE phycst         ! physical constants 
    2323   USE dom_oce        ! ocean space and time domain variables 
    24    USE oce     , ONLY : fraqsr_1lev  
    2524   USE ice            ! LIM: sea-ice variables 
    2625   USE sbc_oce        ! Surface boundary condition: ocean fields 
     
    172171            IF ( ln_cpl ) THEN 
    173172               zqld =  tmask(ji,jj,1) * rdt_ice *  & 
    174                   &    (   zqsr(ji,jj) * fraqsr_1lev(ji,jj) + zqns(ji,jj)               &   ! pfrld already included in coupled mode 
    175                   &    + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj)  *     &   ! heat content of precip 
     173                  &    (   zqsr(ji,jj) * frq_m(ji,jj) + zqns(ji,jj)                     &   ! pfrld already included in coupled mode 
     174                  &    + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj) *   &   ! heat content of precip 
    176175                  &      ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus )   & 
    177176                  &    + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) ) 
    178177            ELSE 
    179178               zqld =  tmask(ji,jj,1) * rdt_ice *  & 
    180                   &      ( pfrld(ji,jj) * ( zqsr(ji,jj) * fraqsr_1lev(ji,jj) + zqns(ji,jj) )    & 
    181                   &    + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj)  *             &  ! heat content of precip 
    182                   &      ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus )           & 
     179                  &      ( pfrld(ji,jj) * ( zqsr(ji,jj) * frq_m(ji,jj) + zqns(ji,jj) )   & 
     180                  &    + ( pfrld(ji,jj)**rn_betas - pfrld(ji,jj) ) * sprecip(ji,jj) *    &  ! heat content of precip 
     181                  &      ( cpic * ( MIN( tatm_ice(ji,jj), rt0_snow ) - rt0 ) - lfus )    & 
    183182                  &    + ( 1._wp - pfrld(ji,jj) ) * ( tprecip(ji,jj) - sprecip(ji,jj) ) * rcp * ( tatm_ice(ji,jj) - rt0 ) ) 
    184183            ENDIF 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r5299 r5352  
    135135                     CALL iom_rstput( kt, nitrst, numrow, 'rhd'    , rhd       ) 
    136136#endif 
    137                   IF( lk_lim3 .OR. ( nn_components == jp_iam_opa ) ) THEN 
    138                      CALL iom_rstput( kt, nitrst, numrow, 'fraqsr_1lev'  , fraqsr_1lev     ) !clem modif 
    139                   ENDIF 
    140137      IF( kt == nitrst ) THEN 
    141138         CALL iom_close( numrow )     ! close the restart file (only at last time step) 
     
    268265      ENDIF 
    269266      ! 
    270 !EM Idem 
    271 !EM      IF( lk_lim3 .OR. ( nn_components == jp_iam_opa ) ) THEN 
    272          CALL iom_get( numror, jpdom_autoglo, 'fraqsr_1lev' , fraqsr_1lev ) 
    273 !EM      ENDIF 
    274       ! 
    275267   END SUBROUTINE rst_read 
    276268 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r5220 r5352  
    136136   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ssh_m     !: mean (nn_fsbc time-step) sea surface height                [m] 
    137137   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e3t_m     !: mean (nn_fsbc time-step) sea surface layer thickness       [m] 
     138   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   frq_m     !: mean (nn_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level [-] 
    138139 
    139140   !! * Substitutions 
     
    169170         &      atm_co2(jpi,jpj) ,                                        & 
    170171#endif 
    171          &      ssu_m  (jpi,jpj) , sst_m(jpi,jpj) ,                       & 
    172          &      ssv_m  (jpi,jpj) , sss_m  (jpi,jpj), ssh_m(jpi,jpj) , STAT=ierr(4) ) 
     172         &      ssu_m  (jpi,jpj) , sst_m(jpi,jpj) , frq_m(jpi,jpj) ,      & 
     173         &      ssv_m  (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) ) 
    173174         ! 
    174175#if defined key_vvl 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5343 r5352  
    3333   USE cpl_oasis3      ! OASIS3 coupling 
    3434   USE geo2ocean       !  
    35    USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, tsb, sshb, fraqsr_1lev 
     35   USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, tsb, sshb 
    3636   USE albedo          ! 
    3737   USE in_out_manager  ! I/O manager 
     
    10271027      !                                                      !  fraction of solar net radiation ! 
    10281028      !                                                      ! ================================ ! 
    1029       IF( srcv(jpr_fraqsr)%laction ) THEN                      ! received by sas in case of opa <-> sas coupling 
    1030          fraqsr_1lev(:,:) = frcv(jpr_fraqsr)%z3(:,:,1) 
     1029      IF( srcv(jpr_fraqsr)%laction ) THEN                    ! received by sas in case of opa <-> sas coupling 
     1030         frq_m(:,:) = frcv(jpr_fraqsr)%z3(:,:,1) 
    10311031      ENDIF 
    10321032       
     
    18801880         ELSE                    ;   ztmp1(:,:) = sshn(:,:) 
    18811881         ENDIF 
    1882          CALL cpl_snd( jps_ssh, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1882         CALL cpl_snd( jps_ssh   , isec, RESHAPE ( ztmp1            , (/jpi,jpj,1/) ), info ) 
    18831883 
    18841884      ENDIF 
    18851885      !                                                        ! SSS 
    18861886      IF( ssnd(jps_soce  )%laction )  THEN 
    1887          ztmp1(:,:) =  tsn(:,:,1,jp_sal) 
    1888          CALL cpl_snd( jps_soce ,  isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1887         CALL cpl_snd( jps_soce  , isec, RESHAPE ( tsn(:,:,1,jp_sal), (/jpi,jpj,1/) ), info ) 
    18891888      ENDIF 
    18901889      !                                                        ! first T level thickness  
    18911890      IF( ssnd(jps_e3t1st )%laction )  THEN 
    1892          ztmp1(:,:) =  fse3t_n(:,:,1) 
    1893          CALL cpl_snd( jps_e3t1st,  isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1891         CALL cpl_snd( jps_e3t1st, isec, RESHAPE ( fse3t_n(:,:,1)   , (/jpi,jpj,1/) ), info ) 
    18941892      ENDIF 
    18951893      !                                                        ! Qsr fraction 
    18961894      IF( ssnd(jps_fraqsr)%laction )  THEN 
    1897          ztmp1(:,:) =  fraqsr_1lev(:,:)  
    1898          CALL cpl_snd( jps_fraqsr, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     1895         CALL cpl_snd( jps_fraqsr, isec, RESHAPE ( frq_m            , (/jpi,jpj,1/) ), info ) 
    18991896      ENDIF 
    19001897      ! 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90

    r5343 r5352  
    1717   USE sbcapr          ! surface boundary condition: atmospheric pressure 
    1818   USE eosbn2          ! equation of state and related derivatives 
     19   USE traqsr, ONLY: ln_qsr_ice,fraqsr_1lev 
    1920   ! 
    2021   USE in_out_manager  ! I/O manager 
     
    5960      REAL(wp), DIMENSION(jpi,jpj,jpts) :: zts 
    6061      !!--------------------------------------------------------------------- 
    61        
     62 
    6263      !                                        !* surface T-, U-, V- ocean level variables (T, S, depth, velocity) 
    6364      DO jj = 1, jpj 
     
    8182         ENDIF 
    8283         ! 
    83          IF( lk_vvl )   fse3t_m(:,:) = fse3t_n(:,:,1) 
     84         IF( lk_vvl     )   e3t_m(:,:) = fse3t_n(:,:,1) 
     85         ! 
     86         IF( ln_qsr_ice )   frq_m(:,:) = fraqsr_1lev(:,:) 
    8487         ! 
    8588      ELSE 
     
    101104            ENDIF 
    102105            ! 
    103             IF( lk_vvl )   fse3t_m(:,:) = zcoef * fse3t_n(:,:,1) 
     106            IF( lk_vvl     )   e3t_m(:,:) = zcoef * fse3t_n(:,:,1) 
     107            ! 
     108            IF( ln_qsr_ice )   frq_m(:,:) = zcoef * fraqsr_1lev(:,:) 
    104109            !                                             ! ---------------------------------------- ! 
    105110         ELSEIF( MOD( kt - 2 , nn_fsbc ) == 0 ) THEN      !   Initialisation: New mean computation   ! 
     
    110115            sss_m(:,:) = 0.e0 
    111116            ssh_m(:,:) = 0.e0 
    112             IF( lk_vvl )   fse3t_m(:,:) = 0.e0 
     117            IF( lk_vvl     )   e3t_m(:,:) = 0.e0 
     118            IF( ln_qsr_ice )   frq_m(:,:) = 0.e0 
    113119         ENDIF 
    114120         !                                                ! ---------------------------------------- ! 
     
    126132         ENDIF 
    127133         ! 
    128          IF( lk_vvl )   fse3t_m(:,:) = fse3t_m(:,:) + fse3t_n(:,:,1) 
     134         IF( lk_vvl     )   e3t_m(:,:) = fse3t_m(:,:) + fse3t_n(:,:,1) 
     135         ! 
     136         IF( ln_qsr_ice )   frq_m(:,:) =   frq_m(:,:) + fraqsr_1lev(:,:) 
    129137 
    130138         !                                                ! ---------------------------------------- ! 
     
    137145            ssv_m(:,:) = ssv_m(:,:) * zcoef           ! 
    138146            ssh_m(:,:) = ssh_m(:,:) * zcoef           ! mean SSH             [m] 
    139             IF( lk_vvl )   fse3t_m(:,:) = fse3t_m(:,:) * zcoef   ! mean vertical scale factor [m] 
     147            IF( lk_vvl     )   e3t_m(:,:) = fse3t_m(:,:) * zcoef   ! mean vertical scale factor [m] 
     148            IF( ln_qsr_ice )   frq_m(:,:) =   frq_m(:,:) * zcoef   ! mean fraction of solar net radiation absorbed in the 1st T level [-] 
    140149            ! 
    141150         ENDIF 
     
    154163            CALL iom_rstput( kt, nitrst, numrow, 'sss_m'  , sss_m  ) 
    155164            CALL iom_rstput( kt, nitrst, numrow, 'ssh_m'  , ssh_m  ) 
    156             IF( lk_vvl ) THEN 
    157                CALL iom_rstput( kt, nitrst, numrow, 'fse3t_m'  , fse3t_m(:,:)  ) 
    158             END IF 
     165            IF( lk_vvl     )   CALL iom_rstput( kt, nitrst, numrow, 'e3t_m'  , e3t_m  ) 
     166            IF( ln_qsr_ice )   CALL iom_rstput( kt, nitrst, numrow, 'frq_m'  , frq_m  ) 
    159167            ! 
    160168         ENDIF 
     
    168176         CALL iom_put( 'sss_m', sss_m ) 
    169177         CALL iom_put( 'ssh_m', ssh_m ) 
    170          IF( lk_vvl )   CALL iom_put( 'e3t_m', fse3t_m(:,:) ) 
     178         IF( lk_vvl     )   CALL iom_put( 'e3t_m', e3t_m ) 
     179         IF( ln_qsr_ice )   CALL iom_put( 'frq_m', frq_m ) 
    171180      ENDIF 
    172181      ! 
     
    204213            CALL iom_get( numror, jpdom_autoglo, 'sss_m'  , sss_m  )   !   "         "    salinity    (T-point) 
    205214            CALL iom_get( numror, jpdom_autoglo, 'ssh_m'  , ssh_m  )   !   "         "    height      (T-point) 
    206             IF( lk_vvl ) CALL iom_get( numror, jpdom_autoglo, 'fse3t_m', fse3t_m(:,:) ) 
     215            IF( lk_vvl ) CALL iom_get( numror, jpdom_autoglo, 'e3t_m', e3t_m ) 
     216            ! fraction of solar net radiation absorbed in 1st T level 
     217            IF( iom_varid( numror, 'frq_m', ldstop = .FALSE. ) > 0 ) THEN 
     218               CALL iom_get( numror, jpdom_autoglo, 'frq_m'  , frq_m  ) 
     219            ELSE 
     220               frq_m(:,:) = 1._wp   ! default definition 
     221            ENDIF 
    207222            ! 
    208223            IF( zf_sbc /= REAL( nn_fsbc, wp ) ) THEN      ! nn_fsbc has changed between 2 runs 
     
    215230               sss_m(:,:) = zcoef * sss_m(:,:) 
    216231               ssh_m(:,:) = zcoef * ssh_m(:,:) 
    217                IF( lk_vvl ) fse3t_m(:,:) = zcoef * fse3t_m(:,:) 
     232               IF( lk_vvl )   e3t_m(:,:) = zcoef * fse3t_m(:,:) 
     233               frq_m(:,:) = zcoef * frq_m(:,:)   ! bug: must not be done if ln_qsr_ice = .false.  
    218234            ELSE 
    219235               IF(lwp) WRITE(numout,*) '~~~~~~~   mean fields read in the ocean restart file' 
     
    232248         sss_m(:,:) = tsn(:,:,1,jp_sal) 
    233249         ssh_m(:,:) = sshn(:,:) 
    234          IF( lk_vvl )   fse3t_m(:,:) = fse3t_n(:,:,1) 
     250         IF( lk_vvl )   e3t_m(:,:) = fse3t_n(:,:,1) 
     251         frq_m(:,:) = 1._wp 
    235252         ! 
    236253      ENDIF 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r5299 r5352  
    3232   USE wrk_nemo       ! Memory Allocation 
    3333   USE timing         ! Timing 
    34    USE sbc_ice, ONLY : lk_lim3 
    3534 
    3635   IMPLICIT NONE 
     
    5049   REAL(wp), PUBLIC ::   rn_si0       !: very near surface depth of extinction      (RGB & 2 bands) 
    5150   REAL(wp), PUBLIC ::   rn_si1       !: deepest depth of extinction (water type I)       (2 bands) 
    52     
     51  
     52   !! Energy budget of the leads (open water embedded in sea ice) 
     53   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:)   ::   fraqsr_1lev   !: fraction of solar net radiation absorbed in the 1st T level [-] 
     54 
    5355   ! Module variables 
    5456   REAL(wp) ::   xsi0r                           !: inverse of rn_si0 
     
    165167         CALL iom_put( 'qsr3d', etot3 )   ! Shortwave Radiation 3D distribution 
    166168         ! clem: store attenuation coefficient of the first ocean level 
    167          IF ( lk_lim3 .AND. ln_qsr_ice ) THEN 
     169         IF ( ln_qsr_ice ) THEN 
    168170            DO jj = 1, jpj 
    169171               DO ji = 1, jpi 
    170172                  IF ( qsr(ji,jj) /= 0._wp ) THEN 
    171173                     fraqsr_1lev(ji,jj) = ( qsr_hc(ji,jj,1) / ( r1_rau0_rcp * qsr(ji,jj) ) ) 
     174                  ELSE 
     175                     fraqsr_1lev(ji,jj) = 1. 
    172176                  ENDIF 
    173177               END DO 
     
    380384      IF( nn_timing == 1 )  CALL timing_start('tra_qsr_init') 
    381385      ! 
    382       ! Default value for fraqsr_1lev 
    383       IF( .NOT. ln_rstart ) THEN 
    384          fraqsr_1lev(:,:) = 1._wp 
    385       ENDIF 
    386       ! 
    387386      CALL wrk_alloc( jpi, jpj,      zekb, zekg, zekr        )  
    388387      CALL wrk_alloc( jpi, jpj, jpk, ze0, ze1, ze2, ze3, zea )  
     
    412411         WRITE(numout,*) '      RGB & 2 bands: shortess depth of extinction  rn_si0 = ', rn_si0 
    413412         WRITE(numout,*) '      2 bands: longest depth of extinction         rn_si1 = ', rn_si1 
    414          WRITE(numout,*) '      light penetration for ice-model LIM3     ln_qsr_ice = ', ln_qsr_ice     
    415       ENDIF 
    416  
     413      ENDIF 
     414 
     415      ! allocate fraqsr_1lev if we have ln_qsr_ice 
     416      IF( ln_qsr_ice ) THEN 
     417         ALLOCATE( fraqsr_1lev(jpi,jpj) , STAT=ierror ) 
     418         IF( ierror > 0 ) THEN 
     419            CALL ctl_stop( 'tra_qsr_init: unable to allocate fraqsr_1lev array' )   ;   RETURN 
     420         ENDIF 
     421         fraqsr_1lev(:,:) = 1._wp   !  default definition used in the 1st time step as sbc_ssm is called before tra_qsr 
     422      ENDIF 
     423       
    417424      IF( ln_traqsr ) THEN     ! control consistency 
    418425         !                       
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/oce.F90

    r4990 r5352  
    6969   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   snwice_fmass       !: time evolution of mass of snow+ice               [Kg/m2/s] 
    7070 
    71    !! Energy budget of the leads (open water embedded in sea ice) 
    72    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fraqsr_1lev        !: fraction of solar net radiation absorbed in the first ocean level [-] 
    73  
    7471   !!---------------------------------------------------------------------- 
    7572   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     
    8380      !!                   ***  FUNCTION oce_alloc  *** 
    8481      !!---------------------------------------------------------------------- 
    85       INTEGER :: ierr(4) 
     82      INTEGER :: ierr(3) 
    8683      !!---------------------------------------------------------------------- 
    8784      ! 
     
    117114      ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), snwice_fmass(jpi,jpj) , STAT=ierr(3) ) 
    118115         ! 
    119       ALLOCATE( fraqsr_1lev(jpi,jpj) , STAT=ierr(4) ) 
    120          ! 
    121116      oce_alloc = MAXVAL( ierr ) 
    122117      IF( oce_alloc /= 0 )   CALL ctl_warn('oce_alloc: failed to allocate arrays') 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r5343 r5352  
    501501      USE oce       , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass  
    502502      ! 
    503       INTEGER :: ierr,ierr1,ierr2,ierr3,ierr4,ierr5,ierr6,ierr7 
     503      INTEGER :: ierr,ierr1,ierr2,ierr3,ierr4,ierr5,ierr6 
    504504      INTEGER :: jpm 
    505505      !!---------------------------------------------------------------------- 
     
    520520      ALLOCATE( tsb(jpi,jpj,1,jpm)  , STAT=ierr5 ) 
    521521      ALLOCATE( sshn(jpi,jpj)       , STAT=ierr6 ) 
    522       ALLOCATE( fraqsr_1lev(jpi,jpj), STAT=ierr7 ) 
    523  
    524       ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6 + ierr7 
     522 
     523      ierr = ierr + ierr1 + ierr2 + ierr3 + ierr4 + ierr5 + ierr6  
    525524      ! 
    526525      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90

    r5343 r5352  
    3636   PUBLIC   sbc_ssm        ! called by sbc 
    3737 
    38    CHARACTER(len=100)   ::   cn_dir      !: Root directory for location of ssm files 
    39    LOGICAL              ::   ln_3d_uve   !: specify whether input velocity data is 3D 
     38   CHARACTER(len=100)   ::   cn_dir        !: Root directory for location of ssm files 
     39   LOGICAL              ::   ln_3d_uve     !: specify whether input velocity data is 3D 
     40   LOGICAL              ::   ln_read_frq   !: specify whether we must read frq or not 
    4041   INTEGER     ::   nfld_3d 
    4142   INTEGER     ::   nfld_2d 
     
    4748   INTEGER     ::   jf_ssh         ! index of sea surface height 
    4849   INTEGER     ::   jf_e3t         ! index of first T level thickness 
     50   INTEGER     ::   jf_frq         ! index of fraction of qsr absorbed in the 1st T level 
    4951 
    5052   TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_ssm_3d  ! structure of input fields (file information, fields read) 
     
    9597      sss_m(:,:) = sf_ssm_2d(jf_sal)%fnow(:,:,1) * tmask(:,:,1)    ! salinity 
    9698      ssh_m(:,:) = sf_ssm_2d(jf_ssh)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height 
     99      IF( ln_read_frq )   frq_m(:,:) = sf_ssm_2d(jf_frq)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height 
    97100      ! 
    98101      tsn(:,:,1,jp_tem) = sst_m(:,:) 
     
    111114         CALL prt_ctl(tab2d_1=ssv_m, clinfo1=' ssv_m   - : ', mask1=vmask, ovlap=1   ) 
    112115         CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' ssh_m   - : ', mask1=tmask, ovlap=1   ) 
    113          IF( lk_vvl )   CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m   - : ', mask1=tmask, ovlap=1   ) 
     116         IF( lk_vvl      )   CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m   - : ', mask1=tmask, ovlap=1   ) 
     117         IF( ln_read_frq )   CALL prt_ctl(tab2d_1=frq_m, clinfo1=' frq_m   - : ', mask1=tmask, ovlap=1   ) 
    114118      ENDIF 
    115119      ! 
     
    138142      TYPE(FLD_N) :: sn_tem, sn_sal                     ! information about the fields to be read 
    139143      TYPE(FLD_N) :: sn_usp, sn_vsp 
    140       TYPE(FLD_N) :: sn_ssh, sn_e3t 
    141       ! 
    142       NAMELIST/namsbc_sas/cn_dir, ln_3d_uve, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t 
     144      TYPE(FLD_N) :: sn_ssh, sn_e3t, sn_frq 
     145      ! 
     146      NAMELIST/namsbc_sas/cn_dir, ln_3d_uve, ln_read_frq, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq 
    143147      !!---------------------------------------------------------------------- 
    144148       
     
    159163         WRITE(numout,*) '~~~~~~~~~~~ ' 
    160164         WRITE(numout,*) '   Namelist namsbc_sas' 
     165         WRITE(numout,*) '      Are we supplying a 3D u,v and e3 field                             ln_3d_uve   = ', ln_3d_uve 
     166         WRITE(numout,*) '      Are we reading frq (fraction of qsr absorbed in the 1st T level)   ln_read_frq = ', ln_read_frq 
    161167         WRITE(numout,*) 
    162168      ENDIF 
     
    199205      !! and the rest of the logic should still work 
    200206      ! 
    201       jf_tem = 1 ; jf_sal = 2 ; jf_ssh = 3 
     207      jf_tem = 1 ; jf_sal = 2 ; jf_ssh = 3 ; jf_frq = 4   ! default 2D fields index 
    202208      ! 
    203209      IF( ln_3d_uve ) THEN 
    204          jf_usp = 1 ; jf_vsp = 2 ; jf_e3t = 3 
    205          nfld_3d  = 2 + COUNT( (/lk_vvl/) ) 
    206          nfld_2d  = 3 
     210         jf_usp = 1 ; jf_vsp = 2 ; jf_e3t = 3      ! define 3D fields index 
     211         nfld_3d  = 2 + COUNT( (/lk_vvl/) )        ! number of 3D fields to read 
     212         nfld_2d  = 3 + COUNT( (/ln_read_frq/) )   ! number of 2D fields to read 
    207213      ELSE 
    208          jf_usp = 4 ; jf_vsp = 5 ; jf_e3t = 6 
    209          nfld_3d  = 0 
    210          nfld_2d  = 5 + COUNT( (/lk_vvl/) ) 
     214         jf_usp = 4 ; jf_vsp = 5 ; jf_e3t = 6 ; jf_frq = 6 + COUNT( (/lk_vvl/) )   ! update 2D fields index 
     215         nfld_3d  = 0                                                              ! no 3D fields to read 
     216         nfld_2d  = 5 + COUNT( (/lk_vvl/) ) + COUNT( (/ln_read_frq/) )             ! number of 2D fields to read 
    211217      ENDIF 
    212218 
     
    227233         ENDIF 
    228234         slf_2d(jf_tem) = sn_tem ; slf_2d(jf_sal) = sn_sal ; slf_2d(jf_ssh) = sn_ssh 
     235         IF( ln_read_frq )   slf_2d(jf_frq) = sn_frq 
    229236         IF( .NOT. ln_3d_uve ) THEN 
    230237            slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 
     
    271278      IF( nfld_2d > 0 ) DEALLOCATE( slf_2d, STAT=ierr ) 
    272279 
    273       call sbc_ssm( nit000 )   ! need to define ss?_m arrays used in limistate 
     280      CALL sbc_ssm( nit000 )   ! need to define ss?_m arrays used in limistate 
     281      IF( .NOT. ln_read_frq )   frq_m(:,:) = 1. 
    274282      ! 
    275283   END SUBROUTINE sbc_ssm_init 
Note: See TracChangeset for help on using the changeset viewer.