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 5381 for branches – NEMO

Changeset 5381 for branches


Ignore:
Timestamp:
2015-06-09T00:48:54+02:00 (9 years ago)
Author:
smasson
Message:

dev_r5218_CNRS17_coupling: continue...

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

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/field_def.xml

    r5352 r5381  
    192192         <field id="qsb_oce"      long_name="Sensible Downward Heat Flux over open ocean"                  unit="W/m2"     /> 
    193193         <field id="qla_oce"      long_name="Latent Downward Heat Flux over open ocean"                    unit="W/m2"     /> 
    194          <field id="qhc_oce"      long_name="Downward Heat Content of E-P over open ocean"                 unit="W/m2"     /> 
     194         <field id="qemp_oce"     long_name="Downward Heat Content of E-P over open ocean"                 unit="W/m2"     /> 
    195195         <field id="taum_oce"     long_name="wind stress module over open ocean"                           unit="N/m2"     /> 
    196196 
     
    241241         <field id="uice_ipa"     long_name="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />       
    242242         <field id="vice_ipa"     long_name="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />       
    243           
     243 
    244244         <field id="utau_ice"     long_name="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     /> 
    245245         <field id="vtau_ice"     long_name="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     /> 
     
    251251        
    252252         <field id="iceconc"      long_name="ice concentration"                                            unit="%"        /> 
    253          <field id="uice_ipa"     long_name="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      /> 
    254          <field id="vice_ipa"     long_name="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      /> 
    255253          <field id="isst"         long_name="sea surface temperature"                                      unit="degC"     /> 
    256254         <field id="isss"         long_name="sea surface salinity"                                         unit="psu"      />  
     
    262260         <field id="qns_ice"      long_name="non-solar heat flux at ice surface"                           unit="W/m2"     /> 
    263261         <field id="qtr_ice"      long_name="solar heat flux transmitted thru the ice"                     unit="W/m2"     /> 
     262         <field id="qemp_ice"     long_name="Downward Heat Content of E-P over ice"                        unit="W/m2"     /> 
    264263         <field id="utau_ice"     long_name="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     /> 
    265264         <field id="vtau_ice"     long_name="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     /> 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r5376 r5381  
    110110 
    111111      ! make calls for heat fluxes before it is modified 
    112 !!$      IF( iom_use('qsr_oce') )   CALL iom_put( "qsr_oce" , qsr_oce(:,:) * pfrld(:,:) )                                   !     solar flux at ocean surface 
    113 !!$      IF( iom_use('qns_oce') )   CALL iom_put( "qns_oce" , qns_oce(:,:) * pfrld(:,:) + qemp_oce(:,:) )                   ! non-solar flux at ocean surface 
     112      IF( iom_use('qsr_oce') )   CALL iom_put( "qsr_oce" , qsr_oce(:,:) * pfrld(:,:) )                                   !     solar flux at ocean surface 
     113      IF( iom_use('qns_oce') )   CALL iom_put( "qns_oce" , qns_oce(:,:) * pfrld(:,:) + qemp_oce(:,:) )                   ! non-solar flux at ocean surface 
    114114      IF( iom_use('qsr_ice') )   CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )                 !     solar flux at ice surface 
    115115      IF( iom_use('qns_ice') )   CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) ) ! non-solar flux at ice surface 
    116116      IF( iom_use('qtr_ice') )   CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )                 !     solar flux transmitted thru ice 
    117 !!$      IF( iom_use('qt_oce' ) )   CALL iom_put( "qt_oce"  , ( qsr_oce(:,:) + qns_oce(:,:) ) * pfrld(:,:) + qemp_oce(:,:) )   
     117      IF( iom_use('qt_oce' ) )   CALL iom_put( "qt_oce"  , ( qsr_oce(:,:) + qns_oce(:,:) ) * pfrld(:,:) + qemp_oce(:,:) )   
    118118      IF( iom_use('qt_ice' ) )   CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) )   & 
    119119         &                                                      * a_i_b(:,:,:), dim=3 ) + qemp_ice(:,:) ) 
     120      IF( iom_use('qemp_oce' ) )   CALL iom_put( "qemp_oce"  , qemp_oce(:,:) )   
     121      IF( iom_use('qemp_ice' ) )   CALL iom_put( "qemp_ice"  , qemp_ice(:,:) )   
    120122 
    121123      ! pfrld is the lead fraction at the previous time step (actually between TRP and THD) 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r5357 r5381  
    2424   USE trdmxl_oce      ! ocean active mixed layer tracers trends variables 
    2525   USE divcur          ! hor. divergence and curl      (div & cur routines) 
    26    USE sbc_ice, ONLY : lk_lim3 
    27    USE sbc_oce, ONLY : nn_components, jp_iam_opa 
    2826 
    2927   IMPLICIT NONE 
     
    121119                     CALL iom_rstput( kt, nitrst, numrow, 'hdivb'  , hdivb     ) 
    122120                     CALL iom_rstput( kt, nitrst, numrow, 'sshb'   , sshb      ) 
    123                      ! 
    124       IF( lk_lim3 .OR. ( nn_components == jp_iam_opa ) )  CALL iom_rstput( kt, nitrst, numrow, 'fse3t_b', fse3t_b(:,:,:) ) 
    125121                     ! 
    126122                     CALL iom_rstput( kt, nitrst, numrow, 'un'     , un        )     ! now fields 
     
    212208         CALL iom_get( numror, jpdom_autoglo, 'hdivb'  , hdivb   ) 
    213209         CALL iom_get( numror, jpdom_autoglo, 'sshb'   , sshb    ) 
    214 ! EM Attention Ceci doit etre reimplemente correctement 
    215          IF( lk_lim3 .OR. ( nn_components == jp_iam_opa ) )   CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) ) 
    216 !clem         CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) ) 
    217210      ELSE 
    218211         neuler = 0 
     
    257250         ENDIF 
    258251 
    259          IF( ( lk_lim3 .OR. ( nn_components == jp_iam_opa ) ) .AND. .NOT. lk_vvl ) THEN 
    260             DO jk = 1, jpk 
    261                fse3t_b(:,:,jk) = fse3t_n(:,:,jk) 
    262             END DO 
    263          ENDIF 
    264  
    265252      ENDIF 
    266253      ! 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90

    r5364 r5381  
    390390      ! NB: if sea-ice model, the snow precip are computed and the associated heat is added to qns (see blk_ice_clio) 
    391391 
    392       CALL iom_put( "qlw_oce",   zqlw )   ! output downward longwave  heat over the ocean 
    393       CALL iom_put( "qsb_oce", - zqsb )   ! output downward sensible  heat over the ocean 
    394       CALL iom_put( "qla_oce", - zqla )   ! output downward latent    heat over the ocean 
    395       CALL iom_put( "qns_oce",   qns  )   ! output downward non solar heat over the ocean 
     392      IF ( nn_ice == 0 ) THEN 
     393         CALL iom_put( "qlw_oce" ,   zqlw )                 ! output downward longwave  heat over the ocean 
     394         CALL iom_put( "qsb_oce" , - zqsb )                 ! output downward sensible  heat over the ocean 
     395         CALL iom_put( "qla_oce" , - zqla )                 ! output downward latent    heat over the ocean 
     396         CALL iom_put( "qemp_oce",   qns-zqlw+zqsb+zqla )   ! output downward heat content of E-P over the ocean 
     397         CALL iom_put( "qns_oce" ,   qns  )                 ! output downward non solar heat over the ocean 
     398         CALL iom_put( "qsr_oce" ,   qsr  )                 ! output downward solar heat over the ocean 
     399         CALL iom_put( "qt_oce"  ,   qns+qsr )              ! output total downward heat over the ocean 
     400      ENDIF 
    396401 
    397402      IF(ln_ctl) THEN 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r5376 r5381  
    400400#endif 
    401401      ! 
    402       CALL iom_put( "qlw_oce",   zqlw )                 ! output downward longwave heat over the ocean 
    403       CALL iom_put( "qsb_oce", - zqsb )                 ! output downward sensible heat over the ocean 
    404       CALL iom_put( "qla_oce", - zqla )                 ! output downward latent   heat over the ocean 
    405       CALL iom_put( "qhc_oce",   qns-zqlw+zqsb+zqla )   ! output downward heat content of E-P over the ocean 
    406       CALL iom_put( "qns_oce",   qns  )                 ! output downward non solar heat over the ocean 
    407       CALL iom_put( "qsr_oce",   qsr  )                 ! output downward solar heat over the ocean 
    408       CALL iom_put( "qt_oce" ,   qns+qsr )              ! output total downward heat over the ocean 
     402      IF ( nn_ice == 0 ) THEN 
     403         CALL iom_put( "qlw_oce" ,   zqlw )                 ! output downward longwave heat over the ocean 
     404         CALL iom_put( "qsb_oce" , - zqsb )                 ! output downward sensible heat over the ocean 
     405         CALL iom_put( "qla_oce" , - zqla )                 ! output downward latent   heat over the ocean 
     406         CALL iom_put( "qemp_oce",   qns-zqlw+zqsb+zqla )   ! output downward heat content of E-P over the ocean 
     407         CALL iom_put( "qns_oce" ,   qns  )                 ! output downward non solar heat over the ocean 
     408         CALL iom_put( "qsr_oce" ,   qsr  )                 ! output downward solar heat over the ocean 
     409         CALL iom_put( "qt_oce"  ,   qns+qsr )              ! output total downward heat over the ocean 
     410      ENDIF 
    409411      ! 
    410412      IF(ln_ctl) THEN 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5376 r5381  
    4343   USE eosbn2 
    4444   USE traqsr   , ONLY : fraqsr_1lev 
     45   USE sbcrnf   , ONLY : l_rnfcpl, ln_rnf_emp 
    4546#if defined key_cpl_carbon_cycle 
    4647   USE p4zflx, ONLY : oce_co2 
     
    401402      !                                                      ! ------------------------- ! 
    402403      srcv(jpr_rnf   )%clname = 'O_Runoff'   ;   IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' )   srcv(jpr_rnf)%laction = .TRUE. 
    403 ! This isn't right - really just want ln_rnf_emp changed 
    404 !                                                 IF( TRIM( sn_rcv_rnf%cldes ) == 'climato' )   THEN   ;   ln_rnf = .TRUE. 
    405 !                                                 ELSE                                                 ;   ln_rnf = .FALSE. 
    406 !                                                 ENDIF 
     404      l_rnfcpl = srcv(jpr_rnf)%laction 
     405      ! 
    407406      srcv(jpr_cal   )%clname = 'OCalving'   ;   IF( TRIM( sn_rcv_cal%cldes ) == 'coupled' )   srcv(jpr_cal)%laction = .TRUE. 
    408407 
     
    536535         ! Vectors: change of sign at north fold ONLY if on the local grid 
    537536         srcv(jpr_ocx1:jpr_ocy1)%nsgn = -1. 
    538          ! Change first letter to couple with atmosphere if already coupled with sea_ice 
     537         ! Change first letter to couple with atmosphere if already coupled OPA 
     538         ! this is nedeed as each variable name used in the namcouple must be unique: 
     539         ! for example O_Runoff received by OPA from SAS and therefore O_Runoff received by SAS from the Atmosphere 
    539540         DO jn = 1, jprcv 
    540541            IF ( srcv(jn)%clname(1:1) == "O" ) srcv(jn)%clname = "S"//srcv(jn)%clname(2:LEN(srcv(jn)%clname)) 
     
    777778      xcplmask(:,:,0) = 1. - SUM( xcplmask(:,:,1:nn_cplmodel), dim = 3 ) 
    778779      ! 
    779       IF( ln_dm2dc .AND. & 
     780      IF( ln_dm2dc .AND. ln_cpl .AND. & 
    780781         &   ( cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'S_QsrOce' ) + cpl_freq( 'S_QsrMix' ) ) /= 86400 )   & 
    781782         &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 
     
    10661067         ! 
    10671068         !                                                        ! runoffs and calving (added in emp) 
    1068          IF( srcv(jpr_rnf)%laction )   zemp(:,:) = zemp(:,:) - frcv(jpr_rnf)%z3(:,:,1) 
    1069          IF( srcv(jpr_cal)%laction )   zemp(:,:) = zemp(:,:) - frcv(jpr_cal)%z3(:,:,1) 
     1069         IF( srcv(jpr_rnf)%laction ) THEN 
     1070            IF( ln_rnf_emp ) THEN 
     1071               zemp(:,:) = zemp(:,:) - frcv(jpr_rnf)%z3(:,:,1) 
     1072               CALL iom_put( 'runoffs', zemp(:,:) )   ! rivers 
     1073            ELSE 
     1074               rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 
     1075            ENDIF 
     1076         ENDIF 
     1077         IF( srcv(jpr_cal)%laction )     zemp(:,:) = zemp(:,:) - frcv(jpr_cal)%z3(:,:,1) 
    10701078          
    10711079         IF( ln_mixcpl ) THEN   ;   emp(:,:) = emp(:,:) * xcplmask(:,:,0) + zemp(:,:) * zmsk(:,:) 
     
    10941102         ELSE                                       ;   zqsr(:,:) = 0._wp 
    10951103         ENDIF 
    1096          IF( ln_dm2dc .AND. nn_components /= jp_iam_opa )   zqsr(:,:) = sbc_dcy( zqsr )   ! modify qsr to include the diurnal cycle 
     1104         IF( ln_dm2dc .AND. ln_cpl )   zqsr(:,:) = sbc_dcy( zqsr )   ! modify qsr to include the diurnal cycle 
    10971105         IF( ln_mixcpl ) THEN   ;   qsr(:,:) = qsr(:,:) * xcplmask(:,:,0) + zqsr(:,:) * zmsk(:,:) 
    10981106         ELSE                   ;   qsr(:,:) =                              zqsr(:,:) 
     
    14221430      !                                                           ! runoffs and calving (put in emp_tot) 
    14231431      IF( srcv(jpr_rnf)%laction ) THEN  
    1424          zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_rnf)%z3(:,:,1) 
    1425             CALL iom_put( 'runoffs'      , frcv(jpr_rnf)%z3(:,:,1)              )   ! rivers 
    1426          IF( iom_use('hflx_rnf_cea') )   & 
    1427             CALL iom_put( 'hflx_rnf_cea' , frcv(jpr_rnf)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from rivers 
     1432         IF( ln_rnf_emp ) THEN 
     1433            zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_rnf)%z3(:,:,1) 
     1434                                            CALL iom_put( 'runoffs'      , frcv(jpr_rnf)%z3(:,:,1)              )   ! rivers 
     1435            IF( iom_use('hflx_rnf_cea') )   CALL iom_put( 'hflx_rnf_cea' , frcv(jpr_rnf)%z3(:,:,1) * zcptn(:,:) )   ! river heat flx 
     1436         ELSE 
     1437            rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 
     1438         ENDIF 
    14281439      ENDIF 
    14291440      IF( srcv(jpr_cal)%laction ) THEN  
     
    15461557         ENDDO 
    15471558         qprec_ice(:,:) = qprec_ice(:,:) * xcplmask(:,:,0) + zqprec_ice(:,:)* zmsk(:,:) 
    1548          qemp_oce(:,:) = qemp_oce(:,:) * xcplmask(:,:,0) + zqemp_oce(:,:)* zmsk(:,:) 
     1559         qemp_oce (:,:) =  qemp_oce(:,:) * xcplmask(:,:,0) + zqemp_oce(:,:)* zmsk(:,:) 
    15491560!!clem         evap_ice(:,:) = evap_ice(:,:) * xcplmask(:,:,0) 
    15501561      ELSE 
     
    15601571#else 
    15611572 
    1562       ! clem: this formulation is certainly wrong. 
     1573      ! clem: this formulation is certainly wrong... but better than it was... 
    15631574      zqns_tot(:,:) = zqns_tot(:,:)                       &            ! zqns_tot update over free ocean with: 
    15641575         &          - ztmp(:,:)                           &            ! remove the latent heat flux of solid precip. melting 
     
    16191630            &                     + palbi         (:,:,1) * zicefr(:,:) ) ) 
    16201631      END SELECT 
    1621       IF( ln_dm2dc ) THEN   ! modify qsr to include the diurnal cycle 
     1632      IF( ln_dm2dc .AND. ln_cpl ) THEN   ! modify qsr to include the diurnal cycle 
    16221633         zqsr_tot(:,:  ) = sbc_dcy( zqsr_tot(:,:  ) ) 
    16231634         DO jl=1,jpl 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r5376 r5381  
    225225      IF( ln_dm2dc )   nday_qsr = -1   ! initialisation flag 
    226226 
    227       IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) )   & 
     227      IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) .AND. nn_components /= jp_iam_opa )   & 
    228228         &   CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' ) 
    229229       
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r4990 r5381  
    5151   REAL(wp)          , PUBLIC ::   rn_rfact        !: multiplicative factor for runoff 
    5252 
     53   LOGICAL           , PUBLIC ::   l_rnfcpl = .false.       ! runoffs recieved from oasis 
     54 
    5355   INTEGER , PUBLIC  ::   nkrnf = 0         !: nb of levels over which Kz is increased at river mouths 
    5456   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   rnfmsk              !: river mouth mask (hori.) 
     
    120122         !                                                !-------------------! 
    121123         ! 
    122                              CALL fld_read ( kt, nn_fsbc, sf_rnf   )    ! Read Runoffs data and provide it at kt 
    123          IF( ln_rnf_tem  )   CALL fld_read ( kt, nn_fsbc, sf_t_rnf )    ! idem for runoffs temperature if required 
    124          IF( ln_rnf_sal  )   CALL fld_read ( kt, nn_fsbc, sf_s_rnf )    ! idem for runoffs salinity    if required 
     124         IF( .NOT. l_rnfcpl )   CALL fld_read ( kt, nn_fsbc, sf_rnf   )    ! Read Runoffs data and provide it at kt 
     125         IF(   ln_rnf_tem   )   CALL fld_read ( kt, nn_fsbc, sf_t_rnf )    ! idem for runoffs temperature if required 
     126         IF(   ln_rnf_sal   )   CALL fld_read ( kt, nn_fsbc, sf_s_rnf )    ! idem for runoffs salinity    if required 
    125127         ! 
    126128         ! Runoff reduction only associated to the ORCA2_LIM configuration 
    127129         ! when reading the NetCDF file runoff_1m_nomask.nc 
    128          IF( cp_cfg == 'orca' .AND. jp_cfg == 2 )   THEN 
     130         IF( cp_cfg == 'orca' .AND. jp_cfg == 2 .AND. .NOT. l_rnfcpl )   THEN 
    129131            WHERE( 40._wp < gphit(:,:) .AND. gphit(:,:) < 65._wp ) 
    130132               sf_rnf(1)%fnow(:,:,1) = 0.85 * sf_rnf(1)%fnow(:,:,1) 
     
    134136         IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    135137            ! 
    136             rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )       ! updated runoff value at time step kt 
     138            IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )       ! updated runoff value at time step kt 
    137139            ! 
    138140            !                                                     ! set temperature & salinity content of runoffs 
     
    152154            IF( ln_rnf_sal )   rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
    153155            !                                                           ! else use S=0 for runoffs (done one for all in the init) 
    154             IF ( ANY( rnf(:,:) < 0._wp ) ) z_err=1 
    155             IF(lk_mpp) CALL mpp_sum(z_err) 
    156             IF( z_err > 0 ) CALL ctl_stop( 'sbc_rnf : negative runnoff values exist' ) 
    157             ! 
    158156            CALL iom_put( "runoffs", rnf )         ! output runoffs arrays 
    159157         ENDIF 
     
    161159      ENDIF 
    162160      ! 
     161      !                                                ! ---------------------------------------- ! 
    163162      IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    ! 
    164163         !                                             ! ---------------------------------------- ! 
     
    290289      ENDIF 
    291290      ! 
     291      IF( ln_rnf_emp .AND. nn_components == jp_iam_opa ) THEN 
     292         CALL ctl_stop( 'sbc_rnf_init: ln_rnf_emp must be false in case of SAS-OPA coupling' )   ;   RETURN 
     293      ENDIF 
    292294      !                                   ! ================== 
    293295      !                                   !   Type of runoff 
     
    306308      ELSE                                      !==  runoffs read in a file : set sf_rnf structure  ==! 
    307309         ! 
    308          ALLOCATE( sf_rnf(1), STAT=ierror )         ! Create sf_rnf structure (runoff inflow) 
    309          IF(lwp) WRITE(numout,*) 
    310          IF(lwp) WRITE(numout,*) '          runoffs inflow read in a file' 
    311          IF( ierror > 0 ) THEN 
    312             CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
    313          ENDIF 
    314          ALLOCATE( sf_rnf(1)%fnow(jpi,jpj,1)   ) 
    315          IF( sn_rnf%ln_tint ) ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) ) 
    316          !                                          ! fill sf_rnf with the namelist (sn_rnf) and control print 
    317          CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf' ) 
     310         IF( .NOT. l_rnfcpl ) THEN                     
     311            ALLOCATE( sf_rnf(1), STAT=ierror )      ! Create (if required) sf_rnf structure (runoff inflow) 
     312            IF(lwp) WRITE(numout,*) 
     313            IF(lwp) WRITE(numout,*) '          runoffs inflow read in a file' 
     314            IF( ierror > 0 ) THEN 
     315               CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
     316            ENDIF 
     317            ALLOCATE( sf_rnf(1)%fnow(jpi,jpj,1)   ) 
     318            IF( sn_rnf%ln_tint ) ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) ) 
     319            CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf' ) 
     320         ENDIF 
    318321         ! 
    319322         IF( ln_rnf_tem ) THEN                      ! Create (if required) sf_t_rnf structure 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90

    r5376 r5381  
    180180         WRITE(numout,*) 
    181181      ENDIF 
    182  
    183       IF( nn_components /= jp_iam_sas ) THEN  
    184          ! 
    185          !! switch off stuff that isn't sensible with a standalone module 
    186          !! note that we need sbc_ssm called first in sbc 
    187          ! 
    188          IF( ln_apr_dyn ) THEN 
    189             IF( lwp ) WRITE(numout,*) 'No atmospheric gradient needed with StandAlone Surface scheme' 
    190             ln_apr_dyn = .FALSE. 
    191          ENDIF 
    192          IF( ln_dm2dc ) THEN 
    193             IF( lwp ) WRITE(numout,*) 'No diurnal cycle needed with StandAlone Surface scheme' 
    194             ln_dm2dc = .FALSE. 
    195          ENDIF 
    196          IF( ln_rnf ) THEN 
    197             IF( lwp ) WRITE(numout,*) 'No runoff needed with StandAlone Surface scheme' 
    198             ln_rnf = .FALSE. 
    199          ENDIF 
    200          IF( ln_ssr ) THEN 
    201             IF( lwp ) WRITE(numout,*) 'No surface relaxation needed with StandAlone Surface scheme' 
    202             ln_ssr = .FALSE. 
    203          ENDIF 
    204          IF( nn_fwb > 0 ) THEN 
    205             IF( lwp ) WRITE(numout,*) 'No freshwater budget adjustment needed with StandAlone Surface scheme' 
    206             nn_fwb = 0 
    207          ENDIF 
    208          IF( nn_closea > 0 ) THEN 
    209             IF( lwp ) WRITE(numout,*) 'No closed seas adjustment needed with StandAlone Surface scheme' 
    210             nn_closea = 0 
    211          ENDIF 
    212           
     182      ! 
     183      !! switch off stuff that isn't sensible with a standalone module 
     184      !! note that we need sbc_ssm called first in sbc 
     185      ! 
     186      IF( ln_apr_dyn ) THEN 
     187         IF( lwp ) WRITE(numout,*) 'No atmospheric gradient needed with StandAlone Surface scheme' 
     188         ln_apr_dyn = .FALSE. 
     189      ENDIF 
     190      IF( ln_rnf ) THEN 
     191         IF( lwp ) WRITE(numout,*) 'No runoff needed with StandAlone Surface scheme' 
     192         ln_rnf = .FALSE. 
     193      ENDIF 
     194      IF( ln_ssr ) THEN 
     195         IF( lwp ) WRITE(numout,*) 'No surface relaxation needed with StandAlone Surface scheme' 
     196         ln_ssr = .FALSE. 
     197      ENDIF 
     198      IF( nn_fwb > 0 ) THEN 
     199         IF( lwp ) WRITE(numout,*) 'No freshwater budget adjustment needed with StandAlone Surface scheme' 
     200         nn_fwb = 0 
     201      ENDIF 
     202      IF( nn_closea > 0 ) THEN 
     203         IF( lwp ) WRITE(numout,*) 'No closed seas adjustment needed with StandAlone Surface scheme' 
     204         nn_closea = 0 
    213205      ENDIF 
    214206      !  
Note: See TracChangeset for help on using the changeset viewer.