Skip to content

Commit

Permalink
Add the LVT IMERG reader testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
jvgeiger committed Oct 11, 2022
1 parent c4fa8bb commit 2ea689c
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lvt/testcases/datastreams/IMERG/METRICS.TBL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#name total in-time writeTS extractTS minthreshold maxthreshold ASC ADC
Mean: 1 1 1 1 -9999.0 -9999.0 0 0 #Mean
#Standard deviation: 1 1 0 0 -9999.0 -9999.0 0 0 #Std
19 changes: 19 additions & 0 deletions lvt/testcases/datastreams/IMERG/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
IMERG Reader Test Case

This test case performs an LVT run over Africa from Jan 01, 2019 to
Jan 05, 2019 that reads in IMERG data and outputs the average daily
precipitation fields.

This directory contains:

- This README file.
- The lvt.config file used for this test case.
- Sample GrADS data descriptor files that can be used to
visualize the output. (output.ctl, testcase.ctl).

To run this test case:

* Generate the LVT executable.
* Run the LVT executable using the lvt.config file.
* View the output using the sample GrADS ctl files.

57 changes: 57 additions & 0 deletions lvt/testcases/datastreams/IMERG/input.ctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
dset ^lis_input_testcase.d01.nc
dtype netcdf
options template
undef -9999
xdef 320 linear -19.875 0.25
ydef 320 linear -39.875 0.25
zdef 1 linear 1 1
* dummy tdef
tdef 1 linear 00z01jan2019 1hr
vars 46
DOMAINMASK=>DOMAINMASK 1 y,x description
LANDMASK=>LANDMASK 1 y,x description
SURFACETYPE=>SURFACETYPE1 0 0,y,x description
SURFACETYPE=>SURFACETYPE2 0 1,y,x description
SURFACETYPE=>SURFACETYPE3 0 2,y,x description
SURFACETYPE=>SURFACETYPE4 0 3,y,x description
SURFACETYPE=>SURFACETYPE5 0 4,y,x description
SURFACETYPE=>SURFACETYPE6 0 5,y,x description
SURFACETYPE=>SURFACETYPE7 0 6,y,x description
SURFACETYPE=>SURFACETYPE8 0 7,y,x description
SURFACETYPE=>SURFACETYPE9 0 8,y,x description
SURFACETYPE=>SURFACETYPE10 0 9,y,x description
SURFACETYPE=>SURFACETYPE11 0 10,y,x description
SURFACETYPE=>SURFACETYPE12 0 11,y,x description
SURFACETYPE=>SURFACETYPE13 0 12,y,x description
SURFACETYPE=>SURFACETYPE14 0 13,y,x description
SURFACETYPE=>SURFACETYPE15 0 14,y,x description
SURFACETYPE=>SURFACETYPE16 0 15,y,x description
SURFACETYPE=>SURFACETYPE17 0 16,y,x description
SURFACETYPE=>SURFACETYPE18 0 17,y,x description
SURFACETYPE=>SURFACETYPE19 0 18,y,x description
SURFACETYPE=>SURFACETYPE20 0 19,y,x description
SURFACETYPE=>SURFACETYPE21 0 20,y,x description
LANDCOVER=>LANDCOVER1 0 0,y,x description
LANDCOVER=>LANDCOVER2 0 1,y,x description
LANDCOVER=>LANDCOVER3 0 2,y,x description
LANDCOVER=>LANDCOVER4 0 3,y,x description
LANDCOVER=>LANDCOVER5 0 4,y,x description
LANDCOVER=>LANDCOVER6 0 5,y,x description
LANDCOVER=>LANDCOVER7 0 6,y,x description
LANDCOVER=>LANDCOVER8 0 7,y,x description
LANDCOVER=>LANDCOVER9 0 8,y,x description
LANDCOVER=>LANDCOVER10 0 9,y,x description
LANDCOVER=>LANDCOVER11 0 10,y,x description
LANDCOVER=>LANDCOVER12 0 11,y,x description
LANDCOVER=>LANDCOVER13 0 12,y,x description
LANDCOVER=>LANDCOVER14 0 13,y,x description
LANDCOVER=>LANDCOVER15 0 14,y,x description
LANDCOVER=>LANDCOVER16 0 15,y,x description
LANDCOVER=>LANDCOVER17 0 16,y,x description
LANDCOVER=>LANDCOVER18 0 17,y,x description
LANDCOVER=>LANDCOVER19 0 18,y,x description
LANDCOVER=>LANDCOVER20 0 19,y,x description
LANDCOVER=>LANDCOVER21 0 20,y,x description
lat=>lat 1 y,x description
lon=>lon 1 y,x description
endvars
129 changes: 129 additions & 0 deletions lvt/testcases/datastreams/IMERG/lvt.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
#----------------------------------------------------------------------------
# README
#
# This LVT configuration shows an example of comparing variables from a
# LIS output (e.g., Noah.3.3 LSM).
#
# The following metrics are used: Soil moisture percentiles - Root zone
#
# - Updated as of Apr 22, 2017
#
#----------------------------------------------------------------------------

LVT running mode: "Data intercomparison"
# 1. Dataset to be evaluated; 2. The reference dataset
Analysis data sources: "GPM IMERG" "none"
LVT output methodology: "2d gridspace" # 1d tilespace | 2d gridspace | 1d gridspace
LVT output format: "netcdf" # netcdf | grib1 | binary

Start mode: coldstart # coldstart | restart
LVT restart output interval: "1mo"
LVT restart filename: none
Starting year: 2019
Starting month: 01
Starting day: 01
Starting hour: 0
Starting minute: 0
Starting second: 0
Ending year: 2019
Ending month: 01
Ending day: 05
Ending hour: 0
Ending minute: 0
Ending second: 0
LVT clock timestep: "1da" # Timestep used in analysis; best to match tstep of 1st datastream
Undefined value: -9999

#LVT analysis domain:
Map projection of the LVT analysis: "latlon"
# Blue Nile - 25KM ::
#Run domain lower left lat: -35.95
#Run domain lower left lon: 10.95
#Run domain upper right lat: -8.95
#Run domain upper right lon: 42.875
#Run domain resolution (dx): 0.25
#Run domain resolution (dy): 0.25
Run domain lower left lat: -39.95
Run domain lower left lon: -19.95
Run domain upper right lat: 39.95
Run domain upper right lon: 59.95
Run domain resolution (dx): 0.25
Run domain resolution (dy): 0.25
#Run domain lower left lat: -40.0
#Run domain lower left lon: -20.0
#Run domain upper right lat: 40.0
#Run domain upper right lon: 60.0
#Run domain resolution (dx): 0.25
#Run domain resolution (dy): 0.25


# LDT-generated netcdf file with input domain and mask field
Input domain and mask data file: ./lis_input_testcase.d01.nc

# Variables to be analyzed and their attributes:
LVT datastream attributes table::
TotalPrecip 1 1 kg/m2s DN 1 1 SoilMoist 1 1 m3/m3 - 1 1
#Rainf_f 1 1 kg/m2s - 1 1 Rainf_f 1 1 kg/m2s - 1 1
::
#TotalPrecip 1 1 kg/m2s DN 1 1 SoilMoist 1 1 m3/m3 - 1 1
#::
# Two datastreams: 1 and 2 have the following inputs --
# Short_name, select, units, dir_type, tavg_opt(0-inst,1-tavg), num_vertlevs

LVT surface soil layer thickness: 0.10 # Top soil layer thickness (in meters)
LVT root zone soil layer thickness: 1.0 # Root zone soil layer thickness for analysis (in meters)

## Stats specifications (only applicable to retrospective mode):

# Climatology table:
Metrics attributes file: ./METRICS.TBL # Metrics used in analysis, e.g., METRICS.TBL
Metrics output directory: ./OUTPUT # Output directory for all stats files
LVT diagnostic file: ./OUTPUT/lvtlog
#Time series location file: ./TS_Domains/TS_FAME-SAZ1_25KM_SMDA.TXT # Time-series attribs file, e.g., TS_LOCATIONS.TXT
Metrics output frequency: "1da" # Specifies frequency of analysis output
Metrics computation frequency: "1da" # Temporal averaging interval of LIS output and obs data
# - Timescale at which the metric is being calculated ...
#Metrics computation frequency: "1mo" # Temporal averaging interval of LIS output and obs data
# ** Percentiles currently only work with daily timescales, and not monthly, at this time ...

Scale model data prior to computing percentiles: 0

Observation count threshold: 0 # Min. number of obs used in computing stats
Spatial averaging mode: "pixel-by-pixel" # "pixel-by-pixel" | "region-based"
Confidence interval (%): 95 # Confidence interval threshold (%)

## External Mask options:
Apply external mask: 0 # Apply ext. mask, limiting analysis domain
# 0 - no mask; 1 - temporally varying mask; 2 - fixed mask; 3 -temporal monthly mask
External mask directory: none # Location of ext. mask (seq-access, binary format)

## Stratification data options:
Stratification attributes file: none # File which has details of stratification (see Users Guide)
Variable-based stratification: 0 # 1 - stratify errors with select output variable
External data-based stratification: 0 # Stratified errors from external dataset (e.g., landcover)

## Seasonal cycle options:
Seasonal cycle interval type: "monthly" # Interval type for avg seasonal calculations (METRICS.TBL)
# "monthly"; "3 monthly" (DJF,MAM,JJA,SON); "6 monthly"; "yearly" - yearly seasonal cycles?
Seasonal cycle minimum count threshold: 0 # Min number to calculate avg seasonal cycle
Average diurnal cycle minimum count threshold: 0 # Min number to calculate avg diurnal cycle

## Temporal smoothing options:
Apply temporal smoothing to obs: 0 # 1 - Apply temp smoothing to obs
Starting month if a shifted year definition is used in temporal averaging: 1 # 1 to 12; 10 = Oct, or Water year start

## Anomaly and percentile calculations options:
# - Specify the time window to compute mean values for Anomaly calculations ...
Averaging window for computing mean values in anomaly calculations: monthly # monthly | yearly
# -- Note: This option only applies if Anomaly metrics are selected ...

Compute ensemble metrics: 0 # 0=off; 1=on, all non-ensemble metrics are off
Compute information theory metrics: 0 # 0=off; 1=on, all other metrics turned off

## DATA STREAM INPUTS ....

IMERG data directory: ./input/MET_FORCING/IMERG
IMERG version: V06B
IMERG product: early

# ______________________________________________________________________________
15 changes: 15 additions & 0 deletions lvt/testcases/datastreams/IMERG/output.ctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dset ^OUTPUT/MEAN_TS.201901030000.d01.nc
title LVT IMERG Testcase lis-input
dtype netcdf
*options template
undef -9999
xdef 321 linear -19.875 0.25
ydef 321 linear -39.875 0.25
zdef 1 linear 1 1
tdef 1 linear 03jan2019 1dy
vars 4
latitude=>latitude 1 y,x description
longitude=>longitude 1 y,x description
TotalPrecip=>TotalPrecip 1 y,x description
COUNT_TotalPrecip=>COUNT_TotalPrecip 1 y,x description
endvars
15 changes: 15 additions & 0 deletions lvt/testcases/datastreams/IMERG/testcase.ctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dset ^TARGET_OUTPUT/MEAN_TS.201901030000.d01.nc
title LVT IMERG Testcase lis-input
dtype netcdf
*options template
undef -9999
xdef 321 linear -19.875 0.25
ydef 321 linear -39.875 0.25
zdef 1 linear 1 1
tdef 1 linear 03jan2019 1dy
vars 4
latitude=>latitude 1 y,x description
longitude=>longitude 1 y,x description
TotalPrecip=>TotalPrecip 1 y,x description
COUNT_TotalPrecip=>COUNT_TotalPrecip 1 y,x description
endvars

0 comments on commit 2ea689c

Please sign in to comment.