Changeset 515b21c in flexpart.git
- Timestamp:
- Apr 16, 2017, 10:14:27 AM (7 years ago)
- Branches:
- fp9.3.1-20161214-nc4
- Children:
- b398fb6
- Parents:
- 5f50284
- Location:
- flexpart_code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
flexpart_code/fpgridcheck.F90
r5f50284 r515b21c 45 45 fpfname = TRIM(path(3)) // TRIM(wfname(ifn)) 46 46 endif 47 print *, 'fpgridcheck(): LOADING.... ', TRIM(fpfname)48 47 49 48 ! The second argument of this call indicates which index (1 or 2) … … 54 53 55 54 56 PRINT *, 'fpgridcheck(): fpfname:', fpfname57 55 CALL fpmetbinary_load(TRIM(fpfname), 1) 58 56 -
flexpart_code/fpmetbinary_mod.F90
r5f50284 r515b21c 55 55 INTEGER, PARAMETER :: IOUNIT_DUMP = 33, IOUNIT_LOAD = 34, & 56 56 IOUNIT_TEXTOUT = 35 57 58 59 INTEGER, PARAMETER :: PREPROC_FMT_STR_DIM = 11 57 60 58 61 ! When a change is made to the format of the preprocessed file, such that 59 62 ! this routine will not be able to read a previous version, this version 60 63 ! string should be modified 61 CHARACTER(LEN=12), PARAMETER :: PREPROC_FORMAT_VERSION_STR = 'FP_p-9.3.1'//char(0) 64 65 66 ! WARNING - for now, for NC4 compatability, make sure that the PREPROC_FMT_STR_DIM 67 ! defined above is exactly the length of the string PLUS the null character added 68 ! I've had a hell of a time making it all compatible with NC4 (DJM) 69 CHARACTER(LEN=PREPROC_FMT_STR_DIM), PARAMETER :: PREPROC_FORMAT_VERSION_STR = 'FP_p-9.3.1'//char(0) 62 70 63 71 PRIVATE IOUNIT_DUMP, IOUNIT_LOAD, IOUNIT_TEXTOUT, fpio, & … … 331 339 & maxspec_dimid, numclass_dimid, maxnests_dimid, nxmaxn_dimid, nymaxn_dimid, & 332 340 & zero_to_nzmax_dimid, zero_to_maxnests_dimid, polemap_dimid, & 333 & nconvlevmax_dimid, na_dimid 341 & nconvlevmax_dimid, na_dimid, preproc_fmt_str_dimid 334 342 335 343 … … 349 357 & maxnests_dimname, nxmaxn_dimname, nymaxn_dimname, & 350 358 & zero_to_nzmax_dimname, zero_to_maxnests_dimname, & 351 & polemap_dimname, nconvlevmax_dimname, na_dimname 359 & polemap_dimname, nconvlevmax_dimname, na_dimname, & 360 & preproc_fmt_str_dimname 352 361 353 362 ! These are temporary variables, used in the LOAD option, for … … 356 365 & temp_nuvzmax, temp_nwzmax, & 357 366 & temp_maxspec, temp_numclass,& 358 & temp_maxnests, temp_nxmaxn, temp_nymaxn 359 360 CHARACTER(LEN= 12) :: temp_preproc_format_version_str367 & temp_maxnests, temp_nxmaxn, temp_nymaxn, temp_preproc_fmt_str_dim 368 369 CHARACTER(LEN=PREPROC_FMT_STR_DIM) :: temp_preproc_format_version_str 361 370 362 371 CHARACTER(LEN=128) :: errmesg … … 385 394 386 395 396 ! Dimension for the preprocessing format string 397 ncret = nf90_def_dim(ncid, 'preproc_fmt_str_dim', PREPROC_FMT_STR_DIM, & 398 & preproc_fmt_str_dimid) 399 call handle_nf90_err(ncret) 400 PRINT *, '1' 401 402 387 403 ncret = nf90_def_dim(ncid, 'nxmax', nxmax, nxmax_dimid) 388 404 call handle_nf90_err(ncret) … … 418 434 419 435 ! Scalar values 436 437 438 dim1dids = (/preproc_fmt_str_dimid/) 439 ncret = nf90_def_var(ncid, 'preproc_fmt_str', NF90_CHAR, & 440 & dim1dids, ncvarid) 441 call handle_nf90_err(ncret) 442 ncret = nf90_def_var_deflate(ncid, ncvarid, & 443 & shuffle=0, & 444 & deflate=1, & 445 & deflate_level=DEF_LEVEL) 446 call handle_nf90_err(ncret) 447 ncret = nf90_put_var(ncid, ncvarid, PREPROC_FORMAT_VERSION_STR(1:preproc_fmt_str_dim)) 448 call handle_nf90_err(ncret) 449 420 450 421 451 … … 604 634 WRITE(iounit) cloudsh(:,:,cm_index) 605 635 #endif 606 607 636 608 637 … … 833 862 834 863 835 836 864 dim2dids = (/nxmax_dimid, nymax_dimid/) 837 865 … … 2211 2239 2212 2240 2241 2242 2243 2244 2245 2213 2246 #ifdef RAWBIN 2214 2247 READ (iounit) temp_preproc_format_version_str 2248 #endif 2249 2250 2251 ncret = nf90_inq_dimid(ncid, 'preproc_fmt_str_dim', preproc_fmt_str_dimid) 2252 call handle_nf90_err(ncret) 2253 ncret = nf90_inquire_dimension(ncid, preproc_fmt_str_dimid, preproc_fmt_str_dimname, & 2254 & temp_preproc_fmt_str_dim) 2255 call handle_nf90_err(ncret) 2256 PRINT *, 'temp_preproc_fmt_str_dim: ', temp_preproc_fmt_str_dim 2257 2258 ncret = nf90_inq_varid(ncid, 'preproc_fmt_str', ncvarid) 2259 call handle_nf90_err(ncret) 2260 ncret = nf90_get_var(ncid, ncvarid, temp_preproc_format_version_str(1:temp_preproc_fmt_str_dim)) 2261 call handle_nf90_err(ncret) 2262 2263 2215 2264 PRINT *, 'Reading preprocessed file format version: ', & 2216 2265 & temp_preproc_format_version_str 2217 2218 2266 IF (TRIM(temp_preproc_format_version_str) == & 2219 2267 & TRIM(PREPROC_FORMAT_VERSION_STR)) THEN … … 2227 2275 STOP 2228 2276 END IF 2229 #endif 2277 2230 2278 2231 2279 … … 2247 2295 2248 2296 2249 PRINT *, 'GET DIMENSIONS' 2297 2250 2298 ! Get dimensions 2299 2300 2301 2302 2251 2303 ncret = nf90_inq_dimid(ncid, 'nxmax', nxmax_dimid) 2252 call handle_nf90_err(ncret) 2253 PRINT *, 'GOT nxmax_dimid' 2304 call handle_nf90_err(ncret) 2254 2305 ncret = nf90_inquire_dimension(ncid, nxmax_dimid, nxmax_dimname, & 2255 2306 & temp_nxmax) … … 2257 2308 PRINT *, 'temp_nxmax: ', temp_nxmax 2258 2309 2259 PRINT *, 'GOT temp_nxmax'2260 2310 2261 2311 ncret = nf90_inq_dimid(ncid, 'nymax', nymax_dimid) … … 2302 2352 2303 2353 2304 2305 PRINT *, 'CHECK DIMENSIONS'2306 2354 2307 2355 IF ( (temp_nxmax == nxmax) .AND. (temp_nymax == nymax) .AND. & … … 2340 2388 2341 2389 2342 2343 2344 PRINT *, 'GET SCALARS'2345 2390 2346 2391 ! Get the varid , then read into scalar variable
Note: See TracChangeset
for help on using the changeset viewer.