- Timestamp:
- 06/05/07 15:04:05 (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/condmag_on_orca.pro
r19 r20 104 104 'ORCA2': BEGIN 105 105 msg = 'iii : valid orcares parameter = ' + orcares 106 PRINT, msg106 ras = report(msg) 107 107 filename_oce = 'meshmask_bab.nc' 108 108 IF keyword_set(DRAKKAR_EXP) THEN BEGIN 109 109 msg = 'www : unused DRAKKAR_EXP keyword = ' + drakkar_exp 110 PRINT, msg110 ras = report(msg) 111 111 END 112 112 END 113 113 'ORCA025': BEGIN 114 114 msg = 'iii : valid orcares parameter = ' + orcares 115 PRINT, msg115 ras = report(msg) 116 116 IF keyword_set(DRAKKAR_EXP) THEN BEGIN 117 117 msg = 'iii : DRAKKAR_EXP keyword set' 118 PRINT, msg118 ras = report(msg) 119 119 msg = 'iii : DRAKKAR_EXP = ' + drakkar_exp 120 PRINT, msg120 ras = report(msg) 121 121 CASE drakkar_exp OF 122 122 'G42' : BEGIN 123 123 msg = 'iii : valid DRAKKAR_EXP keyword = ' + drakkar_exp 124 PRINT, msg124 ras = report(msg) 125 125 END 126 126 'G70' : BEGIN 127 127 msg = 'iii : valid DRAKKAR_EXP keyword = ' + drakkar_exp 128 PRINT, msg128 ras = report(msg) 129 129 END 130 130 ELSE : BEGIN 131 131 msg = 'eee : invalid DRAKKAR_EXP keyword = ' + drakkar_exp 132 PRINT, msg132 ras = report(msg) 133 133 RETURN 134 134 END … … 139 139 ELSE : BEGIN 140 140 msg = 'eee : invalid orcares parameter = ' + orcares 141 PRINT, msg141 ras = report(msg) 142 142 msg = 'eee : orcares must be ORCA2 or ORCA025' 143 PRINT, msg143 ras = report(msg) 144 144 RETURN 145 145 END … … 150 150 'bilinear': BEGIN 151 151 msg = 'iii : valid method parameter = ' + method 152 PRINT, msg152 ras = report(msg) 153 153 END 154 154 'imoms3' : BEGIN 155 155 msg = 'iii : valid method parameter = ' + method 156 PRINT, msg156 ras = report(msg) 157 157 END 158 158 ELSE : BEGIN 159 159 msg = 'eee : invalid method parameter = ' + method 160 PRINT, msg160 ras = report(msg) 161 161 msg = 'eee : method must be bilinear or imoms3' 162 PRINT, msg162 ras = report(msg) 163 163 RETURN 164 164 END … … 170 170 'T' : BEGIN 171 171 msg = 'iii : valid gridtype parameter = ' + gridtype 172 PRINT, msg172 ras = report(msg) 173 173 END 174 174 'U' : BEGIN 175 175 msg = 'iii : valid gridtype parameter = ' + gridtype 176 PRINT, msg176 ras = report(msg) 177 177 END 178 178 'V' : BEGIN 179 179 msg = 'iii : valid gridtype parameter = ' + gridtype 180 PRINT, msg180 ras = report(msg) 181 181 END 182 182 ELSE: BEGIN 183 183 msg = 'eee : invalid gridtype parameter = ' + gridtype 184 PRINT, msg184 ras = report(msg) 185 185 msg = 'eee : gridtype must be T, U or V' 186 PRINT, msg186 ras = report(msg) 187 187 RETURN 188 188 END … … 196 196 '' : BEGIN 197 197 msg = 'eee : ${GEOMAG_ID} is not defined' 198 PRINT, msg198 ras = report(msg) 199 199 RETURN 200 200 END 201 201 ELSE: BEGIN 202 202 msg = 'iii : ${GEOMAG_ID} is ' + geomag_id_env 203 PRINT, msg203 ras = report(msg) 204 204 END 205 205 ENDCASE … … 210 210 IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 211 211 msg = 'eee : the directory' + iodirin + ' is not accessible.' 212 PRINT, msg212 ras = report(msg) 213 213 RETURN 214 214 ENDIF … … 221 221 IF fullfilename_condmag[0] EQ '' THEN BEGIN 222 222 msg = 'eee : the file ' + fullfilename_condmag + ' was not found.' 223 PRINT, msg223 ras = report(msg) 224 224 RETURN 225 225 ENDIF … … 228 228 IF (FILE_TEST(fullfilename_condmag[0], /READ) EQ 0) THEN BEGIN 229 229 msg = 'eee : the file ' + fullfilename_condmag[0] + ' is not readable.' 230 PRINT, msg230 ras = report(msg) 231 231 RETURN 232 232 ENDIF … … 238 238 IF fullfilename_oce[0] EQ '' THEN BEGIN 239 239 msg = 'eee : the file ' + fullfilename_oce + ' was not found.' 240 PRINT, msg240 ras = report(msg) 241 241 RETURN 242 242 ENDIF … … 245 245 IF (FILE_TEST(fullfilename_oce[0], /READ) EQ 0) THEN BEGIN 246 246 msg = 'eee : the file ' + fullfilename_oce[0] + ' is not readable.' 247 PRINT, msg247 ras = report(msg) 248 248 RETURN 249 249 ENDIF … … 254 254 '' : BEGIN 255 255 msg = 'eee : ${GEOMAG_OD} is not defined' 256 PRINT, msg256 ras = report(msg) 257 257 RETURN 258 258 END 259 259 ELSE: BEGIN 260 260 msg = 'iii : ${GEOMAG_OD} is ' + geomag_od_env 261 PRINT, msg261 ras = report(msg) 262 262 END 263 263 ENDCASE … … 269 269 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 270 270 msg = 'eee : the directory' + iodirout + ' was not found.' 271 PRINT, msg271 ras = report(msg) 272 272 RETURN 273 273 ENDIF … … 295 295 olon, olat, jpio, jpjo, 2, /DOUBLE 296 296 msg = 'iii : ' + fullfilename_oce[0] + ' opened for read' 297 PRINT, msg297 ras = report(msg) 298 298 ; 299 299 ;--------------- … … 311 311 netcdf_id_condmag = NCDF_OPEN(fullfilename_condmag[0], /NOWRITE) 312 312 msg = 'iii : ' + fullfilename_condmag[0] + ' opened for read' 313 PRINT, msg313 ras = report(msg) 314 314 ; 315 315 varname_cond_sed = 'cond_sed' -
trunk/initorca2_bab.pro
r19 r20 1 1 ; + 2 ; 2 3 ; @file_comments 3 ; initialisation on ORCA2 grid 4 ; initialisation on ORCA grid 5 ; 6 ; @param orcares {in}{required}{type=string} 7 ; code of ORCA grid to use for output results 8 ; must be 'ORCA2' or 'ORCA025' 9 ; 10 ; @keyword DRAKKAR_EXP {type=string} 11 ; code for Drakkar experiment 12 ; only used when orcares = ORCA025 13 ; must be G42 ++ G70 14 ; 15 ; @keyword EXTRA 16 ; must exist in order to be able to use this procedure as an argument 17 ; 18 ; @examples 19 ; appel classique 20 ; IDL> initocemesh,'ORCA2' 21 ; 22 ; to plot ${GEOMAG_OD}/cond_sed_ORCA2.nc : 23 ; IDL> myfile=getenv('GEOMAG_OD') + 'cond_sed_ORCA2.nc' 24 ; IDL> xxx, myfile, 'initocemesh', '''ORCA2''',format='(i5)', 4 25 ; 5 26 ; @history … … 7 28 ; F. Pinsard adaptation to new SAXO 8 29 ; according to SAXO ./SRC/Tests/tst_initorca2.pro 30 ; fplod 2007-05-15T13:43:21Z aedon.locean-ipsl.upmc.fr (Darwin) 31 ; transformation in procedure with parameter orcares 32 ; fplod 2007-06-05T12:22:38Z aedon.locean-ipsl.upmc.fr (Darwin) 33 ; (following Sebastien Masson advices) 34 ; . add EXTRA keyword in order to be able to use this procedure as an argument 35 ; of <pro>xxx</pro>. 36 ; . add EXTRA to the call of ncdf_meshlec 37 ; replace initorca2_bab by initocemesh in filename and procedure name 9 38 ; 10 39 ; @todo 11 ; parametrisation for ORCA025 12 ; can I use CASE statement in a file called by @...++ 13 ; can I use RETURN or STOP statement in a file called by @...++ 14 ; 15 ; zminmesh and izmaxmesh may be set to 0,0 because we only work with 16 ; surface problem (no z) whatever the resolution of ORCA. this will safe lot 40 ; 41 ; zminmesh and izmaxmesh may be set to 0,0 because we only work with 42 ; surface problem (no z) whatever the resolution of ORCA. this will safe lot 17 43 ; of memory 18 ; 19 ; use ncdf_getaxisto recover meshmask dimension44 ; 45 ; use <pro>ncdf_getaxis</pro> to recover meshmask dimension 20 46 ; on x, retrieve -1 and -1 (bande de recouvrement haut et bas) 21 ; on y, for ORCA2, retrieve -2 (bande de recouvrement ++ et ++) 47 ; on y, for ORCA2, retrieve -2 (bande de recouvrement ++ et ++) 22 48 ; 23 49 ; reminder : ORCA2 = 182 x 149 and ORCA025 1442 x 1021 24 ; 25 ; for ORCA025, use r /keepcont in triangulecall.50 ; 51 ; for ORCA025, use /keepcont in <pro>triangule</pro> call. 26 52 ; 27 53 ; @version 28 54 ; $Id$ 55 ; 29 56 ;- 57 ; 58 PRO initocemesh, orcares, DRAKKAR_EXP = drakkar_exp, _EXTRA = ex 59 ; 60 compile_opt idl2, strictarrsubs 30 61 ; 31 62 @cm_4mesh … … 33 64 @cm_4data 34 65 ; 35 66 ; check input parameters 67 CASE orcares OF 68 'ORCA2': BEGIN 69 msg = 'iii : valid orcares parameter = ' + orcares 70 ras = report(msg) 71 filename_oce = 'meshmask_bab.nc' 72 IF keyword_set(DRAKKAR_EXP) THEN BEGIN 73 msg = 'www : unused DRAKKAR_EXP keyword = ' + drakkar_exp 74 ras = report(msg) 75 END 76 END 77 'ORCA025': BEGIN 78 msg = 'iii : valid orcares parameter = ' + orcares 79 ras = report(msg) 80 IF keyword_set(DRAKKAR_EXP) THEN BEGIN 81 msg = 'iii : DRAKKAR_EXP keyword set' 82 ras = report(msg) 83 msg = 'iii : DRAKKAR_EXP = ' + drakkar_exp 84 ras = report(msg) 85 CASE drakkar_exp OF 86 'G42' : BEGIN 87 msg = 'iii : valid DRAKKAR_EXP keyword = ' + drakkar_exp 88 ras = report(msg) 89 END 90 'G70' : BEGIN 91 msg = 'iii : valid DRAKKAR_EXP keyword = ' + drakkar_exp 92 ras = report(msg) 93 END 94 ELSE : BEGIN 95 msg = 'eee : invalid DRAKKAR_EXP keyword = ' + drakkar_exp 96 ras = report(msg) 97 RETURN 98 END 99 ENDCASE 100 filename_oce = orcares + '-' + drakkar_exp + '_mesh_hgr.nc' 101 END 102 END 103 ELSE : BEGIN 104 msg = 'eee : invalid orcares parameter = ' + orcares 105 ras = report(msg) 106 msg = 'eee : orcares must be ORCA2 or ORCA025' 107 ras = report(msg) 108 RETURN 109 END 110 ENDCASE 111 ; 112 ; check for input files 113 ; 36 114 ; test if ${GEOMAG_ID} defined 37 geomag_id_env=GETENV('GEOMAG_ID') 38 ; ++ pb syntaxe case dans @... 39 115 geomag_id_env=GETENV('GEOMAG_ID') 116 CASE geomag_id_env OF 117 '' : BEGIN 118 msg = 'eee : ${GEOMAG_ID} is not defined' 119 ras = report(msg) 120 RETURN 121 END 122 ELSE: BEGIN 123 msg = 'iii : ${GEOMAG_ID} is ' + geomag_id_env 124 ras = report(msg) 125 END 126 ENDCASE 40 127 iodirin = isadirectory(geomag_id_env) 41 128 ; 42 ; existence and protection of ${GEOMAG_ID} ++ 43 44 filename_oce='meshmask_bab.nc' 129 ; existence and protection of ${GEOMAG_ID} 130 IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 131 msg = 'eee : the directory' + iodirin + ' is not accessible.' 132 ras = report(msg) 133 RETURN 134 ENDIF 135 ; 45 136 ; check if this file exists 46 137 fullfilename_oce = isafile(iodirin + filename_oce, NEW=0, /MUST_EXIST, $ 47 138 RECURSIVE=0) 48 print,fullfilename_oce[0] 49 139 IF fullfilename_oce[0] EQ '' THEN BEGIN 140 msg = 'eee : the file ' + fullfilename_oce + ' was not found.' 141 ras = report(msg) 142 RETURN 143 ENDIF 144 ; 145 ; protection 146 IF (FILE_TEST(fullfilename_oce[0], /READ) EQ 0) THEN BEGIN 147 msg = 'eee : the file ' + fullfilename_oce[0] + ' is not readable.' 148 ras = report(msg) 149 RETURN 150 ENDIF 151 ; 50 152 ;-------------------------------------------------------- 51 153 ; boundaries of the read grid regarding to the original grid 52 154 ;---------------------------------------------------------- 53 155 ; 156 CASE orcares OF 157 'ORCA2': BEGIN 54 158 ixminmesh =1 55 159 ixmaxmesh =180 … … 61 165 izmaxmesh =-1 62 166 ; 167 END 168 'ORCA025': BEGIN 169 ixminmesh =1 170 ixmaxmesh =1440 171 ; 172 iyminmesh =0 173 iymaxmesh =1019 174 ; 175 izminmesh =-1 176 izmaxmesh =-1 177 ; 178 END 179 ELSE : BEGIN 180 msg = 'eee : invalid orcares parameter = ' + orcares 181 ras = report(msg) 182 msg = 'eee : orcares must be ORCA2 or ORCA025' 183 ras = report(msg) 184 RETURN 185 END 186 ENDCASE 63 187 jpt = 1 64 188 time = 0 … … 66 190 ; read the grid 67 191 ;------------------------------------------------------ 68 192 ; 69 193 key_stride = [1, 1, 1] 70 ncdf_meshlec, fullfilename_oce[0], glamboundary = [20, 380] 194 ncdf_meshlec, fullfilename_oce[0], glamboundary = [20, 380], _extra = ex 71 195 ;------------------------------------------------------------- 72 196 domdef 73 197 ; 74 triangles_list = triangule() 75 ;---------------------------------------------------------- 198 CASE orcares OF 199 'ORCA2' : BEGIN 200 triangles_list = triangule() 201 END 202 'ORCA025': BEGIN 203 triangles_list = triangule(/keepcont) 204 END 205 ELSE : BEGIN 206 msg = 'eee : invalid orcares parameter = ' + orcares 207 ras = report(msg) 208 msg = 'eee : orcares must be ORCA2 or ORCA025' 209 ras = report(msg) 210 RETURN 211 END 212 ENDCASE 213 ; 76 214 ; boundaries of the data regarding to the original grid 77 ;----------------------------------------------------------78 215 jpidta = jpiglo 79 216 jpjdta = jpjglo … … 85 222 izmindta = 0 86 223 izmaxdta = jpkdta-1 87 ; ----------------------------------------------------------224 ; 88 225 @updateold 226 ; 227 END
Note: See TracChangeset
for help on using the changeset viewer.