Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding custom variables for cloud study #2482

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9d32795
add custom vars
LisaBock Jun 21, 2023
cee749c
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Jun 21, 2023
4819966
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Jun 23, 2023
818fdac
add p500 coordinate
LisaBock Aug 2, 2023
7c2a0d6
add zg500 fix
LisaBock Aug 14, 2023
1849be7
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Aug 14, 2023
7e3fa6c
add p700 and p850
LisaBock Nov 13, 2023
ba228a6
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Nov 29, 2023
3eb3b64
add custom variable ta1000
LisaBock Dec 1, 2023
29f5b80
add wap700
LisaBock Dec 7, 2023
6ff9483
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Jan 9, 2024
7ebae36
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Feb 9, 2024
fe2b52e
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Mar 5, 2024
7000357
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Mar 27, 2024
59043eb
Merge branch 'main' of github.com:ESMValGroup/ESMValCore into causal_…
LisaBock Jun 10, 2024
4a78723
change to CMIP5 table
LisaBock Jun 11, 2024
685ffd1
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Jun 11, 2024
c05545e
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Jun 25, 2024
75a201f
Merge remote-tracking branch 'origin/main' into causal_clouds
LisaBock Jul 16, 2024
e80e11b
added tests
LisaBock Jul 16, 2024
016e7a4
add tests
LisaBock Jul 19, 2024
bf00542
Merge remote-tracking branch 'origin/main' into adding_custom_vars
LisaBock Jul 19, 2024
82192f6
fix
LisaBock Jul 19, 2024
0f6c30f
fix
LisaBock Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions esmvalcore/cmor/tables/custom/CMOR_coordinates.dat
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,47 @@ type: double
must_have_bounds: yes
!----------------------------------
!

!============
axis_entry: p700
!============
!----------------------------------
! Axis attributes:
!----------------------------------
standard_name: air_pressure
units: Pa
axis: Z ! X, Y, Z, T (default: undeclared)
positive: down ! up or down (default: undeclared)
long_name: pressure
!----------------------------------
! Additional axis information:
!----------------------------------
out_name: plev
stored_direction: decreasing
type: double
value: 70000. ! of scalar (singleton) dimension
must_have_bounds: no
!----------------------------------
!

!============
axis_entry: p1000
!============
!----------------------------------
! Axis attributes:
!----------------------------------
standard_name: air_pressure
units: Pa
axis: Z ! X, Y, Z, T (default: undeclared)
positive: down ! up or down (default: undeclared)
long_name: pressure
!----------------------------------
! Additional axis information:
!----------------------------------
out_name: plev
stored_direction: decreasing
type: double
value: 100000. ! of scalar (singleton) dimension
must_have_bounds: no
!----------------------------------
!
19 changes: 19 additions & 0 deletions esmvalcore/cmor/tables/custom/CMOR_ctp.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SOURCE: CMIP5
!============
variable_entry: ctp
!============
modeling_realm: atmos
!----------------------------------
! Variable attributes:
!----------------------------------
standard_name:
units: hPa
cell_methods: time: mean
cell_measures: area: areacella
long_name: Cloud Top Pressure
!----------------------------------
! Additional variable information:
!----------------------------------
dimensions: longitude latitude time
type: real
!----------------------------------
19 changes: 19 additions & 0 deletions esmvalcore/cmor/tables/custom/CMOR_reff.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
SOURCE: CMIP6
!============
variable_entry: reff
!============
modeling_realm: atmos
!----------------------------------
! Variable attributes:
!----------------------------------
standard_name:
units: um
cell_methods: time: mean
cell_measures: area: areacella
long_name: Cloud Effective Radius
!----------------------------------
! Additional variable information:
!----------------------------------
dimensions: longitude latitude time
type: real
!----------------------------------
21 changes: 21 additions & 0 deletions esmvalcore/cmor/tables/custom/CMOR_ta1000.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SOURCE: CMIP5
!============
variable_entry: ta1000
!============
modeling_realm: atmos
!----------------------------------
! Variable attributes:
!----------------------------------
standard_name: air_temperature
units: K
cell_methods: time: mean
cell_measures: area: areacella
long_name: Air Temperature at 1000hPa
!----------------------------------
! Additional variable information:
!----------------------------------
dimensions: longitude latitude time p1000
out_name: ta1000
type: real
!----------------------------------
!
22 changes: 22 additions & 0 deletions esmvalcore/cmor/tables/custom/CMOR_wap700.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SOURCE: CMIP5
!============
variable_entry: wap700
!============
modeling_realm: atmos
!----------------------------------
! Variable attributes:
!----------------------------------
standard_name: lagrangian_tendency_of_air_pressure
units: Pa s-1
cell_methods: time: mean
cell_measures: area: areacella
long_name: Omega (=dp/dt) at 700hPa
comment: at 700 hPa level; commonly referred to as ""omega"", this represents the vertical component of velocity in pressure coordinates (positive down)
!----------------------------------
! Additional variable information:
!----------------------------------
dimensions: longitude latitude time p700
out_name: wap700
type: real
!----------------------------------
!
36 changes: 36 additions & 0 deletions tests/integration/cmor/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,42 @@ def test_get_variable_tosStderr(self):
'Sea Surface Temperature Error')
self.assertEqual(var.units, 'K')

def test_get_variable_ctp(self):
"""Get ctp variable."""
CustomInfo()
var = self.variables_info.get_variable('day', 'ctp')
self.assertEqual(var.short_name, 'ctp')
self.assertEqual(var.long_name,
'Cloud Top Pressure')
self.assertEqual(var.units, 'hPa')

def test_get_variable_reff(self):
"""Get reff variable."""
CustomInfo()
var = self.variables_info.get_variable('day', 'reff')
self.assertEqual(var.short_name, 'reff')
self.assertEqual(var.long_name,
'Cloud Effective Radius')
self.assertEqual(var.units, 'um')

def test_get_variable_ta1000(self):
"""Get ta1000 variable."""
CustomInfo()
var = self.variables_info.get_variable('day', 'ta1000')
self.assertEqual(var.short_name, 'ta1000')
self.assertEqual(var.long_name,
'Air Temperature at 1000hPa')
self.assertEqual(var.units, 'K')

def test_get_variable_wap700(self):
"""Get wap700 variable."""
CustomInfo()
var = self.variables_info.get_variable('day', 'wap700')
self.assertEqual(var.short_name, 'wap700')
self.assertEqual(var.long_name,
'Omega (=dp/dt) at 700hPa')
self.assertEqual(var.units, 'Pa s-1')


@pytest.mark.parametrize(
'project,mip,short_name,frequency',
Expand Down