emcsfc_snow2mdl  1.4.0
 All Data Structures Files Functions Variables
snowdat Module Reference

Read and qc afwa, nesdis/ims and autosnow snow data. More...

Public Member Functions

subroutine afwa_check (hemi)
 Check for corrupt afwa data. More...
 
subroutine nh_climo_check (kgds_data, snow_data, bitmap_data, idata, jdata, isrc, bad)
 Check for corrupt nh snow cover data. More...
 
subroutine read_afwa_binary (file_name, snow_dep_afwa)
 Read afwa binary snow depth file. More...
 
subroutine read_afwa_mask (file_name, bitmap_afwa)
 Read afwa land mask file to get a bitmap. More...
 
subroutine readafwa
 Read snow depth data and masks. More...
 
subroutine readautosnow
 Read autosnow snow cover. More...
 
subroutine readnesdis
 Read nesdis/ims snow cover/ice data. More...
 

Data Fields

real afwa_res
 Resolution of afwa data in km. More...
 
real autosnow_res
 Resolution of autosnow in km. More...
 
logical bad_afwa_global
 When true, the global afwa data failed its quality control check. More...
 
logical bad_afwa_nh
 When true, the northern hemisphere afwa data failed its quality control check. More...
 
logical bad_afwa_sh
 When true, the southern hemisphere afwa data failed its quality control check. More...
 
logical bad_nesdis
 When true, the nesdis data failed its quality control check. More...
 
logical *1, dimension(:,:),
allocatable 
bitmap_afwa_global
 The global afwa data grib bitmap. More...
 
logical *1, dimension(:,:),
allocatable 
bitmap_afwa_nh
 The northern hemisphere afwa data grib bitmap. More...
 
logical *1, dimension(:,:),
allocatable 
bitmap_afwa_sh
 The southern hemisphere afwa data grib bitmap. More...
 
logical *1, dimension(:,:),
allocatable 
bitmap_autosnow
 autosnow data grib bitmap (false-non land, true-land). More...
 
logical *1, dimension(:,:),
allocatable 
bitmap_nesdis
 nesdis data grib bitmap (false-non land, true-land). More...
 
integer iafwa
 i-dimension of afwa grid More...
 
integer iautosnow
 i-dimension of autosnow grid More...
 
integer inesdis
 i-dimension of nesdis grid More...
 
integer jafwa
 j-dimension of afwa grid More...
 
integer jautosnow
 j-dimension of autosnow grid More...
 
integer jnesdis
 j-dimension of nesdis grid More...
 
integer, dimension(200) kgds_afwa_global
 grib1 grid description section for global afwa data. More...
 
integer, dimension(200) kgds_afwa_nh
 grib1 grid description section for northern hemisphere 16th mesh afwa data. More...
 
integer, dimension(200) kgds_afwa_nh_8th
 grib1 grid description section for northern hemisphere 8th mesh afwa data. More...
 
integer, dimension(200) kgds_afwa_sh
 grib1 grid description section for southern hemisphere 16th mesh afwa data. More...
 
integer, dimension(200) kgds_afwa_sh_8th
 grib1 grid description section for southern hemisphere 8th mesh afwa data. More...
 
integer, dimension(200) kgds_autosnow
 autosnow grid description section (grib section 2) More...
 
integer, dimension(200) kgds_nesdis
 nesdis/ims grid description section (grib section 2) More...
 
integer mesh_nesdis
 nesdis/ims data is 96th mesh (or bediant) More...
 
real nesdis_res
 Resolution of the nesdis data in km. More...
 
integer *1, dimension(:,:),
allocatable 
sea_ice_nesdis
 nesdis/ims sea ice flag (0-open water, 1-ice) More...
 
real, dimension(:,:), allocatable snow_cvr_autosnow
 autosnow snow cover flag (0-no, 100-yes) More...
 
real, dimension(:,:), allocatable snow_cvr_nesdis
 nesdis/ims snow cover flag (0-no, 100-yes) More...
 
real, dimension(:,:), allocatable snow_dep_afwa_global
 The global afwa snow depth. More...
 
real, dimension(:,:), allocatable snow_dep_afwa_nh
 Northern hemisphere afwa snow depth. More...
 
real, dimension(:,:), allocatable snow_dep_afwa_sh
 Southern hemisphere afwa snow depth. More...
 
logical use_autosnow
 True if autosnow data to be used. More...
 
logical use_global_afwa
 True if global hemisphere afwa data to be used. More...
 
logical use_nesdis
 True if nesdis/ims data to be used. More...
 
logical use_nh_afwa
 True if northern hemisphere afwa data to be used. More...
 
logical use_sh_afwa
 True if southern hemisphere afwa data to be used. More...
 

Detailed Description

Read and qc afwa, nesdis/ims and autosnow snow data.

program history log:

  • 2005-dec-16 gayno - initial version
  • 2007-aug-10 gayno - Allow program to run with no nesdis/ims data. Add 16th mesh afwa grib data.
  • 2008-feb-04 gayno - Add autosnow cover data for sh.
  • 2009-jun-03 gayno - Add qc check for nesdis/ims and afwa data.
  • 2014-feb-07 gayno - Read nesdis/ims data in grib1 or grib 2 format.
  • 2014-sep-30 gayno - Convert weekly nh snow climatology - used to qc input data - to grib 2. variable definitions:
  • bad_afwa_Xh - is afwa data corrupt?
  • bitmap_afwa_Xh - bitmap of afwa grid (false-non land, true-land)
  • kgds_afwa_Xh - afwa grid description section (grib section 2)
  • nesdis_res - resolution of nesdis/ims data in km
  • snow_dep_afwa_Xh - afwa snow depth data (inches*10 on input, meters on output)
  • use_xh_afwa - true if afwa data to be used

Definition at line 26 of file snowdat.F90.

Member Function/Subroutine Documentation

subroutine snowdat::afwa_check ( integer, intent(in)  hemi)

Check for corrupt afwa data.

Parameters
[in]hemi(1-nh, 2-sh)
Author
George Gayno org: w/np2
Date
2009-Jun-3

Definition at line 1122 of file snowdat.F90.

Referenced by readafwa().

subroutine snowdat::nh_climo_check ( integer, dimension(200), intent(in)  kgds_data,
real, dimension(idata,jdata), intent(in)  snow_data,
logical*1, dimension(idata,jdata), intent(in)  bitmap_data,
integer, intent(in)  idata,
integer, intent(in)  jdata,
integer, intent(in)  isrc,
logical, intent(out)  bad 
)

Check for corrupt nh snow cover data.

Note
Check for corrupt nh data by comparing it to climatology.

program history log: 2009-jun-3 gayno - initial version 2011-apr-26 gayno - Perform gross check first, then check against climo. 2014-sep-30 gayno - Weekly climo file converted to grib 2.

Parameters
[in]kgds_dataGrib 1 grid description sect of data to be qcd.
[in]snow_dataSnow cover to be qcd.
[in]bitmap_databitmap of data to be qcd.
[in]idataI dimension of data to be qcd.
[in]jdataJ dimension of data to be qcd.
[in]isrcFlag indicating data source; 1- afwa depth, 2-ims cover.
[out]badWhen true, data failed check.

files: input:

  • NH weekly climatological snow cover file (grib 2).
Author
George Gayno org: w/np2
Date
2009-Jun-3

Definition at line 850 of file snowdat.F90.

References grib2_free(), and grib2_null().

Referenced by readafwa(), and readnesdis().

subroutine snowdat::read_afwa_binary ( character*(*), intent(in)  file_name,
real, dimension(iafwa,jafwa), intent(out)  snow_dep_afwa 
)

Read afwa binary snow depth file.

Parameters
[in]file_namefile name
[out]snow_dep_afwasnow depth in meters

files: input:

  • nh/sh afwa data in simple binary format

condition codes: all fatal 60 - bad open of afwa file 61 - bad read of afwa file

Note
Read logic for binary data is taken from hua-lu's code, /nwprod/sorc/grib_snowgrib.fd.
Author
George Gayno org: w/np2
Date
2007-Nov-28

Definition at line 1230 of file snowdat.F90.

Referenced by readafwa().

subroutine snowdat::read_afwa_mask ( character*(*), intent(in)  file_name,
logical*1, dimension(iafwa,jafwa), intent(out)  bitmap_afwa 
)

Read afwa land mask file to get a bitmap.

Parameters
[in]file_nameland mask file name
[out]bitmap_afwa.true. if land

files: input:

  • afwa landmask in simple binary format

condition codes: all fatal 62 - bad open of afwa landmask file 63 - bad read of afwa landmask file

Author
George Gayno org: w/np2
Date
2007-Nov-28

Definition at line 1313 of file snowdat.F90.

Referenced by readafwa().

subroutine snowdat::readafwa ( )

Read snow depth data and masks.

Note
Read nh and sh afwa snow depth data and land sea mask.

program history log:

2005-dec-16 gayno - initial version 2007-nov-28 gayno - read 16th mesh afwa data in grib format

files: input:

  • global afwa data in grib 1 (if selected)
  • nh afwa data in grib 1 (if selected)
  • sh afwa data in grib 1 (if selected)

condition codes: 60 - bad open afwa file 61 - bad degrib of afwa file

Author
George Gayno org: w/np2
Date
2005-Dec-16

Definition at line 531 of file snowdat.F90.

References afwa_check(), grib_check(), nh_climo_check(), read_afwa_binary(), and read_afwa_mask().

Referenced by driver().

subroutine snowdat::readautosnow ( )

Read autosnow snow cover.

program history log: 2008-feb-04 gayno - initial version

files: input:

  • autosnow data, grib 2, unit=lugb

condition codes: all fatal 74 - bad open of autosnow file 75 - bad read of autosnow file

Note
Autosnow data is available only for southern hemis. Autosnow data is in grib 2.
Author
George Gayno org: w/np2
Date
2008-Feb-04

Definition at line 117 of file snowdat.F90.

References gdt_to_gds(), grib2_free(), and grib2_null().

Referenced by driver().

subroutine snowdat::readnesdis ( )

Read nesdis/ims snow cover/ice data.

program history log: 2005-dec-16 gayno - initial version 2014-feb-07 gayno - Read 4km ims data in either grib1 or grib 2 format. files: input:

  • ims snow cover and ice file, grib 1 or grib 2
  • 16th-mesh ims land mask, binary

condition codes: all fatal 41 - ims file not grib 1 or grib 2 53 - ims data failed quality check 70 - bad read of ims snow cover data 71 - bad read of ims ice data 72 - bad read of ims grib 1 header 73 - bad open of ims file 87 - bad open ims land mask file 88 - bad read ims land mask file

Note
Nesdis/ims data available only for n hemis. Ims data used to be created by nesdis, hence the references to "nesdis" in this routine. Ims data is now created by the national ice center.
Author
George Gayno org: w/np2
Date
2005-Dec-16

Definition at line 222 of file snowdat.F90.

References gdt_to_gds(), grib2_free(), grib2_null(), grib_check(), and nh_climo_check().

Referenced by driver().

Field Documentation

real snowdat::afwa_res

Resolution of afwa data in km.

Definition at line 84 of file snowdat.F90.

real snowdat::autosnow_res

Resolution of autosnow in km.

Definition at line 83 of file snowdat.F90.

logical snowdat::bad_afwa_global

When true, the global afwa data failed its quality control check.

Definition at line 66 of file snowdat.F90.

logical snowdat::bad_afwa_nh

When true, the northern hemisphere afwa data failed its quality control check.

Definition at line 60 of file snowdat.F90.

logical snowdat::bad_afwa_sh

When true, the southern hemisphere afwa data failed its quality control check.

Definition at line 62 of file snowdat.F90.

logical snowdat::bad_nesdis

When true, the nesdis data failed its quality control check.

Definition at line 64 of file snowdat.F90.

logical*1, dimension(:,:), allocatable snowdat::bitmap_afwa_global

The global afwa data grib bitmap.

(false-non land, true-land).

Definition at line 68 of file snowdat.F90.

logical*1, dimension(:,:), allocatable snowdat::bitmap_afwa_nh

The northern hemisphere afwa data grib bitmap.

(false-non land, true-land).

Definition at line 70 of file snowdat.F90.

logical*1, dimension(:,:), allocatable snowdat::bitmap_afwa_sh

The southern hemisphere afwa data grib bitmap.

(false-non land, true-land).

Definition at line 72 of file snowdat.F90.

logical*1, dimension(:,:), allocatable snowdat::bitmap_autosnow

autosnow data grib bitmap (false-non land, true-land).

Definition at line 75 of file snowdat.F90.

logical*1, dimension(:,:), allocatable snowdat::bitmap_nesdis

nesdis data grib bitmap (false-non land, true-land).

Definition at line 74 of file snowdat.F90.

integer snowdat::iafwa

i-dimension of afwa grid

Definition at line 40 of file snowdat.F90.

integer snowdat::iautosnow

i-dimension of autosnow grid

Definition at line 41 of file snowdat.F90.

integer snowdat::inesdis

i-dimension of nesdis grid

Definition at line 42 of file snowdat.F90.

integer snowdat::jafwa

j-dimension of afwa grid

Definition at line 43 of file snowdat.F90.

integer snowdat::jautosnow

j-dimension of autosnow grid

Definition at line 44 of file snowdat.F90.

integer snowdat::jnesdis

j-dimension of nesdis grid

Definition at line 45 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_afwa_global

grib1 grid description section for global afwa data.

Definition at line 46 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_afwa_nh

grib1 grid description section for northern hemisphere 16th mesh afwa data.

Definition at line 48 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_afwa_nh_8th

grib1 grid description section for northern hemisphere 8th mesh afwa data.

Definition at line 50 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_afwa_sh

grib1 grid description section for southern hemisphere 16th mesh afwa data.

Definition at line 52 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_afwa_sh_8th

grib1 grid description section for southern hemisphere 8th mesh afwa data.

Definition at line 54 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_autosnow

autosnow grid description section (grib section 2)

Definition at line 56 of file snowdat.F90.

integer, dimension(200) snowdat::kgds_nesdis

nesdis/ims grid description section (grib section 2)

Definition at line 57 of file snowdat.F90.

integer snowdat::mesh_nesdis

nesdis/ims data is 96th mesh (or bediant)

Definition at line 58 of file snowdat.F90.

real snowdat::nesdis_res

Resolution of the nesdis data in km.

Definition at line 85 of file snowdat.F90.

integer*1, dimension(:,:), allocatable snowdat::sea_ice_nesdis

nesdis/ims sea ice flag (0-open water, 1-ice)

Definition at line 59 of file snowdat.F90.

real, dimension(:,:), allocatable snowdat::snow_cvr_autosnow

autosnow snow cover flag (0-no, 100-yes)

Definition at line 87 of file snowdat.F90.

real, dimension(:,:), allocatable snowdat::snow_cvr_nesdis

nesdis/ims snow cover flag (0-no, 100-yes)

Definition at line 86 of file snowdat.F90.

real, dimension(:,:), allocatable snowdat::snow_dep_afwa_global

The global afwa snow depth.

Definition at line 88 of file snowdat.F90.

real, dimension(:,:), allocatable snowdat::snow_dep_afwa_nh

Northern hemisphere afwa snow depth.

Definition at line 89 of file snowdat.F90.

real, dimension(:,:), allocatable snowdat::snow_dep_afwa_sh

Southern hemisphere afwa snow depth.

Definition at line 90 of file snowdat.F90.

logical snowdat::use_autosnow

True if autosnow data to be used.

Definition at line 80 of file snowdat.F90.

logical snowdat::use_global_afwa

True if global hemisphere afwa data to be used.

Definition at line 79 of file snowdat.F90.

logical snowdat::use_nesdis

True if nesdis/ims data to be used.

Definition at line 81 of file snowdat.F90.

logical snowdat::use_nh_afwa

True if northern hemisphere afwa data to be used.

Definition at line 77 of file snowdat.F90.

logical snowdat::use_sh_afwa

True if southern hemisphere afwa data to be used.

Definition at line 78 of file snowdat.F90.


The documentation for this module was generated from the following file: