Reading ROMS output in GrADS

James T. Potemra jimp at HAWAII.EDU
Thu Apr 2 04:07:15 EDT 2009


I'm trying to access output from ROMS (regional ocean model) with
GrADS.  The output, supposedly CF compliant netCDF, has a somewhat
complicated list of variables; I've attached the output from ncdump
below.  Has anyone developed a data descriptor file for output such as
this?  Thanks,

Jim

------------------- ncdump -h hiig_0331.nc ----------------------
netcdf hiig_0331 {
dimensions:
        xi_rho = 294 ;
        xi_u = 293 ;
        xi_v = 294 ;
        xi_psi = 293 ;
        eta_rho = 194 ;
        eta_u = 194 ;
        eta_v = 193 ;
        eta_psi = 193 ;
        N = 30 ;
        s_rho = 30 ;
        s_w = 31 ;
        tracer = 2 ;
        boundary = 4 ;
        ocean_time = UNLIMITED ; // (25 currently)
variables:
        int ntimes ;
                ntimes:long_name = "number of long time-steps" ;
        int ndtfast ;
                ndtfast:long_name = "number of short time-steps" ;
        double dt ;
                dt:long_name = "size of long time-steps" ;
                dt:units = "second" ;
        double dtfast ;
                dtfast:long_name = "size of short time-steps" ;
                dtfast:units = "second" ;
        double dstart ;
                dstart:long_name = "time stamp assigned to model
initilization" ;
                dstart:units = "days since 2000-01-01 00:00:00" ;
        int nHIS ;
                nHIS:long_name = "number of time-steps between history
records" ;
        int ndefHIS ;
                ndefHIS:long_name = "number of time-steps between the
creation of history files" ;
        int nRST ;
                nRST:long_name = "number of time-steps between restart
records" ;
                nRST:cycle = "only latest two records are maintained" ;
        int ntsAVG ;
                ntsAVG:long_name = "starting time-step for accumulation
of time-averaged fields" ;
        int nAVG ;
                nAVG:long_name = "number of time-steps between
time-averaged records" ;
        int ndefAVG ;
                ndefAVG:long_name = "number of time-steps between the
creation of average files" ;
        double Falpha ;
                Falpha:long_name = "Power-law shape barotropic filter
parameter" ;
        double Fbeta ;
                Fbeta:long_name = "Power-law shape barotropic filter
parameter" ;
        double Fgamma ;
                Fgamma:long_name = "Power-law shape barotropic filter
parameter" ;
        double tnu2(tracer) ;
                tnu2:long_name = "Laplacian mixing coefficient for
tracers" ;
                tnu2:units = "meter2 second-1" ;
        double visc2 ;
                visc2:long_name = "Laplacian mixing coefficient for
momentum" ;
                visc2:units = "meter2 second-1" ;
        double Akt_bak(tracer) ;
                Akt_bak:long_name = "background vertical mixing
coefficient for tracers" ;
                Akt_bak:units = "meter2 second-1" ;
        double Akv_bak ;
                Akv_bak:long_name = "background vertical mixing
coefficient for momentum" ;
                Akv_bak:units = "meter2 second-1" ;
        double Akk_bak ;
                Akk_bak:long_name = "background vertical mixing
coefficient for turbulent energy" ;
                Akk_bak:units = "meter2 second-1" ;
        double Akp_bak ;
                Akp_bak:long_name = "background vertical mixing
coefficient for length scale" ;
                Akp_bak:units = "meter2 second-1" ;
        double rdrg ;
                rdrg:long_name = "linear drag coefficient" ;
                rdrg:units = "meter second-1" ;
        double rdrg2 ;
                rdrg2:long_name = "quadratic drag coefficient" ;
        double Zob ;
                Zob:long_name = "bottom roughness" ;
                Zob:units = "meter" ;
        double Zos ;
                Zos:long_name = "surface roughness" ;
                Zos:units = "meter" ;
        double gls_p ;
                gls_p:long_name = "stability exponent" ;
        double gls_m ;
                gls_m:long_name = "turbulent kinetic energy exponent" ;
        double gls_n ;
                gls_n:long_name = "turbulent length scale exponent" ;
        double gls_cmu0 ;
                gls_cmu0:long_name = "stability coefficient" ;
        double gls_c1 ;
                gls_c1:long_name = "shear production coefficient" ;
        double gls_c2 ;
                gls_c2:long_name = "dissipation coefficient" ;
        double gls_c3m ;
                gls_c3m:long_name = "buoyancy production coefficient
(minus)" ;
        double gls_c3p ;
                gls_c3p:long_name = "buoyancy production coefficient
(plus)" ;
        double gls_sigk ;
                gls_sigk:long_name = "constant Schmidt number for TKE" ;
        double gls_sigp ;
                gls_sigp:long_name = "constant Schmidt number for PSI" ;
        double gls_Kmin ;
                gls_Kmin:long_name = "minimum value of specific
turbulent kinetic energy" ;
        double gls_Pmin ;
                gls_Pmin:long_name = "minimum Value of dissipation" ;
        double Znudg ;
                Znudg:long_name = "free-surface nudging/relaxation
inverse time scale" ;
                Znudg:units = "day-1" ;
        double M2nudg ;
                M2nudg:long_name = "2D momentum nudging/relaxation
inverse time scale" ;
                M2nudg:units = "day-1" ;
        double M3nudg ;
                M3nudg:long_name = "3D momentum nudging/relaxation
inverse time scale" ;
                M3nudg:units = "day-1" ;
        double Tnudg(tracer) ;
                Tnudg:long_name = "Tracers nudging/relaxation inverse
time scale" ;
                Tnudg:units = "day-1" ;
        double FSobc_in(boundary) ;
                FSobc_in:long_name = "free-surface inflow, nudging
inverse time scale" ;
                FSobc_in:units = "second-1" ;
        double FSobc_out(boundary) ;
                FSobc_out:long_name = "free-surface outflow, nudging
inverse time scale" ;
                FSobc_out:units = "second-1" ;
        double M2obc_in(boundary) ;
                M2obc_in:long_name = "2D momentum inflow, nudging
inverse time scale" ;
                M2obc_in:units = "second-1" ;
        double M2obc_out(boundary) ;
                M2obc_out:long_name = "2D momentum outflow, nudging
inverse time scale" ;
                M2obc_out:units = "second-1" ;
        double Tobc_in(boundary, tracer) ;
                Tobc_in:long_name = "tracers inflow, nudging inverse
time scale" ;
                Tobc_in:units = "second-1" ;
        double Tobc_out(boundary, tracer) ;
                Tobc_out:long_name = "tracers outflow, nudging inverse
time scale" ;
                Tobc_out:units = "second-1" ;
        double M3obc_in(boundary) ;
                M3obc_in:long_name = "3D momentum inflow, nudging
inverse time scale" ;
                M3obc_in:units = "second-1" ;
        double M3obc_out(boundary) ;
                M3obc_out:long_name = "3D momentum outflow, nudging
inverse time scale" ;
                M3obc_out:units = "second-1" ;
        double rho0 ;
                rho0:long_name = "mean density used in Boussinesq
approximation" ;
                rho0:units = "kilogram meter-3" ;
        double gamma2 ;
                gamma2:long_name = "slipperiness parameter" ;
        char spherical ;
                spherical:long_name = "grid type logical switch" ;
                spherical:option_T = "spherical" ;
                spherical:option_F = "Cartesian" ;
        double xl ;
                xl:long_name = "domain length in the XI-direction" ;
                xl:units = "meter" ;
        double el ;
                el:long_name = "domain length in the ETA-direction" ;
                el:units = "meter" ;
        double theta_s ;
                theta_s:long_name = "S-coordinate surface control
parameter" ;
        double theta_b ;
                theta_b:long_name = "S-coordinate bottom control
parameter" ;
        double Tcline ;
                Tcline:long_name = "S-coordinate surface/bottom layer
width" ;
                Tcline:units = "meter" ;
        double hc ;
                hc:long_name = "S-coordinate parameter, critical depth" ;
                hc:units = "meter" ;
        double s_rho(s_rho) ;
                s_rho:long_name = "S-coordinate at RHO-points" ;
                s_rho:valid_min = -1. ;
                s_rho:valid_max = 0. ;
                s_rho:standard_name = "ocean_s_coordinate" ;
                s_rho:formula_terms = "s: s_rho eta: zeta depth: h a:
theta_s b: theta_b depth_c: hc" ;
                s_rho:field = "s_rho, scalar" ;
        double s_w(s_w) ;
                s_w:long_name = "S-coordinate at W-points" ;
                s_w:valid_min = -1. ;
                s_w:valid_max = 0. ;
                s_w:standard_name = "ocean_s_coordinate" ;
                s_w:formula_terms = "s: s_w eta: zeta depth: h a:
theta_s b: theta_b depth_c: hc" ;
                s_w:field = "s_w, scalar" ;
        double Cs_r(s_rho) ;
                Cs_r:long_name = "S-coordinate stretching curves at
RHO-points" ;
                Cs_r:valid_min = -1. ;
                Cs_r:valid_max = 0. ;
                Cs_r:field = "Cs_r, scalar" ;
        double Cs_w(s_w) ;
                Cs_w:long_name = "S-coordinate stretching curves at
W-points" ;
                Cs_w:valid_min = -1. ;
                Cs_w:valid_max = 0. ;
                Cs_w:field = "Cs_w, scalar" ;
        double h(eta_rho, xi_rho) ;
                h:long_name = "bathymetry at RHO-points" ;
                h:units = "meter" ;
                h:coordinates = "lon_rho lat_rho" ;
                h:field = "bath, scalar" ;
        double f(eta_rho, xi_rho) ;
                f:long_name = "Coriolis parameter at RHO-points" ;
                f:units = "second-1" ;
                f:coordinates = "lon_rho lat_rho" ;
                f:field = "coriolis, scalar" ;
        double pm(eta_rho, xi_rho) ;
                pm:long_name = "curvilinear coordinate metric in XI" ;
                pm:units = "meter-1" ;
                pm:coordinates = "lon_rho lat_rho" ;
                pm:field = "pm, scalar" ;
        double pn(eta_rho, xi_rho) ;
                pn:long_name = "curvilinear coordinate metric in ETA" ;
                pn:units = "meter-1" ;
                pn:coordinates = "lon_rho lat_rho" ;
                pn:field = "pn, scalar" ;
        double lon_rho(eta_rho, xi_rho) ;
                lon_rho:long_name = "longitude of RHO-points" ;
                lon_rho:units = "degree_east" ;
                lon_rho:field = "lon_rho, scalar" ;
        double lat_rho(eta_rho, xi_rho) ;
                lat_rho:long_name = "latitude of RHO-points" ;
                lat_rho:units = "degree_north" ;
                lat_rho:field = "lat_rho, scalar" ;
        double lon_u(eta_u, xi_u) ;
                lon_u:long_name = "longitude of U-points" ;
                lon_u:units = "degree_east" ;
                lon_u:field = "lon_u, scalar" ;
        double lat_u(eta_u, xi_u) ;
                lat_u:long_name = "latitude of U-points" ;
                lat_u:units = "degree_north" ;
                lat_u:field = "lat_u, scalar" ;
        double lon_v(eta_v, xi_v) ;
                lon_v:long_name = "longitude of V-points" ;
                lon_v:units = "degree_east" ;
                lon_v:field = "lon_v, scalar" ;
        double lat_v(eta_v, xi_v) ;
                lat_v:long_name = "latitude of V-points" ;
                lat_v:units = "degree_north" ;
                lat_v:field = "lat_v, scalar" ;
        double lon_psi(eta_psi, xi_psi) ;
                lon_psi:long_name = "longitude of PSI-points" ;
                lon_psi:units = "degree_east" ;
                lon_psi:field = "lon_psi, scalar" ;
        double lat_psi(eta_psi, xi_psi) ;
                lat_psi:long_name = "latitude of PSI-points" ;
                lat_psi:units = "degree_north" ;
                lat_psi:field = "lat_psi, scalar" ;
        double angle(eta_rho, xi_rho) ;
                angle:long_name = "angle between XI-axis and EAST" ;
                angle:units = "radians" ;
                angle:coordinates = "lon_rho lat_rho" ;
                angle:field = "angle, scalar" ;
        double mask_rho(eta_rho, xi_rho) ;
                mask_rho:long_name = "mask on RHO-points" ;
                mask_rho:option_0 = "land" ;
                mask_rho:option_1 = "water" ;
                mask_rho:coordinates = "lon_rho lat_rho" ;
        double mask_u(eta_u, xi_u) ;
                mask_u:long_name = "mask on U-points" ;
                mask_u:option_0 = "land" ;
                mask_u:option_1 = "water" ;
                mask_u:coordinates = "lon_u lat_u" ;
        double mask_v(eta_v, xi_v) ;
                mask_v:long_name = "mask on V-points" ;
                mask_v:option_0 = "land" ;
                mask_v:option_1 = "water" ;
                mask_v:coordinates = "lon_v lat_v" ;
        double mask_psi(eta_psi, xi_psi) ;
                mask_psi:long_name = "mask on psi-points" ;
                mask_psi:option_0 = "land" ;
                mask_psi:option_1 = "water" ;
                mask_psi:coordinates = "lon_psi lat_psi" ;
        double ocean_time(ocean_time) ;
                ocean_time:long_name = "time since initialization" ;
                ocean_time:units = "seconds since 2000-01-01 00:00:00" ;
                ocean_time:calendar = "gregorian" ;
                ocean_time:field = "time, scalar, series" ;
        float zeta(ocean_time, eta_rho, xi_rho) ;
                zeta:long_name = "free-surface" ;
                zeta:units = "meter" ;
                zeta:time = "ocean_time" ;
                zeta:coordinates = "lon_rho lat_rho ocean_time" ;
                zeta:field = "free-surface, scalar, series" ;
        float ubar(ocean_time, eta_u, xi_u) ;
                ubar:long_name = "vertically integrated u-momentum
component" ;
                ubar:units = "meter second-1" ;
                ubar:time = "ocean_time" ;
                ubar:coordinates = "lon_u lat_u ocean_time" ;
                ubar:field = "ubar-velocity, scalar, series" ;
        float DU_avg1(ocean_time, eta_u, xi_u) ;
                DU_avg1:long_name = "time averaged u-flux for 2D
equations" ;
                DU_avg1:units = "meter3 second-1" ;
                DU_avg1:time = "ocean_time" ;
                DU_avg1:coordinates = "lon_u lat_u ocean_time" ;
                DU_avg1:field = "DU_avg1, scalar, series" ;
        float DU_avg2(ocean_time, eta_u, xi_u) ;
                DU_avg2:long_name = "time averaged u-flux for 3D
equations coupling" ;
                DU_avg2:units = "meter3 second-1" ;
                DU_avg2:time = "ocean_time" ;
                DU_avg2:coordinates = "lon_u lat_u ocean_time" ;
                DU_avg2:field = "DU_avg2, scalar, series" ;
        float vbar(ocean_time, eta_v, xi_v) ;
                vbar:long_name = "vertically integrated v-momentum
component" ;
                vbar:units = "meter second-1" ;
                vbar:time = "ocean_time" ;
                vbar:coordinates = "lon_v lat_v ocean_time" ;
                vbar:field = "vbar-velocity, scalar, series" ;
        float DV_avg1(ocean_time, eta_v, xi_v) ;
                DV_avg1:long_name = "time averaged v-flux for 2D
equations" ;
                DV_avg1:units = "meter3 second-1" ;
                DV_avg1:time = "ocean_time" ;
                DV_avg1:coordinates = "lon_v lat_v ocean_time" ;
                DV_avg1:field = "DV_avg1, scalar, series" ;
        float DV_avg2(ocean_time, eta_v, xi_v) ;
                DV_avg2:long_name = "time averaged v-flux for 3D
equations coupling" ;
                DV_avg2:units = "meter3 second-1" ;
                DV_avg2:time = "ocean_time" ;
                DV_avg2:coordinates = "lon_v lat_v ocean_time" ;
                DV_avg2:field = "DV_avg2, scalar, series" ;
        float u(ocean_time, s_rho, eta_u, xi_u) ;
                u:long_name = "u-momentum component" ;
                u:units = "meter second-1" ;
                u:time = "ocean_time" ;
                u:coordinates = "lon_u lat_u s_rho ocean_time" ;
                u:field = "u-velocity, scalar, series" ;
        float v(ocean_time, s_rho, eta_v, xi_v) ;
                v:long_name = "v-momentum component" ;
                v:units = "meter second-1" ;
                v:time = "ocean_time" ;
                v:coordinates = "lon_v lat_v s_rho ocean_time" ;
                v:field = "v-velocity, scalar, series" ;
        float w(ocean_time, s_w, eta_rho, xi_rho) ;
                w:long_name = "vertical momentum component" ;
                w:units = "meter second-1" ;
                w:time = "ocean_time" ;
                w:coordinates = "lon_rho lat_rho s_w ocean_time" ;
                w:field = "w-velocity, scalar, series" ;
        float omega(ocean_time, s_w, eta_rho, xi_rho) ;
                omega:long_name = "S-coordinate vertical momentum
component" ;
                omega:units = "meter3 second-1" ;
                omega:time = "ocean_time" ;
                omega:coordinates = "lon_rho lat_rho s_w ocean_time" ;
                omega:field = "omega, scalar, series" ;
        float temp(ocean_time, s_rho, eta_rho, xi_rho) ;
                temp:long_name = "potential temperature" ;
                temp:units = "Celsius" ;
                temp:time = "ocean_time" ;
                temp:coordinates = "lon_rho lat_rho s_rho ocean_time" ;
                temp:field = "temperature, scalar, series" ;
        float salt(ocean_time, s_rho, eta_rho, xi_rho) ;
                salt:long_name = "salinity" ;
                salt:time = "ocean_time" ;
                salt:coordinates = "lon_rho lat_rho s_rho ocean_time" ;
                salt:field = "salinity, scalar, series" ;
        float AKv(ocean_time, s_w, eta_rho, xi_rho) ;
                AKv:long_name = "vertical viscosity coefficient" ;
                AKv:units = "meter2 second-1" ;
                AKv:time = "ocean_time" ;
                AKv:coordinates = "lon_rho lat_rho s_w ocean_time" ;
                AKv:field = "AKv, scalar, series" ;
        float AKt(ocean_time, s_w, eta_rho, xi_rho) ;
                AKt:long_name = "temperature vertical diffusion
coefficient" ;
                AKt:units = "meter2 second-1" ;
                AKt:time = "ocean_time" ;
                AKt:coordinates = "lon_rho lat_rho s_w ocean_time" ;
                AKt:field = "AKt, scalar, series" ;
        float AKs(ocean_time, s_w, eta_rho, xi_rho) ;
                AKs:long_name = "salinity vertical diffusion coefficient" ;
                AKs:units = "meter2 second-1" ;
                AKs:time = "ocean_time" ;
                AKs:coordinates = "lon_rho lat_rho s_w ocean_time" ;
                AKs:field = "AKs, scalar, series" ;

// global attributes:
                :type = "ROMS/TOMS history file" ;
                :Conventions = "CF-1.0" ;
                :title = "NLM HI-POOIS ISLAND GRID (4km)" ;
                :var_info = "varinfo.dat" ;
                :rst_file = "hiig_rst.nc" ;
                :his_file = "hiig_his.nc" ;
                :avg_file = "hiig_avg.nc" ;
                :grd_file = "../grid/roms-hiig-grid-ncom.nc" ;
                :ini_file = "ini.nc" ;
                :frc_file_01 = "hiig-frc.nc" ;
                :bry_file = "hiig-bry.nc" ;
                :clm_file = "hiig-clim.nc" ;
                :script_file = "/share/observer/ocean/hioos/work/ocean.in" ;
                :svn_url = "" ;
                :svn_rev = "svn: $LastChangedRevision$" ;
                :code_dir = "/share/observer/ocean/roms/src" ;
                :header_dir = "/share/observer/ocean/hioos/roms/nlm-hiig" ;
                :header_file = "hiig.h" ;
                :os = "Linux" ;
                :cpu = "x86_64" ;
                :compiler_system = "ifort" ;
                :compiler_command =
"/usr/mpi/intel/openmpi-2.2/bin/mpif90" ;
                :compiler_flags = " -ip -O3 -i_dynamic -xT  -free" ;
                :tiling = "004x002" ;
                :history = "ROMS/TOMS, Version 3.0, Tuesday - March 31,
2009 - 7:47:06 AM" ;
                :ana_file =
"/share/observer/ocean/hioos/roms/nlm-hiig/../../include/ana_btflux.h,
/share/observer/ocean/hioos/roms/nlm-hiig/../../include/ana_nudgcoef.h" ;
                :CPP_options = "HIIG, ANA_BSFLUX, ANA_BTFLUX,
ASSUMED_SHAPE, AVERAGES, AVERAGES_FLUXES, BULK_FLUXES, CURVGRID,
DJ_GRADPS, DOUBLE_PRECISION, EAST_FSCHAPMAN, EAST_M2FLATHER,
EAST_M3NUDGING, EAST_M3RADIATION, EAST_TNUDGING, EAST_TRADIATION,
EMINUSP, FORWARD_WRITE, GLS_MIXING, KANTHA_CLAYSON, LONGWAVE_OUT,
M2CLIMATOLOGY, M2CLM_NUDGING, M3CLIMATOLOGY, M3CLM_NUDGING, MASKING,
MIX_GEO_TS, MIX_S_UV, MPI, NONLINEAR, NONLIN_EOS, NORTH_FSCHAPMAN,
NORTH_M2FLATHER, NORTH_M3NUDGING, NORTH_M3RADIATION, NORTH_TNUDGING,
NORTH_TRADIATION, N2S2_HORAVG, POWER_LAW, PROFILE, K_GSCHEME,
RADIATION_2D, !RST_SINGLE, SALINITY, SOLAR_SOURCE, SOLVE3D,
SOUTH_FSCHAPMAN, SOUTH_M2FLATHER, SOUTH_M3NUDGING, SOUTH_M3RADIATION,
SOUTH_TNUDGING, SOUTH_TRADIATION, SPLINES, TCLIMATOLOGY, TCLM_NUDGING,
TS_U3HADVECTION, TS_C4VADVECTION, TS_DIF2, UV_ADV, UV_COR,
UV_U3HADVECTION, UV_C4VADVECTION, UV_QDRAG, UV_VIS2, VAR_RHO_2D,
WEST_FSCHAPMAN, WEST_M2FLATHER, WEST_M3NUDGING, WEST_M3RADIATION,
WEST_TNUDGING, WEST_TRADIATION, ZCLIMATOLOGY, ZCLM_NUDGING," ;}



More information about the gradsusr mailing list