diff --git a/flexpart_code/grib2nc4/fp2nc4io_mod.F90 b/flexpart_code/grib2nc4/fp2nc4io_mod.F90 index 6db0ce9460f6a43b205af7302c335c426e3ed222..bf5863d278a7af26f3838bbd790637f24f688350 100644 --- a/flexpart_code/grib2nc4/fp2nc4io_mod.F90 +++ b/flexpart_code/grib2nc4/fp2nc4io_mod.F90 @@ -9,6 +9,13 @@ MODULE fp2nc4io_mod ! * ! May 2016 * ! * + ! 2017-12-03 DJM - * + ! * + ! - Changed NF90_DOUBLE to NF90 FLOAT (6 places) * + ! - Cleaned up long lines from addition of NC descriptions * + ! * + ! * + ! * !**************************************************************** USE par_mod @@ -154,10 +161,11 @@ CONTAINS ENDDO ! Write the height field - variable 'height' is defined in com_mod - ncfunc_retval = nf90_def_var(ncid, 'height', NF90_DOUBLE, & + ncfunc_retval = nf90_def_var(ncid, 'height', NF90_FLOAT, & & z_dimid, varid) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","height of the FLEXPART model levels") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "height of the FLEXPART model levels") ncfunc_retval = nf90_put_att(ncid, varid, "units","m a.g.l") ncfunc_retval = nf90_def_var_deflate(ncid, varid, & @@ -169,31 +177,35 @@ CONTAINS ! Write some of the scalar metadata variables ! dx, dy, xlon0, xlat0 are all defined in com_mod - ncfunc_retval = nf90_def_var(ncid, 'dx', NF90_DOUBLE, varid) + ncfunc_retval = nf90_def_var(ncid, 'dx', NF90_FLOAT, varid) ncfunc_retval = nf90_put_var(ncid, varid, dx) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","grid distance in x direction") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "grid distance in x direction") ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees") - ncfunc_retval = nf90_def_var(ncid, 'dy', NF90_DOUBLE, varid) + ncfunc_retval = nf90_def_var(ncid, 'dy', NF90_FLOAT, varid) ncfunc_retval = nf90_put_var(ncid, varid, dy) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","grid distance in y direction") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "grid distance in y direction") ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees") - ncfunc_retval = nf90_def_var(ncid, 'xlon0', NF90_DOUBLE, varid) + ncfunc_retval = nf90_def_var(ncid, 'xlon0', NF90_FLOAT, varid) ncfunc_retval = nf90_put_var(ncid, varid, xlon0) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","longitude of the lowest left corner") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "longitude of the lowest left corner") ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees") - ncfunc_retval = nf90_def_var(ncid, 'ylat0', NF90_DOUBLE, varid) + ncfunc_retval = nf90_def_var(ncid, 'ylat0', NF90_FLOAT, varid) ncfunc_retval = nf90_put_var(ncid, varid, ylat0) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","latitude of the lowest left corner") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "latitude of the lowest left corner") ncfunc_retval = nf90_put_att(ncid, varid, "units","degrees") @@ -297,7 +309,7 @@ CONTAINS nc_varname = to_upper(varname) ! Create the variable in the NetCDF file - ncfunc_retval = nf90_def_var(ncid, nc_varname, NF90_DOUBLE, & + ncfunc_retval = nf90_def_var(ncid, nc_varname, NF90_FLOAT, & & dimids, varid) ncfunc_retval = nf90_def_var_deflate(ncid, varid, & @@ -315,7 +327,8 @@ CONTAINS ncfunc_retval = nf90_put_var(ncid, varid, & & uu(0:nx-1, 0:ny-1, 1:nz, 1)) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","U component of wind in the X[horizontal] direction") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "U component of wind in the X[horizontal] direction") ncfunc_retval = nf90_put_att(ncid, varid, "units","m s**-1") @@ -323,7 +336,8 @@ CONTAINS ncfunc_retval = nf90_put_var(ncid, varid, & & vv(0:nx-1, 0:ny-1, 1:nz, 1)) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","V component of wind in the Y[horizontal] direction") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "V component of wind in the Y[horizontal] direction") ncfunc_retval = nf90_put_att(ncid, varid, "units","m s**-1") @@ -331,14 +345,16 @@ CONTAINS ncfunc_retval = nf90_put_var(ncid, varid, & & tt(0:nx-1, 0:ny-1, 1:nz, 1)) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","temperature") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "temperature") ncfunc_retval = nf90_put_att(ncid, varid, "units","k") ELSEIF (nc_varname == 'W') THEN ncfunc_retval = nf90_put_var(ncid, varid, & & ww(0:nx-1, 0:ny-1, 1:nz, 1)) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","wind component in the Z[vertical] direction") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "wind component in the Z[vertical] direction") ncfunc_retval = nf90_put_att(ncid, varid, "units","m s**-1") @@ -346,7 +362,8 @@ CONTAINS ncfunc_retval = nf90_put_var(ncid, varid, & & qv(0:nx-1, 0:ny-1, 1:nz, 1)) ! attributes - ncfunc_retval = nf90_put_att(ncid, varid, "description","specific humidity") + ncfunc_retval = nf90_put_att(ncid, varid, "description",& +& "specific humidity") ncfunc_retval = nf90_put_att(ncid, varid, "units"," ")