Changeset efd26ca in flexpart.git


Ignore:
Timestamp:
Dec 4, 2017, 1:58:26 AM (6 years ago)
Author:
Don Morton <Don.Morton@…>
Branches:
FPv9.3.2, grib2nc4_repair
Children:
94106e2
Parents:
857dfd0
Message:

Changed double precision NC write to single precision.

Ticket #384 comment:17

File:
1 edited

Legend:

Unmodified
Added
Removed
  • flexpart_code/grib2nc4/fp2nc4io_mod.F90

    r8624a75 refd26ca  
    99    !                                                               *
    1010    !  May 2016                                                     *
     11    !                                                               *
     12    !  2017-12-03 DJM -                                             *
     13    !                                                               *
     14    !  - Changed NF90_DOUBLE to NF90 FLOAT (6 places)               *
     15    !  - Cleaned up long lines from addition of NC descriptions     *
     16    !                                                               *
     17    !                                                               *
    1118    !                                                               *
    1219    !****************************************************************
     
    155162
    156163        ! Write the height field - variable 'height' is defined in com_mod
    157         ncfunc_retval = nf90_def_var(ncid, 'height', NF90_DOUBLE, &
     164        ncfunc_retval = nf90_def_var(ncid, 'height', NF90_FLOAT, &
    158165&                                    z_dimid, varid)
    159166! attributes
    160             ncfunc_retval = nf90_put_att(ncid, varid, "description","height of the FLEXPART model levels")
     167            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     168&                                  "height of the FLEXPART model levels")
    161169            ncfunc_retval = nf90_put_att(ncid, varid, "units","m a.g.l")
    162170
     
    170178        ! Write some of the scalar metadata variables
    171179        ! dx, dy, xlon0, xlat0 are all defined in com_mod
    172         ncfunc_retval = nf90_def_var(ncid, 'dx', NF90_DOUBLE, varid)
     180        ncfunc_retval = nf90_def_var(ncid, 'dx', NF90_FLOAT, varid)
    173181        ncfunc_retval = nf90_put_var(ncid, varid, dx)
    174182! attributes
    175             ncfunc_retval = nf90_put_att(ncid, varid, "description","grid distance in x direction")
     183            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     184&                                  "grid distance in x direction")
    176185            ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees")
    177186
    178187
    179         ncfunc_retval = nf90_def_var(ncid, 'dy', NF90_DOUBLE, varid)
     188        ncfunc_retval = nf90_def_var(ncid, 'dy', NF90_FLOAT, varid)
    180189        ncfunc_retval = nf90_put_var(ncid, varid, dy)
    181190! attributes
    182             ncfunc_retval = nf90_put_att(ncid, varid, "description","grid distance in y direction")
     191            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     192&                                   "grid distance in y direction")
    183193            ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees")
    184194
    185195
    186         ncfunc_retval = nf90_def_var(ncid, 'xlon0', NF90_DOUBLE, varid)
     196        ncfunc_retval = nf90_def_var(ncid, 'xlon0', NF90_FLOAT, varid)
    187197        ncfunc_retval = nf90_put_var(ncid, varid, xlon0)
    188198! attributes
    189             ncfunc_retval = nf90_put_att(ncid, varid, "description","longitude of the lowest left corner")
     199            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     200&                                "longitude of the lowest left corner")
    190201            ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees")
    191202
    192203
    193         ncfunc_retval = nf90_def_var(ncid, 'ylat0', NF90_DOUBLE, varid)
     204        ncfunc_retval = nf90_def_var(ncid, 'ylat0', NF90_FLOAT, varid)
    194205        ncfunc_retval = nf90_put_var(ncid, varid, ylat0)
    195206! attributes
    196             ncfunc_retval = nf90_put_att(ncid, varid, "description","latitude of the lowest left corner")
     207            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     208&                                "latitude of the lowest left corner")
    197209            ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees")
    198210
     
    298310
    299311        ! Create the variable in the NetCDF file
    300         ncfunc_retval = nf90_def_var(ncid, nc_varname, NF90_DOUBLE, &
     312        ncfunc_retval = nf90_def_var(ncid, nc_varname, NF90_FLOAT, &
    301313&                                    dimids, varid)
    302314
     
    316328&                                        uu(0:nx-1, 0:ny-1, 1:nz, 1))
    317329! attributes
    318             ncfunc_retval = nf90_put_att(ncid, varid, "description","U component of wind in the X[horizontal] direction")
     330            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     331&                        "U component of wind in the X[horizontal] direction")
    319332            ncfunc_retval = nf90_put_att(ncid, varid, "units","m s**-1")
    320333
     
    324337&                                        vv(0:nx-1, 0:ny-1, 1:nz, 1))
    325338! attributes
    326             ncfunc_retval = nf90_put_att(ncid, varid, "description","V component of wind in the Y[horizontal] direction")
     339            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     340&                         "V component of wind in the Y[horizontal] direction")
    327341            ncfunc_retval = nf90_put_att(ncid, varid, "units","m s**-1")
    328342
     
    332346&                                        tt(0:nx-1, 0:ny-1, 1:nz, 1))
    333347! attributes
    334             ncfunc_retval = nf90_put_att(ncid, varid, "description","temperature")
     348            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     349&                                    "temperature")
    335350            ncfunc_retval = nf90_put_att(ncid, varid, "units","k")
    336351
     
    339354&                                        ww(0:nx-1, 0:ny-1, 1:nz, 1))
    340355! attributes
    341             ncfunc_retval = nf90_put_att(ncid, varid, "description","wind component in the Z[vertical] direction")
     356            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     357&                             "wind component in the Z[vertical] direction")
    342358            ncfunc_retval = nf90_put_att(ncid, varid, "units","m s**-1")
    343359
     
    347363&                                        qv(0:nx-1, 0:ny-1, 1:nz, 1))
    348364! attributes
    349             ncfunc_retval = nf90_put_att(ncid, varid, "description","specific humidity")
     365            ncfunc_retval = nf90_put_att(ncid, varid, "description",&
     366&                              "specific humidity")
    350367            ncfunc_retval = nf90_put_att(ncid, varid, "units"," ")
    351368
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG