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

Changeset 1998


Ignore:
Timestamp:
2010-07-08T17:12:21+02:00 (14 years ago)
Author:
acc
Message:

ticket #465_Rivers tidied code and added namelist changes in preparation for mid-year merge

Location:
branches/DEV_R1821_Rivers
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_R1821_Rivers/CONFIG/GYRE/EXP00/namelist

    r1741 r1998  
    214214   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    215215   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     216   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     217   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     218   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    216219  
    217220   cn_dir       = './'      !  root directory for the location of the runoff files 
    218221   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    219222   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     223   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    220224   rn_hrnf      =   0.e0    !  depth over which enhanced vertical mixing is used 
    221225   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_R1821_Rivers/CONFIG/GYRE_LOBSTER/EXP00/namelist

    r1741 r1998  
    214214   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    215215   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     216   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     217   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     218   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    216219  
    217220   cn_dir       = './'      !  root directory for the location of the runoff files 
    218221   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    219222   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     223   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    220224   rn_hrnf      =   0.e0    !  depth over which enhanced vertical mixing is used 
    221225   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_R1821_Rivers/CONFIG/ORCA2_LIM/EXP00/namelist

    r1759 r1998  
    241241   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    242242   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     243   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     244   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     245   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
     246 
    243247  
    244248   cn_dir       = './'      !  root directory for the location of the runoff files 
    245249   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    246250   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     251   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input   
    247252   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used 
    248253   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_R1821_Rivers/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist

    r1759 r1998  
    241241   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    242242   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     243   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     244   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     245   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    243246  
    244247   cn_dir       = './'      !  root directory for the location of the runoff files 
    245248   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    246249   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     250   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    247251   rn_hrnf      =  15.e0    !  depth over which enhanced vertical mixing is used 
    248252   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_R1821_Rivers/CONFIG/POMME/EXP00/namelist

    r1730 r1998  
    240240   sn_rnf      = 'runoff_1m_nomask' ,  -1         , 'sorunoff' ,    .true.      , .true.  , 'yearly'  , ''       , '' 
    241241   sn_cnf      = 'runoff_1m_nomask' ,   0         , 'socoefr'  ,    .false.     , .true.  , 'yearly'  , ''       , '' 
     242   sn_sal_rnf  = 'runoffs'          ,  24         , 'rosaline' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     243   sn_tmp_rnf  = 'runoffs'          ,  24         , 'rotemper' ,    .true.      , .true.  ,   'yearly', ''       , '' 
     244   sn_dep_rnf  = 'runoffs'          ,   0         , 'rodepth'  ,    .false.     , .true.  ,   'yearly', ''       , '' 
    242245  
    243246   cn_dir       = './'      !  root directory for the location of the runoff files 
    244247   ln_rnf_emp   =   .false. !  runoffs included into precipitation field (T) or into a file (F) 
    245248   ln_rnf_mouth =   .false. !  specific treatment at rivers mouths 
     249   ln_rnf_att   =   .false. !  apply temperature, salinity and depth attributes to runoff input 
    246250   rn_hrnf      =  0.e0    !  depth over which enhanced vertical mixing is used 
    247251   rn_avt_rnf   =   1.e-3   !  value of the additional vertical mixing coef. [m2/s] 
  • branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DOM/closea.F90

    r1938 r1998  
    182182      REAL(wp), DIMENSION (jpncs) ::   zfwf  
    183183  
    184       REAL(wp), DIMENSION (jpi,jpj)       ::   fwf              !: fresh water flux,for volume: emp-rnf   
    185       REAL(wp), DIMENSION (jpi,jpj)       ::   fwfs             !: fresh water flux, for conc/dilution effect: emps-rnf   
    186184      !!---------------------------------------------------------------------- 
    187185      ! 
     
    283281      END DO  
    284282      ! 
    285       fwf(:,:)  = emp(:,:)  - rnf(:,:)   
    286       fwfs(:,:) = emps(:,:) - rnf(:,:)   
    287       CALL lbc_lnk( fwf , 'T', 1. )  
    288       CALL lbc_lnk( fwfs, 'T', 1. )  
     283      CALL lbc_lnk( emp , 'T', 1. ) 
     284      CALL lbc_lnk( emps, 'T', 1. ) 
    289285      ! 
    290286   END SUBROUTINE sbc_clo 
  • branches/DEV_R1821_Rivers/NEMO/OPA_SRC/SBC/sbcmod.F90

    r1938 r1998  
    185185      INTEGER, INTENT(in) ::   kt       ! ocean time step 
    186186      !!--------------------------------------------------------------------- 
    187  
    188       emp(:,:)=0.0   
    189       emps(:,:)=0.0   
    190       rnf(:,:)=0.0  
    191187 
    192188      CALL iom_setkt( kt + nn_fsbc - 1 )         !  in sbc, iom_put is called every nn_fsbc time step 
  • branches/DEV_R1821_Rivers/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r1938 r1998  
    3838   REAL(wp)          , PUBLIC ::   rn_hrnf      = 0.e0    !: runoffs, depth over which enhanced vertical mixing is used 
    3939   REAL(wp)          , PUBLIC ::   rn_avt_rnf   = 0.e0    !: runoffs, value of the additional vertical mixing coef. [m2/s] 
    40    LOGICAL           , PUBLIC ::   ln_rnf_att   = .false.  !: river runoffs attributes (temp, sal & depth) are specified in a file  
     40   LOGICAL           , PUBLIC ::   ln_rnf_att   = .false. !: river runoffs attributes (temp, sal & depth) are specified in a file  
    4141   REAL(wp)          , PUBLIC ::   rn_rfact     = 1.e0    !: multiplicative factor for runoff 
    4242 
     
    4545   REAL(wp), PUBLIC, DIMENSION(jpk)     ::   rnfmsk_z    !: river mouth mask (vert.) 
    4646 
    47    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_rnf   ! structure of input SST (file information, fields read) 
    48  
    49    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sal_rnf    !: structure of input salinity (file information, fields read)   
    50    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tmp_rnf    !: structure of input tmeperature (file information, fields read)   
     47   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_rnf        !: structure of input river runoff (file information, fields read) 
     48 
     49   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sal_rnf    !: structure of input river runoff salinity (file information, fields read)   
     50   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tmp_rnf    !: structure of input river runoff temperature (file information, fields read)   
    5151  
    52 !   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf             !: mass flux of river runoff (in kg/m2/s)   
    5352   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_dep         !: depth of runoff in m   
    5453   INTEGER, PUBLIC, DIMENSION(jpi,jpj) ::  rnf_mod_dep     !: depth of runoff in model levels   
     
    8988      !                                    
    9089      IF( kt == nit000 ) THEN   
    91          IF( .NOT. ln_rnf_emp ) THEN 
    92             ALLOCATE( sf_rnf(1), STAT=ierror ) 
    93             IF( ierror > 0 ) THEN 
    94                CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
    95             ENDIF 
    96             ALLOCATE( sf_rnf(1)%fnow(jpi,jpj) ) 
    97             ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) ) 
    98   
    99             ALLOCATE( sf_sal_rnf(1), STAT=ierror )   
    100             IF( ierror > 0 ) THEN   
    101                CALL ctl_stop( 'sbc_sal_rnf: unable to allocate sf_sal_rnf structure' )   ;   RETURN   
    102             ENDIF   
    103             ALLOCATE( sf_sal_rnf(1)%fnow(jpi,jpj) )   
    104             ALLOCATE( sf_sal_rnf(1)%fdta(jpi,jpj,2) )   
    105     
    106             ALLOCATE( sf_tmp_rnf(1), STAT=ierror )   
    107             IF( ierror > 0 ) THEN   
    108                 CALL ctl_stop( 'sbc_tmp_rnf: unable to allocate sf_tmp_rnf structure' )   ;   RETURN   
    109             ENDIF   
    110             ALLOCATE( sf_tmp_rnf(1)%fnow(jpi,jpj) )   
    111             ALLOCATE( sf_tmp_rnf(1)%fdta(jpi,jpj,2) )   
    112          ENDIF   
    113          CALL sbc_rnf_init( sf_rnf, sf_tmp_rnf, sf_sal_rnf )   
     90         CALL sbc_rnf_init                      ! Read namelist and allocate structures 
    11491      ENDIF 
    11592 
     
    146123               rnf_tmp(:,:) = -999   
    147124            ENDIF   
    148             CALL iom_put( "runoffs", sf_rnf(1)%fnow )         ! runoffs 
     125            CALL iom_put( "runoffs", rnf )         ! runoffs 
    149126         ENDIF 
    150127         ! 
     
    154131 
    155132 
    156    SUBROUTINE sbc_rnf_init( sf_rnf, sf_tmp_rnf, sf_sal_rnf )   
     133   SUBROUTINE sbc_rnf_init 
    157134      !!---------------------------------------------------------------------- 
    158135      !!                  ***  ROUTINE sbc_rnf_init  *** 
     
    164141      !! ** Action  : - read parameters 
    165142      !!---------------------------------------------------------------------- 
    166       TYPE(FLD), INTENT(inout), DIMENSION(:) :: sf_rnf, sf_tmp_rnf, sf_sal_rnf   ! input data   
    167143      CHARACTER(len=32) ::   rn_dep_file   ! runoff file name   
    168144      !!  
     
    207183         IF(lwp) WRITE(numout,*) 
    208184         IF(lwp) WRITE(numout,*) '          runoffs directly provided in the precipitations' 
    209          IF ( ln_rnf_att ) CALL ctl_warn( 'runoffs already included in precipitations & so runoff attributes not included' )  
     185         IF ( ln_rnf_att ) THEN 
     186           CALL ctl_warn( 'runoffs already included in precipitations & so runoff attributes will not be used' )  
     187           ln_rnf_att = .FALSE. 
     188         ENDIF 
    210189         ! 
    211190      ELSE                                      ! runoffs read in a file : set sf_rnf structure  
    212191         ! 
    213          ! sf_rnf already allocated in main routine 
     192         ! Allocate sf_rnf structure and (if required) sf_sal_rnf and sf_tmp_rnf structures 
     193         ALLOCATE( sf_rnf(1), STAT=ierror ) 
     194         IF( ierror > 0 ) THEN 
     195            CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN 
     196         ENDIF 
     197         ALLOCATE( sf_rnf(1)%fnow(jpi,jpj) ) 
     198         ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,2) ) 
     199 
     200         IF( ln_rnf_att ) THEN 
     201            ALLOCATE( sf_sal_rnf(1), STAT=ierror ) 
     202            IF( ierror > 0 ) THEN 
     203               CALL ctl_stop( 'sbc_sal_rnf: unable to allocate sf_sal_rnf structure' )   ;   RETURN 
     204            ENDIF 
     205            ALLOCATE( sf_sal_rnf(1)%fnow(jpi,jpj) ) 
     206            ALLOCATE( sf_sal_rnf(1)%fdta(jpi,jpj,2) ) 
     207 
     208            ALLOCATE( sf_tmp_rnf(1), STAT=ierror ) 
     209            IF( ierror > 0 ) THEN 
     210                CALL ctl_stop( 'sbc_tmp_rnf: unable to allocate sf_tmp_rnf structure' )   ;   RETURN 
     211            ENDIF 
     212            ALLOCATE( sf_tmp_rnf(1)%fnow(jpi,jpj) ) 
     213            ALLOCATE( sf_tmp_rnf(1)%fdta(jpi,jpj,2) ) 
     214         ENDIF 
    214215         ! fill sf_rnf with sn_rnf and control print 
    215216         CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf' ) 
  • branches/DEV_R1821_Rivers/NEMO/OPA_SRC/TRA/trasbc.F90

    r1938 r1998  
    107107      INTEGER  ::   ji, jj, jk           ! dummy loop indices   
    108108      REAL(wp) ::   zta, zsa             ! temporary scalars, adjustment to temperature and salinity   
    109       REAL(wp) ::   azta, azsa           ! temporary scalars, calculations of automatic change to temp & sal due to vvl (done elsewhere)   
     109      REAL(wp) ::   zata, zasa           ! temporary scalars, calculations of automatic change to temp & sal due to vvl (done elsewhere)   
    110110      REAL(wp) ::   zsrau, zse3t, zdep   ! temporary scalars, 1/density, 1/height of box, 1/height of effected water column   
    111       REAL(wp) ::   dheat, dsalt          ! total change of temperature and salinity   
    112       REAL(wp) ::   tot_sal1, tot_tmp1   
     111      REAL(wp) ::   zdheat, zdsalt       ! total change of temperature and salinity   
    113112      !!---------------------------------------------------------------------- 
    114113 
     
    131130      IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration 
    132131 
    133       ! Concentration dillution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff   
     132      ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff   
    134133      DO jj = 2, jpj 
    135134         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    150149      END DO 
    151150 
    152       IF ( ln_rnf ) THEN   
     151      IF ( ln_rnf .AND. ln_rnf_att ) THEN   
    153152      ! Concentration / dilution effect on (t,s) due to river runoff   
    154153        DO jj=1,jpj   
     
    167166                  !!!indirect flux, concentration or dilution effect   
    168167                  !!!force a dilution effect in all levels;   
    169                   dheat=0.0   
    170                   dsalt=0.0   
     168                  zdheat=0.0   
     169                  zdsalt=0.0   
    171170                  DO jk=1, rnf_mod_dep(ji,jj)   
    172171                    zta = -tn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep   
     
    174173                    ta(ji,jj,jk)=ta(ji,jj,jk)+zta   
    175174                    sa(ji,jj,jk)=sa(ji,jj,jk)+zsa   
    176                     dheat=dheat+zta*fse3t(ji,jj,jk)   
    177                     dsalt=dsalt+zsa*fse3t(ji,jj,jk)   
     175                    zdheat=zdheat+zta*fse3t(ji,jj,jk)   
     176                    zdsalt=zdsalt+zsa*fse3t(ji,jj,jk)   
    178177                  ENDDO   
    179178                  !!!negate this total change in heat and salt content from top level   
    180                   zta=-dheat*zse3t   
    181                   zsa=-dsalt*zse3t   
     179                  zta=-zdheat*zse3t   
     180                  zsa=-zdsalt*zse3t   
    182181                  ta(ji,jj,1)=ta(ji,jj,1)+zta   
    183182                  sa(ji,jj,1)=sa(ji,jj,1)+zsa   
     
    205204                IF( lk_vvl) THEN   
    206205                  !calculate automatic adjustment to sal and temp due to dilution/concentraion effect    
    207                   azta = -tn(ji,jj,1) * rnf(ji,jj) * zsrau * zse3t   
    208                   azsa = -sn(ji,jj,1) * rnf(ji,jj) * zsrau * zse3t   
    209                   !!!negate this change in sal and temp    
    210                   ta(ji,jj,1)=ta(ji,jj,1)-azta   
    211                   sa(ji,jj,1)=sa(ji,jj,1)-azsa   
     206                  zata = tn(ji,jj,1) * rnf(ji,jj) * zsrau * zse3t   
     207                  zasa = sn(ji,jj,1) * rnf(ji,jj) * zsrau * zse3t   
     208                  ta(ji,jj,1)=ta(ji,jj,1) + zata   
     209                  sa(ji,jj,1)=sa(ji,jj,1) + zasa   
    212210                ENDIF   
    213211   
     
    216214           ENDDO   
    217215        ENDDO   
    218         
     216 
     217      ELSE IF( ln_rnf ) THEN 
     218 
     219      ! Concentration dilution effect on (t,s) due to runoff without temperatue, salinity and depth attributes 
     220        DO jj = 2, jpj 
     221           DO ji = fs_2, fs_jpim1   ! vector opt. 
     222#if ! defined key_zco 
     223              zse3t = 1. / fse3t(ji,jj,1) 
     224#endif 
     225              IF( lk_vvl) THEN 
     226                 zta =  rnf(ji,jj) * zsrau * tn(ji,jj,1) * zse3t       ! & cooling/heating effect of runoff 
     227                 zsa = 0.e0                                            ! No salinity concent./dilut. effect 
     228              ELSE 
     229                 zta =  0.0                                            ! temperature : heat flux  
     230                 zsa =  - rnf(ji,jj) * zsrau * sn(ji,jj,1) * zse3t     ! salinity :  concent./dilut. effect 
     231              ENDIF 
     232              ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend 
     233              sa(ji,jj,1) = sa(ji,jj,1) + zsa 
     234           END DO 
     235        END DO 
     236  
    219237      ENDIF   
    220238 
Note: See TracChangeset for help on using the changeset viewer.