Changeset 41a2981 in flexpart.git


Ignore:
Timestamp:
Apr 8, 2017, 8:31:27 PM (7 years ago)
Author:
Don Morton <Don.Morton@…>
Branches:
fp9.3.1-20161214-nc4
Children:
8651603
Parents:
7e5f1dc
Message:

Incremental save in branch fp9.3.1-20161214-nc4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • flexpart_code/fpmetbinary_mod.F90

    r7e5f1dc r41a2981  
    4444    USE com_mod
    4545    USE conv_mod
    46     USE par_mod, ONLY : nxmax, nymax, nzmax, nuvzmax, nwzmax, numclass, maxspec
     46    USE par_mod, ONLY : nxmax, nymax, nzmax, nuvzmax, nwzmax, numclass, maxspec, &
     47&                       maxnests, nxmaxn, nymaxn
    4748
    4849    USE netcdf
     
    306307        INTEGER :: ncvarid          ! NetCDF variable ID
    307308
    308         INTEGER :: nxmax_dimid, nymax_dimid, nzmax_dimid, nuvzmax_dimid, nwzmax_dimid
     309        INTEGER :: nxmax_dimid, nymax_dimid, nzmax_dimid, nuvzmax_dimid, nwzmax_dimid, &
     310&                  maxnests_dimid, nxmaxn_dimid, nymaxn_dimid
    309311
    310312        INTEGER, DIMENSION(1) :: dim1dids    ! Dimension IDs for 1D arrays
     
    314316        ! These are used when loading in dimensions from NC file
    315317        CHARACTER(LEN=NF90_MAX_NAME) :: nxmax_dimname, nymax_dimname, nzmax_dimname, &
    316 &                                       nuvzmax_dimname, nwzmax_dimname
     318&                                       nuvzmax_dimname, nwzmax_dimname,&
     319&                                       maxnests_dimname, nxmaxn_dimname, nymaxn_dimname
    317320
    318321        ! These are temporary variables, used in the LOAD option, for
    319322        ! comparing against the current values in FLEXPART of nxmax, nymax, ...
    320323        INTEGER :: temp_nxmax, temp_nymax, temp_nzmax, &
    321 &                  temp_nuvzmax, temp_nwzmax
     324&                  temp_nuvzmax, temp_nwzmax, &
     325&                   temp_maxnests, temp_nxmaxn, temp_nymaxn
    322326
    323327        CHARACTER(LEN=12) :: temp_preproc_format_version_str
     
    936940            ! Getting ready to add in nested code
    937941
     942            ! These are compiled max dimensions from par_mod - these are
     943            ! not meant to be reassigned during a LOAD, but used as "header"
     944            ! information to provide the structure of arrays
     945            ncret = nf90_def_dim(ncid, 'maxnests', maxnests, maxnests_dimid)
     946            ncret = nf90_def_dim(ncid, 'nxmaxn', nxmaxn, nxmaxn_dimid)
     947            ncret = nf90_def_dim(ncid, 'nymaxn', nymaxn, nymaxn_dimid)
     948
     949
    938950
    939951            ! Nested, scalar values (for each nest)
     
    10911103
    10921104
     1105
     1106
    10931107            ! Scalar values
    10941108            READ(iounit) nx, ny, nxmin1, nymin1, nxfield
     
    13871401
    13881402
     1403            ! Now the nested input grid variables
     1404            ! Get the compiled values that were written into the FP file, and
     1405            ! make sure they are equal to the current compiled values, to make
     1406            ! sure we are working with consistent arrays
     1407            ncret = nf90_inq_dimid(ncid, 'maxnests', maxnests_dimid)
     1408            ncret = nf90_inquire_dimension(ncid, maxnests_dimid, maxnests_dimname, &
     1409&                                                temp_maxnests)
     1410            PRINT *, 'temp_maxnests: ', temp_maxnests
     1411
     1412            ncret = nf90_inq_dimid(ncid, 'nxmaxn', nxmaxn_dimid)
     1413            ncret = nf90_inquire_dimension(ncid, nxmaxn_dimid, nxmaxn_dimname, &
     1414&                                                temp_nxmaxn)
     1415            PRINT *, 'temp_nxmaxn: ', temp_nxmaxn
     1416
     1417            ncret = nf90_inq_dimid(ncid, 'nymaxn', nymaxn_dimid)
     1418            ncret = nf90_inquire_dimension(ncid, nymaxn_dimid, nymaxn_dimname, &
     1419&                                                temp_nymaxn)
     1420            PRINT *, 'temp_nymaxn: ', temp_nymaxn
     1421
     1422
     1423            IF ( (temp_nxmaxn == nxmaxn) .AND. (temp_nymaxn == nymaxn) .AND. &
     1424&                   (temp_maxnests == maxnests) ) THEN
     1425                CONTINUE
     1426            ELSE
     1427                PRINT *, 'Incompatible dimensions between fp file and current FLEXPART!'
     1428                ! PRINT *, ''
     1429                PRINT *, '                  FP file     Compiled FP'
     1430                PRINT *, 'nxmaxn:     ', temp_nxmaxn, '    ', nxmaxn
     1431                PRINT *, 'nymaxn:     ', temp_nymaxn, '    ', nymaxn
     1432                PRINT *, 'maxnests:     ', temp_maxnests, '    ', maxnests
     1433                STOP
     1434            END IF
     1435
     1436
    13891437
    13901438            ! Nested, scalar values (for each nest)
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG