diff --git a/fre/pp/schema.json b/fre/pp/schema.json index 7e19522a..e69b4b3d 100644 --- a/fre/pp/schema.json +++ b/fre/pp/schema.json @@ -3,86 +3,61 @@ "title": "Schema for PP Yaml", "type": "object", "properties": { - "rose-suite": { - "type": "object", - "properties": { - "settings": { - "type":"object", - "properties": { - "history_segment": {"type":"string"}, - "pp_start": {"type":"string"}, - "pp_stop": {"type":"string"}, - "site": {"type":"string"}, - "fre_analysis_home": {"type":["string","null"]}, - "pp_chunk_a": {"type":"string"}, - "pp_chunk_b": {"type":["string","null"]}, - "pp_grid_spec": {"type":"string"} - } - }, - "switches": { - "type":"object", - "properties": { - "clean_work": {"type":"boolean"}, - "do_mdtf": {"type":"boolean"}, - "do_statics": {"type":"boolean"}, - "do_timeavgs": {"type":"boolean"}, - "do_refinediag": {"type":"boolean"}, - "do_atmos_plevel_masking": {"type":"boolean"}, - "do_preanalysis": {"type":"boolean"}, - "do_analysis": {"type":"boolean"}, - "do_analysis_only": {"type":"boolean"} - } - }, - "directories": { - "type":"object", - "properties": { - "history_dir": {"type":"string"}, - "pp_dir": {"type":"string"}, - "ptmp_dir": {"type":"string"}, - "refinediag_scripts":{"type":["string","null"]}, - "preanalysis_script":{"type":["string","null"]}, - "history_refined":{"type":["string","null"]}, - "analysis":{"type":["string","null"]} - } - }, - "metadata": { - "type":"object", - "properties": { - "experiment":{"type":"string"}, - "platform":{"type":"string"}, - "target":{"type":"string"} - } - } - } - }, - "component": { - "type":"object", - "properties": { - "type": {"type":"string"}, - "sources": {"type":"string"}, - "sourceGrid": {"type":"string"}, - "xyInterp": {"type":"string"}, - "interpMethod": {"type":"string"}, - "inputRealm": {"type":"string"} - } - }, - "tmpdir": { - "type": "object", - "properties": { - "tmpdirpath": {"type":["string","null"]} - } - }, - "install-exp-script": { - "type": "array", - "properties": { - "path": {"type": "string"}, - "install-option": { - "type": "object", - "properties": { - "install": {"type": "string"} - } - } - } - } + "name": {"type": "string"}, + "platform": {"type": "string"}, + "target": {"type": "string"}, + "directories": { + "history_dir": {"type":"string"}, + "pp_dir": {"type":"string"}, + "ptmp_dir": {"type":"string"}, + "refinediag_scripts":{"type":["string","null"]}, + "preanalysis_script":{"type":["string","null"]}, + "history_refined":{"type":["string","null"]}, + "analysis":{"type":["string","null"]}, + "pp_grid_spec": {"type":"string"}, + "fre_analysis_home": {"type":["string","null"]} + }, + "postprocess": { + "type": "object", + "properties": { + "settings": { + "type:": "object", + "properties": { + "history_segment": {"type":"string"}, + "site": {"type":"string"}, + "pp_chunk_a": {"type":"string"}, + "pp_chunk_b": {"type":"string"}, + "pp_start": {"type":"string"}, + "pp_stop": {"type":"string"}, + "pp_components": {"type":"string"} + } + }, + "switches": { + "type": "object", + "properties": { + "clean_work": {"type":"boolean"}, + "do_mdtf": {"type":"boolean"}, + "do_statics": {"type":"boolean"}, + "do_timeavgs": {"type":"boolean"}, + "do_refinediag": {"type":"boolean"}, + "do_atmos_plevel_masking": {"type":"boolean"}, + "do_preanalysis": {"type":"boolean"}, + "do_analysis": {"type":"boolean"}, + "do_analysis_only": {"type":"boolean"} + } + }, + "components": { + "type": "array", + "properties": { + "type": {"type":"string"}, + "sources": {"type":"string"}, + "sourceGrid": {"type":"string"}, + "xyInterp": {"type":"string"}, + "interpMethod": {"type":"string"}, + "inputRealm": {"type":"string"} + } + } + } + } } } diff --git a/fre/pp/tests/example_ppyamls/am5.yaml b/fre/pp/tests/example_ppyamls/am5.yaml index baeec9f4..a2d6e5f6 100644 --- a/fre/pp/tests/example_ppyamls/am5.yaml +++ b/fre/pp/tests/example_ppyamls/am5.yaml @@ -1,57 +1,59 @@ # reusable variables -define: &AM5_VERSION "am5f7b12r1" -define: &FRE_STEM !join [am5/, *AM5_VERSION] +fre_properties: + - &AM5_VERSION "am5f7b12r1" + - &FRE_STEM !join [am5/, *AM5_VERSION] -# amip -define: &EXP_AMIP_START "1979" -define: &EXP_AMIP_END "2020" -define: &ANA_AMIP_START "1980" -define: &ANA_AMIP_END "2020" + # amip + - &EXP_AMIP_START "1979" + - &EXP_AMIP_END "2020" + - &ANA_AMIP_START "1980" + - &ANA_AMIP_END "2020" -define: &PP_AMIP_CHUNK96 "1yr" -define: &PP_AMIP_CHUNK384 "1yr" -define: &PP_XYINTERP96 "180,288" -define: &PP_XYINTERP384 "720,1152" + - &PP_AMIP_CHUNK96 "1yr" + - &PP_AMIP_CHUNK384 "1yr" + - &PP_XYINTERP96 "180,288" + - &PP_XYINTERP384 "720,1152" -# climo -define: &EXP_CLIMO_START96 "0001" -define: &EXP_CLIMO_END96 "0011" -define: &ANA_CLIMO_START96 "0002" -define: &ANA_CLIMO_END96 "0011" + # climo + - &EXP_CLIMO_START96 "0001" + - &EXP_CLIMO_END96 "0011" + - &ANA_CLIMO_START96 "0002" + - &ANA_CLIMO_END96 "0011" -define: &EXP_CLIMO_START384 "0001" -define: &EXP_CLIMO_END384 "0006" -define: &ANA_CLIMO_START384 "0002" -define: &ANA_CLIMO_END384 "0006" + - &EXP_CLIMO_START384 "0001" + - &EXP_CLIMO_END384 "0006" + - &ANA_CLIMO_START384 "0002" + - &ANA_CLIMO_END384 "0006" -# coupled -define: &PP_CPLD_CHUNK_A "5yr" -define: &PP_CPLD_CHUNK_B "20yr" + # coupled + - &PP_CPLD_CHUNK_A "5yr" + - &PP_CPLD_CHUNK_B "20yr" -# grids -define: &GRID_SPEC96 "/archive/oar.gfdl.am5/model_gen5/inputs/c96_grid/c96_OM4_025_grid_No_mg_drag_v20160808.tar" + # grids + - &GRID_SPEC96 "/archive/oar.gfdl.am5/model_gen5/inputs/c96_grid/c96_OM4_025_grid_No_mg_drag_v20160808.tar" +shared: # directories shared across tools -directories: - history_dir: !join [/archive/$USER/, *FRE_STEM, /, *name, /, *platform, -, *target, /, history] - pp_dir: !join [/archive/$USER/, *FRE_STEM, /, *name, /, *platform, -, *target, /, pp] - analysis_dir: !join [/nbhome/$USER/, *FRE_STEM, /, *name] - ptmp_dir: "/xtmp/$USER/ptmp" - fre_analysis_home: "/home/fms/local/opt/fre-analysis/test" + directories: &shared_directories + history_dir: !join [/archive/$USER/, *FRE_STEM, /, *name, /, *platform, -, *target, /, history] + pp_dir: !join [/archive/$USER/, *FRE_STEM, /, *name, /, *platform, -, *target, /, pp] + analysis_dir: !join [/nbhome/$USER/, *FRE_STEM, /, *name] + ptmp_dir: "/xtmp/$USER/ptmp" + fre_analysis_home: "/home/fms/local/opt/fre-analysis/test" -# shared pp settings -postprocess: - settings: - history_segment: "P1Y" - site: "ppan" - switches: - do_statics: True - do_timeavgs: True - clean_work: True - do_refinediag: False - do_atmos_plevel_masking: True - do_preanalysis: False - do_analysis: True + # shared pp settings + postprocess: + settings: &shared_settings + history_segment: "P1Y" + site: "ppan" + switches: &shared_switches + do_statics: True + do_timeavgs: True + clean_work: True + do_refinediag: False + do_atmos_plevel_masking: True + do_preanalysis: False + do_analysis: True experiments: - name: "c96L65_am5f7b12r1_amip" diff --git a/fre/pp/tests/example_ppyamls/yaml_include/pp.c384_clim.yml b/fre/pp/tests/example_ppyamls/yaml_include/pp.c384_clim.yml deleted file mode 100644 index 589ead49..00000000 --- a/fre/pp/tests/example_ppyamls/yaml_include/pp.c384_clim.yml +++ /dev/null @@ -1,45 +0,0 @@ -# "FRE properties" :) -define1: &xyInterp "720,1152" - -c384_clim_directories: - history_dir: "/archive/oar.gfdl.am5/am5/am5f7b12r0/c384L65_am5f7b12r0_pdclim1850F/gfdl.ncrc5-deploy-prod-openmp/history" - pp_dir: "/archive/$USER/am5/am5f7b12r0/c384L65_am5f7b12r0_pdclim1850F/gfdl.ncrc5-deploy-prod-openmp/pp_canopy" - analysis_dir: "/nbhome/$USER/analysis_canopy/c384L65_am5f7b12r0_pdclim1850F" - ptmp_dir: "/xtmp/$USER/ptmp" - fre_analysis_home: "/home/fms/local/opt/fre-analysis/test" - -c384_clim_postprocess: - switches: - do_statics: True - do_timeavgs: True - clean_work: True - do_refinediag: False - do_atmos_plevel_masking: True - do_preanalysis: False - do_analysis: True - - components: - - type: "atmos_cmip" - sources: "atmos_month_cmip atmos_8xdaily_cmip atmos_daily_cmip" - sourceGrid: "cubedsphere" - xyInterp: *xyInterp - interpMethod: "conserve_order2" - inputRealm: 'atmos' - - type: "atmos" - sources: "atmos_month" - sourceGrid: "cubedsphere" - xyInterp: *xyInterp - interpMethod: "conserve_order2" - inputRealm: 'atmos' - - type: "atmos_level_cmip" - sources: "atmos_level_cmip" - sourceGrid: "cubedsphere" - xyInterp: *xyInterp - interpMethod: "conserve_order2" - inputRealm: 'atmos' - - type: "atmos_level" - sources: "atmos_month" - sourceGrid: "cubedsphere" - xyInterp: *xyInterp - interpMethod: "conserve_order2" - inputRealm: 'atmos' diff --git a/fre/pp/tests/example_ppyamls/yaml_include/pp.c96_amip.yaml b/fre/pp/tests/example_ppyamls/yaml_include/pp.c96_amip.yaml index 01317f0f..117c66c6 100644 --- a/fre/pp/tests/example_ppyamls/yaml_include/pp.c96_amip.yaml +++ b/fre/pp/tests/example_ppyamls/yaml_include/pp.c96_amip.yaml @@ -1,18 +1,25 @@ # local reusable variable overrides -define: &custom_interp "180,360" +fre_properties: + - &custom_interp "180,360" # directory overrides -c96_amip_directories: +#c96_amip_directories: +directories: + <<: *shared_directories ptmp_dir: "/ptmp/$USER" + pp_grid_spec: *GRID_SPEC96 -c96_amip_postprocess: +#c96_amip_postprocess: +postprocess: # pp setting overrides settings: + <<: *shared_settings pp_start: *ANA_AMIP_START pp_stop: *ANA_AMIP_END pp_chunk_a: *PP_AMIP_CHUNK96 pp_components: "atmos atmos_scalar" - switches: + switches: + <<: *shared_switches do_statics: False # main pp instructions