Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S s2dverification
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • s2dverification
  • Merge requests
  • !231

Checking first time stamp in file

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Nuria Pérez-Zanón requested to merge develop-timestep2 into master Oct 14, 2020
  • Overview 8
  • Commits 25
  • Pipelines 0
  • Changes 6

Caution: branch created from 'develop-UTC'

The first timestamp in ECMWF system5c3s total daily precipitation is one day ahead from the start date. For the start date 1st of November 1993, the first timestamp is the 2nd of November 1993.

Until now, Load interpreted that the first timestamp is equal to the start date, therefore, one day lagged observations were loaded.

To solve this issue, the code in this branch reads the first timestamp and its units. When creating the temporal indices to load in observations, the previous information is used to shift one day if necessary.

Its current status misses modifying the metadata (to do it soon).

A comparison between this code and the original Load can be done with:

source("/esarchive/scratch/nperez/git/s2dverification/R/Load.R")
source("/esarchive/scratch/nperez/git/s2dverification/R/LeapYear.R")
source('/esarchive/scratch/nperez/git/s2dverification/R/Utils.R')
library(bigmemory)
library(ncdf4)
library(plyr)
data <- Load(var = 'prlr',
             exp = list(list(name = 'ecmwfS5', path = "/esarchive/exp/ecmwf/system5c3s/$STORE_FREQ$_mean/$VAR_NAME$_s0-24h/$VAR_NAME$_$START_DATE$.nc")),
             obs = list(list(name = 'era5', path = '/esarchive/recon/ecmwf/era5/$STORE_FREQ$_mean/$VAR_NAME$_f1h-r1440x721cds/$VAR_NAME$_$YEAR$$MONTH$.nc')),
             sdates = '19931101', #paste0(1993:2018, '1101')
             nmember = 25,leadtimemin = 1,
             leadtimemax = NULL,
             storefreq = "daily", sampleperiod = 1,
             latmin = 42, latmax = 49, lonmin = 4, lonmax = 11,
             output = 'lonlat', nprocs = 1,
             method = 'conservative', grid = 'r360x181',
             maskmod = vector("list", 15), maskobs = vector("list", 15),
             configfile = NULL, varmin = NULL, varmax = NULL,
             silent = FALSE, dimnames = NULL,
             remapcells = 2, path_glob_permissive = 'partial',
             nmemberobs = NULL, nleadtime = NULL)
dim(data$mod)
dim(data$obs)
sum(is.na(data$mod))
sum(is.na(data$obs))
s2dverification::PlotEquiMap(data$mod[1,1,1,1,,], data$lon, data$lat,
                             filled.continents = FALSE)
dev.new()
s2dverification::PlotEquiMap(data$obs[1,1,1,1,,], data$lon, data$lat,
                             filled.continents = FALSE)
data$Dates$start[1]
obs <- s2dverification::Load(var = 'prlr', exp = NULL,
                             obs = list(list(name = 'era5', path = '/esarchive/recon/ecmwf/era5/$STORE_FREQ$_mean/$VAR_NAME$_f1h-r1440x721cds/$VAR_NAME$_$YEAR$$MONTH$.nc')),
                             sdates = '19931101', #paste0(1993:2018, '1101')
                             nmember = 25,leadtimemin = 1,
                             leadtimemax = 2,
                             storefreq = "daily", sampleperiod = 1,
                             latmin = 42, latmax = 49, lonmin = 4, lonmax = 11,
                             output = 'lonlat', nprocs = 1,
                             method = 'conservative', grid = 'r360x181',
                             maskmod = vector("list", 15), maskobs = vector("list", 15),
                             configfile = NULL, varmin = NULL, varmax = NULL,
                             silent = FALSE, dimnames = NULL,
                             remapcells = 2, path_glob_permissive = 'partial',
                             nmemberobs = 1, nleadtime = NULL)
dev.new()
s2dverification::PlotEquiMap(obs$obs[1,1,1,2,,], obs$lon, obs$lat,
                             filled.continents = FALSE)
Edited Oct 22, 2020 by Nuria Pérez-Zanón
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-timestep2