Skip to content

Commit

Permalink
Add 6hrLev zg & 3hr tosa & 6hrLev zg for the FOCI downscaling #824.
Browse files Browse the repository at this point in the history
  • Loading branch information
treerink committed May 25, 2024
1 parent e9a0e4c commit 94cad9a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"rsdscs",
"rsuscs",
"ps",
"clt"
"clt",
"tosa"
],
"6hrLev": [
"ta",
Expand Down
59 changes: 55 additions & 4 deletions ece2cmor3/scripts/add-aerchem-list-for-foci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,64 @@ if [ "$#" -eq 0 ]; then
# Add 77 TM5 AERchem variables for downscaling within the FOCI project.

table_path=../resources/cmip6-cmor-tables/Tables
table_file_6hrPlevPt=CMIP6_6hrPlevPt.json
table_file_cv=CMIP6_CV.json
table_file_3hr=CMIP6_3hr.json
table_file_6hrLev=CMIP6_6hrLev.json
table_file_6hrPlevPt=CMIP6_6hrPlevPt.json
table_file_AER6hrPt=CMIP6_AER6hrPt.json
table_file_aermon=CMIP6_AERmon.json

cd ${table_path}
rm -f ${table_file_AER6hrPt}
git checkout ${table_file_6hrPlevPt}
git checkout ${table_file_cv}
git checkout ${table_file_3hr}
git checkout ${table_file_6hrLev}
git checkout ${table_file_6hrPlevPt}
git checkout ${table_file_aermon}


sed -i '/"tslsi": {/i \
"tosa": { \
"frequency": "3hr", \
"modeling_realm": "ocean", \
"standard_name": "sea_surface_temperature", \
"units": "degC", \
"cell_methods": "area: mean where sea time: point", \
"cell_measures": "area: areacella", \
"long_name": "Sea Surface Temperature", \
"comment": "Temperature of upper boundary of the liquid ocean, including temperatures below sea-ice and floating ice shelves.", \
"dimensions": "longitude latitude time1", \
"out_name": "tosa", \
"type": "real", \
"positive": "", \
"valid_min": "", \
"valid_max": "", \
"ok_min_mean_abs": "", \
"ok_max_mean_abs": "" \
},
' ${table_file_3hr}

sed -i '/"va": {/i \
"zg": { \
"frequency": "6hrPt", \
"modeling_realm": "atmos", \
"standard_name": "geopotential_height", \
"units": "m", \
"cell_methods": "time: mean", \
"cell_measures": "area: areacella", \
"long_name": "Geopotential Height", \
"comment": "Geopotential is the sum of the specific gravitational potential energy relative to the geoid and the specific centripetal potential energy. Geopotential height is the geopotential divided by the standard acceleration due to gravity. It is numerically similar to the altitude (or geometric height) and not to the quantity with standard name height, which is relative to the surface.", \
"dimensions": "longitude latitude alevel time1", \
"out_name": "zg", \
"type": "real", \
"positive": "", \
"valid_min": "", \
"valid_max": "", \
"ok_min_mean_abs": "", \
"ok_max_mean_abs": "" \
},
' ${table_file_6hrLev}

sed -i '/"ts": {/i \
"tosa": { \
"frequency": "6hrPt", \
Expand All @@ -39,7 +86,7 @@ if [ "$#" -eq 0 ]; then
"long_name": "Sea Surface Temperature", \
"comment": "Temperature of upper boundary of the liquid ocean, including temperatures below sea-ice and floating ice shelves.", \
"dimensions": "longitude latitude time1", \
"out_name": "tos", \
"out_name": "tosa", \
"type": "real", \
"positive": "", \
"valid_min": "", \
Expand Down Expand Up @@ -155,9 +202,11 @@ if [ "$#" -eq 0 ]; then
' ${table_file_cv}

# Remove the trailing spaces of the inserted block above:
sed -i -e 's/\s*$//g' ${table_file_cv}
sed -i -e 's/\s*$//g' -e 's/,$/, /g' ${table_file_3hr}
sed -i -e 's/\s*$//g' -e 's/,$/, /g' ${table_file_6hrLev}
sed -i -e 's/\s*$//g' -e 's/,$/, /g' ${table_file_6hrPlevPt}
sed -i -e 's/\s*$//g' -e 's/,$/, /g' ${table_file_aermon}
sed -i -e 's/\s*$//g' ${table_file_cv}


# Add CMIP6 AER6hrPt table header:
Expand Down Expand Up @@ -391,6 +440,8 @@ if [ "$#" -eq 0 ]; then
echo " $0"
echo " has adjusted the files:"
echo " ${table_path}/${table_file_cv}"
echo " ${table_path}/${table_file_3hr}"
echo " ${table_path}/${table_file_6hrLev}"
echo " ${table_path}/${table_file_6hrPlevPt}"
echo " ${table_path}/${table_file_aermon}"
echo " and added the file:"
Expand Down

0 comments on commit 94cad9a

Please sign in to comment.