Atmospheric forcing

From ccrmwiki
Revision as of 08:25, 31 January 2013 by Jan (talk | contribs) (air-files:)
Jump to: navigation, search

Theory

Here is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides.

File description

In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the NetCDF Climate and Forecast (CF) Metadata Convention 1.0.

There are 4 types of files in sflux/dir; see this site for sample files.

  1. sflux_inputs.txt:
    $cat sflux_inputs.txt
    &sflux_inputs  ! file name
    start_year = 1998, ! start year
    start_month = 09, ! start month
    start_day = 01, ! start day
    start_hour = 0.0, ! start hour
    utc_start = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere
    /
  2. sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;
  3. sflux_prc_1.0*.nc: netcdf files that have precipitation data;
  4. sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.

Using NARR files for your simulation (North America only)

First, make sure the  NARR grid covers your hgrid.ll. 

In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then

sflux_air_1.001.nc --> narr_air.2004_06_10.nc
sflux_air_1.002.nc --> narr_air.2004_06_11.nc
...
sflux_air_1.011.nc --> narr_air.2004_06_20.nc
sflux_air_1.012.nc --> narr_air.2004_06_21.nc (extra day to account for time zone difference)

Similarly for sflux_rad_*.nc and sflux_prc_*.nc. The number "1" after "air_" denotes first data set used; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.


Don't forget to update sflux_inputs.txt also.



Preparing your own sflux inputs

After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.

Conventions for .nc-files in sflux directory and additional files needed for sflux run:

wind: u-component is eastward, v-comp. is northward (normal math convention, not compass convention)

windrot_geo2proj.gr3: rotates winds in case they do not align with coordinate axes, i.e. lat/lon

watertype.gr3: 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.

air-files

these lines (displayed using the ncdump utility):
netcdf sflux_air_1.001 {
dimensions:
        nx_grid = 349 ;
        ny_grid = 277 ;
        time = UNLIMITED ; // (8 currently)
variables:
        float time(time) ;
                time:long_name = "Time" ;
                time:standard_name = "time" ;
                time:units = "days since 2001-01-01" ;
                time:base_date = 2001, 1, 1, 0 ;
        float lon(ny_grid, nx_grid) ;
                lon:long_name = "Longitude" ;
                lon:standard_name = "longitude" ;
                lon:units = "degrees_east" ;
        float lat(ny_grid, nx_grid) ;
                lat:long_name = "Latitude" ;
                lat:standard_name = "latitude" ;
                lat:units = "degrees_north" ;
        float uwind(time, ny_grid, nx_grid) ;
                uwind:long_name = "Surface Eastward Air Velocity (10m AGL)" ;
                uwind:standard_name = "eastward_wind" ;
                uwind:units = "m/s" ;
        float vwind(time, ny_grid, nx_grid) ;
                vwind:long_name = "Surface Northward Air Velocity (10m AGL)" ;
                vwind:standard_name = "northward_wind" ;
                vwind:units = "m/s" ;
        float prmsl(time, ny_grid, nx_grid) ;
                prmsl:long_name = "Pressure reduced to MSL" ;
                prmsl:standard_name = "air_pressure_at_sea_level" ;
                prmsl:units = "Pa" ;
        float stmp(time, ny_grid, nx_grid) ;
                stmp:long_name = "Surface Air Temperature (2m AGL)" ;
                stmp:standard_name = "air_temperature" ;
                stmp:units = "K" ;
        float spfh(time, ny_grid, nx_grid) ;
                spfh:long_name = "Surface Specific Humidity (2m AGL)" ;
                spfh:standard_name = "specific_humidity" ;
                spfh:units = "1" ;

// global attributes:
                :Conventions = "CF-1.0" ;
}

rad-files

netcdf sflux_rad_1.001 {
dimensions:
        nx_grid = 349 ;
        ny_grid = 277 ;
        time = UNLIMITED ; // (8 currently)
variables:
        float time(time) ;
                time:long_name = "Time" ;
                time:standard_name = "time" ;
                time:units = "days since 2001-01-01" ;
                time:base_date = 2001, 1, 1, 0 ;
        float lon(ny_grid, nx_grid) ;
                lon:long_name = "Longitude" ;
                lon:standard_name = "longitude" ;
                lon:units = "degrees_east" ;
        float lat(ny_grid, nx_grid) ;
                lat:long_name = "Latitude" ;
                lat:standard_name = "latitude" ;
                lat:units = "degrees_north" ;
        float dlwrf(time, ny_grid, nx_grid) ;
                dlwrf:long_name = "Downward Long Wave Radiation Flux" ;
                dlwrf:standard_name = "surface_downwelling_longwave_flux_in_air" ;
                dlwrf:units = "W/m^2" ;
        float dswrf(time, ny_grid, nx_grid) ;
                dswrf:long_name = "Downward Short Wave Radiation Flux" ;
                dswrf:standard_name = "surface_downwelling_shortwave_flux_in_air" ;
                dswrf:units = "W/m^2" ;

// global attributes:
                :Conventions = "CF-1.0" ;
}