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

Changeset 1735


Ignore:
Timestamp:
2009-11-16T16:39:43+01:00 (14 years ago)
Author:
cetlod
Message:

suppress useless variables in TOP modules, see ticket:602

Location:
trunk/NEMO
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OFF_SRC/DOM/domain.F90

    r1715 r1735  
    244244          nwrite = nitend 
    245245          nwarn = nwarn + 1 
    246       ENDIF 
    247  
    248       SELECT CASE ( nleapy )   ! Choose calendar for IOIPSL 
    249       CASE (  1 )  
    250          CALL ioconf_calendar('gregorian') 
    251          IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "gregorian", i.e. leap year' 
    252       CASE (  0 ) 
    253          CALL ioconf_calendar('noleap') 
    254          IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "noleap", i.e. no leap year' 
    255       CASE ( 30 ) 
    256          CALL ioconf_calendar('360d') 
    257          IF(lwp) WRITE(numout,*) '           The IOIPSL calendar is "360d", i.e. 360 days in a year' 
    258       END SELECT 
    259  
    260       SELECT CASE ( nleapy )   ! year=raajj*days day=rjjhh*hours hour=rhhmm*minutes etc ... 
    261       CASE ( 1 ) 
    262          raajj = 365.25 
    263          raass = raajj * rjjss 
    264          rmoss = raass/raamo 
    265       CASE ( 0 ) 
    266          raajj = 365. 
    267          raass = raajj * rjjss 
    268          rmoss = raass/raamo 
    269       CASE DEFAULT 
    270          raajj = FLOAT( nleapy ) * raamo 
    271          raass =        raajj    * rjjss 
    272          rmoss = FLOAT( nleapy ) * rjjss 
    273       END SELECT 
    274       IF(lwp) THEN 
    275          WRITE(numout,*) 
    276          WRITE(numout,*) '           nb of days per year      raajj = ', raajj,' days' 
    277          WRITE(numout,*) '           nb of seconds per year   raass = ', raass, ' s' 
    278          WRITE(numout,*) '           nb of seconds per month  rmoss = ', rmoss, ' s' 
    279246      ENDIF 
    280247 
  • trunk/NEMO/OFF_SRC/dtadyn.F90

    r1699 r1735  
    4444      nficdyn = 2       ! number of dynamical fields  
    4545 
     46   CHARACTER(len=45)  ::  & 
     47      cfile_grid_T = 'dyna_grid_T.nc', &   !: name of the grid_T file 
     48      cfile_grid_U = 'dyna_grid_U.nc', &   !: name of the grid_U file 
     49      cfile_grid_V = 'dyna_grid_V.nc', &   !: name of the grid_V file 
     50      cfile_grid_W = 'dyna_grid_W.nc'      !: name of the grid_W file 
     51    
     52   REAL(wp)      ::   & 
     53      rnspdta  ,       &  !: number of time step per 2 consecutives data 
     54      rnspdta2            !: rnspdta * 0.5 
     55 
    4656   INTEGER ::     & 
    4757      ndyn1, ndyn2 , & 
     
    4959      numfl_t, numfl_u, & 
    5060      numfl_v, numfl_w 
    51  
    52    CHARACTER(len=45)  ::  & 
    53       cfile_grid_T = 'dyna_grid_T.nc', &   !: name of the grid_T file 
    54       cfile_grid_U = 'dyna_grid_U.nc', &   !: name of the grid_U file 
    55       cfile_grid_V = 'dyna_grid_V.nc', &   !: name of the grid_V file 
    56       cfile_grid_W = 'dyna_grid_W.nc'      !: name of the grid_W file 
    5761 
    5862   REAL(wp), DIMENSION(jpi,jpj,jpk,2) ::   & 
     
    161165      ENDIF 
    162166 
    163  
    164       zpdtan = raass / rdt 
    165       zpdtpe = zpdtan / FLOAT( ndtadyn ) 
    166       zdemi  = zpdtpe * 0.5 
    167       zt     = ( FLOAT (kt) + zdemi ) / zpdtpe 
    168     
     167      zt       = ( FLOAT (kt) + rnspdta2 ) / rnspdta 
    169168      izt      = INT( zt ) 
    170169      zweigh   = zt - FLOAT( INT(zt) ) 
     
    556555      !! * Local declarations 
    557556 
     557      REAL(wp) ::   znspyr   !: number of time step per year 
    558558 
    559559      NAMELIST/namdyn/ ndtadyn, ndtatot, nsptint, nficdyn, lperdyn,  & 
     
    586586         WRITE(numout,*) ' ' 
    587587      ENDIF 
     588 
     589      znspyr   = nyear_len(1) * rday / rdt   
     590      rnspdta  = znspyr / FLOAT( ndtadyn ) 
     591      rnspdta2 = rnspdta * 0.5  
    588592 
    589593   END SUBROUTINE dta_dyn_init 
  • trunk/NEMO/OFF_SRC/phycst.F90

    r1152 r1735  
    2424      rsiyea              ,     & !: sideral year (s) 
    2525      rsiday              ,     & !: sideral day (s) 
    26       raajj = 365._wp     ,     & !: number of days in one year 
    2726      raamo =  12._wp     ,     & !: number of months in one year 
    2827      rjjhh =  24._wp     ,     & !: number of hours in one day 
    2928      rhhmm =  60._wp     ,     & !: number of minutes in one hour 
    3029      rmmss =  60._wp     ,     & !: number of seconds in one minute 
    31       raass               ,     & !: number of seconds in one year 
    32       rmoss               ,     & !: number of seconds in one month 
    3330      rjjss               ,     & !: number of seconds in one day 
    3431!!!   omega = 7.292115083046061e-5_wp ,  &  !: change the last digit! 
     
    4037      rtt      = 273.16_wp  ,  &  !: triple point of temperature (Kelvin) 
    4138      rt0      = 273.15_wp  ,  &  !: freezing point of water (Kelvin) 
    42       rt0_snow = 273.15_wp  ,  &  !: melting point of snow  (Kelvin) 
    43       rt0_ice  = 273.05_wp  ,  &  !: melting point of ice   (Kelvin) 
    4439      rau0     = 1020._wp   ,  &  !: volumic mass of reference (kg/m3) 
    4540      rauw     = 1000._wp   ,  &  !: density of pure water (kg/m3) 
     
    4742      ro0cpr                      !: = 1. / ( rau0 * rcp ) 
    4843 
    49    REAL(wp), PUBLIC ::            &  !: 
    50       rcdsn   =   0.22_wp     ,   &  !: conductivity of the snow 
    51       rcdic   =   2.034396_wp ,   &  !: conductivity of the ice 
    52       rcpsn   =   6.9069e+5_wp,   &  !: density times specific heat for snow 
    53       rcpic   =   1.8837e+6_wp,   &  !: volumetric latent heat fusion of sea ice 
    54       xlsn    = 110.121e+6_wp ,   &  !: volumetric latent heat fusion of snow 
    55       xlic    = 300.33e+6_wp  ,   &  !: volumetric latent heat fusion of ice 
    56       xsn     =   2.8e+6      ,   &  !: latent heat of sublimation of snow 
    57       rhoic   = 900._wp       ,   &  !: density of sea ice (kg/m3) 
    58       rhosn   = 330._wp       ,   &  !: density of snow (kg/m3) 
    59       emic    =   0.97_wp     ,   &  !: emissivity of snow or ice 
    60       sice    =   6.0_wp      ,   &  !: salinity of ice (psu) 
    61       soce    =  34.7_wp      ,   &  !: salinity of sea (psu) 
    62       cevap   =   2.5e+6_wp   ,   &  !: latent heat of evaporation (water) 
    63       srgamma =   0.9_wp      ,   &  !: correction factor for solar radiation (Oberhuber, 1974) 
    64       vkarmn  =   0.4_wp      ,   &  !: von Karman constant 
    65       stefan  =   5.67e-8_wp         !: Stefan-Boltzmann constant  
    6644      !!---------------------------------------------------------------------- 
    6745      !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     
    134112      IF(lwp) WRITE(numout,*) '          omega                              omega  = ', omega,  ' s-1' 
    135113 
    136       rjjss = rjjhh * rhhmm * rmmss 
    137114      IF(lwp) WRITE(numout,*) 
    138       IF(lwp) WRITE(numout,*) '          nb of months per year               raamo = ', raamo, ' months' 
    139115      IF(lwp) WRITE(numout,*) '          nb of hours per day                 rjjhh = ', rjjhh, ' hours' 
    140116      IF(lwp) WRITE(numout,*) '          nb of minutes per hour              rhhmm = ', rhhmm, ' mn' 
    141117      IF(lwp) WRITE(numout,*) '          nb of seconds per minute            rmmss = ', rmmss, ' s' 
    142       IF(lwp) WRITE(numout,*) '          nb of seconds per day               rjjss = ', rjjss, ' s' 
    143118 
    144119      IF(lwp) WRITE(numout,*) 
     
    149124      IF(lwp) WRITE(numout,*) '          triple point of temperature      rtt      = ', rtt     , ' K' 
    150125      IF(lwp) WRITE(numout,*) '          freezing point of water          rt0      = ', rt0     , ' K' 
    151       IF(lwp) WRITE(numout,*) '          melting point of snow            rt0_snow = ', rt0_snow, ' K' 
    152       IF(lwp) WRITE(numout,*) '          melting point of ice             rt0_ice  = ', rt0_ice , ' K' 
    153126 
    154127      ro0cpr = 1. / ( rau0 * rcp ) 
     
    161134      IF(lwp) THEN 
    162135         WRITE(numout,*) 
    163          WRITE(numout,*) '          thermal conductivity of the snow          = ', rcdsn   , ' J/s/m/K' 
    164          WRITE(numout,*) '          thermal conductivity of the ice           = ', rcdic   , ' J/s/m/K' 
    165          WRITE(numout,*) '          density times specific heat for snow      = ', rcpsn   , ' J/m^3/K'  
    166          WRITE(numout,*) '          density times specific heat for ice       = ', rcpic   , ' J/m^3/K' 
    167          WRITE(numout,*) '          volumetric latent heat fusion of sea ice  = ', xlic    , ' J/m'  
    168          WRITE(numout,*) '          volumetric latent heat fusion of snow     = ', xlsn    , ' J/m'  
    169          WRITE(numout,*) '          latent heat of sublimation of snow        = ', xsn     , ' J/kg'  
    170          WRITE(numout,*) '          density of sea ice                        = ', rhoic   , ' kg/m^3' 
    171          WRITE(numout,*) '          density of snow                           = ', rhosn   , ' kg/m^3' 
    172          WRITE(numout,*) '          emissivity of snow or ice                 = ', emic   
    173          WRITE(numout,*) '          salinity of ice                           = ', sice    , ' psu' 
    174          WRITE(numout,*) '          salinity of sea                           = ', soce    , ' psu' 
    175          WRITE(numout,*) '          latent heat of evaporation (water)        = ', cevap   , ' J/m^3'  
    176          WRITE(numout,*) '          correction factor for solar radiation     = ', srgamma  
    177          WRITE(numout,*) '          von Karman constant                       = ', vkarmn  
    178          WRITE(numout,*) '          Stefan-Boltzmann constant                 = ', stefan  , ' J/s/m^2/K^4' 
    179  
    180136         WRITE(numout,*) 
    181137         WRITE(numout,*) '          conversion: degre ==> radian          rad = ', rad 
    182  
    183138         WRITE(numout,*) 
    184139         WRITE(numout,*) '          smallest real computer value       rsmall = ', rsmall 
  • trunk/NEMO/TOP_SRC/PISCES/p4zflx.F90

    r1678 r1735  
    3939 
    4040   REAL(wp) :: & 
    41       xconv  = 0.01/3600     !: coefficients for conversion  
     41      xconv  = 0.01/3600      !: coefficients for conversion  
     42 
     43   INTEGER  ::  nspyr         !: number of timestep per year 
    4244 
    4345#if defined key_cpl_carbon_cycle 
     
    6870      !!--------------------------------------------------------------------- 
    6971      INTEGER, INTENT(in) :: kt 
    70       INTEGER  ::   ji, jj, jrorr, nspyr 
     72      INTEGER  ::   ji, jj, jrorr 
    7173      REAL(wp) ::   ztc, ztc2, ztc3, zws, zkgwan 
    7274      REAL(wp) ::   zfld, zflu, zfld16, zflu16, zfact 
     
    8991      ! ----------------------------------------------------- 
    9092 
    91       nspyr = INT( raass / rdt ) 
     93      nspyr = INT( n/ rdt ) 
    9294 
    9395      ! SURFACE CHEMISTRY (PCO2 AND [H+] IN 
     
    262264      ENDIF 
    263265 
     266      ! number of time step per year   
     267      nspyr = INT( nyear_len(1) * rday / rdt ) 
     268 
    264269#if defined key_cpl_carbon_cycle 
    265270      ! Initialization of Flux of Carbon 
  • trunk/NEMO/TOP_SRC/PISCES/p4zlys.F90

    r1678 r1735  
    3737   REAL(wp) :: & 
    3838      calcon = 1.03E-2        ! mean calcite concentration [Ca2+] in sea water [mole/kg solution] 
     39 
     40   INTEGER ::               & 
     41     rmtss                    !: number of seconds per month 
    3942 
    4043   !!---------------------------------------------------------------------- 
     
    148151              !  CHANGE OF [CO3--] , [ALK], PARTICULATE [CACO3], 
    149152              !       AND [SUM(CO2)] DUE TO CACO3 DISSOLUTION/PRECIPITATION 
    150               zremco3 = zdispot / rmoss 
     153              zremco3 = zdispot / rmtss 
    151154              zco3(ji,jj,jk) = zco3(ji,jj,jk) + zremco3 * rfact 
    152155              tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + 2. * zremco3 
     
    214217      ENDIF 
    215218 
     219      ! Number of seconds per month  
     220      rmtss =  nyear_len(1) * rday / raamo 
     221 
    216222   END SUBROUTINE p4z_lys_init 
    217223 
  • trunk/NEMO/TOP_SRC/PISCES/p4zprod.F90

    r1562 r1735  
    5050      tpp                              !: Total primary production 
    5151 
     52   INTEGER  ::  nspyr                  !: number of timesteps per year 
     53 
    5254   !!* Substitution 
    5355#  include "domzgr_substitute.h90" 
     
    7072      !!--------------------------------------------------------------------- 
    7173      INTEGER, INTENT(in) :: kt, jnt 
    72       INTEGER  ::   ji, jj, jk, nspyr 
     74      INTEGER  ::   ji, jj, jk 
    7375      REAL(wp) ::   zsilfac, zfact 
    7476      REAL(wp) ::   zprdiachl, zprbiochl, zsilim, ztn, zadap, zadap2 
     
    107109      zprbio  (:,:,:) = 0.0 
    108110      zysopt  (:,:,:) = 0.0 
    109  
    110       nspyr  = INT( raass / rdt ) 
    111  
    112111 
    113112      ! Computation of the optimal production 
     
    432431      ENDIF 
    433432 
     433      ! number of timesteps per year 
     434      nspyr  = INT( nyear_len(1) * rday / rdt ) 
     435 
    434436      rpis180   = rpi / 180. 
    435437      texcret   = 1.0 - excret 
  • trunk/NEMO/TOP_SRC/PISCES/p4zsed.F90

    r1678 r1735  
    4747 
    4848   !! * Module variables 
    49    INTEGER ::          & 
    50       numdust,          &  ! logical unit for surface fluxes data 
    51       nflx1 , nflx2,   &  !  first and second record used 
     49   INTEGER ::                   & 
     50     ryyss,                     &  !: number of seconds per year 
     51     rmtss                         !: number of seconds per month 
     52 
     53   INTEGER ::                   & 
     54      numdust,                  &  !: logical unit for surface fluxes data 
     55      nflx1 , nflx2,            &  !: first and second record used 
    5256      nflx11, nflx12      ! ??? 
    5357   REAL(wp), DIMENSION(jpi,jpj,2) ::    &  !: 
     
    103107      IF( (jnt == 1) .and. ( ln_dustfer ) )  CALL p4z_sbc( kt ) 
    104108 
    105       zstep = rfact2 / rjjss      ! Time step duration for the biology 
     109      zstep = rfact2 / rday      ! Time step duration for the biology 
    106110 
    107111      zirondep(:,:,:) = 0.e0          ! Initialisation of variables used to compute deposition 
     
    113117      DO jj = 1, jpj 
    114118         DO ji = 1, jpi 
    115             zirondep(ji,jj,1) = ( dustsolub * dust(ji,jj) / ( 55.85 * rmoss ) + 3.e-10 / raass )   & 
     119            zirondep(ji,jj,1) = ( dustsolub * dust(ji,jj) / ( 55.85 * rmtss ) + 3.e-10 / ryyss )   & 
    116120               &             * rfact2 / fse3t(ji,jj,1) 
    117             zsidep  (ji,jj)   = 8.8 * 0.075 * dust(ji,jj) * rfact2 / ( fse3t(ji,jj,1) * 28.1 * rmoss ) 
     121            zsidep  (ji,jj)   = 8.8 * 0.075 * dust(ji,jj) * rfact2 / ( fse3t(ji,jj,1) * 28.1 * rmtss ) 
    118122         END DO 
    119123      END DO 
     
    123127 
    124128      DO jk = 2, jpkm1 
    125          zirondep(:,:,jk) = dust(:,:) / ( 10. * 55.85 * rmoss ) * rfact2 * 1.e-4 
     129         zirondep(:,:,jk) = dust(:,:) / ( 10. * 55.85 * rmtss ) * rfact2 * 1.e-4 
    126130      END DO 
    127131 
     
    159163         DO ji = 1, jpi 
    160164            ikt = MAX( mbathy(ji,jj)-1, 1 ) 
    161             zfact = e1t(ji,jj) * e2t(ji,jj) / rjjss * tmask_i(ji,jj) 
     165            zfact = e1t(ji,jj) * e2t(ji,jj) / rday * tmask_i(ji,jj) 
    162166# if defined key_kriest 
    163167            zsumsedsi  = zsumsedsi  + zfact *  trn(ji,jj,ikt,jpdsi) * wscal (ji,jj,ikt) 
     
    199203#if ! defined key_sed 
    200204            trn(ji,jj,ikt,jpsil) = trn(ji,jj,ikt,jpsil) + zconctmp   & 
    201             &      * ( 1.- ( sumdepsi + rivalkinput / raass / 6. ) / zsumsedsi ) 
     205            &      * ( 1.- ( sumdepsi + rivalkinput / ryyss / 6. ) / zsumsedsi ) 
    202206#endif 
    203207         END DO 
     
    212216#if ! defined key_sed 
    213217            trn(ji,jj,ikt,jptal) = trn(ji,jj,ikt,jptal) + zconctmp   & 
    214                &   * ( 1.- ( rivalkinput / raass ) / zsumsedcal ) * 2.e0 
     218               &   * ( 1.- ( rivalkinput / ryyss ) / zsumsedcal ) * 2.e0 
    215219            trn(ji,jj,ikt,jpdic) = trn(ji,jj,ikt,jpdic) + zconctmp   & 
    216                &   * ( 1.- ( rivalkinput / raass ) / zsumsedcal ) 
     220               &   * ( 1.- ( rivalkinput / ryyss ) / zsumsedcal ) 
    217221#endif 
    218222         END DO 
     
    231235            trn(ji,jj,ikt,jpdoc) = trn(ji,jj,ikt,jpdoc)    & 
    232236            &      + ( zconctmp  * wsbio4(ji,jj,ikt) + zconctmp2 * wsbio3(ji,jj,ikt) ) * zfact   & 
    233             &      * ( 1.- rivpo4input / (raass * zsumsedpo4 ) ) 
     237            &      * ( 1.- rivpo4input / (ryyss * zsumsedpo4 ) ) 
    234238#endif 
    235239            trn(ji,jj,ikt,jpbfe) = trn(ji,jj,ikt,jpbfe) - trn(ji,jj,ikt,jpbfe) * wsbio4(ji,jj,ikt) * zfact 
     
    246250            trn(ji,jj,ikt,jpdoc) = trn(ji,jj,ikt,jpdoc)    & 
    247251            &      + ( zconctmp2 * wsbio3(ji,jj,ikt) )   & 
    248             &      * zfact * ( 1.- rivpo4input / ( raass * zsumsedpo4 ) ) 
     252            &      * zfact * ( 1.- rivpo4input / ( ryyss * zsumsedpo4 ) ) 
    249253#endif 
    250254            trn(ji,jj,ikt,jpsfe) = trn(ji,jj,ikt,jpsfe)   & 
     
    282286               zlim = ( 1.- xnanono3(ji,jj,jk) - xnanonh4(ji,jj,jk) ) 
    283287               IF( zlim <= 0.2 )   zlim = 0.01 
    284                znitrpot(ji,jj,jk) = MAX( 0.e0, ( 0.6 * tgfunc(ji,jj,jk) - 2.15 ) / rjjss )   & 
     288               znitrpot(ji,jj,jk) = MAX( 0.e0, ( 0.6 * tgfunc(ji,jj,jk) - 2.15 ) / rday )   & 
    285289# if defined key_off_degrad 
    286290               &                  * facvol(ji,jj,jk)   & 
     
    565569 
    566570 
     571      ! Number of seconds per year and per month 
     572      ryyss = nyear_len(1) * rday 
     573      rmtss = ryyss / raamo 
     574 
    567575      ! total atmospheric supply of Si 
    568576      ! ------------------------------ 
     
    571579         DO jj = 2, jpjm1 
    572580            DO ji = fs_2, fs_jpim1 
    573                sumdepsi = sumdepsi + zdustmo(ji,jj,jm) / (12.*rmoss) * 8.8        & 
     581               sumdepsi = sumdepsi + zdustmo(ji,jj,jm) / (12.*rmtss) * 8.8        & 
    574582                  &     * 0.075/28.1 * e1t(ji,jj) * e2t(ji,jj) * tmask(ji,jj,1) * tmask_i(ji,jj) 
    575583            END DO 
     
    582590      DO jj = 1, jpj 
    583591         DO ji = 1, jpi 
    584             zcoef = raass * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,1) * tmask(ji,jj,1) * tmask_i(ji,jj) 
     592            zcoef = ryyss * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,1) * tmask(ji,jj,1) * tmask_i(ji,jj) 
    585593            cotdep(ji,jj) =  river(ji,jj)                  *1E9 / ( 12. * zcoef + rtrn ) 
    586594            rivinp(ji,jj) = (river(ji,jj)+riverdoc(ji,jj)) *1E9 / ( 31.6* zcoef + rtrn ) 
    587             nitdep(ji,jj) = 7.6 * ndepo(ji,jj)                  / ( 14E6*raass*fse3t(ji,jj,1) + rtrn ) 
     595            nitdep(ji,jj) = 7.6 * ndepo(ji,jj)                  / ( 14E6*ryyss*fse3t(ji,jj,1) + rtrn ) 
    588596         END DO 
    589597      END DO 
     
    596604      DO jj = 2 , jpjm1 
    597605         DO ji = fs_2, fs_jpim1 
    598             zcoef = cvol(ji,jj,1) * raass 
     606            zcoef = cvol(ji,jj,1) * ryyss 
    599607            rivpo4input = rivpo4input + rivinp(ji,jj) * zcoef 
    600608            rivalkinput = rivalkinput + cotdep(ji,jj) * zcoef 
     
    612620      ! ------------------------- 
    613621      DO jk = 1, jpkm1 
    614          ironsed(:,:,jk) = sedfeinput * cmask(:,:,jk) / ( fse3t(:,:,jk) * rjjss ) 
     622         ironsed(:,:,jk) = sedfeinput * cmask(:,:,jk) / ( fse3t(:,:,jk) * rday ) 
    615623      END DO 
    616624      CALL lbc_lnk( ironsed , 'T', 1. )      ! Lateral boundary conditions on ( ironsed )   (sign unchanged) 
Note: See TracChangeset for help on using the changeset viewer.