Skip to content

Commit

Permalink
Added sea ice thickness to polcon plots
Browse files Browse the repository at this point in the history
  • Loading branch information
DSenftleben committed May 17, 2018
1 parent 7e4a3c0 commit 1aa6402
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 62 deletions.
69 changes: 38 additions & 31 deletions diag_scripts/SeaIce_polcon.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
;; Description
;; Uses original grid (no regridding).
;; Draws sea ice concentration color coded and a red contour line at 0.15
;; (extent).
;; (extent), or sea ice thickness color coded.
;; Panels multiple plots: starts a new page after max_vert*max_hori
;;
;; Required diag_script_info attributes (diagnostics specific)
Expand All @@ -28,17 +28,18 @@
;; showunits: display units in figure title
;;
;; Caveats
;; no masking of the apparent line of missing data between the two grid
;; No masking of the apparent line of missing data between the two grid
;; poles yet (for a workaround, see
;; http://www.ncl.ucar.edu/Applications/Scripts/ice_4.ncl).
;;
;; Modification history
;; 20170512-A_senf_da: Added reporting
;; 20180516-A_senf_da: Adapted to sea ice thickness (sit).
;; 20170512-A_senf_da: Added reporting.
;; 20151027-A_laue_ax: Moved call to 'write_references' to the beginning
;; of the code
;; 20150605-A_vanu_be: Additional attributes for more formatting control
;; of the code.
;; 20150605-A_vanu_be: Additional attributes for more formatting control.
;; 20150325-A_laue_ax: Modified reference tags used for acknowledgements
;; (projects, observations, etc)
;; (projects, observations, etc).
;; 20140623-A_senf_da: res now passed to plot script as attributes of var.
;; 20140312-A_righ_ma: Adapted to new time_operations structure.
;; 20131216-A_vanu_be: Generalized a bit so it can plot other vars.
Expand Down Expand Up @@ -83,12 +84,12 @@ begin
field_type0 = field_types(0)

;; References Information
write_references(diag_script, \ ; script name
"A_gott_kl", \ ; authors
"A_senf_da", \ ; contributors
"D_0001", \ ; diag_references
"", \ ; obs_references
(/"P_embrace", "P_climval"/)) ; proj_acknowledgements
write_references(diag_script, \ ; script name
(/"A_gott_kl", "A_senf_da"/), \ ; authors
"", \ ; contributors
"D_0001", \ ; diag_references
"", \ ; obs_references
(/"P_embrace", "P_climval"/)) ; proj_acknowledgements

do idx_mod = 0, dim_MOD - 1
data = read_data(idx_mod, var0, field_type0)
Expand Down Expand Up @@ -155,22 +156,6 @@ begin
;; open the workstation
wks = get_wks(0, diag_script, name_string)

;; Set contour parameters
grid_min = 0. ; default
grid_max = 1. ; default
grid_step = 0.1 ; default
if (isatt(diag_script_info, "grid_min")) then
grid_min = tofloat(diag_script_info@grid_min)
end if
if (isatt(diag_script_info, "grid_max")) then
grid_max = tofloat(diag_script_info@grid_max)
end if
if (isatt(diag_script_info, "grid_step")) then
grid_step = tofloat(diag_script_info@grid_step)
end if
nsteps = round((grid_max - grid_min) / grid_step, 3) + 1
cnLevels = fspan(grid_min, grid_max, nsteps)

;; Define color table
;; "WhiteBlue", "BlueWhiteOrangeRed", "BlueYellowRed" ;"BlWhRe"
if (isatt(diag_script_info, "colormap")) then
Expand Down Expand Up @@ -234,9 +219,11 @@ begin

;; see ./interface_scripts/data_handling.ncl
var = extract_data(imod, data, -1, 0, 0)
if (var@units.eq."%") then
var = var / 100. ; Subsequent code works fine without rescaling
var@units = "%/100" ; But annotation is hardcoded for %/100
if (var0.eq."sic") then
if (var@units.eq."%") then
var = var / 100. ; Subsequent code works fine without rescaling
var@units = "%/100" ; But annotation is hardcoded for %/100
end if
end if

;; Show units in title (default False)
Expand Down Expand Up @@ -307,6 +294,26 @@ begin

;; resources to be passed to plot routine
; as attributes to var_ann with prefix "res_"
;; Set contour parameters
grid_min = 0. ; default
if (var0.eq."sic") then
grid_max = 1. ; default
grid_step = 0.1 ; default
else
grid_max = round(max(var_ann), 0)
grid_step = (grid_max - grid_min) / 10.
end if
if (isatt(diag_script_info, "grid_min")) then
grid_min = tofloat(diag_script_info@grid_min)
end if
if (isatt(diag_script_info, "grid_max")) then
grid_max = tofloat(diag_script_info@grid_max)
end if
if (isatt(diag_script_info, "grid_step")) then
grid_step = tofloat(diag_script_info@grid_step)
end if
nsteps = round((grid_max - grid_min) / grid_step, 3) + 1
cnLevels = fspan(grid_min, grid_max, nsteps)
var_ann@res_lbLabelBarOn = lblBarOn ; individual bars
var_ann@res_cnLevelSelectionMode = "ExplicitLevels"
var_ann@res_cnLevels = cnLevels
Expand Down
18 changes: 13 additions & 5 deletions diag_scripts/SeaIce_polcon_diff.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ begin
verbosity, 2)
;; See ./interface_scripts/data_handling.ncl
var_raw = extract_data(imod, data, -1, 0, 0)
if (var_raw@units.eq."%") then
var_raw = var_raw / 100. ; Subsequent code expects %/100
var_raw@units = "%/100"
if (var0.eq."sic") then
if (var_raw@units.eq."%") then
var_raw = var_raw / 100. ; Subsequent code expects %/100
var_raw@units = "%/100"
end if
end if

;; Show units in title (default False)
Expand Down Expand Up @@ -327,7 +329,6 @@ begin
copy_VarMeta(var_regrid, var)
var = where(ismissing(var_ref), var_ref@_FillValue, var)
var = where(ismissing(var_regrid), var_ref@_FillValue, var)

var@long_name = "~F33~D~F~ of " + var@long_name + strUnits
var_perc = 100. * (var_regrid - var_ref) / \
where(var_ref .le. 0., var_ref@_FillValue, var_ref)
Expand All @@ -343,6 +344,12 @@ begin
grid_center = 0.0 ; default
if (isatt(diag_script_info, "grid_min")) then
grid_min = tofloat(diag_script_info@grid_min)
else
if (var0.eq."sit") then
error_msg("w", diag_script, "", "For sea ice thickness," + \
" grid min and max values " + \
" should be specified in the cfg file.")
end if
end if
if (isatt(diag_script_info, "grid_max")) then
grid_max = tofloat(diag_script_info@grid_max)
Expand Down Expand Up @@ -478,7 +485,8 @@ begin
end do
contrib_authors = (/"A_gott_kl", "A_senf_da"/)
ESMValMD(plot_fname, alltags, caption, id, var0, \
models@name(ind_models_shown), climofiles, diag_script, contrib_authors)
models@name(ind_models_shown), climofiles, diag_script, \
contrib_authors)
delete([/ seq_num, plot_fname, id, ind_models_shown, \
ind_models_shown_exclref, climofiles /])
end do
Expand Down
35 changes: 19 additions & 16 deletions doc/sphinx/source/namelists/namelist_seaice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ Sea ice
Overview
--------

The sea ice diagnostics cover sea ice extent and concentration, but work is
underway to include other variables and processes in future releases of the
ESMValTool. Current diagnostics include time series of September (Arctic) and
March (Antarctic) sea ice extent calculated as the total area (km\ :sup:`2`\) of grid
cells with sea ice concentrations (sic) of at least 15%. Also included are the
seasonal cycle of sea ice extent, polar stereographic contour and polar
contour difference plots of Arctic and Antarctic sea ice concentrations.
The sea ice diagnostics cover sea ice extent, concentration, and thickness.
Work is underway to include other variables and processes in future releases
of the ESMValTool. Current diagnostics include time series of Arctic and
Antarctic sea ice area and extent (calculated as the total area (km\ :sup:`2`\)
of grid cells with sea ice concentrations (sic) of at least 15%). Also included
are the seasonal cycle of sea ice extent, and polar stereographic contour and
polar contour difference plots of Arctic and Antarctic sea ice concentration
and sea ice thickness.



Expand All @@ -34,16 +35,15 @@ Diagnostics are stored in diag_scripts/
(multi-year monthly mean values).

* SeaIce_polcon.ncl: polar stereographic plots of sea ice
concentration (= sea ice area fraction) and extent (grid cells with
a sea ice concentration of at least 15%) for individual models or
observational data sets, for Arctic and Antarctic regions with
flexible paneling of the individual plots. The edges of sea ice
extent can be highlighted via an optional red line.
concentration (= sea ice area fraction) and sea ice thickness for
individual models or observational data sets, for Arctic and Antarctic
regions with flexible paneling of the individual plots. The edges of
sea ice extent can be highlighted via an optional red line.

* SeaIce_polcon_diff.ncl: polar stereographic plots of sea ice area
concentration difference between individual models and reference
data (e.g., an observational data set) for both Arctic and Antarctic
with flexible paneling of the individual plots. All data are
concentration and thickness difference between individual models and
reference data (e.g., an observational data set) for both Arctic and
Antarctic with flexible paneling of the individual plots. All data are
regridded to a common grid (1°x1°) before comparison.


Expand Down Expand Up @@ -121,7 +121,7 @@ Variables
---------

* sic (sea ice, monthly mean, longitude latitude time)

* sit (sea ice, monthly mean, longitude latitude time)


Observations and reformat scripts
Expand All @@ -137,6 +137,9 @@ Observations and reformat scripts

*Reformat script:* reformat_scripts/obs/reformat_obs_HadISST.ncl

* Pan-Arctic Ice Ocean Modelling and Assimilation System (PIOMAS)

*Reformat script:* reformat_scripts/obs/reformat_obs_PIOMAS.f90



Expand Down
37 changes: 37 additions & 0 deletions nml/cfg_SeaIce/cfg_SeaIce_NH_sit.ncl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
diag_script_info = True

;; Used by: all SeaIce routines
diag_script_info@region = "Arctic" ; "Arctic" or "Antarctic"; entire hemisphere will be evaluated
; Make sure to specify data for the correct hemisphere in the main nml.
diag_script_info@month = "9" ; A = annual mean, 3 = March, 9 = September
diag_script_info@styleset = "CMIP5" ; "CMIP5", "DEFAULT"

;; Used by: SeaIce_polcon, SeaIce_polcon_diff, SeaIce_ancyc
diag_script_info@range_option = 1 ; 0 = use each model's whole time range as specified in namelist
; 1 = use only intersection of all time ranges

;; Used by: SeaIce_tsline, SeaIce_ancyc
;; see style_FUNCTIONS/style_$project$.ncl for which data shall be included in the statistics
diag_script_info@multi_model_mean = "n" ; "y" = plot multi-model mean & stddev; "n" = don't
diag_script_info@EMs_in_lg = False ; create legend label for each individual ensemble member
diag_script_info@fill_pole_hole = True ; Fill pole hole in data
diag_script_info@legend_outside = False

;; Used by: SeaIce_polcon, SeaIce_polcon_diff
diag_script_info@contour_extent = "n" ; y = draw a red contour line for sic extent in polar stereographic plots
diag_script_info@max_vert = 1 ; max allowed number of rows on a panel page (vertical)
diag_script_info@max_hori = 1 ; max allowed number of columns on a panel page (horizontal)
diag_script_info@max_lat = -50. ; Antarctic plotted from -90° up to this latitude
diag_script_info@min_lat = 60. ; Arctic plotted from 90° up to this latitude
diag_script_info@showunits = True ; Show units in title
;diag_script_info@PanelTop = 0.99 ; tune down to get full title of uppermost panel row (default 0.99)

;; Used by: SeaIce_polcon_diff.ncl
diag_script_info@ref_model = "PIOMAS" ; reference model, as specified in annotations -> if the specified string is
; not found, the routine will print a list of valid strings before crashing
diag_script_info@dst_grid = "./diag_scripts/aux/CDO/cdo_dst_grid_g010"
; path to destination grid file, required by cdo_remapdis
;diag_script_info@grid_min = -0.3 ; min contour value, default: -1.
;diag_script_info@grid_max = 0.3 ; max contour value, default: 1.
;diag_script_info@grid_step = 0.05 ; step between contours, default: 0.2
;diag_script_info@grid_center = 0.0 ; value to center the color bar, default: 0.0
29 changes: 24 additions & 5 deletions nml/namelist_SeaIce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A namelist for plotting SeaIce diagnostics at the Arctic and Antarctic
Author
Daniel Senftleben (DLR, Germany - [email protected])

Contributor
Contributors
Melanie Braeu (DLR, Germany)
Klaus-Dirk Gottschaldt (DLR, Germany - [email protected])

Expand All @@ -37,7 +37,7 @@ This namelist is part of the ESMValTool
<verbosity type="integer"> 1 </verbosity>
<exit_on_warning type="boolean"> False </exit_on_warning>
<output_file_type> png </output_file_type>
<tags> D_stroeve07grl, P_esmval, P_crescendo </tags>
<tags> D_stroeve07grl, P_esmval, P_crescendo </tags>
</GLOBAL>

<MODELS>
Expand Down Expand Up @@ -210,12 +210,26 @@ This namelist is part of the ESMValTool
<model> CMIP5_ETHZ NorESM1-M OImon historical r3i1p1 1960 2005 @{MODELPATH}/ETHZ_CMIP5/ </model>

<model> CMIP5_ETHZ NorESM1-ME OImon historical r1i1p1 1960 2005 @{MODELPATH}/ETHZ_CMIP5/ </model>


<model> OBS HadISST reanaly 20130524 1960 2005 @{OBSPATH}/Tier2/HadISST/ </model>
</MODELS>


<DIAGNOSTICS>
<diag>
<description> Set of NH sit contour and difference plots </description>
<variable_def_dir> ./variable_defs/ </variable_def_dir>
<variable> sit </variable>
<field_type> T2Ms </field_type>
<diag_script_cfg_dir> ./nml/cfg_SeaIce/ </diag_script_cfg_dir>
<tags> R_seaIce, T_seaIce </tags>

<model> OBS_gridfile PIOMAS reanaly 2-1 1978 2017 @{OBSPATH}/Tier2/PIOMAS/
@{OBSPATH}/Tier2/PIOMAS/OBS_PIOMAS_reanaly_2-1_T2Ms_sit_197801-201712.nc </model>

<diag_script cfg="cfg_SeaIce_NH_sit.ncl"> SeaIce_polcon.ncl </diag_script>
<diag_script cfg="cfg_SeaIce_NH_sit.ncl"> SeaIce_polcon_diff.ncl </diag_script>
</diag>


<diag>
<description> Set of NH sic timeline, contour and difference plots </description>
<variable_def_dir> ./variable_defs/ </variable_def_dir>
Expand All @@ -224,6 +238,8 @@ This namelist is part of the ESMValTool
<diag_script_cfg_dir> ./nml/cfg_SeaIce/ </diag_script_cfg_dir>
<tags> R_seaIce, T_seaIce </tags>

<model> OBS HadISST reanaly 20130524 1960 2005 @{OBSPATH}/Tier2/HadISST/ </model>

<model> OBS_gridfile NSIDC-NT sat NH 1979 2005 @{OBSPATH}/Tier2/NSIDC/
@{OBSPATH}/Tier2/NSIDC/OBS_NSIDC-NT_sat_NH_T2Ms_sic_197811-201312.nc </model>
<model> OBS_gridfile NSIDC-BT sat NH 1979 2005 @{OBSPATH}/Tier2/NSIDC/
Expand All @@ -244,6 +260,8 @@ This namelist is part of the ESMValTool
<diag_script_cfg_dir> ./nml/cfg_SeaIce/ </diag_script_cfg_dir>
<tags> R_seaIce, T_seaIce </tags>

<model> OBS HadISST reanaly 20130524 1960 2005 @{OBSPATH}/Tier2/HadISST/ </model>

<model> OBS_gridfile NSIDC-NT sat SH 1979 2005 @{OBSPATH}/Tier2/NSIDC/
@{OBSPATH}/Tier2/NSIDC/OBS_NSIDC-NT_sat_SH_T2Ms_sic_197811-201312.nc </model>
<model> OBS_gridfile NSIDC-BT sat SH 1979 2005 @{OBSPATH}/Tier2/NSIDC/
Expand All @@ -254,6 +272,7 @@ This namelist is part of the ESMValTool
<diag_script cfg="cfg_SeaIce_SH.ncl"> SeaIce_polcon.ncl </diag_script>
<diag_script cfg="cfg_SeaIce_SH.ncl"> SeaIce_polcon_diff.ncl </diag_script>
</diag>

</DIAGNOSTICS>

</namelist>
25 changes: 20 additions & 5 deletions nml/test_suites/dlr/namelist_SeaIce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,25 @@ This namelist is part of the ESMValTool
<MODELS>
<model> CMIP5_ETHZ MPI-ESM-LR OImon historical r1i1p1 2001 2004 @{MODELPATH}/ETHZ_CMIP5/ </model>
<model> CMIP5_ETHZ MPI-ESM-MR OImon historical r1i1p1 2002 2005 @{MODELPATH}/ETHZ_CMIP5/ </model>
<model> OBS HadISST reanaly 20130524 1999 2004 @{OBSPATH}/Tier2/HadISST/ </model>
</MODELS>

<DIAGNOSTICS>
<diag>
<description> Set of NH sit contour and difference plots </description>
<variable_def_dir> ./variable_defs/ </variable_def_dir>
<variable> sit </variable>
<field_type> T2Ms </field_type>
<diag_script_cfg_dir> ./nml/cfg_SeaIce/ </diag_script_cfg_dir>
<tags> R_seaIce, T_seaIce </tags>

<model> OBS_gridfile PIOMAS reanaly 2-1 1999 2004 @{OBSPATH}/Tier2/PIOMAS/
@{OBSPATH}/Tier2/PIOMAS/OBS_PIOMAS_reanaly_2-1_T2Ms_sit_197801-201712.nc </model>

<diag_script cfg="cfg_SeaIce_NH_sit.ncl"> SeaIce_polcon.ncl </diag_script>
<diag_script cfg="cfg_SeaIce_NH_sit.ncl"> SeaIce_polcon_diff.ncl </diag_script>
</diag>


<diag>
<description> Set of NH Sea Ice conc. timeline, contour and difference plots </description>
<variable_def_dir> ./variable_defs/ </variable_def_dir>
Expand All @@ -57,9 +72,9 @@ This namelist is part of the ESMValTool
<diag_script cfg="cfg_SeaIce_NH.ncl"> SeaIce_polcon.ncl </diag_script>
<diag_script cfg="cfg_SeaIce_NH.ncl"> SeaIce_polcon_diff.ncl </diag_script>

<model> OBS HadISST reanaly 20130524 1999 2004 @{OBSPATH}/Tier2/HadISST/ </model>
<model> OBS_gridfile NSIDC-NT sat NH 2002 2005 @{OBSPATH}/Tier2/NSIDC/
@{OBSPATH}/Tier2/NSIDC/OBS_NSIDC-NT_sat_NH_T2Ms_sic_197811-201312.nc </model>

<model> OBS_gridfile NSIDC-BT sat NH 2002 2005 @{OBSPATH}/Tier2/NSIDC/
@{OBSPATH}/Tier2/NSIDC/OBS_NSIDC-BT_sat_NH_T2Ms_sic_197811-201312.nc </model>
</diag>
Expand All @@ -75,10 +90,10 @@ This namelist is part of the ESMValTool
<diag_script cfg="cfg_SeaIce_SH.ncl"> SeaIce_polcon.ncl </diag_script>
<diag_script cfg="cfg_SeaIce_SH.ncl"> SeaIce_polcon_diff.ncl </diag_script>

<model> OBS_gridfile NSIDC-NT sat SH 1979 2005 @{OBSPATH}/Tier2/NSIDC/
<model> OBS HadISST reanaly 20130524 1999 2004 @{OBSPATH}/Tier2/HadISST/ </model>
<model> OBS_gridfile NSIDC-NT sat SH 2002 2005 @{OBSPATH}/Tier2/NSIDC/
@{OBSPATH}/Tier2/NSIDC/OBS_NSIDC-NT_sat_SH_T2Ms_sic_197811-201312.nc </model>

<model> OBS_gridfile NSIDC-BT sat SH 1979 2013 @{OBSPATH}/Tier2/NSIDC/
<model> OBS_gridfile NSIDC-BT sat SH 2002 2005 @{OBSPATH}/Tier2/NSIDC/
@{OBSPATH}/Tier2/NSIDC/OBS_NSIDC-BT_sat_SH_T2Ms_sic_197811-201312.nc </model>

</diag>
Expand Down

0 comments on commit 1aa6402

Please sign in to comment.