您好,欢迎来到抵帆知识网。
搜索
您的当前位置:首页CLM3.0 UsersGuide

CLM3.0 UsersGuide

来源:抵帆知识网
CommunityClimateSystemModel

NationalCenterforAtmosphericResearch,Boulder,CO

CommunityLandModelVersion3.0

(CLM3.0)User’sGuide

MarianaVertenstein,KeithOleson,SamLevisandForrestHoffman

June21,2004

Contents

1Introduction

2ObtainingtheSourceCodeandDatasets

3CreatingandRunningtheExecutable

3.1offlinemode:usingjobscript.csh.............

.....................3.1.1Specificationofscriptenvironmentvariables........................3.1.2SettingtheNamelist.....................................3.1.3Creationofheaderanddirectorysearchpathfiles.....................3.1.4Buildingthemodel......................................3.1.5Runningtheexecutable...................................3.2cammode...............................................3.3ccsmmode..............................................4NamelistParameters

4.1Rundefinitions............................................4.2Specificationofmodelinputdatasets................................4.3Specificationofhistoryandrestartfiles..............................4.4Specificationofinputphysicsvariables...............................4.5SpecificationofRTMRiverrouting.................................4.6Specificationofcammodenamelist.................................4.7Specificationofccsmmodenamelist................................

5CLM3.0DataStructures

6CLM3.0SurfaceDatasetFormats7CreatingaSpun-upInitialDataset8HistoryFileFields

9OfflineModeNamelistExamples

9.1Example1:Offlineinitialrun,oneday,global...........................9.2Example2:Restartrun.......................................9.3Example3:Branchrun.......................................9.4Example4:Auxiliaryhistoryfiles..................................9.5Example5.Generationofregionalgridsurfacedataset......................9.6Example6.Generationofglobalgaussiansurfacedataset

....................

ListofTables

1SourceCodeDirectoryStructure...............................2InputDataDirectoryStructure................................3OfflineModeSupportedArchitectures...........................4UserModifiableScriptVariables...............................5misc.hCPPtokens........................................6preproc.hCPPtokens......................................7Filepath...............................................8NamelistVariablesoverwrittenwithCAMsettings...................9

MasterFieldList-TemperatureandHumidity.

......

...................1

3477810101212121213131519232323242425262732333435353637

56791011112427

10MasterFieldList-SurfaceRadiation...............................10MasterFieldList-SurfaceRadiation...............................11MasterFieldList-SurfaceEnergyFluxes.............................12MasterFieldList-VegetationPhenology.............................13MasterFieldList-CanopyPhysiology..............................14MasterFieldList-Hydrology...................................15MasterFieldList-WaterandEnergyBalanceChecks......................16MasterFieldList-AtmosphericForcing.............................17MasterFieldList-Soil.......................................18MasterFieldList-VolatileOrganicCompounds(onlyincludedifVOCdefined).......19MasterFieldList-DynamicVegetation(onlyincludedifDGVMdefined)...........2

2728292929303031313232

1Introduction

CLM3.0isradicallydifferentfromeitherCLM2.1orCLM2.0,particularlyfromasoftwareengineeringperspective.ThemajordifferenceisthatCLM3.0isnowbothscalarcachefriendlyaswellasvectorfriendlyandcanperformwellonbothtypesofarchitectures.ThesubgridhierarchyintroducedinCLM2.1hasbeenmaintainedinCLM3.0.However,itsimplementationwithinthecodehasbeencompletelymodifiedinordertopermitthecodetobehaveacceptablyonvectorarchitecturessuchastheEarthSimulatorortheCrayX1.TheCLM3.0codeisinfacteasiertoreadaswellasbeingmoreaccessibletotheintroductionofnewparameterizationsthaneitherCLM2.1orCLM2.0.

Severalothersoftware-relatedchangeshavealsoaccompaniedthenewCLM3.0datastructures.Abriefdiscussionofthenewdatastructuresaswellastheresultingnewdecompositionalgorithmisgiveninsection5.Inaddition,acompletelynewdecompositionalgorithmhasbeenimplementedformulti-taskedand/ormulti-threadedmodelrunsthatresultinasignificantimprovementinboththeloadbalancingaswellasscalingnatureofthemodel.Newinterfaceshavebeenimplementedforthespecificationofhistoryfilefieldsandinitialdatasetfields.Furthermore,historyoutputforRTMriveroutputisnowontheRTMgridratherthanbeinginterpolatedtothemodelgrid.WereferthereadertotheCLM3.0Developer’sGuideformorecomprehensivedetailsofthecodingimplementations.

CLM3.0containsseveralimprovementstobiogeophysicalparameterizationstocorrectdeficienciesinthecoupledmodelclimateusingCLM2.1.InCLM2.1,the2-mtemperaturefrequentlydroppedbelowtheatmosphericpotentialtemperatureduringdaytimeheatingincertainregions.Stabilitytermswereaddedtotheformulationfor2-mairtemperaturetocorrectthis.InCLM2.1,thereisadiscontinuityintheequationthatrelatesthebulkdensityofnewlyfallensnowtoatmospherictemperature.Theequationwasmodifiedtocorrectthisproblem.Aerodynamicresistanceforheat/moisturetransferfromgroundtocanopydoesnotvarywiththedensityofthecanopyinCLM2.1.Thisleadstohighsurfacesoiltemperaturesinregionswithsparsecanopies.AnewformulationwasimplementedinCLM3.0thatprovidesforvariableaerodynamicresistancewithcanopydensity.Theverticaldistributionoflakelayerswasmodifiedtoallowformoreaccuratecomputationofgroundheatflux.Afixwasimplementedfornegativeround-offlevelsoilicecausedbysublimation.Competitionbetweenplantfunctionaltypes(PFTs)forwater,inwhichallPFTsshareasinglesoilcolumn,isthedefaultmodeofoperationinCLM3.0.CLM2.1acceptseitherrainorsnowfromtheatmosphericmodel.Iftheprecipitationissnow,aformulationbasedonatmospherictemperaturedeterminesthefractionofprecipitationthatisinliquidform.InCLM3.0,theatmosphericmodel(incamandccsmmode)deliversprecipitationexplicitlyinliquidand/orsolidform.Inofflinemode(uncoupledfromanatmosphericmodel),theformulationbasedonatmospherictemperatureisstillused.Afixwasimplementedtocorrectroughnesslengthsfornon-vegetatedareas.AfullscientificdescriptionofCLM3.0isgivenin

TechnicalDescriptionoftheCommunityLandModel(CLM)

Oleson,K.W.,DaiY.,BonanG.,BosilovichM.,DickinsonR.,DirmeyerP.,HoffmanF.,HouserP.,LevisS.,NiuG.-Y.,Thornton,P.,VertensteinM.,YangZ.-L.,ZengX.

NCARTechnicalNote,NCAR/TN-461+STR,2004.

IntheCLM3.0releasewearealsodistributingthedynamicglobalvegetationmodel(CLM-DGVM)andamoduleforsimulatingvolatileorganiccompound(VOC)emissions.TheVOCmoduleisdocumentedintheCLM3.0technicaldescription.AfullscientificdescriptionoftheCLM-DGVMaswellasanaccompanyinguser’sguideisgivenin

TheCommunityLandModel’sDynamicGlobalVegetationModel(CLM-DGVM):TechnicalDescriptionandUser’sGuide

Levis,S.,Bonan,G.B.,Vertenstein,M.,Oleson,K.W.NCARTechnicalNote,NCAR/TN-459+IA,2004.

3

Finally,CLM3.0supportsanewability,viatheinputnamelistspecification(seesection4),tocreateanduseaslightlydifferentsurface-datafile.Thisnewformatsurfacedataset(”allpfts”)isdiscussedatlengthinsection6.

2ObtainingtheSourceCodeandDatasets

ThesourcecodeanddatasetsrequiredtoruntheCommunityLandModelversion3.0(CLM3.0)inofflinemode(uncoupledfromothercomponentsoftheCommunityClimateSystemModelversion3(CCSM3.0))canbeobtainedviathewebfrom:http://www.cgd.ucar.edu/tss/clm.

TheusershouldrefertotheCAM3.0User’sGuideortheCCSM3.0User’sGuideforinstructionsonobtainingcodeanddatasetstorunCLM3.0coupledtootherCCSM3.0components.

Itisassumedthattheuserhasaccesstotheutilitiestar,FreeSoftwareFoundationgunzipandgmake(GNUgmake).

TheCLM3.0distributionconsistsoftwotarfiles:CLM3.0code.tar.gzand

CLM3.0inputdata.tar.gz.

ThefileCLM3.0code.tar.gzcontainscode,documentation,andscripts.Thisfilemustfirstbeuncom-pressedwiththegunziputilityandthen”untarred”asfollows:gunzip-cCLM3.0code.tar.gz—tarxvf-Theabovecommandbothuncompressesand”untars”thecodeintothefollowingsubdirectoryhierarchycontainingclm3/astheroot:

4

Table1:SourceCodeDirectoryStructure

DirectoryNamesrc/src/biogeophys/src/biogeochem/src/csmshare/DescriptionDirectoryofFORTRANand”C”sourcecodeBiogeophysicsroutines(e.g.,surfacefluxes)Ecosystemandbiogeochemistryroutines(e.g.,DGVMandVOCs)CodesharedbyallthegeophysicalmodelcomponentsoftheCommunityClimateSystemModel(CCSM).ContainscodeforCCSMmessagepassing,orbitalcalculations,andsystemutilities.Control(driver)routinesRoutinesforgeneratingsurfacedatasetsRiverrouting(RTM)routinesIndependentutilityroutinesEarthSystemModelingFrameworkutilitiesGeneralpurposetiminglibraryDirectoryofbuild,testandrunscriptsScripttobuildandexecutethemodelonvariousplatformsDirectoryoftoolsforinputdatasetmanipulation(thesetoolsareusedin-dependentofrunningthemodel)

Routinesforconvertinguser-generatedasciisurfacedatasetfilestonetCDFformatsuitableforusebythemodel

ToolforcreatingnewinitialCLM3.0datasetsfromexistingCLM3.0datasetsatanothermodelresolutionand/orlandmaskToolforcomparingmodelnetCDFhistoryfilessrc/main/src/mksrfdata/src/riverroute/src/utils/src/utils/esmf/src/utils/timing/bld/bld/offline/tools/tools/convertascii/tools/interpinictools/newcprnc/ThefileCLM3.0inputdata.tar.gzcontainssurfaceandofflineatmosphericforcingdatasets.Thisfilemustfirstbeuncompressedwiththegunziputilityandthen”untarred”asfollows:gunzip-cCLM3.0inputdata.tar.gz—tarxvf-Theabovecommandresultsinadirectoryhierarchycontaininginputdata/lnd/clm2/astheroot.Thisdirectoryhierarchyisoutlinedbelow.

5

Table2:InputDataDirectoryStructure

DirectoryNameNCEPDATA/SynopsisOneyear’sworthofatmosphericforcingvariablesinmonthlynetCDFfor-matsuitableforrunningthemodelinofflinemode(uncoupledfromtheatmosphericmodel)

Plantfunctionaltype(PFT)physiologicalconstantsdataset(asciiformat)”Raw”(highestprovidedresolution)datasets(netCDFformat)(usedbyCLM3.0togeneratesurfacedatasetsatmodelresolution)RiverdirectionmapforRTMinasciiformatDirectorycontainingnetCDFCLM3.0surfaceand”fgrid”datasetsThesurfacedatasetsincludenew-format(”allpfts”)andold-formatdatasetsforrunningCLM3.0inofflinemode

NOTEthatsurfacedatasetsusedinanyCAMorCCSMruncanalsobeusedtorunCLM3.0inofflinemode

For”fgrid”datasetsseesection4.2andExample6

ModelnetcdfhistoryfilesprovidedfortheusertovalidatetheirportofCLM3.0

Thisdatawasgeneratedusingthefile,jobscript.csh(seesection3.1)whichwasrunontheNCARIBMSPfor1yearusingthedataindirectoryNCEPDATA/.

pftdata/rawdata/rtmdata/srfdata/output/NotethatwearecurrentlyprovidingeightsurfacedatasetsforrunningofflineCLM3.0.Thesedatasetsarelocatedininputdata/lnd/clm2/srfdata.Abriefsynopsisofeachofthesedatasetsisgivenbelow.ItisimportanttokeepinmindthatanysurfacedatasetusedforaCAMorCCSMruncanalsobeusedforrunningofflineCLM.WeareprovidingthesedatasetsasawayfortheusertoquicklybeginusingofflineCLM3.0.

•clmsx128USGSc030605.nc:CAMold-formatT42surfacedataset•clmsx128allpftsc040426.nc:CAMnew-formatT42surfacedataset•clms128x256c031031.nc:

CAMold-formatT85surfacedataset•clms128x256allpftsc040426.nc:CAMnew-formatT85surfacedataset

•surface-data.128x0atm.gx1v3ocn.080101.nc:CCSMold-formatT42surfacedataset

•surface-data.128x0atm.gx1v3ocn.allpftsc040426.nc:CCSMnew-formatT42surfacedataset

•surface-data.256x128atm.gx1v3ocn.070903.nc:CCSMold-formatT85surfacedataset

•surface-data.256x128atm.gx1v3ocn.allpftsc040426.nc:CCSMnew-formatT85surfacedataset+

6

3CreatingandRunningtheExecutable

TheCLM3.0modelcanbebuilttoruninoneofthreemodes.Itcanrunasastandaloneexecutablewhereatmosphericforcingdataisperiodicallyreadin(e.g.,usingthedatainNCEPDATA).Thiswillbereferredtoasofflinemode.ItcanalsoberunaspartoftheCommunityAtmosphereModel(CAM)wherecommunicationbetweentheatmosphericandlandmodelsoccursviasubroutinecalls.Thiswillbereferredtoascammode.Finally,itcanberunasacomponentinasystemofgeophysicalmodels(CCSM).Inthismode,theatmosphere,land,oceanandsea-icemodelsarerunasseparateexecutablesthatcommunicatewitheachotherviatheCCSMfluxcoupler.Thiswillbereferredtoasccsmmode.

CLM3.0mayberunserially(i.e.,onasingleprocessor),inparallelusingtheMessagePassingInterface(MPI)fordistributedmemorytasks,inparallelusingtheOpenMulti-Processing(OpenMP)directivesforsharedmemorytasks,orfinallyinparallelusingbothMPIandOpenMP(hybridparallelism).Asanexample,theIBMSPconsistsofdistributedmemorynodesinterconnectedbyahighperformancenetworkconnection,andeachnodecontainsmultiplesharedmemoryprocessors.WhenrunontheIBMSP,CLM3.0usesOpenMPdirectivesforparallelismonprocessorswithinasharedmemorynodeandMPIroutinesforparallelismacrossdistributedmemorynodestotakefulladvantageofthecapabilitiesofthehardware.ThesupportedarchitecturesandassociatedcompilersforrunningCLM3.0inofflinemodeareshowninTable3.NotethatwhenDGVMisdefined(seeTable6),bit-for-bitrestartsarenotsupportedontheCRAYX1whenprocessorconfigurationischangedmid-run.

Table3:OfflineModeSupportedArchitecturesHardwareIBMSPSGIIntelCRAYX1NECSX6NECSX6ArchitectureRS600MIPSIntelX86CrayX1NECSX6NECSX6OSAIXIRIXLinuxUnicos/mpSuper-UXSuper-UXCompilerIBMXLMIPSpgf90,lf95ftnf90sxf90(crosscompiler)ThemethodofbuildingandrunningCLM3.0dependsonboththetargetarchitectureandwhetherthemodelwillberunserially,inpureMPImode(distributedmemory),inpureOpenMPmode(sharedmemory)orinhybridmode.AgeneraldiscussionofthevariousaspectsofbuildingandrunningCLM3.0follows.SeveralcautionarynoteshavetobemadeconcerningLinuxsystems.ForLinuxoperatingsystems,CLM3.0issupportedforbothlf95andpgf90compilers.WehavenotedproblemsinrunningCLM3.0inhybridmodeusingpgf90compilers.Consequently,OpenMPthreadinghasbeenturnedoffbydefaultforLinuxsystems.(TheusermayturnitbackonbysettingSMPtoTRUEinjobscript.csh(seebelow).Wehavealsonotedproblemsinboundscheckingwithpgf90whenrunningindebugmode(DEBUG=TRUE).Asaresult,theboundscheckingintheMakefilehasbeentemporarilydisabled.

3.1offlinemode:usingjobscript.csh

InordertobuildandrunCLM3.0inofflinemode,asamplescript,jobscript.csh,andacorrespondingMakefileareprovidedinthebld/offlinedirectory.Inaddition,twoperlscriptsmkDepends(usedtogeneratedependenciesinaformsuitableforinclusionintoaMakefile),andmkSrcfiles(usedtomakealistoffilescontainingsourcecode)arealsoincluded.Theuserneednotworryabouttheseperlscripts.

Thescript,jobscript.csh,createsamodelexecutableatT42modelresolutionwithRTM(rivertransportmodel)activatedandCLM-DGVMandVOCsdeactivated,determinesthenecessaryinputdatasets,con-structstheinputmodelnamelistandrunsthemodelforoneday.Usersmusteditthisscriptappropriatelyinordertobuildandruntheexecutablefortheirparticularrequirementsandintheirparticularenvironment.

7

ThisscriptisprovidedonlyasanexampletoaidthenoviceuseringettingCLM3.0upandrunningasquicklyaspossible.

Thescriptcanberunwithminimalusermodification,assumingtheuserresetsseveralenvironmentvariablesatthetopofthescript.Inparticular,theusermustsetthefollowing:

1.Setbatchqueuedirectivesfortherequiredmachineifwillberunninginbatchmodeasopposedtointeractivemode.Batchmodemeanssubmittingjobscript.cshthroughaqueueingsystem.Interactivemodemeanstypingjobscript.cshatthepromptonyourscreen.2.Setmodelresolution:numberofmodellongitudes(LSMLON)andlatitudes(LSMLAT).

3.SetROOTDIRtopointtothefulldiskpathnameoftherootdirectorycontainingtheuntarredsourcecode.4.SetMODELEXEDIRtopointtothedirectorywheretheuserwantstheexecutabletobebuiltandrun.5.SetCSMDATAtopointtothefulldiskpathnameoftherootdirectorycontainingtheuntarredinputdatasetsubdirectories.6.DetermineifMPIand/orOpenMPwillbeused,andifsodeterminethenumberofMPItasksand/orthenumberofOpenMPthreads(notethatforlinuxsystemsthenumberofmpitasksisdeterminedfromthebatchdirectivesifrunninginbatchmode).7.Setrequiredlibrarypathsandincludepaths.8.Modifythenamelist.

9.Determinewhichmodelcpptokenswillbeenabled.

Thescriptcanbedividedintofivefunctionalsections:1)specificationofscriptenvironmentvariables;2)creationofthemodelinputnamelist;3)creationoftwoheaderfiles(misc.handpreproc.h)andadirectorysearchpathfile(Filepath)neededtobuildthemodelexecutable;4)creationofthemodelexecutable;and5)executionofthemodel.Jobscript.cshissetupsothattheuserwillnormallyonlyhavetomodifysections1)and2)inordertoobtainamodelexecutableandassociatednamelist.Eachofthesefunctionalsectionsisdiscussedinwhatfollows.3.1.1

Specificationofscriptenvironmentvariables

Table4liststheusermodifiablescriptenvironmentvariables.SomeofthesevariablesareusedbytheMakefiletobuildthemodelexecutable.Althoughthescriptprovidestentativesettingsforallthesevariables,theprovidedvalueswillgenerallyhavetobemodifiedbytheuser.

8

Table4:UserModifiableScriptVariables

ScriptVariableLSMLONLSMLATROOTDIRMODELEXEDIRCSMDATASMPDescriptionNumberofmodelgridlongitudes.Numberofmodelgridlatitudes.Fullpathnamefortherootsourcecodedirectory.Fullpathnameforthedirectorywherethemodelexecutablewillreside.Objectfileswillbebuiltinthedirectory$MODELEXEDIR/obj.Fullpathnameofrootinputdatasetsdirectory.FlagthatturnsonOpenMP(validvaluesareTRUEorFALSE)IfSMPisTRUE,OpenMpisenabledandNTHREADSisthenumberofOpenMPthreads.IfSMPisFALSE,OpenMpisdisabledandNTHREADSisignored.Currently,SMPwillbesettoFALSEforLinuxplatforms.NumberofOpenMPmultitaskingthreads.NTHREADSshouldnotexceedthenumberofphysicalCPUs(ie,proces-sors)onasharedmemorymachineandshouldnotexceedthenumberofCPUsinanodeonadistributedmemorymachine.ThissettingisignoredifSMPissettoFALSE.

FlagthatturnsonMPI(validvaluesareTRUEorFALSE).IfSPMDisTRUE,MPIisenabledandNTASKSisthenumberofMPItasks.IfSPMDisFALSE,MPIisdisabledandNTASKSisignored.NumberofMPItasks.SettingisignoredifSPMDissettoFALSE.NTASKSshouldnotexceedthenumberofphysicalCPUs(ie,processors)onamachine.FullpathnameofdirectorycontainingthenetCDFlibrary.Thesettingdependsonuser’stargetmachine.

FullpathnameofdirectorycontainingnetCDFincludefiles.Thesettingdependsonuser’stargetmachine.

FullpathnameofdirectorycontainingtheMPIlibrary.Thesettingdependsonuser’stargetmachine.OnlyneededifSPMDissettoTRUE.NotneededonIBMSP,CrayX1,NECSX6machines,wheretheMPIlibraryandincludefilesareobtaineddirectlyfromthecompilercommand.

FullpathnamefordirectorycontainingtheMPIincludefiles.Thesettingdependsonuser’stargetmachine.OnlyneededifSPMDissettoTRUE.NotneededonIBMSP,CrayX1,NECSX6machines.Determineswhichlinuxfortrancompilerisused.Validvaluesarepgf90orlf95.Onlyusedonlinuxplatforms.Nameoflinuxmachine.CurrentlyNCAR-CGDlinuxmachine”anchorage”issupportedinthescripts.Theuserwillneedtotailorthisfortheirownplatform.Onlyusedonlinuxplatforms.

Thefullpathnameofmpiruntouseif$SPMDissettoTRUE.Multiplefortrancompilersoftenexistonasinglelinuxsystem.Eachcom-pilercanhaveauniquepathwherethempichmpirunbinaryisinstalledforthatcompiler.Onlyusedonlinuxplatforms.

Determinesifrunwillbeinbatchorinteractivemode.Onlyusedonlinuxplatforms.

FlagthatturnsondebugginginMakefile.ValidvaluesareTRUEorFALSE.

NTHREADSSPMDNTASKSLIBNETCDFINCNETCDFLIBMPIINCMPIlinuxfortcompilerlinuxmachinelinuxmpiruncmndlinuxbatchDEBUG9

Itisassumedthattheuserhassetuptheenvironmentfortheirparticularcompilerchoice(e.g.LDLIBRARYPATHissetcorrectlyintheuser’senvironment).3.1.2

SettingtheNamelist

Beforebuildingandrunningthemodelwithjobscript.csh,theusermustspecifymodelnamelistvariablesviatheCLM3namelist,clmexp,foundinjobscript.csh.Withoutmodification,jobscript.cshgeneratesadefaultnamelistfile,lnd.stdin,whichresultsinaonedaymodelrunusingtheprovideddatasets.Namelistvariablescanbedividedintoseveralcategories:rundefinitions,datasets,historyandrestartfilesettingsandlandmodelphysicssettings.Afulldiscussionofmodelnamelistvariablesisgiveninsection4.3.1.3

Creationofheaderanddirectorysearchpathfiles

Theuserwillgenerallynotneedtomodifythesectionofjobscript.cshthatcreatestheheaderanddirectorysearchpathfiles.Thescriptcreatesthreefilesinthedirectory$MODELEXEDIR/obj:theheaderfilesmisc.handpreproc.handthedirectorysearchpathfile,Filepath.Tomodifythesefiles,theusershouldeditthefilecontentsfromwithinthescriptratherthanattempttoeditthefilesdirectly,sincethescriptwilloverwritethefilesuponexecution.Theuseofthesefilesbygnumakeisdiscussedbelow.Eachofthesefilesissummarizedbelow.

Thefile,misc.h,containsresolution-andmodel-independentC-languagepre-processor(cpp)tokens.

Table5:misc.hCPPtokens

misc.hcpptokenSPMDDescriptionIfdefined,enablesdistributedmemory,SPMD(singleprogrammultipledata),implementation.AutomaticallydefinedbyscriptifenvironmentvariableSPMDissettoTRUE.Seesection3.1.1.

Ifdefined,enablesmodificationsthattestreasonableperturbationerrorgrowth.Notsupportedatthistime.

PERGROThefilepreproc.hcontainsresolution-dependentandmodel-dependentC-languagecpptokens.

10

Table6:preproc.hCPPtokens

preproc.hcpptokenOFFLINECOUPCSMCOUPCAMSCAMLSMLONLSMLATRTMVOCDGVMNOCOMPETEDescriptionIfdefined,offlinemodeisinvokedIfdefined,ccsmmodeisinvokedIfdefined,cammodeisinvokedIfdefined,camsinglecolumnmodeisinvokedThisisonlyapplicableifCOUPCAMisALSOdefinedNumberofmodellongitudesNumberofmodellatitudesIfdefined,RTMriverroutingisinvokedIfdefined,vocemissioniscomputedIfdefined,dynamicvegetationmodelisactivatedIfdefined,competitionforwateristurnedoff(eachpfthasitsowncolumn)Thismodeisnolongerofficiallysupported

C-preprocessordirectivesoftheform#include,#ifdefined,etc.,areusedinthemodelsourcecodetoenhancecodeportabilityandallowfortheimplementationofdistinctblocksoffunctionality(suchasincorporationofdifferentmodes)withinasinglefile.Headerfiles,suchasmisc.handpreproc.h,areincludedwith#includestatementswithinthesourcecode.Whengnumakeisinvoked,theCpreprocessorincludesorexcludesblocksofcodedependingonwhichcpptokenshavebeendefined.C-preprocessordirectivesarealsousedtoperformtextualsubstitutionforresolution-specificparametersinthecode.TheformatofthesetokensfollowsstandardcppprotocolinthattheyarealluppercaseversionsoftheFortranvariables,whichtheydefine.Thus,acodestatementlike

parameter(lsmlon=LSMLON);parameter(lsmlat=LSMLAT)willresultinthefollowingprocessedline(forT42modelresolution):parameter(lsmlon=128);parameter(lsmlat=)

whereLSMLONandLSMLATaresetinpreproc.hviathejobscript.

FilepathcontainsalistofdirectoriesusedbyMakefiletoresolvethelocationofsourcefilesandtodeterminedependencies.ThesearchbeginsinthecurrentdirectoryandproceedstoeachdirectoryappearinginFilepath,intheorderinwhichtheyarespecified.Allfilesappearinginthesedirectorieswillbeusedunlessduplicatefilesarefound.Forthecaseofduplicatefiles,thefirstfilefoundwillbeusedbygnumaketocreatetheobjectfile.Ifuser-modifiedcodeisintroduced,Filepathshouldcontain,asthefirstentry,thedirectorycontainingsuchmodifiedcode.

Userscanaddnewsearchdirectoriesbyeditingjobscript.cshunder“buildFilepath”.ThedefaultFilepathdirectoryhierarchyforCLM3.0isasfollows:

Table7:Filepath

SourceDirectories$MODELSRCDIR/main$MODELSRCDIR/biogeophys$MODELSRCDIR/biogeochem$MODELSRCDIR/riverroute$MODELSRCDIR/csmshare/shr$MODELSRCDIR/utils/timing$MODELSRCDIR/mksrfdataFunctionalitycontrolroutines(history,restart,etc)biogeophysicsroutinesecosystemandbiogeochemistryroutinesriverroutingroutinescodesharedbyallCCSMgeophysicalmodelcomponentstimingroutinesgenerationofsurfacedatasetroutines11

3.1.4Buildingthemodel

Theuserwillgenerallynotneedtomodifythesectionofjobscript.cshthatbuildsthemodelexe-cutable.Jobscript.cshinvokesgnumaketogeneratethemodelexecutable.Thefile,Makefile,locatedinthebld/offlinedirectory,containscommandsusedbygnumakeoneachofthesupportedtargetarchitectures.Successfulinvocationofgnumakeresultsinanexecutable,”clm”,alongwithalogfile,”compilelog.clm”,documentingthebuildprocedure.Anyproblemsencounteredduringthebuildprocedurewillbedocumentedinthislogfile.Aparallelgnumakeisachievedinthescriptbyinvokinggnumakewiththe-joption,whichspecifiesthenumberofjobcommandstoruninparallel.3.1.5

Runningtheexecutable

Theuserwillgenerallynotneedtomodifythesectionofjobscript.cshthatrunsthemodelexecutable.Jobscript.cshwillexecutethecommandsrequiredtorunthemodelunderthesupportedtargetarchitectures.MostMPIimplementationsprovideastartupscriptwhichacceptstheMPIexecutableasacommandlineargument.Additionalcommandlineargumentsallowtheusertospecifydetailssuchasthevariousmachinearchitecturesornumberofprocessestousefortherun.OnceMPIhascreatedthespecifiednumberofprocesses,modelexecutionwillbegin.Thecollectionofactivetaskswillthencomputelocallyandexchangemessageswitheachothertointegratethemodel.

Uponsuccessfulcompletionofthemodelrun,severalfileswillbegeneratedinMODELEXEDIR.Theseincludehistory,restart,andinitializationfiles(seesection4.3)aswellaslogfilesdocumentingthemodelexecution.Theselogfileswillhavenamesofclm.log.YYMMDD-HHMMSS,whereYYisthelasttwodigitsofthecurrentmodelyear,MMisthemonth,DDisthedayofthemonth,HHisthehour,MMistheminutes,andSSisthesecondsofthestartofthemodelrun.Timingfiles,(e.g.“timing.0”),containingmodelperformancestatisticsarealsogeneratedintheexecutabledirectory.

3.2cammode

WhenrunningthemodelaspartoftheCAMexecutable,CAMbuildandrunscriptsmustbeutilized.TheusershouldrefertoUser’sGuide(totheNCARCommunityAtmosphereModel3.0(CAM3.0)atwww.ccsm.ucar.edu/models/ccsm3.0/cam/

forspecificdetailsonbuildingandrunningtheCAMexecutable.WewillonlydiscusssomeessentialpointsoftheCAMbuildandrunscriptshere.

Theheaderfiles,preproc.handmisc.h,aswellasthedirectorysearchpathfile,Filepath,areneededfortheCAMbuildprocedureinananalogousmannertotheCLM3.0buildprocedure.TheusershouldkeepinmindthattheCLM3.0directoryhierarchyMUSTappearaftertheCAMdirectoryhierarchyinFilepath.CLM3.0containsseveralfilesthathavethesamenameasthecorrespondingCAMfiles(e.g.timemanager.F90).WhenrunninginCAMmode,thecorrespondingCAMfilemustbeused.TheCAMbuildandrunscriptsensurethisoccurs.

TheCLM3.0namelist,clmexp,mustalsobespecified.Bydefault,RTMriverroutingisnotenabledincammode(i.e.thecppvariable,RTM,isnotdefined).Furthermore,CLM3.0doesnotpermittheusertoindependentlysetseveralnamelistvariables(inparticular,thosedealingwithhistoryfilelogicandruncontrollogic)whenrunningincammode.CLM3.0willoverrideanyuserinputforthesevariableswiththecorrespondingvaluesusedbytheCAMmodel.Thisisdiscussedinmoredetailinsection4.6.

3.3ccsmmode

CCSM3.0willcontainCLM3.0.InccsmmodeRTMisdefinedbydefault,becausethisprovidesthefreshwaterfluxfromthelandtotheoceanmodel.WereferthereadertotheCCSM3.0User’sGuideforfurtherdetailsonrunninginccsmmode.

12

4NamelistParameters

CLM3.0namelistinputsarepresentedinsections4.1-4.7below.Inwhatfollows,”mode”hasvaluesof”offline”,”ccsm”,”cam”or”all”,correspondingtoofflinemode,ccsmmode,cammode,orallthemodes.Ifanamelistvariablesettingislistedasrequired,thevaluemustbesetinthenamelistinorderforthemodeltoexecutesuccessfully.Ifasettingisspecifiedasrequiredandthemodeisonlygivenasoffline,thenthatvariablemustonlybespecifiedwhenrunninginofflinemode.Fornamelistvariablesettingsnotlistedasrequired,thecodewillprovidedefaultsettingsatinitialization.Inthefollowingvariabledescriptions,werefertoexamplespresentedinsection9.SeeExample1foradescriptionoftheminimumrequirednamelistforasuccessfulrun.

4.1Rundefinitions

Thefollowinglistspecifiesnamelistvariablesassociatedwiththedefinitionofruncasenames,runtypes(restart,initialorbranch),modeltimestep,andinitialrundate.

Aninitialrunstartsthemodelfromeitherinitialconditionsthataresetinternallyinthecode(referredtoasarbitraryinitialconditions)orfromaninitialconditionsdataset(seenamelistvariableFINIDAT)thatenablesthemodeltostartfromaspun-upstate.

Arestartrunisanexactcontinuationofaprevioussimulationfromitspointoftermination.Outputfromarestartrunshouldbebit-for-bitthesameasiftheprevioussimulationhadnotstopped.Runcontrolvariablessetinthenamelistmustbethesameasintherunthatisbeingrestarted.

Abranchrunisanewcasethatusesarestartdatasetfromaprevioussimulationtobegintheintegration.Forabranchrun,thelengthofthehistoryintervalandtheoutputhistoryfieldsdonothavetobethesameasinthecontrolsimulation.Forexample,thebranchingoptioncanbeusedtooutputselectedfieldsmorefrequentlythanwasthecaseintheoriginalrunortoaddnewauxiliaryhistoryfilestothemodelrun.

name:description:type:mode:default:

CASEID

Casename(shortidentifierforrun)(seeex.1,2,3).char*256

offline,ccsm(obtainedfromatmincammode)required(mustbechangedforbranchrun

unlessBRNCHRETAINCASENAMEissetto.true.)

name:description:type:mode:default:CTITLE

Casetitleforusewithinhistoryfiles(longidentifier).char*256

offline,ccsm(obtainedfromatmincammode)blank

name:description:type:mode:default:NSREST

Runtype(0forinitialrun,1forrestart,3forbranch)(seeex.1,2,3).integer

offline,ccsm(obtainedfromatmincammode)required

name:description:DTIME

Modeltimestep(seconds)(seeex.1).

13

type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:integer

offline,mustagreewithCAMmodelinccsmmode,obtainedfromCAMmodeldirectlyincammode

required(suggestedrange:1200-3600s)

STOPYMDStopdate(YYYYMMDD)integer

offline(obtainedfromCAMincammodeandCCSMcouplerinccsmmode)required(ifNESTEPorNELAPSEnotset)

STOPTODStoptimeofday(seconds).IgnoredifSTOPYMDnotdefinedinteger

offline(obtainedfromCAMincammodeandCCSMcouplerinccsmmode)0

NESTEP

Endingruntimeinmodeltimesteps(positive)ordays(negative)(seeex.1).ValueisignoredifSTOPYMDisspecified.integer

offline(endingtimeobtainedfromCAMincammodeandCCSMcouplerinccsmmode)

required(ifneitherNELAPSEnorSTOPYMDareset)

NELAPSE

Elapsedruntimeinmodeltimesteps(positive)ordays(negative)(seeex.2).ValueisignoredifeitherSTOPYMDorNELAPSEarespecified.integer

offline(endingtimeisobtainedfromCAMincammodeandCCSMcouplerinccsmmode)

required(ifneitherNESTEPnorSTOPYMDareset)

STARTYMDStartdateofrun(yyyymmddformat)(seeex.1).integer

offline,ccsm(obtainedfromCAMmodelincammode)required

STARTTODStarttimeofdayofrun(seconds).integer

offline,ccsm(obtainedfromCAMincammode)0

14

name:description:type:mode:default:

REFYMD

Referencedatefortimecoordinate(yyyymmddformat).integer

offline,ccsm(obtainfromCAMincammode)

nodefaultvaluebutifnotset,thenthemodelreferencedatewillautomaticallybesettoSTARTYMDname:description:type:mode:default:REFTOD

Referencetimeofdayfortimecoordinate(secs).integer

offline,ccsm(obtainfromCAMincammode)0

name:description:type:mode:default:CALENDAR

Calendartouseindatecalculations(”no-leap”or”gregorian”).char*32

offline,ccsm(obtainedfromCAMincammode)no-leap

name:description:type:mode:default:

CLUMPPPROC

Numberof“clumps”perprocess(seesection5).integer

offline,ccsm(obtainedfromCAMincammode)1ifOpenMPisdisabled

numberofOpenMPthreads(specifiedintheenvironment)ifOpenMPisenabled.

name:description:

type:mode:default:

BRNCHRETAINCASENAMEFlagtoretaincasenameonabranchrun.Iftrue,thenallowcasenametoremainthesameforbranchrun.Incammode,thisflagmustbesetforboththecamandclmnamelists.logical

offline,cam,ccsm.false.

4.2Specificationofmodelinputdatasets

Thefollowinglistspecifiesnamelistvariablesassociatedwithmodelinputdatasets.

name:description:type:mode:default:

FSURDAT

Fullpathnameofsurfacedataset(seeex.1,5,6).char*256all

blank(detailsattheendofthissection)

15

notes:

name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:notes:surfacedatasetsprovidedwiththedistributionarein$CSMDATA/srfdata,rawdatasetstogeneratesurfacedatasetsarein$CSMDATA/rawdata

FINIDAT

Fullpathnameofinitialconditionsdataset(seeex.1,2,3).char*256all

blank(detailsattheendofthissection)

noinitialdatasetsareprovided,theuserwillneedtogeneratethese

FPFTCON

Fullpathnameofplantfunctionaltype(PFT)physiologicalconstantsdataset(seeex.1).char*256all

required

datasetprovidedis$CSMDATA/pftdata/pft-physiology

FRIVINPRTM

fullpathnameofRTMinputdataset(seeex.4).char*256offline,ccsm

requiredifcpptokenRTMisdefinedinpreproc.hdatasetprovidedis$CSMDATA/rtmdata/rdirc.05

NREVSN

Fullpathnameofrestartfilename(onlyforbranchruns)(seeex.3).char*256all

required(onlyifbranchrun,NSREST=3)

MKSRFALLPFTS

Flagtoturnonnewsurfacedatasetformat.Iftrue,newsurfacedatasetformat(seesection6)isused.logicalall.false.

MKSRFFVEGTYP

Fullpathnameofrawplantfunctionaltypedataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrfpft.nc16

name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:notes:name:description:MKSRFFSOITEX

fullpathnameofrawsoiltexturedataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrfsoitex.10level.ncMKSRFFSOICOL

Fullpathnameofrawsoilcolordataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrfsoicolclm2.nc

MKSRFFLANWAT

Fullpathnameofrawinlandwaterdataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrflanwat.ncMKSRFFURBAN

fullpathnameofurbandataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrfurban.ncMKSRFFGLACIER

Fullpathnameofglacierdataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrfglacier.ncMKSRFFLAI

fullpathnameofleafandstemareaindex,canopytopandbottomheightdataset(seeex.5).char*256all

required(ifFSURDATisblank)

datasetprovidedis$CSMDATA/rawdata/mksrflai.ncMKSRFOFFLINEFNAVYORO

20minnavyorographydatasetusedtogeneratelandmask(seeex.5).

17

type:mode:default:notes:name:description:type:mode:default:notes:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:notes:char*256offline

required(ifMKSRFOFFLINEFGRIDnotsetandFSURDATisblank)datasetprovidedis$CSMDATA/rawdata/mksrfnavyoro20min.ncMKSRFOFFLINEFGRIDDatasetspecifyinglandgridandmaskatdesiredresolution(seeex.6).char*256offline

blank,required(ifMKSRFOFFLINEFNAVYOROnotsetandFSURDATisblank)

datasetsprovidedin$CSMDATA/srfdata

MKSRFOFFLINEEDGENNorthernedgeoflandgrid(degreesnorth)(seeex.5).realoffline90.

MKSRFOFFLINEEDGEEEasternedgeoflandgrid(degreeseast)(seeex.5).realoffline180.

MKSRFOFFLINEEDGESSouthernedgeoflandgrid(degreesnorth)(seeex.5).realoffline-90.

MKSRFOFFLINEEDGEWWesternedgeofgridland(degreeseast)(seeex.5).realoffline-180.

OFFLINEAIRDirectorycontainingatmosphericforcingdatasets(seeex.1).char*256offlinerequired

datasetsprovidedareindirectory$CSMDATA/NCEPDATA

18

Additionaldetails:FSURDATspecifiesasurfacedatasetcontainingtime-invariantlandpropertiessuchasplantfunctionaltypesandsoiltexturesandtime-variantpropertiessuchasleafareaindex.IfFSURDATissettotheemptystring,anewsurfacedatasetisgeneratedatruntimeforthespecifiedmodelresolution.Thecreationofanewsurfacedatasetrequiresthespecificationofthefullpathnameofthefollowingrawdatasets:MKSRFFVEGTYP,MKSRFFSOITEX,MKSRFFSOICOL,MKSRFFLANWAT,MKSRFFURBAN,MKSRFFGLACIER,MKSRFFLAI.Thesedatasetsareonlyusedforthegen-erationofamodelsurfacedataset.

Inadditiontorawdatasets,aland/oceanmaskisalsorequiredforthecreationofanewsurfacedataset.Ifthemodelisruninccsmorcammode,thismaskisobtainedfromeithertheccsmfluxcouplerorfromthecamatmospheremodelatstartup.Inofflinemode,however,theland/oceanmaskcaneitherbecalculatedfromahighresolutionorographydatasetbysettingthenamelistvariableMKSRFOFFLINEFNAVYOROorcanbereadinfromaninputdatasetalreadyatthetargetresolutionviathesettingofthenamelistvariableMKSRFOFFLINEFGRID.

Finally,ifasurfacedatasetistobecreatedatruntime,theusermustspecifyifanew-formatorold-formatdatasetwillbegenerated.Bydefault,old-formatdatasetsarecreated.BysettingthenamelistvariableMKSRFALLPFTSto.true.,anew-formatsurfacedatasetwillbecreated(seesection6).

Subroutinesinvolvedincreatingasurfacedatasetatruntimeresideinthesourcecodedirectorymk-srfdata/.Inmostcasesthecreationofasurfacedatasetinvolvesastraightforwardinterpolationfromtherawdatasetresolutiontothedesiredmodelresolution.Forsoiltexture,however,averagingwouldcreatenewsoiltypes.Consequently,themodeldeterminesthedominantsoiltextureprofilepergridcellfromtherawresolutiontothedesiredresolution.

Oncethesurfacedatasetiscreated,theusershoulduseFSURDATtopointtothatdataset,inordertoavoidcreatingthesamedatasetmultipletimes.

TheinputfilespecifiedbythenamelistvariableFINIDATcontainsvaluesforthetime-dependentvariablesneededtoinitializethemodelfromaspun-upstate.IfFINIDATissettotheemptystring,themodelisinternallyinitializedtononspun-upvalues.Thesettingofthenamelistvariable,HISTCRTINIC(describedinsection4.3)canbeusedtogenerateinitialCLMfilesduringamodelrun.Wealsoprovideanewtool,interpinic,whichprovidesuserswiththeabilitytouseanalreadyexistinginitialdatasetatonemodelresolutiontogenerateanewinitialdatasetatanothermodelresolution.Section7providesmoredetailsofthistool.

WhenthecpptokenRTMisdefined,theRTMriverroutingschemewillbeinvokedinrunningthemodel.Inthiscase,FRIVINPRTMmustbesettoariverroutingdataset.

Inofflinemode,timedependentatmosphericforcingdatamustbereadinperiodically.ThedirectorycontainingthesefilesisgivenbyOFFLINEAIR.Thisvariableisignoredincamandccsmmode.

4.3Specificationofhistoryandrestartfiles

Thefollowingdescribesnamelistvariablesassociatedwithhistory,restart,andinitializationfiles.Inwhatfollows,maxtapesdenotesthemaximumallowablenumberofdifferenttypesofhistoryfiles(tapes)thatthemodelcanproduce(currentlysetto6)andmaxfldsdenotesthemaximumnumberofhistoryfieldsthatmayappearonanygivenhistorytape(currentlysetto1000).

name:description:type:mode:default:name:

HISTCRTINICFrequencywithwhichinitialdatasetswillbegenerated.

Validvaluesare’YEARLY’,’MONTHLY’,’DAILY’,’6-HOURLY’or’NONE’.char*8

offline,ccsm(obtainedfromCAMincammode)’YEARLY’HISTNHTFRQ19

description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:

type:mode:default:

name:description:

type:mode:default:

Historytapeinterval(s)

(+formodeltimesteps,-forhours,0formonthlyave)(seeex.1,3).integerarray(uptomaxtapesvaluesseparatedbycommas)offline,ccsm(obtainedfromCAMincammode)0

HISTMFILTNumberoftimesamplesperhistorytape(s)(seeex.3,4).

integerarray(uptomaxtapesvaluesseparatedbycommas)offline,ccsm(obtainedfromCAMincammode)1whenHISTNHTFRQ=0,else30

HISTNDENSOutputtapeprecision(s).Validvaluesare1(doubleprecision)or2(singlepre-cision).

integerarray(uptomaxtapesvaluesseparatedbycommas)all2

HISTDOV2XYPertapespatialaveragingflag.Ifsettotrue,producesgrid-averagehistoryfieldsonoutputtape.Ifsettofalse,one-dimensionalfieldsareproduced(seeex.4).logicalarray(uptomaxtapesvaluesseparatedbycommas)all.true.

HISTAVGFLAGPERTAPE

Pertapetimeaveragingflag.Validvaluesare’A’(averageoverhistoryperiod),’I’(instantaneous),’X’(maximumoverhistoryperiod)or’M’(minimumoverhistoryperiod).

char*1array(uptomaxtapesvaluesseparatedbycommas)all

blank(inthiscaseahardwiredflagpervariableisused,foundinhistFldsMod.F90)

HISTTYPE1DPERTAPEPertapeonedimensionaloutputtype.Onlyusedifonedimensionaloutputisselectedforthegiventape(viathesettingofHISTDOV2XY).Validvaluesare’GRID’,’LAND’,’COLS’,’PFTS’.Forexample,ifonedimensionaloutputisselectedfortape3andHISTTYPE1DPERTAPEissetto’COLS’,thenallthefieldswillhave1dcolumnoutput.Ifthespecifiedonedimensionaloutputtypeisnotdefinedforagivenfield,outputvalueswillbesetto1.e36forthatfield.char*4array(uptomaxtapesvaluesseparatedbycommas)all

blank(inthiscaseahardwiredtypepervariableisused)

20

name:description:type:mode:default:name:description:

type:mode:default:

name:description:

type:mode:default:

name:description:

type:mode:default:

name:description:type:mode:default:name:HISTEMPTYHTAPES

Ifsettotrue,allthehistorytapesareemptybydefault.Onlyvariablesexplicitlylistedbytheuserwillbeoutput.logicalall.false.

HISTFINCL1,...,HISTFINCL6Listoffieldstoincludeontherespectivehistorytape.Seetables9-18forthelistofdefaultfieldsontheprimaryhistorytape.Namelistspecificationcantakeoneoftwoforms.Theusermaysimplyspecifythenameofthefieldtobeincludedonthehistorytape(inwhichcasethedefaulttimeaveragingforthatfieldwillbeused).Forexample,HISTFINCL2=’TV’,willaddthefieldTVtothesecondhistorytapewithwhateverdefaulttimeaveragingwasspecifiedforTV.Alternatively,theusermayspecifythefieldname,followedbya”:”followedbythetimeaveragingflagdesired(validflagsare’I’forinstantaneous,’A’foraverage,’M’forminimum,and’X’formaximum).Forexample,HISTFINCL2=’TV:I”willaddthefieldTVwithinstantaneousoutputtothesecondhistorytape(seeex.3,4).

char*34array(uptomaxfldsvaluesseparatedbycommas)allblank

HISTFEXCL1,...,HISTFEXCL6Listoffieldstoexcludefromtherespectivehistorytape.ThefieldnamemustappearintheMasterFieldListofthedefaulthistorytape(theprimarytape).Seetables9-18formoredetails.

char*32array(uptomaxfldsvaluesseparatedbycommas)allblank

MSSIRTMassStoreretentionperiod(days)foroutputdatasets(seeex.4).UsermusthaveMassStoreaccess.ForexampleNCARsupercomputersrecognizeMassStorecommands.integer

offline,ccsm(obtainedfromCAMincammode)

0(i.e.,historyfileswillbewrittentolocaldisk,nottheNCARMassStore)

MSSWPASSMassStorewritepasswordforoutputdatasets.char*8allblank

RPNTPATH

21

description:type:mode:default:name:description:type:mode:default:

Fullunixpathnameofthelocalrestartpointerfile.char*256all

Filelnd.CASEID.rpointerplacedinuser’shomedirectoryARCHIVEDIR

MassStoredirectorytoarchiveoutputfileschar*256all

/USERNAME/CSM/CASEID

Additionaldetails:Themodelwritesitsownhistory,restartandinitialfiles.HistoryfilesareinnetCDFfileformatandcontainmodeldatavalueswrittenatuserspecifiedfrequenciesduringamodelrun.Eachfieldhasadefaulttimeaveragingflagdetermininghowthatfieldwillbeaccumulatedintimeoveragivenhistoryinterval.Thechoicesaretorecordaveraged,instantaneous,maximum,orminimumvalues.TheusermayoverwritethisdefaultsettingviathenamelistvariableHISTFINCLtwheretcanequal1to6.Iftheuserwishestoseeafieldwrittenatmorethanoneoutputfrequency(e.g.dailyandhourly),additionalhistoryfilesmustbedeclaredcontainingthatfield.Bydefault,CLM3.0producesamonthlyaveragedprimaryhistoryfileandallowstheusertodefineuptofiveauxiliaryhistoryfiles.AllfilescontaingridaverageddataunlessthenamelistvariableHISTDOV2XYissettofalseforagivenfile.Primaryhistoryfilescontainthestring’h0’,whereasauxiliaryhistoryfilescontainthestring’h1’,’h2’,’h3’,’h4’and’h5’.

ThemodelwillalsocreatenetCDFdatasetscontainingonedimensionalinstantaneousvaluesofinitialdatafieldsatthefrequencydefinedbynamelistvariableHISTCRTINIC.Thesedatasetscanbeutilizedas“spun-up”initialconditions.

Restartfilesareinbinaryformatandcanbeusedonlyforrestartorbranchrunsfrompreviousmodelsimulations.Wheneverarestartfileiswritten,acorrespondinglocaldiskrestartpointerfileisoverwritten.Therestartpointerfilecontainsthenameofthelatestmodelrestartfile.Bydefault,therestartpointerfileisplacedintheuser’shomedirectoryunderthename,lnd.CASEID.rpointer.TheusermaymodifythefullpathnameoftherestartpointerfileviathesettingofthenamelistvariableRPNTPATH.

Thefollowingtablespecifiesthenamingconventionusedforoutputfiles.Inthistablethestringyyyyreferstothemodelyear,mmreferstothemodelmonth,ddisthemodeldayandssssscorrespondstosecondsintothemodelday.Initialandrestartfilesalwayscontainonetimesliceofinstantaneousdata.However,non-monthlyhistoryfilesmaycontainmultipletimeslicesoftime-averageddata,soyyyy-mm-dd-ssssscorrespondstothefirsttimesliceofdataonthefile.CASEIDisthecaseidentifiersetviathenamelistinput.

CASEID.clm2.r.yyyy-mm-dd-sssssrestartfilesCASEID.clm2.i.yyyy-mm-dd-sssss.ncinitialfiles

CASEID.clm2.h[012345.yyyy-mm.nc]monthlyaveragehistoryfilesCASEID.clm2.h[012345.yyyy-mm-dd-sssss.nc]non-monthlyhistoryfiles

History,restartandinitializationfilescanbearchivedontheNCARMassStorageSystem(MSS)ifthenamelistvariableMSSIRTissettoavaluegreaterthanzero.History,restartandinitialfilesarearchivedasfollows(whereUSERNAMEistheupper-caseequivalentoftheuser’sloginname,i.e.,theuser’srootdirectoryontheMSS):

historyfiles/USERNAME/csm/CASEID/lnd/histrestartfiles/USERNAME/csm/CASEID/lnd/restinitialfiles/USERNAME/csm/CASEID/lnd/init

22

4.4Specificationofinputphysicsvariables

name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:name:description:type:mode:default:

IRAD

Frequencyofsolarradiationcalculations(+formodeltimesteps,-forhours).integer

offline,mustbeconsistentwithCAM3.0inccsmmode,obtainedfromCAMincammode-1

CSMDOFLXAVE

Ifsettotrue,fluxaveragingisperformedoverthedurationsetinIRAD.logical

ccsm(mustagreewithCAM3.0settinginatm.setup.csh).true.(.false.notsupported)

WRTDIA

Iftrue,globalaverage2-mtemperaturewrittentostandardout(asciilogfileoftherun)(seeex.4).logicalall.false.

PERTLIM

Perturbationlimit(notsupportedatthistime)realall0

4.5SpecificationofRTMRiverrouting

name:description:type:mode:default:

RTMNSTEPS

FrequencyinnumberoftimestepsatwhichRTMiscalled.integerall

numberoftimestepsin3hours

4.6Specificationofcammodenamelist

Whenrunningincammode,certainCLM3.0namelistvariablescannotbesetindependently.Inparticu-lar,anyuserspecificationforthenamelistvariables,CASEID,CTITLE,IRAD,NSREST,HISTCRTINIC,MSSIRT,HISTNHTFRQ,andHISTMFILT(thelasttwoonlyforprimaryhistoryfiles)willbeover-writtenbyvaluesobtainedfromCAM3.0atstartup.Allothernamelistsettingsmaybesetindependentlybytheuser.

ThefollowingtablespecifiesthenamelistvariablesthatareoverwrittenwithvaluesobtainedfromcamandliststheassociatedCAM3.0namelistvariableanditsdefaultvalue.

23

Table8:NamelistVariablesoverwrittenwithCAMsettings

CLMNamelistCASEIDCTITLENSRESTIRADHISTCRTINICHISTNHTFRQ(1)HISTMFILT(1)MSSIRTCAMnamelistCASEIDCTITLENSRESTIRADSWINITHISTNHTFRQ(1)MFILT(1)MSSIRTCAMdefaultrequiredblank0-1’MONTHLY’0136.7Specificationofccsmmodenamelist

Whenrunninginccsmmode,theusermustensurethatsettingsofthenamelistvariables,IRAD,DTIMEandCSMDOFLXAVE,haveidenticalvaluestothecorrespondingCAMnamelistvariablesIRADSW,DTIMEandFLXAVEinthescriptcam.buildnmlprestage.csh(seeCCSM3.0User’sGuide).InccsmmodetheRTMinputdatasetmustbespecifiedinthenamelistusingvariableFRIVINPRTM,becauseRTMisdefinedbydefault.

Inccsmmode,CAMandCLMrunonthesamegridwhichdependsonthespecificoceandomainutilized.Consequently,adifferentsurfacedatasetisrequiredforeachatm/ocngridcombination.Currentlyallsupportedccsm-clmsurfacedatasetswillbereleasedwiththeccsmdistribution.NotsupportedonesmaybegeneratedbytheuserbysettingFSURDAT=’’.

Additionally,aCLM3.0spun-upinitialdatasetmaybeprovidedcontainingvaluesforthetime-dependentvariablesneededtoinitializethemodelfromaspun-upstatebysettingthenamelistvariableFINIDAT.ThisfileMUSThavethesameatm/ocnresolutionandlandmaskasthemodelrunforwhichitwillbeused.ThevariablesappearingintheFINIDATfilewillbeinternallyinitializedtononspun-upvaluesatruntimeifFINIDATisnotset.

Finally,thenamelistvariableCSMDOFLXAVEisspecifictoccsmmodeonly.Ifthisvariableissettotrue(thedefaultsetting),fluxaveragingisperformedoverthetimeintervalspecifiedbythenamelistvariable,IRAD(IRADmustbegreaterthan1).Thefalsesettingisnotsupported.

5CLM3.0DataStructures

Inwhatfollows,weprovideabriefsummaryoftheCLM3.0datastructures.Understandingofthesedatastructuresisessentialbeforetheuserattemptstomodifycodeand/oraddnewhistoryoutputfieldstothemodel.

ThesubgridhierarchyinCLM3.0iscomposedofgridcells,landunits,columnsandplantfunctionaltypes(pfts).Eachgridcellcanhaveadifferentnumberoflandunits,eachlandunitcanhaveadifferentnumberofcolumnsandeachcolumncanhavemultiplepfts.Thisresultsinefficientmemoryallocation,andallowsfortheimplementationofmanydifferenttypesofsubgridrepresentations.

Thefirstsubgridlevel,thelandunit,isintendedtocapturethebroadestspatialpatternsofsubgridheterogeneity.Thesebroadpatternsincludephysicallydistinctsurfacetypes(glaciers,lakes,wetlands,andvegetatedareas).IntermsofCLM3.0variables,thecentraldistinguishingcharacteristicofthelandunitisthatthisiswherephysicalsoilpropertiesaredefined:texture,color,depth,pressure-volumerelationships,andthermalconductivity.

Thesecondsubgridlevel,thecolumn,isintendedtocapturepotentialvariabilityinthesoilandsnowstatevariableswithinasinglelandunit.Thecentralcharacteristicofthecolumnisthatthisiswherethestateandfluxvariablesforwaterandenergyinthesoilandsnowaredefined.Regardlessofthenumberandtypeofpftsoccupyingspaceonthecolumn,thecolumnphysicsoperateswithasinglesetofupperboundary

24

fluxes,aswellasasinglesetoftranspirationfluxesfrommultiplesoillevels.Theseboundaryfluxesareweightedaveragesoverallpfts.

Thethirdandfinalsubgridlevelisreferredtoastheplantfunctionaltype(pft),butitalsoincludesthetreatmentforbareground.Itisintendedtocapturethebiophysicalandbiogeochemicaldifferencesbetweenbroadcategoriesofplants,intermsoftheirfunctionalcharacteristics.Allfluxestoandfromthesurfacearedefinedatthepftlevel,asarethevegetationstatevariables(e.g.vegetationtemperature,canopywaterstorage,andcarbonfortheleaf,stem,androots).

Inadditiontostateandfluxvariabledatastructuresforconservedquantities(energy,water,carbon,etc.),eachsubgridlevelalsohasaphysicalstatedatastructureforhandlingquantitiesthatarenotinvolvedinconservationchecks(diagnosticvariables).Forexample,soiltextureisdefinedthroughphysicalstatevariablesatthelandunitlevel,thenumberofsnowlayersandtheroughnesslengthsaredefinedasphysicalstatevariablesatthecolumnlevel,andtheleafareaindexandthefractionofcanopythatiswetaredefinedasphysicalstatevariablesatthepftlevel.

Thehierarchicalsubgriddatastructuresareimplementedinthecodethroughthemodulesclmtype.F90,clmtypeInitMod.F90,decompMod.F90andinitGridCellsMod.F90.Theseroutinesareallinthe/src/main/subdirectory.ThenewcodemakesextensiveuseoftheFortran90implementationofthederiveddatatype.Thispermitstheusertodefinenewdatatypesthatcanconsistofmultiplestandarddatatypes(integers,doubles,strings)aswellasotherderiveddatatypes.

ThissubgridhierarchyisimplementedinCLM3.0asasetofnestedderivedtypes.Theentiredefinitioniscontainedinmoduleclmtype.F90.Extensiveuseismadeofpointers,bothfordynamicmemoryallocationandforsimplificationofthederivedtypereferencingwithinsubroutines.Theuseofpointersfordynamicmemoryallocationensuresthatthenumberofsubgridelementsateachlevelinthehierarchyisflexibleandresolvedatruntime,therebyeliminatingtheneedtostaticallydeclarearraysoffixeddimensionsthatmightendupbeingsparselypopulated.Theuseofpointersforreferencingmembersofthederiveddatatypewithinthesubroutinesprovidesacoherenttreatmentofthelogicalrelationshipsbetweenvariables(e.g.,theusercannotinadvertentlychangeapft-levelvariablewithinasubroutinethatissupposedtooperateonthecolumnstatesandfluxes),andamoretransparentrepresentationofthecorealgorithms(itiseasytotellwhenthecodeisinacolumnorpftloop).

Themodule,clmtype.F90,isorganizedsuchthatderivedtypeswhicharemembersofotherderivedtypesaredefinedfirst(aFortran90compilerrequirement).Inparticular,theenergyandmassconservationdatatypesaredefinedfirst,followedbydatatypesconstitutingthepftlevel,columnlevel,landunitlevel,gridcelllevelandthemodeldomainlevel.Finally,thehierarchicalorganizationofthesetypesisdefined,startingwiththemodeldomainlevel,whichconsistsinpartofapointertoanarrayofgridcells,eachofwhichconsistsinpartofapointertoanarrayoflandunits,eachofwhichhasapointertoanarrayofcolumns,whicheachhaveapointertoanarrayofpfts.

ModelinitializationoccursinmoduleinitializeMod.F90.AbriefsummaryoftheCLM3.0initializationisprovided.Foramoredetaileddiscussion,theuserisreferredtotheCLM3.0Developer’sGuide.ThefirststepinCLM3.0initializationistodetermineprocessorandthreaddecomposition(i.e.“clump”layout).ThisisdoneviaacalltosubroutineinitDecompinmoduledecompMod.F90.Subsequently,memoryisallocatedfortheclmdatastructuresinsubroutineinitClmtypeinmoduleclmtypeInitMod.F90.Oncememoryallocationhasoccurred,thehierarchyofthedatastructures(e.g.assignmentofpftstocolumns,etc.)isdeterminedinsubroutineinitGridCellsinmoduleinitGridCellsMod.F90.Useismadeofinputgriddeddatasetsdefiningthespatialdistributionofpftsandothersurfacetypes(glacier,lake,etc.).Finally,thenecessarymodelfilters(e.g.isolatingsoilpoints,lakepoints,etc)aredeterminedinroutineinitFiltersinmodulefilterMod.F90.

6CLM3.0SurfaceDatasetFormats

Asmentionedinsection4.2,CLM3.0nowsupportstwosurface-dataformats.Thenewformatdiffersfromtheoldformatinonlytwovariables:

25

•PFT-removedfromthenewformatsurface-datafile.

•PCTPFT-percentofthelandgridcellcoveredbyeachpft,includingpftswithzeropercentcover(notpercentofthevegetatedportioncoveredbythefourdominantpfts).Thenewformatsurfacedatasetwillbecreatedifthefollowingnamelistvariableisset:

mksrf_all_pfts=.true.

Theoriginalformatsurfacedatasetwillbecreatedbydefault,orif

mksrf_all_pfts=.false.

Thesurfacedatainitsnewformatprovidesmoreflexibilitythanintheoriginalformatbyallowingtheusertodecidethenumberofdominantpftspergridcellfortheirsimulationwithoutcreatinganewsurface-datafileeachtimethisnumberchanges.Thisispossiblebecauseallpftsfoundintherawdataareincludedinthenewformatsurfacedatasetintheorderthattheyarelistedinthepft-physiologyfileFPFTCON.Usingthenewformatsurface-datafileasinput,themodelselectsatrun-timethe4dominantnaturalpftsandplacesthemonanaturalvegetationlandunit,whileitplacescropsseparatelyonacroplandunit.

Theusermaychangeatcompiletimethemodelparameterthatspecifiesthenumberofdominantpftsusedinthemodel.Theparameter,maxpatchpftinmoduleclmvarpar.F90inthesrc/maindirectorydeterminesthemaximumnumberofvegetatedpftsinthenaturallyvegetatedlandunit.Currentlythisissetto4.Iftheuserweretoincreasethisvalueto6andrecompilethecode,thenthemodelwouldselectthe6dominantnaturalpftsandplacethemonthenaturalvegetationlandunit.Intheoriginalformat,afterrecompilingthecode,anewsurfacedatasetwouldneedtobecreated,whichwouldcontainthe6dominantpfts(bothnaturalandcrop).

Similartomaxpatchpft,theparametermaxpatchcftspecifiesthemaximumnumberofcroppftsinthecroplandunitinthenewformat.Currentlythisnumberissetto2andcorrespondstocornandwheatvegetationtypes.InCLM3.0,thesevegetationtypesforcornandwheatarecurrentlyhard-wiredtovaluesof15and16,respectively,whichareidenticalintermsoftheirphysiologicalproperties.Thishard-wiringofvalueswillberemovedinfuturereleases.

Thenewformatsurface-datafilewillfacilitatechangingthelandcoverinthemiddleofasimulation.Itisimportanttonote,however,thatsuchacapabilitywillrequireadditionalcodedevelopmentwhichisnotcurrentlyintheCLM3.0release.Thepresenceofdistinctnaturalandcroplandunitswillalsoallowtheseparatetreatmentoftheselandunitsusingdifferentmodules.Forexample,thedynamicvegetationmodel(DGVM)inCLM3.0maybeusedforthenaturallandunit,whileacropmodelcouldbeusedforthecroplandunit.AlthoughnocropmodelisincludedyetandonlynaturalvegetationispermittedwhenDGVMisactiveintheCLM3.0release,thenewsurfacedatasetformwillfacilitatetheintroductionofthesechangesinthecode.

Thenewsurface-dataformatandtheseparatevegetationlandunitsleadtosmallchangesinCLM’ssimulatedfluxestotheatmosphere.Asaresult,onewillseesmallchangesinthesimulatedclimateinCAMorCCSMmode.Usersshoulddecidetoworkwithoneofthesurface-dataformatsandnotswitchbetweensuchformatsinthemiddleofastudy.However,ifauserdesirestodosurfacedatasetdevelopment,theyarestronglyencouragedtousethenewsurfacedatasetformat.

7CreatingaSpun-upInitialDataset

Oftenitmaytakeseveralsimulatedyearsto“spinup”themodel.Forexample,inCCSMmodeitmaytakenumerousdecadestospinupthedeepsoilliquidwater.Asaresult,ithasbecomenecessarytoprovideuserswiththetooltocreateanewinitialdatasetusingaspunupinitialdatasetatanotherresolutionorlandmask.InCLM3.0weareprovidingsuchatool,interpinic,inthedirectorytools/interpinic.Theonlyconstraintisthattheusermusthavealreadycreateda“template”initialdatasetatthenewresolutionbeforethistoolisused.ThiscanbedonebyrunningthemodelforonedayasinExample1butwithanadditionalnamelistsetting:

26

hist_crtinic=’DAILY’

Anewinitialdatasetwillbecreatedasaresultofthisrun.Thetoolinterpinicwillthenoverwritethenonspun-upvaluesofCLM3.0variablesinthisinitialdatasetwithspun-upvaluesfromthespun-upinitialdataset.

8HistoryFileFields

ThefollowingsectionsdiscussboththefieldsthatmaycurrentlybeoutputtoCLM3.0historytapesaswellascodemodificationsthattheusermustmaketoaddnewfieldstothehistorytapes.

Tables9-18listthefieldsthatcurrentlymaybeoutputtoaCLM3.0historytape.Bydefault,thesefieldsappearontheprimaryhistorytape.Thedimensionsofeachfieldmayinclude’time’(dayssincethebeginningofthesimulation),’levsoi’(numberofsoillayers,levsoi=10),’levlak’(numberoflakelayers,levlak=10),and’lat’and’lon’(numberoflatitudeandlongitudepoints,e.g.,lat=,lon=128foraT42simulation)forgridaveragedtwodimensionaloutput,and’gridcell’,’landunit’,’column’or’pft’foronedimensionaloutput.ThedimensionsoftheRTMfields,QCHOCNRandQCHANR,include’lonrof’and’latrof’,thenumberoflatitudeandlongitudepointsontheRTMgrid.ThetwoRTMfieldsarealwaysoutputonthe0.5degreeRTMgridregardlessoftheresolutionofthemodelrun.Notethatthe1ddimensiontypeappearinginthedimensionsentryspecifiesonlythedefault1doutputtype.Forexample,’TSA’willbeoutputbydefaultinpft1doutput.However,thatdefaulttypemaybechangedforagivenhistorytapeviathesettingofthenamelistvariableHISTTYPE1DPERTAPE.Ahistoryfieldmayappearassingle-level(SL)ormulti-level(ML).Finally,unlessexplicitlyspecifiedinthedescription,allfieldsaretimeaveragedovertherequestedhistoryinterval.

Table9:MasterFieldList-TemperatureandHumidity

NameTSATVTGTSOITLAKETSNOWTREFMNAVTREFMXAVQ2MDescription2-mairtemperaturevegetationtemperaturegroundtemperaturesoiltemperaturelaketemperaturesnowtemperaturedailyminimumofhourly-averaged2-mtemperature

dailymaximumofhourly-averaged2-mtemperature

2-mspecifichumidityUnitsKKKKKKKKkg/kg1dOutputpftpftcolumncolumncolumncolumnpftpftpftLevelSLSLSLMLMLSLSLSLSLSpatialValid-ityglobalglobalgloballakesexcludedonlylakesin-cluded

lakesexcludedglobalglobalglobalTable10:MasterFieldList-SurfaceRadiation

NameFSASABGSABVFSRFSRVDDescriptionabsorbedsolarradiationsolarradiationabsorbedbygroundsolarradiationabsorbedbyvegetationreflectedsolarradiationdirectvisiblereflectedsolarradiation27

UnitsW/m2W/m2W/m2W/m2W/m21dOutputpftpftpftpftpftLevelSLSLSLSLSLSpatialValid-ityglobalglobalglobalglobalglobalTable10:MasterFieldList-SurfaceRadiation

FSRNDFSRVDLNFSRNDLNFSRVIFSRNIFIRAFIREdirectnear-infraredreflectedsolarra-diation

directvisiblereflectedsolarradiationatlocalnoon

directnear-infraredreflectedsolarra-diationatlocalnoon

diffusevisiblereflectedsolarradiationdiffusenear-infraredreflectedsolarra-diation

netinfrared(longwave)radiationemittedinfrared(longwave)radiationW/m2W/m2W/m2W/m2W/m2W/m2W/m2pftpftpftpftpftpftpftSLSLSLSLSLSLSLglobalglobalglobalglobalglobalglobalglobal28

Table11:MasterFieldList-SurfaceEnergyFluxes

NameFCTRFCEVFGEVFSHFSHGFSHVFGRFSMTAUXTAUYDescriptioncanopytranspirationevaporationofcanopy-interceptedwa-ter

groundevaporationsensibleheatfluxsensibleheatfromgroundsensibleheatfromvegetationheatfluxintosnow/soil(includessnowmelt)

snowmeltheatfluxzonalsurfacestressmeridionalsurfacestressUnitsW/m2W/m2W/m2W/m2W/m2W/m2W/m2W/m2kg/m/s2kg/m/s21dOutputpftpftpftpftpftpftpftcolumnpftpftLevelSLSLSLSLSLSLSLSLSLSLSpatialValid-ityglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalTable12:MasterFieldList-VegetationPhenology

NameELAIESAIDescriptionexposedone-sidedleafareaindexexposedone-sidedstemareaindexUnitsm2/m2m2/m21dOutputpftpftLevelSLSLSpatialValid-ityglobalglobalTable13:MasterFieldList-CanopyPhysiology

NameRSSUNRSSHABTRANFPSNDescriptionsunlitleafstomatalresistance(mini-mumovertimeinterval)

shadedleafstomatalresistance(mini-mumovertimeinterval)

transpirationbetafactor(soilmois-turelimitation)photosynthesisUnitss/ms/munitlessunitless1dOutputpftpftpftpftLevelSLSLSLSLSpatialValid-ity

lakesexcludedlakesexcludedlakesexcludedglobal29

Table14:MasterFieldList-Hydrology

NameH2OSOIH2OSNOFSNOH2OCANSOILLIQSOILICESNOWLIQSNOWICESNOWDPSNOWAGEQINFLQOVERQRGWLQDRAIQINTRQDRIPQMELTQSOILQVEGEQVEGTQCHOCNRQCHANRDescriptionvolumetricsoilwater(ratioofwatertototalsoilvolume)

snowdepth(liquidwaterequivalent)fractionofsoilcoveredbysnowwateronthecanopysoilliquidwatersoilicesnowliquidwatersnowicesnowheightsnowagewaterinfiltrationinsoilsurfacerunoffsurfacerunoffatglaciers,wetlands,andlakes

sub-surfacedrainagecanopyinterceptionofprecipitationthroughfallsnowmeltgroundevaporationevaporationofcanopy-interceptedwa-ter

canopytranspirationRTMriverdischargeintoocean(in-cludedifRTMdefined)

RTMriverflow(includedifRTMde-fined)

Unitsmm3/mm3mmunitlessmmkg/m2kg/m2kg/m2kg/m2munitlessmm/smm/smm/smm/smm/smm/smm/smm/smm/smm/sm3/sm3/s1dOutputcolumncolumncolumnpftcolumncolumncolumncolumncolumncolumncolumncolumncolumncolumnpftpftcolumnpftpftpft2-Donly2-DonlyLevelMLSLSLSLMLMLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSpatialValid-ity

lakesexcludedglobalglobalgloballakesexcludedlakesexcludedlakesexcludedlakesexcludedglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalTable15:MasterFieldList-WaterandEnergyBalanceChecks

NameERRSOIERRSEBERRSOLERRH2ODescriptionsoil/lakeenergyconservationerrorsurfaceenergyconservationerrorsolarradiationconservationerrortotalwaterconservationerrorUnitsW/m2W/m2W/m2mm1dOutputcolumnpftpftcolumnLevelSLSLSLSLSpatialValid-ityglobalglobalglobalglobal30

Table16:MasterFieldList-AtmosphericForcing

NameRAINSNOWTBOTWINDTHBOTQBOTZBOTFLDSFSDSFSDSVDFSDSNDFSDSVDLNFSDSNDLNFSDSVIFSDSNIDescriptionrainsnowatmosphericairtemperatureatmosphericwindvelocitymagnitudeatmosphericairpotentialtemperatureatmosphericspecifichumidityatmosphericreferenceheightincidentlongwaveradiationincidentsolarradiationdirectvisibleincidentsolarradiationdirectnear-infraredincidentsolarra-diation

directvisibleincidentsolarradiationatlocalnoon

directnear-infraredincidentsolarra-diationatlocalnoon

diffusevisibleincidentsolarradiationdiffusenear-infraredincidentsolarra-diation

Unitsmm/smm/sKm/sKkg/kgmW/m2W/m2W/m2W/m2W/m2W/m2W/m2W/m21dOutputgridcellgridcellgridcellgridcellgridcellgridcellgridcellgridcellgridcellpftpftpftpftpftpftLevelSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSpatialValid-ityglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalTable17:MasterFieldList-Soil

NameZSOIDZSOIWATSATDescriptionsoillayernodedepthsoillayerthicknessvolumetricsoilwateratsaturation(equaltotheporosity)saturatedsoilmatricpotentialUnitsmmmm3/mm31dOutputcolumncolumncolumnLevelMLMLMLSpatialValid-ity

lakesexcludedlakesexcludedglaciers,wet-lands,lakesexcludedglaciers,wet-lands,lakesexcludedglaciers,wet-lands,lakesexcluded

SUCSATmmcolumnMLBSWslopeofsoilwaterretentioncurveunitlesscolumnML31

Table18:MasterFieldList-VolatileOrganicCompounds(onlyincludedifVOCdefined)

NameBIOGENCOISOPRENEMONOTERPORVOCOVOCVOCFLXTDescriptionbiogenicCOfluxisoprenefluxmonterpenefluxotherreactiveVOCfluxotherVOCfluxtotalVOCfluxintoatmosphereUnitsµg/m2/hµg/m2/hµg/m2/hµg/m2/hµg/m2/hµg/m2/h1dOutputpftpftpftpftpftpftLevelSLSLSLSLSLSLSpatialValid-ityglobalglobalglobalglobalglobalglobalTable19:MasterFieldList-DynamicVegetation(onlyincludedifDGVMdefined)

NameFMICRFRMSFRMRFRMFFRGFCO2DMIHTOPHBOTTLAITSAITDAT10AGDD0AGDD5DescriptionmicrobialrespirationstemmaintenancerespirationrootmaintenancerespirationfoliagemaintenancerespirationgrowthrespirationnetCO2fluxnetprimaryproductionheightoftopofcanopyheightofbottomofcanopytotalone-sidedleafareaindextotalone-sidedstemareaindexdailyaverage2-mtemperature10-dayrunningmeanof2-mtempera-ture

growingdegree-daysbase0degreesCgrowingdegree-daysbase5degreesCUnitsµmol/m2/sµmol/m2/sµmol/m2/sµmol/m2/sµmol/m2/sµmol/m2/sµmol/m2/smmm2/m2m2/m2KKdegree-daysdegree-days1dOutputpftpftpftpftpftpftpftpftpftpftpftpftpftpftpftLevelSLSLSLSLSLSLSLSLSLSLSLSLSLSLSLSpatialValid-ityglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalglobalNotethatforsnowrelatedfields(e.g.SNOWLIQ),horizontalaveragingisdoneonlyusingcolumnsthathavesnow.Inthishorizontalaveraging,lakesubgridpointsareexcluded.Furthermore,forsnowrelatedfields,verticalaveragingisdonebysumming(e.g.,SNOWLIQ)oraveraging(e.g.,TSNOW)onlyovervalidsnowlayers.

AlsonotethatadditionalhistoryfieldsappearintheprimaryhistoryfilewhenDGVMisdefined.Inaddition,aseparatehistoryfileisproducedonceperyearwhenDGVMisdefined.ThisfileisdescribedintheCLM-DGVMuser’sguide.

9OfflineModeNamelistExamples

ThefollowingexamplesillustratedifferentnamelistoptionsthatcanbeusedtorunCLM3.0inofflinemode.

32

9.1Example1:Offlineinitialrun,oneday,global

Whenthemodelisruninofflinemodeusingapre-existingsurfacedataset,theminimumnamelistparame-tersare:CASEID,NSREST,NESTEPorNELAPSE,FSURDAT,FPFTCON,OFFLINEAIR,STARTYMD,andDTIME.IfFSURDATisblank,asurfacedatasetwillbegeneratedatruntimeandadditionalvariablesneedtobespecified(seesection4.2andExamples5and6).Namelistparametersnotspecifiedwillbesettodefaultvalues.Thefollowinggivesanexampleofasimplenamelist.&clmexpCASEIDNSRESTNESTEPFSURDATFINIDATFPFTCON

FRIVINP_RTMOFFLINE_AIRSTART_YMDDTIME

HIST_NHTFRQ/

===========

’test01’0-1

’$CSMDATA/srfdata/clms_x128_USGS_c030605.nc’’’

’$CSMDATA/pftdata/pft-physiology’’$CSMDATA/rtmdata/rdirc.05’’$CSMDATA/NCEPDATA’199712311800-24

CASEID=’test01’

Caseidentifierwhichdistinguishesthisparticularsimulationfromanother.ThestringinCASEIDshowsupinthenamesofhistory,restart,andinitialfiles,intherestartpointerfilename(seeExample2)andintheMassStorepathnamewherehistory,restart,andinitialfilesareplacediftheMassStoreisused.NSREST=0

Requestsaninitialrun,asopposedtoarestartorabranchrun.Aninitialrundoesnotrequiretheuseofaninitialinputdatafile(FINIDAT).Ifnoneisprovided,themodelusesnonspun-upinitializationprovidedinthecode(seesrc/main/iniTimeVar.F90).

NESTEP=-1

Specifiestherun’sendingtimetobeattheendofday1.

FSURDAT=’$CSMDATA/srfdata/clmsx128USGSc030605.nc’

Specifiesthenameofthesurfacedatainputfile.ThisparticularT42surfacedatasetcanbeusedbothincamandofflinemode.Themodelresolution(i.e.parametersLSMLONandLSMLAT)mustbecompatiblewiththeresolutionofFSURDAT.Ifthefilenameappearedwithoutapathspecifyingitsexactlocation,thefilewouldbeexpectedintheexecutabledirectory,definedbytheenvironmentvariable$MODELEXEDIR.FINIDAT=’’

Specifiestheinitialfiletobeusedtoprescribeinitialvaluesfortime-dependentvariables.Sincenofileisspecifiedinthiscase,themodelwillbeinternallyinitializedtononspun-upvalues(arbitraryinitialization).FPFTCON=’$CSMDATA/pftdata/pft-physiology’

SpecifiesafilewithPFT(PlantFunctionalType)parameters.

FRIVINPRTM=’$CSMDATA/rtmdata/rdirc.05’

SpecifiestheinputfilerequiredfortheoperationofRTM(RiverTransportModel).Bydefault,RTMwilloperateathalfdegreehorizontalresolutionandwillbeinvokedevery3hours,wherethefluxesinputtoRTM(i.e.,runoff)areaveragedoverthe3hourperiod.IftheuserwantstheRTMschemetooperateatadifferentfrequencythanonceevery3hours,RTMNSTEPSshouldbesettothedesiredvalueoftimesteps.UseofRTMisactivatedinthejobscript.cshwiththeCpre-processor(cpp)directive#defineRTMintheheaderfilepreproc.h(seesection3.1.3).

33

OFFLINEAIR=’$CSMDATA/NCEPDATA’

Specifiesthelocationoftheatmosphericdriverdataset.Suchadatasetisrequiredforthemodeltoruninofflinemode.

STARTYMD=19971231

Specifiesthebasedateofthesimulationandmustbecompatiblewiththeatmosphericinputdata.Forexample,STARTYMD=19971231willusetheatmosphericinputfile1997-12.nc.Inarestartorbranchrun,STARTYMDneednotbechanged,aslongasitreferstoadateearlierthanthedateofrestartorbranch.

DTIME=1800

Specifiesthesimulation’stimestepinseconds.Inofflinemode,themodelcanhandleatimestepofupto3600seconds.

HISTNHTFRQ=-24

Primaryhistoryfilesandrestartfileswillbeproducedintheexecutabledirectoryandwillbewrittenevery24hours.

9.2Example2:Restartrun

ThefollowingnamelistgeneratesarestartrunwhichcontinuestheruninExample1.&clmexpCASEIDNSRESTNELAPSEFSURDATFINIDATFPFTCON

FRIVINP_RTMOFFLINE_AIRSTART_YMDDTIME

HIST_NHTFRQ/

===========

’test01’1-1

’$CSMDATA/srfdata/clms_x128_USGS_c030605.nc’’’

’$CSMDATA/pftdata/pft-physiology’’$CSMDATA/rtmdata/rdirc.05’’$CSMDATA/NCEPDATA’199712311800-24

NSREST=1

Requestsarestartrun.Arestartrunfindsthenameoftheappropriaterestartfileautomaticallybyreadingthefile,lnd.CASEID.rpointerfoundbydefaultintheuser’shomedirectory.Inthisexample,thepointerfilewillbelnd.test01.rpointer.Restartrunsaremeanttobe’seamless’,producingthesameoutputasrunswhichcontinuedwithoutarestart.

NELAPSE=-1

Specifiestherun’sendingtimetobeonedayafterthepointofrestart.ThisisequivalenttoenteringNESTEP=-2,sincethepreviousrunstoppedattheendofday1.IfNESTEPwereusedinthisnamelist,itwouldoverridethevaluegiventoNELAPSE.

Allothernamelistvariablesremainthesametoensurea’seamless’restart(forinformation,seeexample1).Also,foraseamlessrestart,theusershouldgenerallyexecutethecodewiththesameexecutableusedintheinitialrun(ie,withoutcompilingthecodeagain).Thejobscriptwillnotrecompilethecodeunlesstheuserhasmadechangestothecodeorfileshavebeenremovedfromtheblddirectory.

34

9.3Example3:Branchrun

ThefollowingnamelistgeneratesabranchrunstartingfromrestartfilesgeneratedbyExample1.Theusermaybrancharunwiththesameexecutableusedintheinitialrun(i.e.,withoutrecompilingthecode)unlessbranchingisusedtotestchangesinthecode(fordebuggingorsensitivitypurposes).&clmexpCASEIDNSRESTNREVSNNELAPSEFSURDATFINIDATFPFTCON

FRIVINP_RTMOFFLINE_AIRSTART_YMDDTIME

HIST_FINCL2HIST_NHTFRQHIST_MFILT/

==============

’branch_run’3

’test01.clm2.r.1998-01-01-00000’-1

’$CSMDATA/srfdata/clms_x128_USGS_c030605.nc’’’

’$CSMDATA/pftdata/pft-physiology’’$CSMDATA/rtmdata/rdirc.05’’$CSMDATA/NCEPDATA’199712311800’TV:I’-3,52,3

SeeExample1forexplanationsofnamelistvariableswhichremainunchanged.NSREST=3

Requestsabranchrun.

NREVSN=’test01.clm2.r.1998-01-01-00000’

Suppliesthenameoftherestartfilewhichwillinitializethisrun.(ThisfilecanbeproducedbyrunningExample1above).

NELAPSE=-1

Specifiestherun’sendingtimetobeonedayafterthepointofbranching.HISTFINCL2=’TV:I’

Addanauxiliaryhistoryfilewiththefield“TV”thatisoutputinstantaneously.

HISTNHTFRQ=-3,5

Changesthefrequencyofprimaryhistorywritestoevery3hours.Thewritefrequencyoftheauxiliaryfileisevery5timesteps.Thisisanexampleofachangewhichausermaywishtotestinabranchrun.HISTMFILT=2,3

Theprimaryhistoryfilewillhave2timesamplesoneverytape.Theauxiliaryhistoryfilewillhave3timesamplesoneverytape.

9.4Example4:Auxiliaryhistoryfiles

Thisexamplecoverstheadditionofanauxiliaryhistoryfile,theremovalofafieldfromtheprimaryhistoryfileandthechangeoffieldtypeinahistoryfile.Avarietyofothernamelistoptionsarealsoillustrated.&CLMEXPCASEIDNSRESTNESTEP

=’rtm_run’=0=-31

35

FSURDATFINIDATFPFTCON

FRIVINP_RTMOFFLINE_AIRSTART_YMDDTIME

HIST_FEXCL1HIST_FINCL2HIST_DOV2XYHIST_NHTFRQHIST_MFILTMSS_IRTWRTDIA/

==============’$CSMDATA/srfdata/clms_x128_USGS_c030605.nc’’’

’$CSMDATA/pftdata/pft-physiology’’$CSMDATA/rtmdata/rdirc.05’’$CSMDATA/NCEPDATA’199801011800’TSNOW’

’TV’,’TG:I’.true.,.false.-24,-124,2365.true.

Fornamelistvariableswhicharerepeated,refertoExamples1,2,and3.HISTFEXCL1=’TSNOW’

Thefield’TSNOW’willbeexcludedfromtheprimarytape.

HISTFINCL2=’TV’,’TG:I’

Specifiesthetwofieldstobeaddedtotheauxiliaryhistoryoutput.Thefirstfield,’TV’,willhavethedefaulttimeaveragingdone,whereasthesecondfield,’TG’,willhaveinstantaneousoutput.

HISTDOV2XY=.true.,.false.

Historyoutputwillappearingriddedtwo-dimensionalformatfortheprimaryfileandinone-dimensionalsubgridformatfortheauxiliaryfile.

HISTNHTFRQ=-24,-12

Historyoutputwillbedirectedtotheprimaryhistoryfileevery24modelhoursandtotheauxiliaryhistoryfileevery12hours.

HISTMFILT=4,2

Eachprimaryhistoryfilewillcontain4timeslicesofoutput,whileeachauxiliaryhistoryfilewillcontain2timeslicesofoutput.

MSSIRT=365

OutputfileswillbearchivedontheNCARMassStorageSystemwitharetentiontimeof365days.WRTDIA=.true.

Aglobalaverageoflandsurfaceairtemperatureasdiagnosticwillappearinthestandardoutputfileofthesimulation.

9.5Example5.Generationofregionalgridsurfacedataset

Aregulargridsurfacedatasetcanbegeneratedatruntimeforasinglegridcellorforgridcellscomprisingare-gionalorglobaldomain.Inallcases,thecpptokensLSMLONandLSMLATmustbesettothedesiredres-olution(e.g.,LSMLON=1,LSMLAT=1forasinglegridcellsimulationorLSMLON=120,LSMLAT=60fora3degreeby3degreeglobalsimulation).Togenerateasurfacedatasetforaregionalrun,thevari-ablesMKSRFOFFLINEEDGES,MKSRFOFFLINEEDGEN,MKSRFOFFLINEEDGEE,andMKSRFOFFLINEEDGEWandtheirvaluesneedtobeaddedtothenamelist.Asurfacedatasetwillbecreatedwiththenamesurface-data.LSMLONxLSMLAT.nc(e.g.,forasinglepointsimulationthe

36

filenamewillbesurface-data.001x001.nc).ThemodelcanthenberunbyfollowingExample1whereFSURDATpointstothenewsurfacedataset.

Inthefollowingexample,aregionalgridiscreatedovertheAmazonbasin.LSMLONandLSMLATshouldbesetto15and11,respectively,for3degreeby3degreehorizontalresolution.&clmexpCASEIDNSRESTNESTEPSTART_YMDDTIMEFSURDAT

FRIVINP_RTMFPFTCON

OFFLINE_AIR

MKSRF_OFFLINE_FNAVYOROMKSRF_FVEGTYPMKSRF_FSOITEXMKSRF_FSOICOLMKSRF_FLANWATMKSRF_FGLACIERMKSRF_FURBANMKSRF_FLAI

MKSRF_OFFLINE_EDGENMKSRF_OFFLINE_EDGESMKSRF_OFFLINE_EDGEEMKSRF_OFFLINE_EDGEW/

=====================

’create_regional_surfdat’02

199712311800’’

’$CSMDATA/rtmdata/rdirc.05’

’$CSMDATA/pftdata/pft-physiology’’$CSMDATA/NCEPDATA’

’$CSMDATA/rawdata/mksrf_navyoro_20min.nc’’$CSMDATA/rawdata/mksrf_pft.nc’

’$CSMDATA/rawdata/mksrf_soitex.10level.nc’’$CSMDATA/rawdata/mksrf_soicol_clm2.nc’’$CSMDATA/rawdata/mksrf_lanwat.nc’’$CSMDATA/rawdata/mksrf_glacier.nc’’$CSMDATA/rawdata/mksrf_urban.nc’’$CSMDATA/rawdata/mksrf_lai.nc’12-21-36-81

FSURDAT=’’

Asurfacedatasetnamedsurface-data.LSMLONxLSMLAT.ncwillbecreatedinthemodelexecutabledirec-tory.LSMLONandLSMLATaredefinedinjobscript.csh(seesection3.1.3).

MKSRFOFFLINEFNAVYORO=’$CSMDATA/rawdata/mksrfnavyoro20min.nc’

Pointstotheorographydatasetusedtoderivethemodel’slandmaskinofflinemode.Theenvironmentvariable$CSMDATAisexplainedin3.1.1.

MKSRFFVEGTYP,MKSRFFSOITEX,MKSRFFSOICOL,MKSRFFLANWAT,MKSRFFGLACIER,MKSRFFURBAN,andMKSRFFLAISpecifytheraw(usuallyhighresolution)inputdatasetsusedtocreatethemodelsurfacedataset.

MKSRFOFFLINEEDGES,MKSRFOFFLINEEDGEN,MKSRFOFFLINEEDGEE,andMK-SRFOFFLINEEDGEW

Mustbedefinedforthedesiredmodelregionaldomainbecausethedefaultvaluesassumeaglobaldomain.TheunitsaredegreesnorthforEDGESandEDGENanddegreeseastforEDGEEandEDGEW.

9.6Example6.Generationofglobalgaussiansurfacedataset

Onlyglobalsurfacedatasetscanbecreatedonanon-regulargrid,suchasagaussiangrid.Togenerateasurfacedatasetonagaussiangrid,thecpptokensLSMLONandLSMLATmustbesettothedesiredresolution(e.g.,LSMLON=128,LSMLAT=foraT42grid),andMKSRFOFFLINEFGRIDmustbesettotheappropriatedatasetin$CSMDATA/srfdataspecifyingthemodelgrid,landmaskand

37

landfractionforthemodelgrid.AtT42resolution,asurfacedataset,“surface-data.128x0.nc”,willbecreatedinthemodelexecutabledirectory.Thisdatasetmayberenamedbytheusertobemoreself-explanatory.Forexample,thesurfacedatasetcreatedusingthisexamplewasclmsx128USGSc030605.ncin$CSMDATA/srfdata.AndwiththeadditionofMKSRFALLPFTS=.true.tothisnamelist,wecreatedclmsx128allpftsc040426.nc.Thefollowingnamelistwillresultinthegenerationofasurfacedatasetonaglobalgaussiangrid.&clmexpCASEIDNSRESTNESTEPSTART_YMDDTIMEFSURDAT

FRIVINP_RTMFPFTCON

OFFLINE_AIR

MKSRF_OFFLINE_FGRIDMKSRF_FVEGTYPMKSRF_FSOITEXMKSRF_FSOICOLMKSRF_FLANWATMKSRF_FGLACIERMKSRF_FURBANMKSRF_FLAI/

=================

’create_global_surfdat’02

199712311800’’

’$CSMDATA/rtmdata/rdirc.05’

’$CSMDATA/pftdata/pft-physiology’’$CSMDATA/NCEPDATA’

’$CSMDATA/srfdata/fgrid.clms_x128_USGS_c030605.nc’’$CSMDATA/rawdata/mksrf_pft.nc’

’$CSMDATA/rawdata/mksrf_soitex.10level.nc’’$CSMDATA/rawdata/mksrf_soicol_clm2.nc’’$CSMDATA/rawdata/mksrf_lanwat.nc’’$CSMDATA/rawdata/mksrf_glacier.nc’’$CSMDATA/rawdata/mksrf_urban.nc’’$CSMDATA/rawdata/mksrf_lai.nc’

FSURDAT=’’

Asurfacedatasetnamedsurface-data.128x0.ncwillbecreatedatruntimeinthemodelexecutabledirec-tory.

MKSRFOFFLINEFGRID=’$CSMDATA/srfdata/fgrid.clmsx128USGSc030605.nc’

Pointstothedatasetcontainingthemodelgrid,landmaskandfractionallandforthesurfacedataset.

MKSRFFVEGTYP,MKSRFFSOITEX,MKSRFFSOICOL,MKSRFFLANWAT,MKSRFFGLACIER,MKSRFFURBAN,andMKSRFFLAISameasExample5.

38

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- dfix.cn 版权所有 湘ICP备2024080961号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务