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 5403 – NEMO

Changeset 5403


Ignore:
Timestamp:
2015-06-10T22:06:39+02:00 (9 years ago)
Author:
smasson
Message:

dev_r5218_CNRS17_coupling: sette ok

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

Legend:

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

    r4865 r5403  
    2929#  - fcm variables are starting with a % (and not a $) 
    3030# 
    31 %NCDF_HOME           /usr/local/netcdf-4.2_hdf5_parallel 
    32 %HDF5_HOME           /usr/local/hdf5-1.8.9_parallel 
    33 %XIOS_HOME           $WORKDIR/now/models/xios 
     31%NCDF_HOME            /usr/local/netcdf-4.3.3.1_hdf5_parallel 
     32%HDF5_HOME           /usr/local/hdf5-1.8.12_parallel 
     33%XIOS_HOME           $WORKDIR/xios-1.0 
    3434%OASIS_HOME          $WORKDIR/now/models/oa3mct 
    3535 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml

    r5382 r5403  
    7373   <file id="file5" name_suffix="_grid_W" description="ocean W grid variables" > 
    7474     <field field_ref="e3w"                        /> 
    75      <field field_ref="woce"         name="wo"      operation="instant" freq_op="5d" > @woce_e3w / @e3w </field> 
     75     <field field_ref="woce"         name="wo"     /> 
    7676     <field field_ref="avt"          name="difvho" /> 
    7777   </file> 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/iodef.xml

    r5382 r5403  
    102102   <file id="file5" name_suffix="_grid_W" description="ocean W grid variables" > 
    103103     <field field_ref="e3w" /> 
    104      <field field_ref="woce"         name="wo"       operation="instant" freq_op="5d" > @woce_e3w / @e3w </field> 
     104     <field field_ref="woce"         name="wo"       /> 
    105105     <field field_ref="avt"          name="difvho"   /> 
    106106     <field field_ref="w_masstr"     name="vovematr" /> 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/field_def.xml

    r5382 r5403  
    430430        <field id="e3w"          long_name="W-cell thickness"                     standard_name="cell_thickness"              unit="m"    /> 
    431431        <field id="woce"         long_name="ocean vertical velocity"              standard_name="upward_sea_water_velocity"   unit="m/s"  /> 
    432         <field id="woce_e3w"     long_name="ocean vertical velocity * e3v"                                                    unit="m2/s"  > woce * e3w </field> 
    433432        <field id="wocetr_eff"   long_name="effective ocean vertical transport"                                               unit="m3/s" /> 
    434433 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/namelist_ref

    r5382 r5403  
    393393 
    394394   ln_3d_uve   = .true.    !  specify whether we are supplying a 3D u,v and e3 field 
    395    ln_read_frq = .true.    !  specify whether we must read frq or not 
     395   ln_read_frq = .false.    !  specify whether we must read frq or not 
    396396   cn_dir      = './'      !  root directory for the location of the bulk files are 
    397397/ 
     
    426426 
    427427   cn_dir       = './'      !  root directory for the location of the runoff files 
    428    ln_rnf_emp   = .false.   !  runoffs included into precipitation field (T) or into a file (F) 
    429428   ln_rnf_mouth = .true.    !  specific treatment at rivers mouths 
    430429   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90

    r5215 r5403  
    152152      !!---------------------------------------------------------------------- 
    153153      cltxt = '' 
     154      cxios_context = 'nemo' 
    154155      ! 
    155156      !                             ! Open reference namelist and configuration namelist files 
     
    182183#if defined key_iomput 
    183184      CALL  xios_initialize( "nemo",return_comm=ilocal_comm ) 
    184       narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
     185      narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
    185186#else 
    186187      ilocal_comm = 0 
    187       narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt) 
     188      narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt) 
    188189#endif 
    189190 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90

    r5220 r5403  
    171171      ENDIF 
    172172      ENDIF 
    173       narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
     173      narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
    174174#else 
    175175      IF( lk_oasis ) THEN 
     
    177177            CALL cpl_init( ilocal_comm )                               ! nemo local communicator given by oasis 
    178178         ENDIF 
    179          narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt) 
     179         narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt) 
    180180      ELSE 
    181181         ilocal_comm = 0 
    182          narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt) 
     182         narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt) 
    183183      ENDIF 
    184184#endif 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5382 r5403  
    3333   USE cpl_oasis3      ! OASIS3 coupling 
    3434   USE geo2ocean       !  
    35    USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, sshb 
     35   USE oce   , ONLY : tsn, un, vn, sshn, ub, vb, sshb, fraqsr_1lev 
    3636   USE albedo          ! 
    3737   USE in_out_manager  ! I/O manager 
     
    4242   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    4343   USE eosbn2 
    44    USE traqsr   , ONLY : fraqsr_1lev 
    45    USE sbcrnf   , ONLY : l_rnfcpl, ln_rnf_emp 
     44   USE sbcrnf   , ONLY : l_rnfcpl 
    4645#if defined key_cpl_carbon_cycle 
    4746   USE p4zflx, ONLY : oce_co2 
     
    401400      !                                                      !     Runoffs & Calving     !    
    402401      !                                                      ! ------------------------- ! 
    403       srcv(jpr_rnf   )%clname = 'O_Runoff'   ;   IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' )   srcv(jpr_rnf)%laction = .TRUE. 
    404       l_rnfcpl = srcv(jpr_rnf)%laction 
     402      srcv(jpr_rnf   )%clname = 'O_Runoff' 
     403      IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN 
     404         srcv(jpr_rnf)%laction = .TRUE. 
     405         l_rnfcpl              = .TRUE.                      ! -> no need to read runoffs in sbcrnf 
     406         ln_rnf                = .TRUE.                      ! -> force to go through sbcrnf 
     407         IF(lwp) WRITE(numout,*) 
     408         IF(lwp) WRITE(numout,*) '   runoffs received from oasis -> force ln_rnf = .TRUE.' 
     409      ENDIF 
    405410      ! 
    406411      srcv(jpr_cal   )%clname = 'OCalving'   ;   IF( TRIM( sn_rcv_cal%cldes ) == 'coupled' )   srcv(jpr_cal)%laction = .TRUE. 
     
    10671072         ! 
    10681073         !                                                        ! runoffs and calving (added in emp) 
    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 
     1074         IF( srcv(jpr_rnf)%laction )     rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 
    10771075         IF( srcv(jpr_cal)%laction )     zemp(:,:) = zemp(:,:) - frcv(jpr_cal)%z3(:,:,1) 
    10781076          
     
    14291427      !    
    14301428      !                                                           ! runoffs and calving (put in emp_tot) 
    1431       IF( srcv(jpr_rnf)%laction ) THEN  
    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 
    1439       ENDIF 
     1429      IF( srcv(jpr_rnf)%laction )   rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 
    14401430      IF( srcv(jpr_cal)%laction ) THEN  
    14411431         zemp_tot(:,:) = zemp_tot(:,:) - frcv(jpr_cal)%z3(:,:,1) 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r5381 r5403  
    3232 
    3333   PUBLIC   sbc_rnf       ! routine call in sbcmod module 
    34    PUBLIC   sbc_rnf_div   ! routine called in sshwzv module 
     34   PUBLIC   sbc_rnf_div   ! routine called in divcurl module 
    3535   PUBLIC   sbc_rnf_alloc ! routine call in sbcmod module 
    3636   PUBLIC   sbc_rnf_init  ! (PUBLIC for TAM) 
     
    4040   LOGICAL           , PUBLIC ::   ln_rnf_tem      !: temperature river runoffs attribute specified in a file 
    4141   LOGICAL           , PUBLIC ::   ln_rnf_sal      !: salinity    river runoffs attribute specified in a file 
    42    LOGICAL           , PUBLIC ::   ln_rnf_emp      !: runoffs into a file to be read or already into precipitation 
    4342   TYPE(FLD_N)       , PUBLIC ::   sn_rnf          !: information about the runoff file to be read 
    4443   TYPE(FLD_N)       , PUBLIC ::   sn_cnf          !: information about the runoff mouth file to be read 
     
    118117      ENDIF 
    119118 
    120       !                                                   !-------------------! 
    121       IF( .NOT. ln_rnf_emp ) THEN                         !   Update runoff   ! 
    122          !                                                !-------------------! 
    123          ! 
    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 
    127          ! 
    128          ! Runoff reduction only associated to the ORCA2_LIM configuration 
    129          ! when reading the NetCDF file runoff_1m_nomask.nc 
    130          IF( cp_cfg == 'orca' .AND. jp_cfg == 2 .AND. .NOT. l_rnfcpl )   THEN 
    131             WHERE( 40._wp < gphit(:,:) .AND. gphit(:,:) < 65._wp ) 
    132                sf_rnf(1)%fnow(:,:,1) = 0.85 * sf_rnf(1)%fnow(:,:,1) 
     119      !                                            !-------------------! 
     120      !                                            !   Update runoff   ! 
     121      !                                            !-------------------! 
     122      ! 
     123      IF( .NOT. l_rnfcpl )   CALL fld_read ( kt, nn_fsbc, sf_rnf   )    ! Read Runoffs data and provide it at kt 
     124      IF(   ln_rnf_tem   )   CALL fld_read ( kt, nn_fsbc, sf_t_rnf )    ! idem for runoffs temperature if required 
     125      IF(   ln_rnf_sal   )   CALL fld_read ( kt, nn_fsbc, sf_s_rnf )    ! idem for runoffs salinity    if required 
     126      ! 
     127      ! Runoff reduction only associated to the ORCA2_LIM configuration 
     128      ! when reading the NetCDF file runoff_1m_nomask.nc 
     129      IF( cp_cfg == 'orca' .AND. jp_cfg == 2 .AND. .NOT. l_rnfcpl )   THEN 
     130         WHERE( 40._wp < gphit(:,:) .AND. gphit(:,:) < 65._wp ) 
     131            sf_rnf(1)%fnow(:,:,1) = 0.85 * sf_rnf(1)%fnow(:,:,1) 
     132         END WHERE 
     133      ENDIF 
     134      ! 
     135      IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
     136         ! 
     137         IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )       ! updated runoff value at time step kt 
     138         ! 
     139         !                                                     ! set temperature & salinity content of runoffs 
     140         IF( ln_rnf_tem ) THEN                                       ! use runoffs temperature data 
     141            rnf_tsc(:,:,jp_tem) = ( sf_t_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
     142            WHERE( sf_t_rnf(1)%fnow(:,:,1) == -999._wp )             ! if missing data value use SST as runoffs temperature 
     143               rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
    133144            END WHERE 
    134          ENDIF 
    135          ! 
    136          IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    137             ! 
    138             IF( .NOT. l_rnfcpl )   rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )       ! updated runoff value at time step kt 
    139             ! 
    140             !                                                     ! set temperature & salinity content of runoffs 
    141             IF( ln_rnf_tem ) THEN                                       ! use runoffs temperature data 
    142                rnf_tsc(:,:,jp_tem) = ( sf_t_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
    143                WHERE( sf_t_rnf(1)%fnow(:,:,1) == -999._wp )             ! if missing data value use SST as runoffs temperature 
    144                    rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
    145                END WHERE 
    146                WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp )             ! where fwf comes from melting of ice shelves or iceberg 
    147                    ztfrz(:,:) = -1.9 !tfreez( sss_m(:,:) ) !PM to be discuss (trouble if sensitivity study) 
    148                    rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * lfusisf * r1_rau0_rcp 
    149                END WHERE 
    150             ELSE                                                        ! use SST as runoffs temperature 
    151                rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
    152             ENDIF 
    153             !                                                           ! use runoffs salinity data 
    154             IF( ln_rnf_sal )   rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
    155             !                                                           ! else use S=0 for runoffs (done one for all in the init) 
    156             CALL iom_put( "runoffs", rnf )         ! output runoffs arrays 
    157          ENDIF 
    158          ! 
     145            WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp )             ! where fwf comes from melting of ice shelves or iceberg 
     146               ztfrz(:,:) = -1.9 !tfreez( sss_m(:,:) ) !PM to be discuss (trouble if sensitivity study) 
     147               rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * lfusisf * r1_rau0_rcp 
     148            END WHERE 
     149         ELSE                                                        ! use SST as runoffs temperature 
     150            rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
     151         ENDIF 
     152         !                                                           ! use runoffs salinity data 
     153         IF( ln_rnf_sal )   rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
     154         !                                                           ! else use S=0 for runoffs (done one for all in the init) 
     155         CALL iom_put( "runoffs", rnf )         ! output runoffs arrays 
    159156      ENDIF 
    160157      ! 
     
    170167         ELSE                                                   !* no restart: set from nit000 values 
    171168            IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields set to nit000' 
    172              rnf_b    (:,:  ) = rnf    (:,:  ) 
    173              rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 
     169            rnf_b    (:,:  ) = rnf    (:,:  ) 
     170            rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 
    174171         ENDIF 
    175172      ENDIF 
     
    185182         CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal) ) 
    186183      ENDIF 
     184      ! 
    187185      CALL wrk_dealloc( jpi,jpj, ztfrz) 
    188186      ! 
     
    258256      INTEGER           ::   ios           ! Local integer output status for namelist read 
    259257      ! 
    260       NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, ln_rnf_depth, ln_rnf_tem, ln_rnf_sal,   & 
     258      NAMELIST/namsbc_rnf/ cn_dir            , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal,   & 
    261259         &                 sn_rnf, sn_cnf    , sn_s_rnf    , sn_t_rnf  , sn_dep_rnf,   & 
    262260         &                 ln_rnf_mouth      , rn_hrnf     , rn_avt_rnf, rn_rfact 
     
    282280         WRITE(numout,*) '~~~~~~~ ' 
    283281         WRITE(numout,*) '   Namelist namsbc_rnf' 
    284          WRITE(numout,*) '      runoff in a file to be read                ln_rnf_emp   = ', ln_rnf_emp 
    285282         WRITE(numout,*) '      specific river mouths treatment            ln_rnf_mouth = ', ln_rnf_mouth 
    286283         WRITE(numout,*) '      river mouth additional Kz                  rn_avt_rnf   = ', rn_avt_rnf 
    287284         WRITE(numout,*) '      depth of river mouth additional mixing     rn_hrnf      = ', rn_hrnf 
    288285         WRITE(numout,*) '      multiplicative factor for runoff           rn_rfact     = ', rn_rfact 
    289       ENDIF 
    290       ! 
    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 
    293286      ENDIF 
    294287      !                                   ! ================== 
     
    298291      IF( sbc_rnf_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_rnf_alloc : unable to allocate arrays' ) 
    299292      ! 
    300       IF( ln_rnf_emp ) THEN                     !==  runoffs directly provided in the precipitations  ==! 
     293      IF( .NOT. l_rnfcpl ) THEN                     
     294         ALLOCATE( sf_rnf(1), STAT=ierror )      ! Create (if required) sf_rnf structure (runoff inflow) 
    301295         IF(lwp) WRITE(numout,*) 
    302          IF(lwp) WRITE(numout,*) '          runoffs directly provided in the precipitations' 
    303          IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal ) THEN 
    304            CALL ctl_warn( 'runoffs already included in precipitations, so runoff (T,S, depth) attributes will not be used' ) 
    305            ln_rnf_depth = .FALSE.   ;   ln_rnf_tem = .FALSE.   ;   ln_rnf_sal = .FALSE. 
    306          ENDIF 
    307          ! 
    308       ELSE                                      !==  runoffs read in a file : set sf_rnf structure  ==! 
    309          ! 
    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 
    321          ! 
    322          IF( ln_rnf_tem ) THEN                      ! Create (if required) sf_t_rnf structure 
    323             IF(lwp) WRITE(numout,*) 
    324             IF(lwp) WRITE(numout,*) '          runoffs temperatures read in a file' 
    325             ALLOCATE( sf_t_rnf(1), STAT=ierror  ) 
    326             IF( ierror > 0 ) THEN 
    327                CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_t_rnf structure' )   ;   RETURN 
    328             ENDIF 
    329             ALLOCATE( sf_t_rnf(1)%fnow(jpi,jpj,1)   ) 
    330             IF( sn_t_rnf%ln_tint ) ALLOCATE( sf_t_rnf(1)%fdta(jpi,jpj,1,2) ) 
    331             CALL fld_fill (sf_t_rnf, (/ sn_t_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff temperature data', 'namsbc_rnf' ) 
    332          ENDIF 
    333          ! 
    334          IF( ln_rnf_sal  ) THEN                     ! Create (if required) sf_s_rnf and sf_t_rnf structures 
    335             IF(lwp) WRITE(numout,*) 
    336             IF(lwp) WRITE(numout,*) '          runoffs salinities read in a file' 
    337             ALLOCATE( sf_s_rnf(1), STAT=ierror  ) 
    338             IF( ierror > 0 ) THEN 
    339                CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_s_rnf structure' )   ;   RETURN 
    340             ENDIF 
    341             ALLOCATE( sf_s_rnf(1)%fnow(jpi,jpj,1)   ) 
    342             IF( sn_s_rnf%ln_tint ) ALLOCATE( sf_s_rnf(1)%fdta(jpi,jpj,1,2) ) 
    343             CALL fld_fill (sf_s_rnf, (/ sn_s_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff salinity data', 'namsbc_rnf' ) 
    344          ENDIF 
    345          ! 
    346          IF( ln_rnf_depth ) THEN                    ! depth of runoffs set from a file 
    347             IF(lwp) WRITE(numout,*) 
    348             IF(lwp) WRITE(numout,*) '          runoffs depth read in a file' 
    349             rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname ) 
    350             IF( .NOT. sn_dep_rnf%ln_clim ) THEN   ;   WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear    ! add year  
    351                IF( sn_dep_rnf%cltype == 'monthly' )   WRITE(rn_dep_file, '(a,"m",i2)'  ) TRIM( rn_dep_file ), nmonth   ! add month  
    352             ENDIF  
    353             CALL iom_open ( rn_dep_file, inum )                           ! open file 
    354             CALL iom_get  ( inum, jpdom_data, sn_dep_rnf%clvar, h_rnf )   ! read the river mouth array 
    355             CALL iom_close( inum )                                        ! close file 
    356             ! 
    357             nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied 
    358             DO jj = 1, jpj 
    359                DO ji = 1, jpi 
    360                   IF( h_rnf(ji,jj) > 0._wp ) THEN 
    361                      jk = 2 
    362                      DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ;  jk = jk + 1 ;  END DO 
    363                      nk_rnf(ji,jj) = jk 
    364                   ELSEIF( h_rnf(ji,jj) == -1._wp   ) THEN   ;  nk_rnf(ji,jj) = 1 
    365                   ELSEIF( h_rnf(ji,jj) == -999._wp ) THEN   ;  nk_rnf(ji,jj) = mbkt(ji,jj) 
    366                   ELSE 
    367                      CALL ctl_stop( 'sbc_rnf_init: runoff depth not positive, and not -999 or -1, rnf value in file fort.999'  ) 
    368                      WRITE(999,*) 'ji, jj, h_rnf(ji,jj) :', ji, jj, h_rnf(ji,jj) 
    369                   ENDIF 
     296         IF(lwp) WRITE(numout,*) '          runoffs inflow read in a file' 
     297         IF( ierror > 0 ) THEN 
     298            CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
     299         ENDIF 
     300         ALLOCATE( sf_rnf(1)%fnow(jpi,jpj,1)   ) 
     301         IF( sn_rnf%ln_tint ) ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) ) 
     302         CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf' ) 
     303      ENDIF 
     304      ! 
     305      IF( ln_rnf_tem ) THEN                      ! Create (if required) sf_t_rnf structure 
     306         IF(lwp) WRITE(numout,*) 
     307         IF(lwp) WRITE(numout,*) '          runoffs temperatures read in a file' 
     308         ALLOCATE( sf_t_rnf(1), STAT=ierror  ) 
     309         IF( ierror > 0 ) THEN 
     310            CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_t_rnf structure' )   ;   RETURN 
     311         ENDIF 
     312         ALLOCATE( sf_t_rnf(1)%fnow(jpi,jpj,1)   ) 
     313         IF( sn_t_rnf%ln_tint ) ALLOCATE( sf_t_rnf(1)%fdta(jpi,jpj,1,2) ) 
     314         CALL fld_fill (sf_t_rnf, (/ sn_t_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff temperature data', 'namsbc_rnf' ) 
     315      ENDIF 
     316      ! 
     317      IF( ln_rnf_sal  ) THEN                     ! Create (if required) sf_s_rnf and sf_t_rnf structures 
     318         IF(lwp) WRITE(numout,*) 
     319         IF(lwp) WRITE(numout,*) '          runoffs salinities read in a file' 
     320         ALLOCATE( sf_s_rnf(1), STAT=ierror  ) 
     321         IF( ierror > 0 ) THEN 
     322            CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_s_rnf structure' )   ;   RETURN 
     323         ENDIF 
     324         ALLOCATE( sf_s_rnf(1)%fnow(jpi,jpj,1)   ) 
     325         IF( sn_s_rnf%ln_tint ) ALLOCATE( sf_s_rnf(1)%fdta(jpi,jpj,1,2) ) 
     326         CALL fld_fill (sf_s_rnf, (/ sn_s_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff salinity data', 'namsbc_rnf' ) 
     327      ENDIF 
     328      ! 
     329      IF( ln_rnf_depth ) THEN                    ! depth of runoffs set from a file 
     330         IF(lwp) WRITE(numout,*) 
     331         IF(lwp) WRITE(numout,*) '          runoffs depth read in a file' 
     332         rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname ) 
     333         IF( .NOT. sn_dep_rnf%ln_clim ) THEN   ;   WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear    ! add year  
     334            IF( sn_dep_rnf%cltype == 'monthly' )   WRITE(rn_dep_file, '(a,"m",i2)'  ) TRIM( rn_dep_file ), nmonth   ! add month  
     335         ENDIF 
     336         CALL iom_open ( rn_dep_file, inum )                           ! open file 
     337         CALL iom_get  ( inum, jpdom_data, sn_dep_rnf%clvar, h_rnf )   ! read the river mouth array 
     338         CALL iom_close( inum )                                        ! close file 
     339         ! 
     340         nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied 
     341         DO jj = 1, jpj 
     342            DO ji = 1, jpi 
     343               IF( h_rnf(ji,jj) > 0._wp ) THEN 
     344                  jk = 2 
     345                  DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ;  jk = jk + 1 
     346                  END DO 
     347                  nk_rnf(ji,jj) = jk 
     348               ELSEIF( h_rnf(ji,jj) == -1._wp   ) THEN   ;  nk_rnf(ji,jj) = 1 
     349               ELSEIF( h_rnf(ji,jj) == -999._wp ) THEN   ;  nk_rnf(ji,jj) = mbkt(ji,jj) 
     350               ELSE 
     351                  CALL ctl_stop( 'sbc_rnf_init: runoff depth not positive, and not -999 or -1, rnf value in file fort.999'  ) 
     352                  WRITE(999,*) 'ji, jj, h_rnf(ji,jj) :', ji, jj, h_rnf(ji,jj) 
     353               ENDIF 
     354            END DO 
     355         END DO 
     356         DO jj = 1, jpj                                ! set the associated depth 
     357            DO ji = 1, jpi 
     358               h_rnf(ji,jj) = 0._wp 
     359               DO jk = 1, nk_rnf(ji,jj) 
     360                  h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk) 
    370361               END DO 
    371362            END DO 
    372             DO jj = 1, jpj                                ! set the associated depth 
    373                DO ji = 1, jpi 
    374                   h_rnf(ji,jj) = 0._wp 
    375                   DO jk = 1, nk_rnf(ji,jj) 
    376                      h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk) 
    377                   END DO 
    378                END DO 
    379             END DO 
    380          ELSE                                       ! runoffs applied at the surface 
    381             nk_rnf(:,:) = 1 
    382             h_rnf (:,:) = fse3t(:,:,1) 
    383          ENDIF 
    384          ! 
     363         END DO 
     364      ELSE                                       ! runoffs applied at the surface 
     365         nk_rnf(:,:) = 1 
     366         h_rnf (:,:) = fse3t(:,:,1) 
    385367      ENDIF 
    386368      ! 
     
    403385         IF( rn_hrnf > 0._wp ) THEN 
    404386            nkrnf = 2 
    405             DO WHILE( nkrnf /= jpkm1 .AND. gdepw_1d(nkrnf+1) < rn_hrnf )   ;   nkrnf = nkrnf + 1   ;   END DO 
     387            DO WHILE( nkrnf /= jpkm1 .AND. gdepw_1d(nkrnf+1) < rn_hrnf )   ;   nkrnf = nkrnf + 1 
     388            END DO 
    406389            IF( ln_sco )   CALL ctl_warn( 'sbc_rnf: number of levels over which Kz is increased is computed for zco...' ) 
    407390         ENDIF 
    408          IF(lwp) WRITE(numout,*) 
    409          IF(lwp) WRITE(numout,*) '          Specific treatment used in vicinity of river mouths :' 
    410          IF(lwp) WRITE(numout,*) '             - Increase Kz in surface layers (if rn_hrnf > 0 )' 
    411          IF(lwp) WRITE(numout,*) '               by ', rn_avt_rnf,' m2/s  over ', nkrnf, ' w-levels' 
    412          IF(lwp) WRITE(numout,*) '             - set to zero SSS damping       (if ln_ssr=T)' 
    413          IF(lwp) WRITE(numout,*) '             - mixed upstream-centered       (if ln_traadv_cen2=T)' 
    414          ! 
    415          CALL rnf_mouth                             ! set river mouth mask 
    416          ! 
    417       ELSE                                      ! No treatment at river mouths 
    418          IF(lwp) WRITE(numout,*) 
    419          IF(lwp) WRITE(numout,*) '          No specific treatment at river mouths' 
    420          rnfmsk  (:,:) = 0._wp 
    421          rnfmsk_z(:)   = 0._wp 
    422          nkrnf = 0 
    423       ENDIF 
    424       ! 
    425    END SUBROUTINE sbc_rnf_init 
     391            IF(lwp) WRITE(numout,*) 
     392            IF(lwp) WRITE(numout,*) '          Specific treatment used in vicinity of river mouths :' 
     393            IF(lwp) WRITE(numout,*) '             - Increase Kz in surface layers (if rn_hrnf > 0 )' 
     394            IF(lwp) WRITE(numout,*) '               by ', rn_avt_rnf,' m2/s  over ', nkrnf, ' w-levels' 
     395            IF(lwp) WRITE(numout,*) '             - set to zero SSS damping       (if ln_ssr=T)' 
     396            IF(lwp) WRITE(numout,*) '             - mixed upstream-centered       (if ln_traadv_cen2=T)' 
     397            ! 
     398            CALL rnf_mouth                             ! set river mouth mask 
     399            ! 
     400         ELSE                                      ! No treatment at river mouths 
     401            IF(lwp) WRITE(numout,*) 
     402            IF(lwp) WRITE(numout,*) '          No specific treatment at river mouths' 
     403            rnfmsk  (:,:) = 0._wp 
     404            rnfmsk_z(:)   = 0._wp 
     405            nkrnf = 0 
     406         ENDIF 
     407         ! 
     408      END SUBROUTINE sbc_rnf_init 
    426409 
    427410 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90

    r5352 r5403  
    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 
    2019   ! 
    2120   USE in_out_manager  ! I/O manager 
     
    8281         ENDIF 
    8382         ! 
    84          IF( lk_vvl     )   e3t_m(:,:) = fse3t_n(:,:,1) 
    85          ! 
    86          IF( ln_qsr_ice )   frq_m(:,:) = fraqsr_1lev(:,:) 
     83         IF( lk_vvl )   e3t_m(:,:) = fse3t_n(:,:,1) 
     84         ! 
     85         frq_m(:,:) = fraqsr_1lev(:,:) 
    8786         ! 
    8887      ELSE 
     
    104103            ENDIF 
    105104            ! 
    106             IF( lk_vvl     )   e3t_m(:,:) = zcoef * fse3t_n(:,:,1) 
    107             ! 
    108             IF( ln_qsr_ice )   frq_m(:,:) = zcoef * fraqsr_1lev(:,:) 
     105            IF( lk_vvl )   e3t_m(:,:) = zcoef * fse3t_n(:,:,1) 
     106            ! 
     107            frq_m(:,:) = zcoef * fraqsr_1lev(:,:) 
    109108            !                                             ! ---------------------------------------- ! 
    110109         ELSEIF( MOD( kt - 2 , nn_fsbc ) == 0 ) THEN      !   Initialisation: New mean computation   ! 
     
    115114            sss_m(:,:) = 0.e0 
    116115            ssh_m(:,:) = 0.e0 
    117             IF( lk_vvl     )   e3t_m(:,:) = 0.e0 
    118             IF( ln_qsr_ice )   frq_m(:,:) = 0.e0 
     116            IF( lk_vvl )   e3t_m(:,:) = 0.e0 
     117            frq_m(:,:) = 0.e0 
    119118         ENDIF 
    120119         !                                                ! ---------------------------------------- ! 
     
    132131         ENDIF 
    133132         ! 
    134          IF( lk_vvl     )   e3t_m(:,:) = fse3t_m(:,:) + fse3t_n(:,:,1) 
    135          ! 
    136          IF( ln_qsr_ice )   frq_m(:,:) =   frq_m(:,:) + fraqsr_1lev(:,:) 
     133         IF( lk_vvl )   e3t_m(:,:) = fse3t_m(:,:) + fse3t_n(:,:,1) 
     134         ! 
     135         frq_m(:,:) =   frq_m(:,:) + fraqsr_1lev(:,:) 
    137136 
    138137         !                                                ! ---------------------------------------- ! 
     
    145144            ssv_m(:,:) = ssv_m(:,:) * zcoef           ! 
    146145            ssh_m(:,:) = ssh_m(:,:) * zcoef           ! mean SSH             [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 [-] 
     146            IF( lk_vvl )   e3t_m(:,:) = fse3t_m(:,:) * zcoef   ! mean vertical scale factor [m] 
     147            frq_m(:,:) = frq_m(:,:) * zcoef   ! mean fraction of solar net radiation absorbed in the 1st T level [-] 
    149148            ! 
    150149         ENDIF 
     
    163162            CALL iom_rstput( kt, nitrst, numrow, 'sss_m'  , sss_m  ) 
    164163            CALL iom_rstput( kt, nitrst, numrow, 'ssh_m'  , ssh_m  ) 
    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  ) 
     164            IF( lk_vvl )   CALL iom_rstput( kt, nitrst, numrow, 'e3t_m'  , e3t_m  ) 
     165            CALL iom_rstput( kt, nitrst, numrow, 'frq_m'  , frq_m  ) 
    167166            ! 
    168167         ENDIF 
     
    176175         CALL iom_put( 'sss_m', sss_m ) 
    177176         CALL iom_put( 'ssh_m', ssh_m ) 
    178          IF( lk_vvl     )   CALL iom_put( 'e3t_m', e3t_m ) 
    179          IF( ln_qsr_ice )   CALL iom_put( 'frq_m', frq_m ) 
     177         IF( lk_vvl )   CALL iom_put( 'e3t_m', e3t_m ) 
     178         CALL iom_put( 'frq_m', frq_m ) 
    180179      ENDIF 
    181180      ! 
     
    231230               ssh_m(:,:) = zcoef * ssh_m(:,:) 
    232231               IF( lk_vvl )   e3t_m(:,:) = zcoef * fse3t_m(:,:) 
    233                frq_m(:,:) = zcoef * frq_m(:,:)   ! bug: must not be done if ln_qsr_ice = .false.  
     232               frq_m(:,:) = zcoef * frq_m(:,:) 
    234233            ELSE 
    235234               IF(lwp) WRITE(numout,*) '~~~~~~~   mean fields read in the ocean restart file' 
     
    237236         ENDIF 
    238237      ENDIF 
    239  
     238      ! 
    240239      IF( .NOT. l_ssm_mean ) THEN   ! default initialisation. needed by lim_istate 
    241240         ! 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90

    r5352 r5403  
    3737 
    3838   PUBLIC   tra_qsr       ! routine called by step.F90 (ln_traqsr=T) 
    39    PUBLIC   tra_qsr_init  ! routine called by opa.F90 
     39   PUBLIC   tra_qsr_init  ! routine called by nemogcm.F90 
    4040 
    4141   !                                 !!* Namelist namtra_qsr: penetrative solar radiation 
     
    5050   REAL(wp), PUBLIC ::   rn_si1       !: deepest depth of extinction (water type I)       (2 bands) 
    5151  
    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  
    5552   ! Module variables 
    5653   REAL(wp) ::   xsi0r                           !: inverse of rn_si0 
     
    328325            &                    'at it= ', kt,' date= ', ndastp 
    329326         IF(lwp) WRITE(numout,*) '~~~~' 
    330          CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b', qsr_hc ) 
     327         CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b'   , qsr_hc      ) 
     328         CALL iom_rstput( kt, nitrst, numrow, 'fraqsr_1lev', fraqsr_1lev )   ! default definition in sbcssm  
    331329         ! 
    332330      ENDIF 
     
    413411      ENDIF 
    414412 
    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        
    424413      IF( ln_traqsr ) THEN     ! control consistency 
    425414         !                       
     
    571560      ENDIF 
    572561      ! 
     562      ! initialisation of fraqsr_1lev used in sbcssm 
     563      IF( iom_varid( numror, 'fraqsr_1lev', ldstop = .FALSE. ) > 0 ) THEN 
     564         CALL iom_get( numror, jpdom_autoglo, 'fraqsr_1lev'  , fraqsr_1lev  ) 
     565      ELSE 
     566         fraqsr_1lev(:,:) = 1._wp   ! default definition 
     567      ENDIF 
     568      ! 
    573569      CALL wrk_dealloc( jpi, jpj,      zekb, zekg, zekr        )  
    574570      CALL wrk_dealloc( jpi, jpj, jpk, ze0, ze1, ze2, ze3, zea )  
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/oce.F90

    r5352 r5403  
    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 
    7174   !!---------------------------------------------------------------------- 
    7275   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     
    8083      !!                   ***  FUNCTION oce_alloc  *** 
    8184      !!---------------------------------------------------------------------- 
    82       INTEGER :: ierr(3) 
     85      INTEGER :: ierr(4) 
    8386      !!---------------------------------------------------------------------- 
    8487      ! 
     
    114117      ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), snwice_fmass(jpi,jpj) , STAT=ierr(3) ) 
    115118         ! 
     119      ALLOCATE( fraqsr_1lev(jpi,jpj) , STAT=ierr(4) ) 
     120         ! 
    116121      oce_alloc = MAXVAL( ierr ) 
    117122      IF( oce_alloc /= 0 )   CALL ctl_warn('oce_alloc: failed to allocate arrays') 
  • branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_CURIE

    r4147 r5403  
    88#MSUB -n NPROCS              # Total number of mpi task to use 
    99####  #MSUB -N 2                   # number of nodes to use 
    10 #MSUB -A gen0826             # project name 
     10#MSUB -ra2286             # project name 
    1111#MSUB -q standard            # (queue name) only for thin nodes 
    1212########################################################################## 
     
    3333module unload netcdf 
    3434module unload hdf5 
    35 module load netcdf/4.2_hdf5_parallel 
    36 module load hdf5/1.8.9_parallel 
     35module load netcdf/4.3.3.1_hdf5_parallel 
     36module load hdf5/1.8.12_parallel 
    3737 
    3838# Don't remove neither change the following line 
Note: See TracChangeset for help on using the changeset viewer.