Skip to content

Commit

Permalink
update observation data cmorizer
Browse files Browse the repository at this point in the history
include netcdf files of sample output in the repository
  • Loading branch information
YanchunHe committed May 29, 2023
1 parent efeb725 commit d6d816e
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 9 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ __pycache__/
#pytest
.cache
.pytest_cache

# Data files
*.nc
*.nc4
26 changes: 23 additions & 3 deletions cmorizers/cmorize_era20c.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
#!/bin/env bash
# Script to make the observation data ERA-20C CF-compliant
# ERA-20C:
# https://climatedataguide.ucar.edu/climate-data/era-20c-ecmwfs-atmospheric-reanalysis-20th-century-and-comparisons-noaas-20cr
# CF convention:
# http://cfconventions.org/Data/cf-standard-names/current/build/cf-standard-name-table.html
# and search in the Standard Names "air_pressure_at_mean_sea_level"
#
# Yanchun He, 22nd May, 2023

ESGF=/scratch/yanchun/ESGF/
cp /projects/NS9588K/ERA20c/psl_mon_1900_2010.nc $ESGF/rawdata/obs
# copy rawobs
mkdir -p ../Data/rawobs/ && cd ../Data/rawobs/
wget http://ns9560k.web.sigma2.no/diagnostics/esmvaltool/yanchun/Data/rawobs/psl_mon_1900_2010.nc
cp psl_mon_1900_2010.nc ../Data/ESGF/obsdata/Tier3/ERA-20C/
cd ../Data/ESGF/obsdata/Tier3/ERA-20C/

# rename file
mv psl_mon_1900_2010.nc OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc

# rename variable
ncrename -v sp,psl OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc

# rename dimensions
ncrename -d latitude,lat -d longitude,lon OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc
ncrename -v latitude,lat -v longitude,lon OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc

# rename standard_name
ncatted -a standard_name,psl,m,c,air_pressure_at_mean_sea_level OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc
ncatted -a long_name,psl,m,c,Sea Level Pressure OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc

# rename long_name
ncatted -a long_name,psl,m,c,"Sea Level Pressure" OBS6_ERA-20C_reanaly_1_Amon_psl_190001-201012.nc

7 changes: 5 additions & 2 deletions recipes/recipe_cbf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ documentation:
Example recipe that calculate and plot the Common Base Function.

authors:
- andela_bouwe
- unmaintained
#- yanchun_he

maintainer:
- schlund_manuel
- unmaintained
#- yanchun_he

references:
- acknow_project

projects:
- esmval
#- NICEST-2

datasets:
- {dataset: NorESM2-LM, project: CMIP6, exp: historical, ensemble: r1i1p1f1, grid: gn}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d6d816e

Please sign in to comment.