# Presentation: 521368

## The Downsizer 

- Server

- Database

- Any USGS location

- RMI

- The user who wants data runs the client GUI

- Processes request

- 20,000+ netcdf files with NWS climate data updated regularly and stored on MoWS computer system in Denver, CO

- NWIS

- Zips files

**The Downsizer **
- climate and gage daily data retrieval tool

- Accesses USGS NWIS database

**Notes:**
Remote method invocation

## Client

- This will show the period of record (POR) currently available for the Downsizer. You can change these dates to retrieve data from within this POR. If you want the database updated you will need to contact MoWS help so they can run the database puller. We hope to be running the puller on a regular basis.

- Note – if you do not get this window when starting the Downsizer Client, then the Downsizer Server may not be running. Please contact MoWS help so they can restart the server.

- You need to select the format you would like your data to be output in.
- You have three choices: 1. NetCDF Format
- 2. MMS Format – will feed directly into the Modular Modeling System (MMS)
- 3. Laurens Format – ascii format that is self explanatory. Separate file for each variable with header lines that give information on the stations that are chosen.
- You also need to enter a file name for model output.

## To use the Read File option you will need to have files with climate and gage IDs listed. 

- Make sure to indicate the **Units** you want

- You have a choice of getting your **Stations** by using a latitude-longitude box or reading a list from a file

- To use the latitude-longitude box -- enter the coordinates (decimal degree) to define your area of interest.
- Note -- you can get a lot of stations this way and the Downsizer does not like to process more than 100 stations at a time.

- There are a few **Quality Control** options that will be explained on the next couple of slides
- A box must be checked if you want the Downsizer to perform that specific **Quality Control** procedure

## Quality Control in the Downsizer

- Shift the SNOTEL maximum and minimum temperature  back 1 day

- The following slide shows the rules that were followed for each COOP Data **Measurement** Flag(Data Measurement Flag 1)

## COOP Data Measurement and Quality FlagsDATA MEASUREMENT FLAG 1 

| FLAG | Definition | Action |
| --- | --- | --- |
| A | Accumulated amount since last measurement. | Unaccumlate based on nearest stations |
| B | Accumulated amount includes estimated values (since last measurement). | Unaccumulate based on nearest stations |
| E | Estimated (see Table "G" for estimating method). 
 | X |
| J | Value has been manually validated.
 | X |
| M | For fixed length records only. Flag1 is "M" if the data value is missing. In this case, the sign of the meteorological value is assigned "-" and the value of the meteorological element is assigned "99999". 
 | X |
| S | Included in a subsequent value. (data value = "00000" OR "99999"). 
 | Use with “A” and “B” |
| T | Trace (data value = 00000 for a trace).
 | Set = 0.0001 |
| ( | Expert system edited value, not validated.
 | X |
| ) | Expert system approved edited value. 
 | X |

## Quality Control in the Downsizer

- The following slide shows the rules that were followed for each COOP Data **Quality** Flag(Data Quality Flag 2)

## COOP Data Measurement and Quality FlagsDATA QUALITY FLAG 2 

| FLAG | DEFINITION | ACTION |
| --- | --- | --- |
| 0 | Valid data element | X |
| 1 | Valid data element from unknown source | X |
| 2 | Invalid data element (subsequent value replaces original value) | X |
| 3 | Invalid data element (no replacement value follows) | X |
| 4 | Validity unknown (not checked) | Set to missing |
| 5 | Original non-numeric data value has been replaces by its deciphered numeric value | X |
| A | Substituted TOBS for TMAX or TMIN | Set to missing |
| B | Time shifted value | Set to missing |
| C | Precipitation estimated from snowfall | Set to missing |
| D | Transposed digits | Set to missing |
| E | Changed units | Set to missing |
| F | Adjusted TMAX or TMIN by a multiple of + or – 10 degrees | Set to missing |
| G | Changed algebraic sign | Set to missing |
| H | Moved decimal point | Set to missing |
| I | Rescaling other than F,G, or H | Set to missing |
| J | Subjectively derived value | X |
| K | Extracted form an accumulated value | X |
| L | Switched TMAX and/or TMIN | X |
| M | Switched TOBS with TMAX or TMIN | Set to missing |
| N | Substitution of “3 nearest station mean” | X |
| O | Switched snow and precipitation data value | Set to missing |
| P | Added snowfall to snow depth | Set to missing |
| Q | Switched snowfall and snow depth | Set to missing |
| R | Precipitation not reported; estimated as “O” | Set to missing |
| S | Manually edited value | X |
| T | Failed internal consistency check | Set to missing |
| U | Failed areal consistency check | Set to missing |

## Quality Control in the Downsizer

- The following slide shows the rules followed for values considered **Absurd**

## Absurd Values

| Absurd Value | Action |
| --- | --- |
| Precipitation is negative | Set to missing |
| TMAX(n) < TMIN(n) | Set both to missing
 |
| TMAX(n) < TMIN(n-1) | Set both to missing
 |
| TMIN(n) > TMAX(n-1) | Set both to missing
 |
| TMAX(n) < TMIN(n+1) | Set both to missing
 |
| Temperature records have same value for more than 5 consecutive days | Set all missing
 |
| TMAX is missing | Set TMIN to missing
 |
| TMIN is missing | Set TMAX to missing
 |

## Quality Control in the Downsizer

**Extreme Values** are user defined here

## Quality Code Summary File from Downsizer for Climate Data

- ///////////////////////////////////////
-   SUMMARY FOR CLIMATE DATA
- ///////////////////////////////////////
-                             |-- Measurement Flags           |-- Quality Flags                                         |Extreme
- SID     type [missing / total]  A B E  J     M  S    T (   )   0 1 2 3 4 5 A B C D E F G H I J K L M N O P Q R S T U * extreme
- 248087  tmax    7969  / 21458   0 0 0  3  7473  0    0 0 241 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 188 0 0 0 88 0 0 0 0 0 0 0
- 248087  tmin    7969  / 21458   0 0 0  2  7532  0    0 0 284 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 203 0 0 0 87 0 0 0 0 0 0 0
- 248087  precip  6937  / 21458 182 0 3  0  7082 82  744 0   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  10 0 0 0 89 0 0 0 0 0 0 0
- 248902  tmax    13779 / 21458   0 0 0 17 13558  0    0 0 103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  78 0 0 0 89 0 0 0 0 0 0 0
- 248902  tmin    13779 / 21458   0 0 0  4 13564  0    0 0 234 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 395 0 0 0 89 0 0 0 0 0 0 0
- 248902  precip  262   / 21458  28 0 0  0   126 37 2707 0   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   3 0 0 0 89 0 0 0 0 0 0 0
- 248809  tmax    679   / 21458   0 0 0  0   358  0    0 0 129 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 193 0 0 0 30 0 0 0 0 0 0 0
- 248809  tmin    679   / 21458   0 0 0  2   359  0    0 0  50 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  90 0 0 0 30 0 0 0 0 0 0 0
- 248809  precip  374   / 21458   6 0 0  0   346  6 1608 0   1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   2 0 0 0 30 0 0 0 0 0 0 0
- 244328  tmax    623   / 21458   0 0 3 20   176  0    0 0 178 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 266 0 0 0 88 0 0 0 0 0 0 0
- 244328  tmin    623   / 21458   0 0 0 34   204  0    0 0 421 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 585 0 0 0 86 0 0 0 0 0 0 0
- 244328  precip  383   / 21458 209 0 2  0   616 63 1400 0   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  20 0 0 0 88 0 0 0 0 0 0 0
- 246615  tmax    1727  / 21458   0 0 1  0  1226  0    0 0  76 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 140 0 0 0  0 0 0 0 0 0 0 0
- 246615  tmin    1727  / 21458   0 0 2  7  1352  0    0 0 229 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 384 0 0 0  0 0 0 0 0 0 0 0
- 246615  precip  2716  / 2145   16 0 0  0  2669 52 1899 0   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   4 0 0 0  0 0 0 0 0 0 0 0
- NOTE: # missing (3rd column) were counted after QC was performed

**A file is produced that summarizes the QC performed on each climate station**

## Quality Code Summary File from Downsizer for Gage Data from NWIS

- 	///////////////////////////////////////  SUMMARY FOR GAGE DATA///////////////////////////////////////SID            # Missing     / Total     Flags02203600        19463        / 21655     A = 2192,       02203655        20047        / 21655     A = 1046,     P = 562,      1 = 12,       e = 14,         02203700        20744        / 21655     A = 911,      1 = 3,        e = 23,         02203900        18698        / 21655     A = 2957,     02204070        13062        / 21655     *** = 9,      A = 8036,     P = 557,      1 = 35,       e = 252,        02204115        21165        / 21655     A = 490,      1 = 16,       e = 14,         02204285        19045        / 21655     A = 2610,       02204500        14441        / 21655     A = 7214,       02207120        19585        / 21655     A = 1508,     P = 562,      1 = 25,       e = 20,         02207185        19980        / 21655     A = 1675,     1 = 38,       e = 72,         02207418        19643        / 21655     A = 1450,     P = 562,      1 = 34,       Eqp = 8,      e = 67,         02207435        21655        / 21655        02207448        19914        / 21655     *** = 13,     A = 1181,     P = 560,      1 = 5,        e = 179,        02208450        8792         / 21655     A = 12302,    P = 561,      1 = 28,       e = 272,        02209000        20924        / 21655     A = 731,        02210500        7095         / 21655     A = 14003,    P = 557,      1 = 33,       e = 66,         02211300        17516        / 21655     A = 4139,       02211375        20401        / 21655     *** = 71,     A = 715,      P = 539,      1 = 6,        e = 13,         02211459        19463        / 21655     A = 2192,       02211500        20924        / 21655     A = 731,        02212500        16598        / 21655     A = 5057,       02212600        6594         / 21655     A = 15061,    1 = 131,      e = 110,        02213470        20011        / 21655     A = 1644,       02213500        10           / 21655     A = 21448,    P = 197,      1 = 37,       e = 306,        ----- Gage Data Flag Description -----***     Temporarily unavailable  A       Approved for publication -- Processing and review completed.  &       Value was computed from affected unit values by unspecified reasons.  P       Provisional data subject to revision.  1       Daily value is write protected without any remark code to be printed.  Rat     Rating being developed or revised  Eqp     Equipment malfunction  e       Value has been estimated.

**A file is produced that summarizes the Flags encountered for each gage station**

## After the boxes are filled in you can press the Run button and the Downsizer will retrieve your data.

- Remember this only runs on USGS machines (database is located on a USGS only site).
- Anyone who wishes to use this who is not a USGS employee will have to set up their own database.
- Please contact the MoWS help if you need any further information.
- Thank You