emcsfc_snow2mdl
1.8.0
|
Interpolate snow data to model grid and grib the result. More...
Functions/Subroutines | |
subroutine, public | interp |
Interpolate snow data to model grid. More... | |
subroutine | intlon (iord, imon, imsk, m1, m2, k1, f1, f2) |
Convert data from the thinned (or reduced) to the full grid along a single row. More... | |
subroutine | uninterpred (iord, kmsk, fi, f, lonl, latd, len, lonsperlat) |
Fills out full grid using thinned grid data. More... | |
subroutine | write_grib1 |
Write grib1 snow cover and depth on the model grid. More... | |
subroutine | write_grib2 |
Write grib2 snow cover and depth on the model grid. More... | |
Variables | |
real, dimension(:,:), allocatable | snow_cvr_mdl |
snow cover on model grid in percent More... | |
real, dimension(:,:), allocatable | snow_dep_mdl |
snow depth on model grid in meters More... | |
Interpolate snow data to model grid and grib the result.
program history log:
variable definitions:
subroutine, public snow2mdl::interp | ( | ) |
Interpolate snow data to model grid.
program history log: 2005-dec-16 gayno - initial version 2007-sep-20 gayno - tested for b-grids. added improved thinning for gfs grid. 2008-feb-04 gayno - add use of autosnow data 2014-sep-29 gayno - add option to output model snow data in grib2 format.
condition codes: all fatal 54 - selected input snow data not valid for model grid 55 - error in ipolates interpolating snow data
nam grids:
1) nesdis/ims only - An analysis of snow cover on the model grid is produced. No depth analysis is produced.
2) afwa only - An analysis of snow cover and depth on the model grid is produced. Depth is determined from the afwa data. Cover is set to 100% where afwa indicates snow and 0% otherwise.
3) nesdis/ims and afwa - An analysis of snow cover and depth on the model grid is produced. Cover is determined by the nesdis/ims data. If cover is greater than user-defined threshold (variable snow_cvr_threshold) the depth is set to the afwa value or a nominal value, whichever is greater. The nominal value is user-defined (varaible min_snow_depth). If cover is less than user- defined threshold, the depth is set to 0, regardless of the afwa depth value.
gfs grid:
1) nesdis/ims and autosnow only - An analysis of snow cover and depth on the model grid is produced. Cover is determined from the ims and autosnow data. If cover is greater than the user-defined threshold (variable snow_cvr_threshold), the the depth is set to the user-defined default depth (variable min_snow_depth).
2) afwa only - An analysis of snow cover and depth on the model grid is produced. Depth is determined from the afwa data. Cover is set to 100% where afwa indicates snow and 0% otherwise.
3) nesdis/ims, autosnow and afwa - An analysis of snow cover and depth on the model grid is produced. Cover is determined by the ims and autosnow data. If cover is greater than user-defined threshold (variable snow_cvr_threshold) the depth is set to the afwa value or a nominal value, whichever is greater. The nominal value is user-defined (varaible min_snow_depth). If cover is less than user- defined threshold, the depth is set to 0, regardless of the afwa depth value.
Definition at line 158 of file snow2mdl.F90.
References snowdat::afwa_res, snowdat::autosnow_res, snowdat::bitmap_afwa_global, snowdat::bitmap_afwa_nh, snowdat::bitmap_afwa_sh, snowdat::bitmap_autosnow, snowdat::bitmap_nesdis, snowdat::iafwa, snowdat::iautosnow, model_grid::ijmdl, model_grid::imdl, snowdat::inesdis, model_grid::ipts_mdl, snowdat::jafwa, snowdat::jautosnow, model_grid::jmdl, snowdat::jnesdis, model_grid::jpts_mdl, snowdat::kgds_afwa_global, snowdat::kgds_afwa_nh, snowdat::kgds_afwa_sh, snowdat::kgds_autosnow, model_grid::kgds_mdl, snowdat::kgds_nesdis, program_setup::lat_threshold, model_grid::lats_mdl, model_grid::lons_mdl, model_grid::lonsperlat_mdl, model_grid::lsmask_mdl, model_grid::lsmask_mdl_sav, program_setup::min_snow_depth, snowdat::nesdis_res, program_setup::output_grib2, model_grid::resol_mdl, snowdat::sea_ice_nesdis, snowdat::snow_cvr_autosnow, snow_cvr_mdl, snowdat::snow_cvr_nesdis, program_setup::snow_cvr_threshold, snowdat::snow_dep_afwa_global, snowdat::snow_dep_afwa_nh, snowdat::snow_dep_afwa_sh, snow_dep_mdl, model_grid::thinned, uninterpred(), snowdat::use_autosnow, snowdat::use_global_afwa, snowdat::use_nesdis, snowdat::use_nh_afwa, snowdat::use_sh_afwa, write_grib1(), and write_grib2().
Referenced by driver().
|
private |
Convert data from the thinned (or reduced) to the full grid along a single row.
[in] | iord | Interpolation method. '1' neighbor; '2' bilinear. |
[in] | imon | Not used. |
[in] | imsk | Flag to account for mask during conversion. '0' - use mask. |
[in] | m1 | Number of points along a row of the thinned grid. |
[in] | m2 | Number of points along a row on the full grid. |
[in] | k1 | Mask of input data. |
[in] | f1 | Data on the thinned (or reduced) grid. |
[out] | f2 | Data on the full grid. |
Definition at line 1152 of file snow2mdl.F90.
Referenced by uninterpred().
|
private |
Fills out full grid using thinned grid data.
Use an iord of "1" to use a nearest neighbor approach.
[in] | iord | Interpolation method. '1' neighbor; '2' bilinear. |
[in] | kmsk | Mask of the input data. For masked fields, set to '1' for defined points, '0' for undefined points. Not used for unmasked fields - set to '0'. |
[in] | fi | 1-d array to be processed. |
[out] | f | 2-d array on the full grid. |
[in] | lonl | 'i' dimension of 2-d data. |
[in] | latd | 'j' dimension of 2-d data. |
[in] | len | Number of elements of 1-d data. |
[in] | lonsperlat | Definition of thinned (or reduced) grid. Number of "i" points for each 'j' row. |
Definition at line 1101 of file snow2mdl.F90.
References intlon().
Referenced by interp().
subroutine snow2mdl::write_grib1 | ( | ) |
Write grib1 snow cover and depth on the model grid.
program history log: 2005-dec-16 gayno - Initial version 2014-sep-26 gayno - Rename as write_grib1 (was gribit).
output file:
condition codes:
Definition at line 989 of file snow2mdl.F90.
References program_setup::grib_century, program_setup::grib_day, program_setup::grib_hour, program_setup::grib_month, program_setup::grib_year, model_grid::grid_id_mdl, model_grid::kgds_mdl, model_grid::lsmask_mdl, program_setup::model_snow_file, snow_cvr_mdl, snow_dep_mdl, snowdat::use_global_afwa, snowdat::use_nh_afwa, and snowdat::use_sh_afwa.
Referenced by interp().
subroutine snow2mdl::write_grib2 | ( | ) |
Write grib2 snow cover and depth on the model grid.
program history log: 2014-sep-26 gayno - initial version
output file:
condition codes: all fatal
Definition at line 809 of file snow2mdl.F90.
References grib2_check(), program_setup::grib_century, program_setup::grib_day, program_setup::grib_hour, program_setup::grib_month, program_setup::grib_year, model_grid::imdl, init_grib2(), model_grid::jmdl, model_grid::kgds_mdl, model_grid::lat11, model_grid::latlast, model_grid::lon11, model_grid::lonlast, model_grid::lsmask_mdl, program_setup::model_snow_file, snow_cvr_mdl, snow_dep_mdl, snowdat::use_global_afwa, snowdat::use_nh_afwa, and snowdat::use_sh_afwa.
Referenced by interp().
|
private |
snow cover on model grid in percent
Definition at line 85 of file snow2mdl.F90.
Referenced by interp(), write_grib1(), and write_grib2().
|
private |
snow depth on model grid in meters
Definition at line 86 of file snow2mdl.F90.
Referenced by interp(), write_grib1(), and write_grib2().