Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ESCOMP#228 from mvertens/feature/history_refactor
refactor mediator history to permit new functionality ### Description of changes refactor mediator history to permit new functionality ### Specific notes This PR is a large refactor of CMEPS history function capability. There are 3 categories where this capability is now extended or added: instantaneous, average and auxiliary output. - Each component post phase (i.e. `med_phases_post_xxx_mod.F90`) now calls `med_phases_history_write_comp` and passes it its component id. - In turn med_phases_write_comp calls instantaneous, average and auxiliary output for that component. - **med_phases_history_write_inst_comp** - writes the import and export state for that component based on the new input attribute settings `history_n_xxx_inst` and `history_option_xxx_inst` - where xxx = [atm,ice,glc,lnd,ocn,rof,wav and med] - output files will have the form `<casename>.cpl.hi.atm.yyyy-mm-dd-sssss.nc` - **med_phases_history_write_avg_comp** - writes the import and export state for that component based on the new input attribute settings `history_n_xxx_avg` and `history_option_xxx_avg` - where xxx = [atm,ice,glc,lnd,ocn,rof,wav] - output files will have the form `<casename>.cpl.ha.atm.yyyy-mm-dd-sssss.nc` - **med_phases_history_write_aux_comp** - writes auxiliary history files that are normally high frequency mediator output files that contain more than one time sample on a file and that are used to spin up a prognostic component (e.g. the ocn or lnd carbon cycle) - the following auxiliary files are now supported and to enable them simply set the histaux_*_enabled flage to .true. ```histaux_atm2med_file1_enabled = .true. histaux_atm2med_file1_auxname = atm.1h.inst histaux_atm2med_file1_doavg = .false. histaux_atm2med_file1_flds = Faxa_swndr:Faxa_swvdr:Faxa_swndf:Faxa_swvdf histaux_atm2med_file1_history_n = 1 histaux_atm2med_file1_history_option = nhours histaux_atm2med_file2_enabled = .false. histaux_atm2med_file1_ntperfile = 24 histaux_atm2med_file2_auxname = atm.1h.avrg histaux_atm2med_file2_doavg = .true. histaux_atm2med_file2_flds = Sa_u:Sa_v histaux_atm2med_file2_history_n = 1 histaux_atm2med_file2_history_option = nhours histaux_atm2med_file2_ntperfile = 24 histaux_atm2med_file3_enabled = .false. histaux_atm2med_file3_auxname = atm.3hprec.avrg histaux_atm2med_file3_doavg = .true. histaux_atm2med_file3_flds = Faxa_rainc:Faxa_rainl:Faxa_snowc:Faxa_snowl histaux_atm2med_file3_history_n = 3 histaux_atm2med_file3_history_option = nhours histaux_atm2med_file3_ntperfile = 8 histaux_atm2med_file4_enabled = .false. histaux_atm2med_file4_auxname = atm.3h.avrg histaux_atm2med_file4_doavg = .true. histaux_atm2med_file4_flds = Sa_z:Sa_topo:Sa_u:Sa_v:Sa_tbot:Sa_ptem:Sa_shum:Sa_dens:Sa_pbot:Sa_pslv:Faxa_lwdn:Faxa_rainc:Faxa_rainl:Faxa_snowc:Faxa_snowl:Faxa_swndr:Faxa_swvdr:Faxa_swndf:Faxa_swvdf:Sa_co2diag:Sa_co2prog histaux_atm2med_file4_history_n = 3 histaux_atm2med_file4_history_option = nhours histaux_atm2med_file4_ntperfile = 8 histaux_atm2med_file5_auxname = atm.24h.avrg histaux_atm2med_file5_doavg = .true. histaux_atm2med_file5_enabled = .false. histaux_atm2med_file5_flds = Faxa_bcph:Faxa_ocph:Faxa_dstwet:Faxa_dstdry:Sa_co2prog:Sa_co2diag histaux_atm2med_file5_history_n = 1 histaux_atm2med_file5_history_option = ndays histaux_atm2med_file5_ntperfile = 1 histaux_lnd2med_file1_auxname = lnd.ncpl.inst histaux_lnd2med_file1_doavg = .false. histaux_lnd2med_file1_enabled = .false. histaux_lnd2med_file1_flds = all histaux_lnd2med_file1_history_n = 1 histaux_lnd2med_file1_history_option = nsteps histaux_lnd2med_file1_ntperfile = 1 ``` - for file 1 history output is of the form <casename>.cpl.hx.atm.1h.inst.yyyy-mm-dd-sssss.nc - and the <atm.1h.inst> is specified by <histaux_atm2med_file1_auxname> Contributors other than yourself, if any: None CMEPS Issues Fixed: None Are changes expected to change answers? - [x] bit for bit Any User Interface Changes (namelist or namelist defaults changes)? (see above summary) - [x] Yes
- Loading branch information