Changeset 7646 for trunk/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
- Timestamp:
- 2017-02-06T10:25:03+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90
r6140 r7646 24 24 25 25 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 26 29 27 30 !!---------------------------------------------------------------------- … … 82 85 ! mesh, only glamt and gphit ! 83 86 ! ============================= ! 84 87 ! 85 88 SELECT CASE( jphgr_msh ) ! type of horizontal mesh 86 89 ! 87 90 CASE ( 0 ) ! curvilinear coordinate on the sphere read in coordinate.nc file 88 91 ! 89 92 CALL iom_open( 'coordinates', inum ) 90 93 CALL iom_get( inum, jpdom_unknown, 'glamt', glamdta ) ! mig, mjg undefined at this point 91 94 CALL iom_get( inum, jpdom_unknown, 'gphit', gphidta ) ! so use jpdom_unknown not jpdom_data 92 95 CALL iom_close ( inum ) 93 96 ! 94 97 CASE ( 1 ) ! geographical mesh on the sphere with regular grid-spacing 95 98 ! 96 99 DO jj = 1, jpjdta 97 100 DO ji = 1, jpidta 98 101 zti = FLOAT( ji - 1 + nimpp - 1 ) 99 102 ztj = FLOAT( jj - 1 + njmpp - 1 ) 100 103 ! 101 104 glamdta(ji,jj) = ppglam0 + ppe1_deg * zti 102 105 gphidta(ji,jj) = ppgphi0 + ppe2_deg * ztj 103 106 END DO 104 107 END DO 105 108 ! 106 109 CASE ( 2:3 ) ! f- or beta-plane with regular grid-spacing 107 110 ! 108 111 glam0 = 0.e0 109 112 gphi0 = - ppe2_m * 1.e-3 110 113 ! 111 114 DO jj = 1, jpjdta 112 115 DO ji = 1, jpidta … … 115 118 END DO 116 119 END DO 117 120 ! 118 121 CASE ( 4 ) ! geographical mesh on the sphere, isotropic MERCATOR type 119 122 ! 120 123 IF( ppgphi0 == -90 ) CALL ctl_stop( ' Mercator grid cannot start at south pole !!!! ' ) 121 124 ! 122 125 zarg = rpi / 4. - rpi / 180. * ppgphi0 / 2. 123 126 ijeq = ABS( 180. / rpi * LOG( COS( zarg ) / SIN( zarg ) ) / ppe1_deg ) 124 127 IF( ppgphi0 > 0 ) ijeq = -ijeq 125 128 ! 126 129 DO jj = 1, jpjdta 127 130 DO ji = 1, jpidta 128 131 zti = FLOAT( ji - 1 + nimpp - 1 ) 129 132 ztj = FLOAT( jj - ijeq + njmpp - 1 ) 130 133 ! 131 134 glamdta(ji,jj) = ppglam0 + ppe1_deg * zti 132 135 gphidta(ji,jj) = 1. / rad * ASIN ( TANH( ppe1_deg * rad * ztj ) ) 133 136 END DO 134 137 END DO 135 138 ! 136 139 CASE ( 5 ) ! beta-plane with regular grid-spacing and rotated domain (GYRE configuration) 137 140 ! 138 141 zlam1 = -85 139 142 zphi1 = 29 140 ze1 = 106000. / FLOAT(jp_cfg)141 143 ze1 = 106000. / REAL( nn_cfg , wp ) 144 ! 142 145 zsin_alpha = - SQRT( 2. ) / 2. 143 146 zcos_alpha = SQRT( 2. ) / 2. 144 147 ze1deg = ze1 / (ra * rad) 145 148 ! 146 149 glam0 = zlam1 + zcos_alpha * ze1deg * FLOAT( jpjdta-2 ) ! Force global 147 150 gphi0 = zphi1 + zsin_alpha * ze1deg * FLOAT( jpjdta-2 ) 148 151 ! 149 152 DO jj = 1, jpjdta 150 153 DO ji = 1, jpidta … … 156 159 END DO 157 160 END DO 158 161 ! 159 162 CASE DEFAULT 160 163 ! 161 164 WRITE(ctmp1,*) ' bad flag value for jphgr_msh = ', jphgr_msh 162 165 CALL ctl_stop( ctmp1 ) 163 166 ! 164 167 END SELECT 165 168
Note: See TracChangeset
for help on using the changeset viewer.