DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for...

17
The Na’onal Center for Atmospheric Research is sponsored by the Na’onal Science Founda’on. Any opinions, findings and conclusions or recommenda’ons expressed in this publica’on are those of the author(s) and do not necessarily reflect the views of the Na’onal Science Founda’on. ©UCAR DART Tutorial Sec’on 19: Making DART-Compliant Models

Transcript of DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for...

Page 1: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

TheNa'onalCenterforAtmosphericResearchissponsoredbytheNa'onalScienceFounda'on.Anyopinions,findingsandconclusionsorrecommenda'onsexpressedinthispublica'onarethoseoftheauthor(s)anddonotnecessarilyreflecttheviewsoftheNa'onalScienceFounda'on.

©UCAR

DARTTutorialSec'on19:MakingDART-CompliantModels

Page 2: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

DARTCompliantModels

Thissec'onhasnotyetbeenupdatedfortheManhaOanrelease.AnupdateversionshouldbeavailableinJune2017.

DARTTutorialSec'on19:Slide2

Page 3: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

DARTCompliantModels

DARTusesiden'calassimila'oncodeformenagerieofmodels.Samenamelistsyou’vebeenusinginlow-ordermodelss'llapply.ToworkwithDART,modelsmustsupplyasubsetof18interfaces.Normallydonebycrea'ngamodel_modthateither‘wraps’themodel(sothemodelitselfisembeddedinfilter),oramodel_modthatinterfacestothemodel(whereitrunsoutsideoffilter).Moreoninterfacesfollows.

DARTTutorialSec'on19:Slide3

Page 4: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

LargeModelsCompliantwithDART

Manymodelsavailable,fromsimpletohighlycomplex.Lowordermodels,oZenforDAresearchGeophysicalmodels:Atmosphere,Ocean,Land,Solar,SpaceWeather,UpperAtmosphere,Hydrology,CICE(comingsoon)Non-geophysicalapplica'ons:Economics,Target-tracking

DARTTutorialSec'on19:Slide4

Page 5: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

CAM CommunityAtmosphereModel(all3dynamicalcores)

NCAR

CAM/CHEM CAMwithChemistry NCAR

WACCM WholeAtmosphereCommunityClimateModel

NCAR

AM2 AtmosphereModel2 NOAA/GFDL

ECHAM4,6 EuropeanCentreHamburgModel Hamburg

PlanetWRF GlobalversionofWRF JPL

MPAS ModelforPredic'onAcrossScales NCAR/DOE

LMDZ5 LaboratoiredeMétéorologieDynamique

IndianInst.ofTechnology,Delhi

DARTCompliantGlobalAtmosphereModels

DARTTutorialSec'on19:Slide5

Page 6: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

WRF/ARW WeatherResearchandForecastModel

NCAR

WRF/CHEM WRFwithChemistry NCAR

NCOMMAS Collabora'veModelforMul'scaleAtmosphericSimula'on

NOAA/NSSL

COAMPS CoupledOcean/AtmosphereMesoscalePredic'onSystem

USNavy

CMAQ* CommunityMul'-scaleAirQuality(*interfacenotavailable)

EPA

COSMO Consor'umforSmall-ScaleModeling DWD

DARTCompliantRegionalAtmosphereModels

DARTTutorialSec'on19:Slide6

Page 7: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

POP ParallelOceanProgram DOE/NCAR

MITOGCM OceanGeneralCircula'onModel MIT

ROMS RegionalOceanModelingSystem Rutgers

MPAS ModelforPredic'onAcrossScales

(Underdevelopment)

DOE/LANL

DARTCompliantOceanModels

DARTTutorialSec'on19:Slide7

Page 8: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

ROSE NCAR

TIEGCM ThermosphereIonosphereElectrodynamicGCM

NCAR/HAO

GITM GlobalIonosphereThermosphereModel

Michigan

SolarDynamo Dynamo/SunspotModel NCAR/HAO

DARTCompliantUpperAtm/SpaceWeather

DARTTutorialSec'on19:Slide8

Page 9: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

CLM CommunityLandModel NCAR

NOAH Rela'velysimplelandmodel Community

CABLE CommunityAtmosphereBiosphereLandExchange

CAWCR(Australia)

WRFHydro HydrologicModel NCAAR

DARTCompliantLand/HydrologyModels

DARTTutorialSec'on19:Slide9

Page 10: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

Crea'ngaDARTCompliantModel

Totalof18interfacesforfullcompliance.Canhavepar'alcompliancewithsubsetofthese.See:

hOp://www.image.ucar.edu/DAReS/DART/DART2_Documenta'on.php#adding_a_modelSeemodels/template/model_mod.f90forstrippedinterfaces.

Theminimalinterfaceincludes:

1.func4onget_model_size:howbigisthemodel?2.func4onget_state_meta_data:returnsloca'onandkindofeach

statevariableelement(DARTseesonelongvectorforstate).3.subrou4nesta4c_init_model:doesanyini'aliza'onrequiredby

model,forinstancealloca'ngstorage,readingnamelist...Anini'alensembleofstatevectors;canbegeneratedoffline.Withthisimplementa'on,canassimilateiden'tyobsatasingle'me.

DARTTutorialSec'on19:Slide10

Page 11: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

IncreasingFunc'onality

4.func4onget_model_4me_step:whatisδtformodel?5.Stubforsubrou4neadv_1step(justsayδtis0).Cannowtestrepeatedassimila'onsofiden'tyobserva'ons.6.Allowingnon-iden'tyobserva'onoperators:

Implementsubrou4nemodel_interpolate: Givenaloca'on(andkind),returninterpolatedstatevalue.

Cantestrepeatedassimila'onsofnon-iden'tyobserva'ons.

DARTTutorialSec'on19:Slide11

Page 12: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

IncreasingFunc'onality(cont)

7.Somewaytoadvancethemodelin'me.Thiscanbedonebyimplemen'ngsubrou4neadv_1step

Givenstatevector,whatisstatevectoraZerδt?ORByimplemen'ngashellscriptthatadvancesthemodel.Readsastatevectorfromafile,writesupdatedvector.CandoarbitraryOSSEs.Candoexperimentsformodelsthathaverealobserva'ons.

DARTTutorialSec'on19:Slide12

Page 13: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

Addi'onalinterfaces

8.subrou4neinit_condi4ons:returnsastatetostartfrom.Maynotbeappropriateforlargemodelsandcanerroroutinthiscase.9.subrou4neinit_4me:returnsanini'al'metostartfrom.Again,maynotbeappropriateforlargemodelsandcanerrorout.10.subrou4nepert_model_state:Generateanensemblememberbyperturbingacontrolstate.Op'onal.(filterwillperturbifmodel_modhasnospecialneeds.)11.subrou4nesnc_write_model_a>s&nc_write_model_vars:formatnetCDFdiagnos'coutputforyourmodel.Canbeasingle1Dvectorforini'alimplementa'on.12.subrou4neend_model:cleansupwhendone.E.g.deallocatespaceallocatedinthesta'c_init_modelsubrou'ne. DARTTutorialSec'on19:Slide13

Page 14: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

Addi'onalinterfaces(cont)

13-15.get_close_maxdist_init,get_close_obs_init,get_close_obs:Rou'nesthatarenormallyprovidedbyloca4on_mod.Canstartbyincludingausestatementfromloca4on_modandapublicdeclara'onasseeninthetemplate/model_mod.Theseallowmorecontrolonefficiency,ver'caltransforma'ons,etc.forclosesearchesifneeded.16.ens_mean_for_model:notusuallyrequiredforlow-ordermodels.Somelargemodelsneedthemodelensemblemeantodoconsistentcomputa'onsindependentofanysingleensemblemember.Forexample,compu'ngconsistentdistancesbetweenloca'onsthatdependonpressure.Canbeastubthatsimplyreturns.

DARTTutorialSec'on19:Slide14

Page 15: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

Approaches,Tools

CopytheDARTmodels/templatedirectorytoanewloca'on.Addrou'nesintheordersuggestedheresoyoucantestasyougo.DecidehowDARTandyourmodelwillinteract:1.  Subrou'ne-callablemodelinsidefilter2.  Serial,easily-advancedmodeldrivenfromscriptcalledbyfilter3.  Parallel,complex-scrip'ngmodeladvancedseparatelyfromfilterUsemodels/template/model_mod_check.f90fortes'ngspecificrou'nesasyouimplementthem.Startwithsingleobserva'on,nomodeladvance,beforegeungmorecomplicated.

DARTTutorialSec'on19:Slide15

Page 16: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

Assimila'ngObserva'onsinYourModel

Toassimilateobserva'ontypesinyourmodel,youneedcodeinyourmodel_mod.f90::model_interpolate()subrou'neforallgenerickindsneededbytheforwardoperators.

1.Couldbeasimpleinterpola'onifthatobserva'onkindisalsopresentinthemodelstate.2.Couldrequireaver'caltransforma'onbasedonkindspresentinthemodelstate.e.g.temperature,moisture,pressure.3.Couldrequireforwardoperatorcodeinanobs_def_xxx_mod.f90iftheobserva'onkindcannotbedirectlyinterpolatedbythemodel.Inthiscaseyouneedtobeabletointerpolateanykindsrequiredbytheforwardoperatorcodeintheobs_deffile.

DARTTutorialSec'on19:Slide16

Page 17: DART Tutorial Sec’on 19: Making DART-Compliant Models · DART uses iden’cal assimilaon code for menagerie of models. Same namelists you’ve been using in low-order models s’ll

1.   FilteringForaOneVariableSystem2.   TheDARTDirectoryTree3.   DARTRun>meControlandDocumenta>on4.   Howshouldobserva>onsofastatevariableimpactanunobservedstatevariable?

Mul>variateassimila>on.5.   ComprehensiveFilteringTheory:Non-Iden>tyObserva>onsandtheJointPhaseSpace6.   OtherUpdatesforAnObservedVariable7.   SomeAddi>onalLow-OrderModels8.   DealingwithSamplingError9.   MoreonDealingwithError;Infla>on10.   RegressionandNonlinearEffects11.   Crea>ngDARTExecutables12.   Adap>veInfla>on13.   HierarchicalGroupFiltersandLocaliza>on14.   QualityControl15.   DARTExperiments:ControlandDesign16.   Diagnos>cOutput17.   Crea>ngObserva>onSequences18.   LostinPhaseSpace:TheChallengeofNotKnowingtheTruth19.   DART-CompliantModelsandMakingModelsCompliant20.   ModelParameterEs>ma>on21.   Observa>onTypesandObservingSystemDesign22.   ParallelAlgorithmImplementa>on23.  Loca'onmoduledesign(notavailable)24.  Fixedlagsmoother(notavailable)25.   Asimple1Dadvec>onmodel:TracerDataAssimila>on

DARTTutorialIndextoSec'ons

DARTTutorialSec'on19:Slide17