Creating Forcing Files for Original TGLO/TABS from NARR Files


The NetCDF header for the NARR files at the stage where they have been interpolated to the TGLO/TABS grid are:

netcdf NARR-Uwind-200801 {
dimensions:
        eta_rho = 128 ;
        xi_rho = 256 ;
        wind_time = UNLIMITED ; // (248 currently)
variables:
        float lon_rho(eta_rho, xi_rho) ;
                lon_rho:long_name = "longitude of RHO-points" ;
                lon_rho:units = "degree_east" ;
        float lat_rho(eta_rho, xi_rho) ;
                lat_rho:long_name = "latitude of RHO-points" ;
                lat_rho:units = "degree_north" ;
        double wind_time(wind_time) ;
                wind_time:units = "days since 1970-01-01 0:00:00 0:00" ;
                wind_time:long_name = "time since initialization" ;
                wind_time:standard_name = "wind_time" ;
        float Uwind(wind_time, eta_rho, xi_rho) ;
                Uwind:units = "meter second-1" ;
                Uwind:long_name = "surface u-wind component" ;
                Uwind:time = "wind_time" ;
                Uwind:standard_units = "m s-1" ;
                Uwind:standard_name = "eastward_wind" ;
                Uwind:NARR_GRIB_parameter_name = "UGRD" ;
                Uwind:NARR_GRIB_parameter_level = "10_m_above_gnd" ;
                Uwind:NARR_GRIB_units = "m/s" ;
                Uwind:origin = "The North American Regional Reanalysis (NARR) Project" ;
                Uwind:model = "North American Regional Reanalysis (NARR)" ;
                Uwind:center = "PONG Group, TAMU Dept. of Oceanography" ;
                Uwind:geographical_subset = "98W to 80W, 18N to 31N" ;

// global attributes:
                :title = "NARR Project Data Subset for Gulf of Mexico ROMS Simulations" ;
                :institution = "TAMU Dept. of Oceanography, PONG Group" ;
                :source = "North American Regional Reanalysis (NARR) Project" ;
                :history = "Subset created on 2009-02-16 14:47:01" ;
                :note1 = "U and V components of vector quantities are resolved relative to earth NOT gr
id" ;
data:

 lon_rho =
  -97.42693, -97.36927, -97.31637, -97.26485, -97.2144, -97.16457, -97.11517,

The headers of the original TGLO/TABS wind forcing NetCDF files are:

netcdf TGLO_frc-09-02-16-06-48 {
dimensions:
        sms_time = 17 ;
        wind_time = 17 ;
        eta_u = 128 ;
        xi_u = 255 ;
        eta_v = 127 ;
        xi_v = 256 ;
        eta_rho = 128 ;
        xi_rho = 256 ;
variables:
        double sms_time(sms_time) ;
                sms_time:long_name = "wind stress time since initialization" ;
                sms_time:units = "days since 2003-10-28 0:00:00 0:00" ;
                sms_time:standard_name = "time" ;
        double wind_time(wind_time) ;
                wind_time:long_name = "wind time since initialization" ;
                wind_time:units = "days since 2003-10-28 0:00:00 0:00" ;
                wind_time:standard_name = "time" ;
        double sustr(sms_time, eta_u, xi_u) ;
                sustr:long_name = "Eastward Surface Wind Stress" ;
                sustr:units = "Pa" ;
                sustr:missing_value = -99999. ;
                sustr:_FillValue = -99999. ;
                sustr:scale_factor = 1. ;
                sustr:add_offset = 0. ;
                sustr:standard_name = "surface_downward_eastward_stress" ;
        double svstr(sms_time, eta_v, xi_v) ;
                svstr:long_name = "Northward Surface Wind Stress" ;
                svstr:units = "Pa" ;
                svstr:missing_value = -99999. ;
                svstr:_FillValue = -99999. ;
                svstr:scale_factor = 1. ;
                svstr:add_offset = 0. ;
                svstr:standard_name = "surface_downward_northward_stress" ;
        double Uwind(wind_time, eta_rho, xi_rho) ;
                Uwind:long_name = "Eastward Surface Wind" ;
                Uwind:units = "m s-1" ;
                Uwind:missing_value = -99999. ;
                Uwind:_FillValue = -99999. ;
                Uwind:scale_factor = 1. ;
                Uwind:add_offset = 0. ;
                Uwind:standard_name = "eastward_wind" ;
        double Vwind(wind_time, eta_rho, xi_rho) ;
                Vwind:long_name = "Northward Surface Wind" ;
                Vwind:units = "m s-1" ;
                Vwind:missing_value = -99999. ;
                Vwind:_FillValue = -99999. ;
                Vwind:scale_factor = 1. ;
                Vwind:add_offset = 0. ;
                Vwind:standard_name = "northward_wind" ;
data:

 sms_time = 1938.25, 1938.375, 1938.5, 1938.625, 1938.75, 1938.875, 1939,

Creating a NetCDF File with the Proper Time Offset

The cdfconv.py program was copied to cdf4tglo.py and the line:

times.units = 'days since 2003-10-28 0:00:00 0:00'

was swapped for:

times.units = 'days since 1970-01-01 0:00:00 0:00'

Also, the line:

filenew = prefix + "-" + vname + "-" + filestr[2] + hrst + ".nc"

was modified to:

filenew = prefix + "-" + vname + "-" + filestr[2] + hrst + "-tmp.nc"

to obtain files with names like:

NARR-UGRD_10_m_above_gnd-200801-tmp.nc

rather than:

NARR-UGRD_10_m_above_gnd-200801.nc