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 7277 for branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90 – NEMO

Ignore:
Timestamp:
2016-11-21T09:55:07+01:00 (8 years ago)
Author:
flavoni
Message:

update 2016 branch with simplif-2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90

    r6140 r7277  
    2424 
    2525   PUBLIC   dom_c1d   ! called in domcfg.F90 
     26 
     27   INTEGER ::   jpizoom = 1      !: left bottom (i,j) indices of the zoom 
     28   INTEGER ::   jpjzoom = 1      !: in data domain indices 
    2629 
    2730   !!---------------------------------------------------------------------- 
     
    8285      !  mesh, only glamt and gphit   ! 
    8386      ! ============================= ! 
    84  
     87      ! 
    8588      SELECT CASE( jphgr_msh )   ! type of horizontal mesh 
    86  
     89      ! 
    8790      CASE ( 0 )                 !  curvilinear coordinate on the sphere read in coordinate.nc file 
    88  
     91         ! 
    8992         CALL iom_open( 'coordinates', inum ) 
    9093         CALL iom_get( inum, jpdom_unknown, 'glamt', glamdta ) ! mig, mjg undefined at this point 
    9194         CALL iom_get( inum, jpdom_unknown, 'gphit', gphidta ) ! so use jpdom_unknown not jpdom_data 
    9295         CALL iom_close ( inum ) 
    93  
     96         ! 
    9497      CASE ( 1 )                 ! geographical mesh on the sphere with regular grid-spacing 
    95  
     98         ! 
    9699         DO jj = 1, jpjdta 
    97100            DO ji = 1, jpidta 
    98101               zti = FLOAT( ji - 1 + nimpp - 1 ) 
    99102               ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    100  
     103               ! 
    101104               glamdta(ji,jj) = ppglam0 + ppe1_deg * zti 
    102105               gphidta(ji,jj) = ppgphi0 + ppe2_deg * ztj 
    103106            END DO 
    104107         END DO 
    105  
     108         ! 
    106109      CASE ( 2:3 )               ! f- or beta-plane with regular grid-spacing 
    107           
     110         ! 
    108111         glam0 = 0.e0 
    109112         gphi0 = - ppe2_m * 1.e-3 
    110  
     113         ! 
    111114         DO jj = 1, jpjdta 
    112115            DO ji = 1, jpidta 
     
    115118            END DO 
    116119         END DO 
    117  
     120         ! 
    118121      CASE ( 4 )                 ! geographical mesh on the sphere, isotropic MERCATOR type 
    119  
     122         ! 
    120123         IF( ppgphi0 == -90 )   CALL ctl_stop( ' Mercator grid cannot start at south pole !!!! ' ) 
    121  
     124         ! 
    122125         zarg = rpi / 4. - rpi / 180. * ppgphi0 / 2. 
    123126         ijeq = ABS( 180. / rpi * LOG( COS( zarg ) / SIN( zarg ) ) / ppe1_deg ) 
    124127         IF( ppgphi0 > 0 )   ijeq = -ijeq 
    125  
     128         ! 
    126129         DO jj = 1, jpjdta 
    127130            DO ji = 1, jpidta 
    128131               zti = FLOAT( ji - 1    + nimpp - 1 ) 
    129132               ztj = FLOAT( jj - ijeq + njmpp - 1 ) 
    130  
     133               ! 
    131134               glamdta(ji,jj) = ppglam0 + ppe1_deg * zti 
    132135               gphidta(ji,jj) = 1. / rad * ASIN ( TANH( ppe1_deg * rad * ztj ) ) 
    133136            END DO 
    134137         END DO 
    135  
     138         ! 
    136139      CASE ( 5 )                 ! beta-plane with regular grid-spacing and rotated domain (GYRE configuration) 
    137     
     140         ! 
    138141         zlam1 = -85 
    139142         zphi1 = 29 
    140          ze1 = 106000. / FLOAT(jp_cfg) 
    141   
     143         ze1 = 106000. / REAL( nn_cfg , wp ) 
     144         ! 
    142145         zsin_alpha = - SQRT( 2. ) / 2. 
    143146         zcos_alpha =   SQRT( 2. ) / 2. 
    144147         ze1deg = ze1 / (ra * rad) 
    145  
     148         ! 
    146149         glam0 = zlam1 + zcos_alpha * ze1deg * FLOAT( jpjdta-2 ) ! Force global 
    147150         gphi0 = zphi1 + zsin_alpha * ze1deg * FLOAT( jpjdta-2 ) 
    148  
     151         ! 
    149152         DO jj = 1, jpjdta 
    150153            DO ji = 1, jpidta 
     
    156159            END DO 
    157160         END DO 
    158  
     161         ! 
    159162      CASE DEFAULT 
    160  
     163         ! 
    161164         WRITE(ctmp1,*) '          bad flag value for jphgr_msh = ', jphgr_msh 
    162165         CALL ctl_stop( ctmp1 ) 
    163  
     166         ! 
    164167      END SELECT 
    165168 
Note: See TracChangeset for help on using the changeset viewer.