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

Changeset 12751 for NEMO/branches


Ignore:
Timestamp:
2020-04-16T09:44:23+02:00 (4 years ago)
Author:
clem
Message:

update CANAL for students experiments

Location:
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/EXPREF/namelist_cfg

    r12206 r12751  
    2020&namusr_def    !   User defined :   CANAL configuration: Flat bottom, beta-plane 
    2121!----------------------------------------------------------------------- 
    22    rn_domszx   =   3600.   !  x horizontal size         [km] 
    23    rn_domszy   =   1800.   !  y horizontal size         [km] 
    24    rn_domszz   =   5000.   !  z vertical size            [m] 
    25    rn_dx       =     30.   !  x horizontal resolution   [km] 
    26    rn_dy       =     30.   !  y horizontal resolution   [km] 
    27    rn_dz       =    500.   !  z vertical resolution      [m] 
     22   rn_domszx   =   2000.   !  x horizontal size         [km] 
     23   rn_domszy   =   1000.   !  y horizontal size         [km] 
     24   rn_domszz   =   1000.   !  z vertical size            [m] 
     25   rn_dx       =     10.   !  x horizontal resolution   [km] 
     26   rn_dy       =     10.   !  y horizontal resolution   [km] 
     27   rn_dz       =   1000.   !  z vertical resolution      [m] 
    2828   rn_0xratio  =      0.5  !  x-domain ratio of the 0 
    2929   rn_0yratio  =      0.5  !  y-domain ratio of the 0 
     
    3131   rn_ppgphi0  =    38.5   !  Reference latitude      [degrees] 
    3232   rn_u10      =      0.   !  10m wind speed              [m/s] 
    33      rn_windszx =   4000.   !  longitudinal wind extension   [km] 
    34      rn_windszy =   4000.   !  latitudinal wind extension    [km] 
    35      rn_uofac  =      0.   !  Uoce multiplicative factor (0.:absolute or 1.:relative winds) 
     33     rn_windszx =   90.    !  longitudinal wind extension   [km] 
     34     rn_windszy =   90.    !  latitudinal wind extension    [km] 
     35!!clem     rn_uofac  =     0.    !  Uoce multiplicative factor (0.:absolute or 1.:relative winds) 
    3636   rn_vtxmax   =      1.   !  initial vortex max current  [m/s] 
    3737   rn_uzonal   =      1.   !  initial zonal current       [m/s] 
    38      rn_ujetszx =   4000.   !  longitudinal jet extension   [km] 
    39      rn_ujetszy =   4000.   !  latitudinal jet extension    [km] 
     38     rn_ujetszx =   4000.  !  longitudinal jet extension   [km] 
     39     rn_ujetszy =   400.   !  latitudinal jet extension    [km] 
    4040   nn_botcase  =      0    !  bottom definition (0:flat, 1:bump) 
    41    nn_initcase =      1    !  initial condition case (0:rest, 1:zonal current, 2:current shear, 3: gaussian zonal current, 
    42       !                    !                          4: geostrophic zonal pulse, 5: vortex) 
    43    ln_sshnoise =  .false.  !  add random noise on initial ssh 
    44    rn_lambda   =     50.   ! gaussian lambda 
     41   nn_initcase =      1    !  initial condition case 
     42   !                       !          -1 : stratif at rest 
     43   !                       !           0 : rest 
     44   !                       !           1 : zonal current 
     45   !                       !           2 : current shear 
     46   !                       !           3 : gaussian zonal current 
     47   !                       !           4 : geostrophic zonal pulse 
     48   !                       !           5 : baroclinic vortex 
     49   ln_sshnoise =  .FALSE.  !  add random noise on initial ssh 
     50   rn_lambda   =     50.   !  gaussian lambda 
     51   nn_perio    = 1 
    4552/ 
    4653!----------------------------------------------------------------------- 
     
    5966!----------------------------------------------------------------------- 
    6067   ln_linssh   =  .false.  !  =T  linear free surface  ==>>  model level are fixed in time 
    61    rn_rdt      =   1440.   !  time step for the dynamics (and tracer if nn_acc=0) 
    62    rn_atfp     =   0.05    !  asselin time filter parameter 
     68   rn_rdt      =   1200.   !  time step for the dynamics (and tracer if nn_acc=0) 
     69   rn_atfp     =   0.0     !  asselin time filter parameter 
     70/ 
     71!----------------------------------------------------------------------- 
     72&namcfg        !   parameters of the configuration                      (default: use namusr_def in namelist_cfg) 
     73!----------------------------------------------------------------------- 
     74   ln_write_cfg = .false.   !  (=T) create the domain configuration file 
     75      cn_domcfg_out = "domain_cfg" ! newly created domain configuration filename 
    6376/ 
    6477!!====================================================================== 
     
    148161   ln_traadv_OFF = .false. !  No tracer advection 
    149162   ln_traadv_cen = .false. !  2nd order centered scheme 
    150       nn_cen_h   =  4            !  =2/4, horizontal 2nd order CEN / 4th order CEN 
    151       nn_cen_v   =  4            !  =2/4, vertical   2nd order CEN / 4th order COMPACT 
     163      nn_cen_h   =  2            !  =2/4, horizontal 2nd order CEN / 4th order CEN 
     164      nn_cen_v   =  2            !  =2/4, vertical   2nd order CEN / 4th order COMPACT 
    152165   ln_traadv_fct = .false. !  FCT scheme 
    153       nn_fct_h   =  2            !  =2/4, horizontal 2nd / 4th order 
     166      nn_fct_h   =  4            !  =2/4, horizontal 2nd / 4th order 
    154167      nn_fct_v   =  2            !  =2/4, vertical   2nd / COMPACT 4th order 
    155168   ln_traadv_mus = .false. !  MUSCL scheme 
     
    162175&namtra_ldf    !   lateral diffusion scheme for tracers                 (default: NO selection) 
    163176!----------------------------------------------------------------------- 
    164    ln_traldf_OFF   =  .true.  !  No explicit diffusion 
     177   !                       !  Operator type: 
     178   ln_traldf_OFF   = .true.    !  No explicit diffusion 
     179   ln_traldf_lap   = .false.   !    laplacian operator 
     180   ln_traldf_blp   = .false.   !  bilaplacian operator 
     181   ! 
     182   !                       !  Direction of action: 
     183   ln_traldf_lev   = .false.   !  iso-level 
     184   ln_traldf_hor   = .true.    !  horizontal  (geopotential) 
     185   ln_traldf_iso   = .false.   !  iso-neutral (standard operator) 
     186   ln_traldf_triad = .false.   !  iso-neutral (triad    operator) 
     187   ! 
     188   !                             !  iso-neutral options: 
     189   ln_traldf_msc   = .false.   !  Method of Stabilizing Correction      (both operators) 
     190   rn_slpmax       =  0.01     !  slope limit                           (both operators) 
     191   ln_triad_iso    = .false.   !  pure horizontal mixing in ML              (triad only) 
     192   rn_sw_triad     = 1         !  =1 switching triad ; =0 all 4 triads used (triad only) 
     193   ln_botmix_triad = .false.   !  lateral mixing on bottom                  (triad only) 
     194   ! 
     195   !                       !  Coefficients: 
     196   nn_aht_ijk_t    = 31         !  space/time variation of eddy coefficient: 
     197      !                             !   =-20 (=-30)    read in eddy_diffusivity_2D.nc (..._3D.nc) file 
     198      !                             !   =  0           constant 
     199      !                             !   = 10 F(k)      =ldf_c1d 
     200      !                             !   = 20 F(i,j)    =ldf_c2d 
     201      !                             !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation 
     202      !                             !   = 30 F(i,j,k)  =ldf_c2d * ldf_c1d 
     203      !                             !   = 31 F(i,j,k,t)=F(local velocity and grid-spacing) 
     204      !                        !  time invariant coefficients:  aht0 = 1/2  Ud*Ld   (lap case) 
     205      !                             !                           or   = 1/12 Ud*Ld^3 (blp case) 
     206      rn_Ud        = 0.01           !  lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30) 
     207      rn_Ld        = 200.e+3        !  lateral diffusive length   [m]   (nn_aht_ijk_t= 0, 10) 
    165208/ 
    166209!!====================================================================== 
     
    183226      nn_dynkeg     = 0       ! scheme for grad(KE): =0   C2  ;  =1   Hollingsworth correction 
    184227   ln_dynadv_cen2 = .false. !  flux form - 2nd order centered scheme 
    185    ln_dynadv_ubs = .true.  !  flux form - 3rd order UBS      scheme 
     228   ln_dynadv_ubs  = .true.  !  flux form - 3rd order UBS      scheme 
    186229/ 
    187230!----------------------------------------------------------------------- 
    188231&namdyn_vor    !   Vorticity / Coriolis scheme                          (default: NO selection) 
    189232!----------------------------------------------------------------------- 
    190    ln_dynvor_ene = .true.  !  energy conserving scheme 
    191    ln_dynvor_ens = .false. !  enstrophy conserving scheme 
    192    ln_dynvor_mix = .false. !  mixed scheme 
     233   ln_dynvor_ene = .false.  !  energy conserving scheme 
     234   ln_dynvor_ens = .false.  !  enstrophy conserving scheme 
     235   ln_dynvor_mix = .false.  !  mixed scheme 
    193236   ln_dynvor_een = .false.  !  energy & enstrophy scheme 
     237   ln_dynvor_enT = .false.  !  energy conserving scheme (T-point) 
     238   ln_dynvor_eeT = .true.   !  energy conserving scheme (een using e3t) 
    194239      nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    195240/ 
     
    210255         !                          !                     = 1 Boxcar over   nn_baro sub-steps 
    211256         !                          !                     = 2 Boxcar over 2*nn_baro  "    " 
    212       ln_bt_auto    = .false.    ! Number of sub-step defined from: 
     257      ln_bt_auto    = .true.    ! Number of sub-step defined from: 
    213258         nn_baro      =  24         ! =F : the number of sub-step in rn_rdt seconds 
    214259/ 
     
    222267   !                       !  Direction of action  : 
    223268   ln_dynldf_lev =  .false.    !  iso-level 
    224    ln_dynldf_hor =  .true.    !  horizontal (geopotential) 
     269   ln_dynldf_hor =  .false.    !  horizontal (geopotential) 
    225270   ln_dynldf_iso =  .false.    !  iso-neutral 
    226271   !                       !  Coefficient 
    227    nn_ahm_ijk_t  = 20           !  space/time variation of eddy coef 
     272   nn_ahm_ijk_t  = 31           !  space/time variation of eddy coef 
    228273      !                             !  =-30  read in eddy_viscosity_3D.nc file 
    229274      !                             !  =-20  read in eddy_viscosity_2D.nc file 
     
    275320!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    276321!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    277 !!   namflo       float parameters                                      (default: OFF) 
    278 !!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
    279 !!   nam_diadct   transports through some sections                      (default: OFF) 
     322!!   namflo       float parameters                                      ("key_float") 
     323!!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
     324!!   namdct       transports through some sections                      ("key_diadct") 
     325!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    280326!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
    281327!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4") 
     
    286332!----------------------------------------------------------------------- 
    287333   ln_glo_trd  = .false.   ! (T) global domain averaged diag for T, T^2, KE, and PE 
    288    ln_dyn_trd  = .true.   ! (T) 3D momentum trend output 
     334   ln_dyn_trd  = .true.    ! (T) 3D momentum trend output 
    289335   ln_dyn_mxl  = .false.   ! (T) 2D momentum trends averaged over the mixed layer (not coded yet) 
    290336   ln_vor_trd  = .false.   ! (T) 2D barotropic vorticity trends (not coded yet) 
     
    313359&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
    314360!----------------------------------------------------------------------- 
     361!!   jpni        =   8       !  jpni   number of processors following i (set automatically if < 1) 
     362!!   jpnj        =   1       !  jpnj   number of processors following j (set automatically if < 1) 
    315363/ 
    316364!----------------------------------------------------------------------- 
    317365&namctl        !   Control prints                                       (default: OFF) 
    318366!----------------------------------------------------------------------- 
     367   ln_timing   = .true.   !  timing by routine write out in timing.output file 
     368!!   ln_diacfl   = .true.   !  CFL diagnostics write out in cfl_diagnostics.ascii 
    319369/ 
    320370!----------------------------------------------------------------------- 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/usrdef_istate.F90

    r10425 r12751  
    6464      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   ' 
    6565      ! 
    66       IF (ln_sshnoise) CALL RANDOM_NUMBER(zrandom) 
    6766      zjetx = ABS(rn_ujetszx)/2. 
    6867      zjety = ABS(rn_ujetszy)/2. 
    6968      ! 
     69      zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
     70      ! 
    7071      SELECT CASE(nn_initcase) 
     72 
     73      CASE(-1)    ! stratif at rest 
     74 
     75         ! sea level: 
     76         pssh(:,:) = 0. 
     77         ! temperature: 
     78         pts(:,:,1,jp_tem) = 25. !!30._wp 
     79         pts(:,:,2:jpk,jp_tem) = 22. !!24._wp 
     80         ! salinity:   
     81         pts(:,:,:,jp_sal) = 35._wp 
     82         ! velocities: 
     83         pu(:,:,:) = 0. 
     84         pv(:,:,:) = 0. 
     85 
    7186      CASE(0)    ! rest 
    7287          
     
    96111            zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 
    97112            WHERE( ABS(gphit) <= zjety ) 
    98                pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:) * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
    99             ELSEWHERE 
    100                pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:) * SIGN(zjety, gphit(:,:)) * 1.e3   & 
     113               pssh(:,:) = - rn_uzonal / grav * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
     114            ELSEWHERE 
     115               pssh(:,:) = - rn_uzonal / grav * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3   & 
    101116                  &                             + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
    102117            END WHERE 
     
    107122         pts(:,:,jpk,jp_sal) = 0. 
    108123         DO jk=1, jpkm1 
    109             pts(:,:,jk,jp_sal) = gphit(:,:) 
     124            WHERE( ABS(gphit) <= zjety ) 
     125!!$            WHERE( ABS(gphit) <= zjety*0.5 .AND. ABS(glamt) <= zjety*0.5 ) ! for a square of salt 
     126               pts(:,:,jk,jp_sal) = 35. 
     127            ELSEWHERE 
     128               pts(:,:,jk,jp_sal) = 30. 
     129            END WHERE                     
    110130         END DO 
    111131         ! velocities: 
     
    132152            WHERE( ABS(gphit) <= zjety ) 
    133153               pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
    134                   &        * ( ff_t(:,:) * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
     154                  &        * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
    135155            ELSEWHERE 
    136156               pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
    137                   &        * ( ff_t(:,:) * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
     157                  &        * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
    138158            END WHERE 
    139159         END SELECT 
     
    141161         pts(:,:,:,jp_tem) = 10._wp 
    142162         ! salinity:   
    143          pts(:,:,:,jp_sal) = 2. 
    144          DO jk=1, jpkm1 
    145             WHERE( ABS(gphiv) <= zjety ) pts(:,:,jk,jp_sal) = 2. + SIGN(1.,gphiv(:,:)) 
     163         pts(:,:,:,jp_sal) = 30. 
     164         DO jk=1, jpkm1 
     165            WHERE( ABS(gphiv) <= zjety ) pts(:,:,jk,jp_sal) = 30. + SIGN(1.,gphiv(:,:)) 
    146166         END DO 
    147167         ! velocities: 
     
    176196         ! salinity:   
    177197         DO jk=1, jpkm1 
    178             pts(:,:,jk,jp_sal) = gphit(:,:) 
     198            pts(:,:,jk,jp_sal) = pssh(:,:) 
    179199         END DO 
    180200         ! velocities: 
     
    213233         zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
    214234         zumax = rn_vtxmax * SIGN(1._wp, zf0) ! Here Anticyclonic: set zumax=-1 for cyclonic 
    215          zlambda = SQRT(2._wp)*rn_lambda       ! Horizontal scale in meters  
     235         zlambda = SQRT(2._wp)*rn_lambda*1.e3       ! Horizontal scale in meters  
    216236         zn2 = 3.e-3**2 
    217237         zH = 0.5_wp * 5000._wp 
     
    253273         ! velocities: 
    254274         za = 2._wp * zP0 / zlambda**2 
    255          DO jj=1, jpj 
    256             DO ji=1, jpim1 
     275         DO jj = 2, jpjm1 
     276            DO ji = 2, jpim1 
    257277               zx = glamu(ji,jj) * 1.e3 
    258278               zy = gphiu(ji,jj) * 1.e3 
     
    270290         END DO 
    271291         ! 
    272          DO jj=1, jpjm1 
    273             DO ji=1, jpi 
     292         DO jj = 2, jpjm1 
     293            DO ji = 2, jpim1 
    274294               zx = glamv(ji,jj) * 1.e3 
    275295               zy = gphiv(ji,jj) * 1.e3 
     
    287307         END DO 
    288308         !             
     309         CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
     310 
    289311      END SELECT 
    290312 
    291313      IF (ln_sshnoise) THEN 
     314         CALL RANDOM_SEED() 
    292315         CALL RANDOM_NUMBER(zrandom) 
    293316         pssh(:,:) = pssh(:,:) + ( 0.1  * zrandom(:,:) - 0.05 ) 
    294317      END IF 
    295       CALL lbc_lnk( 'usrdef_istate', pssh, 'T',  1. ) 
    296       CALL lbc_lnk(  'usrdef_istate', pts, 'T',  1. ) 
    297       CALL lbc_lnk(   'usrdef_istate', pu, 'U', -1. ) 
    298       CALL lbc_lnk(   'usrdef_istate', pv, 'V', -1. ) 
    299  
     318   
    300319   END SUBROUTINE usr_def_istate 
    301320 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/usrdef_nam.F90

    r11899 r12751  
    5050   LOGICAL , PUBLIC ::   ln_sshnoise=.false. ! add random noise on initial ssh 
    5151   REAL(wp), PUBLIC ::   rn_lambda  = 50.    ! gaussian lambda 
     52   INTEGER , PUBLIC ::   nn_perio   =    0   ! periodicity of the channel (0=closed, 1=E-W) 
    5253 
    5354   !!---------------------------------------------------------------------- 
     
    7980      !! 
    8081      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio   & 
    81          &                 , nn_fcase, rn_ppgphi0, rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy   & 
    82          &                 , rn_u10, rn_windszx, rn_windszy, rn_uofac   & 
    83          &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda 
     82         &                 , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac   & 
     83         &                 , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy  & 
     84         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio 
    8485      !!---------------------------------------------------------------------- 
    8586      ! 
     
    151152         WRITE(numout,*) '      add random noise on initial ssh   ln_sshnoise= ', ln_sshnoise 
    152153         WRITE(numout,*) '      Gaussian lambda parameter          rn_lambda = ', rn_lambda 
    153          WRITE(numout,*) '   ' 
    154          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    155          WRITE(numout,*) '      EW_CANAL : closed basin               jperio = ', kperio 
     154         WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio 
    156155      ENDIF 
     156      !                             ! Set the lateral boundary condition of the global domain 
     157      kperio = nn_perio                    ! EW_CANAL configuration : closed basin 
    157158      ! 
    158159   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/usrdef_sbc.F90

    r10074 r12751  
    1717   USE sbc_oce         ! Surface boundary condition: ocean fields 
    1818   USE phycst          ! physical constants 
    19    USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy  
     19   USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy, rn_windszx  
    2020   ! 
    2121   USE in_out_manager  ! I/O manager 
     
    7171         ! 
    7272         utau(:,:) = 0._wp 
    73          IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN 
    74             WHERE( ABS(gphit) <= rn_windszy/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u10 
    75          ENDIF 
    7673         vtau(:,:) = 0._wp 
    7774         taum(:,:) = 0._wp 
     
    8380         qsr (:,:) = 0._wp 
    8481         !          
     82      ENDIF 
     83 
     84      IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN 
     85         IF( nyear == 1 .AND. nmonth == 1 .AND. nday <= 10 ) THEN 
     86            WHERE( ABS(gphit) <= rn_windszy/2. .AND. ABS(glamt) <= rn_windszx/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u10 
     87         ELSE 
     88            utau(:,:) = 0. 
     89         ENDIF 
    8590      ENDIF 
    8691 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/usrdef_zgr.F90

    r10425 r12751  
    199199         zmaxlam = MAXVAL(glamt) 
    200200         CALL mpp_max( 'usrdef_zgr', zmaxlam )                 ! max over the global domain 
    201          zscl = rpi / zmaxlam 
    202          z2d(:,:) = 0.5 * ( 1. - COS( glamt(:,:) * zscl ) ) 
    203          z2d(:,:) = REAL(jpkm1 - NINT( 0.75 * REAL(jpkm1,wp) * z2d(:,:) ), wp) 
     201         zscl = 0.5 * rpi / zmaxlam 
     202         z2d(:,:) = COS( glamt(:,:) * zscl ) 
     203         z2d(:,:) = REAL(jpkm1 - NINT( 0.5 * REAL(jpkm1,wp) * z2d(:,:) ), wp) 
    204204      END SELECT 
    205205      ! 
Note: See TracChangeset for help on using the changeset viewer.