Package: ggen
Grid Generator (ggen)Generates Spectral Element (SE) and Regular Latitude Longitude (RLL) grid meshes and performs conservative remapping between list of meshes. Works withtempestremapandncounder the hood. Logs are appended to log.ggen.Usagepython ggen.py -husage:ggen.py[-h][-rR][-fF][-indIND][-outOUT][-gfGF][-mfMF][-sd][-scrip][-mp][-irIR]optionalarguments:-h,--helpshowthishelpmessageandexit-rROutputresolutions(e.g.16,30,64x128,180x360)-fFFileNames(inputnetcdffilenames).Use' 'whenusingwildcards.-indINDInputdirectory(currentdirectoryisdefault).-outOUTOutputdirectory(currentdirectoryisdefault).-gfGFInsertgridfile.-mfMFInsertmapfile.-sdAddasigletonlevdim.-scripGenerateSCRIPfiles-mpMultiprocessing-irIRInputresolutions(e.g.16,30,64x128,180x360)General StructureInstallationWorks with e3sm_unifed environmentOn compy:source/share/apps/E3SM/conda_envs/load_latest_e3sm_unified_compy.shOn Cori:source/global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-haswell.shFor others, use the YAML file provided to create a virtual conda enviroment (genv)conda env create -f environment.ymlAnd then activate genv to use ggenconda activate genvExamplesGeneral use (from command line)pythonggen.py-r<outputresolutions>-f<inputfilenames>-ind/input/file/directory-out/output/file/directoryExamplelog.ggenoutput################################## Process Started ##################################[cmd]:pythonggen.py-r30-fbc_emission_def.nc-ind/Users/hass877/Work/data_analysis-out/Users/hass877/Work/data_analysis===driverinitdone===Specifyinginputfilesuppressesresolution.(RecommendedforSEtoRLLconversion)GeneratingRLLgridmetadata

CreatingSCRIPfileRLL180x360_SCRIP.ncin/Users/hass877/Work/data_analysis

Generated/Users/hass877/Work/data_analysis/RLL180x360_SCRIP.nc

Generated/Users/hass877/Work/data_analysis/RLL180x360_SCRIP.nc

OutputResolution:30Generatingexodusmetadata

Generatingpg2metadata

CreatingSCRIPfilene30pg2_SCRIP.ncin/Users/hass877/Work/data_analysis

Generated/Users/hass877/Work/data_analysis/ne30pg2_SCRIP.nc

Generated/Users/hass877/Work/data_analysis/ne30pg2_SCRIP.nc===gen_scripsdone===InputSCRIP:/Users/hass877/Work/data_analysis/RLL180x360_SCRIP.nc
OutputSCRIP:/Users/hass877/Work/data_analysis/ne30pg2_SCRIP.nc[cmd]:ncremap--alg_typ=fv2fv_flx--src_grd=/Users/hass877/Work/data_analysis/RLL180x360_SCRIP.nc--dst_grd=/Users/hass877/Work/data_analysis/ne30pg2_SCRIP.nc--map=/Users/hass877/Work/data_analysis/map_RLL180x360_ne30pg2.nc

Grid(src):/Users/hass877/Work/data_analysis/RLL180x360_SCRIP.nc
Grid(dst):/Users/hass877/Work/data_analysis/ne30pg2_SCRIP.nc


Generatedmap_RLL180x360_ne30pg2.ncmappingfilein/Users/hass877/Work/data_analysis===gen_weightsdone===Applying/Users/hass877/Work/data_analysis/map_RLL180x360_ne30pg2.ncon/Users/hass877/Work/data_analysis/bc_emission_def.nc[cmd]:ncremap--map=/Users/hass877/Work/data_analysis/map_RLL180x360_ne30pg2.nc/Users/hass877/Work/data_analysis/bc_emission_def.nc/Users/hass877/Work/data_analysis/bc_emission_def_RLL180x360_ne30pg2.nc

Input#00: /Users/hass877/Work/data_analysis/bc_emission_def.ncMap/Wgt:/Users/hass877/Work/data_analysis/map_RLL180x360_ne30pg2.nc


Generatedremappedfile/Users/hass877/Work/data_analysis/bc_emission_def_RLL180x360_ne30pg2.nc===apply_weightsdone======gen_remapped_filesdone===Finishedin4.17second(s)################################## Process Finished ########################################################################################################################Using muliprocessing and wildcardspythonggen.py-r16,32,180x360-f"*bc*"-ind/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/-out/compyfs/hass877/e3sm_scratch/ggen_test-mpClick to view long log filelog.ggen output################################## Process Started ##################################[cmd]:pythonggen.py-r16,32,180x360-f*bc*-ind/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/-out/compyfs/hass877/e3sm_scratch/ggen_test-mp===driverinitdone===Specifyinginputfilesuppressesresolution.(RecommendedforSEtoRLLconversion)GeneratingRLLgridmetadata

CreatingSCRIPfileRLL384x576_SCRIP.ncin/compyfs/hass877/e3sm_scratch/ggen_test

Generated/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc

Generated/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc

Specifyinginputfilesuppressesresolution.(RecommendedforSEtoRLLconversion)/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.ncalreadyexists!Usingit.

Generated/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc

OutputResolution:16Generatingexodusmetadata

Generatingpg2metadata

CreatingSCRIPfilene16pg2_SCRIP.ncin/compyfs/hass877/e3sm_scratch/ggen_test

Generated/compyfs/hass877/e3sm_scratch/ggen_test/ne16pg2_SCRIP.nc

Generated/compyfs/hass877/e3sm_scratch/ggen_test/ne16pg2_SCRIP.nc

OutputResolution:32Generatingexodusmetadata

Generatingpg2metadata

CreatingSCRIPfilene32pg2_SCRIP.ncin/compyfs/hass877/e3sm_scratch/ggen_test

Generated/compyfs/hass877/e3sm_scratch/ggen_test/ne32pg2_SCRIP.nc

Generated/compyfs/hass877/e3sm_scratch/ggen_test/ne32pg2_SCRIP.nc

OutputResolution:180x360

GeneratingRLLgridmetadata

CreatingSCRIPfileRLL180x360_SCRIP.ncin/compyfs/hass877/e3sm_scratch/ggen_test

Generated/compyfs/hass877/e3sm_scratch/ggen_test/RLL180x360_SCRIP.nc

Generated/compyfs/hass877/e3sm_scratch/ggen_test/RLL180x360_SCRIP.nc===gen_scripsdone===InputSCRIP:/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc
OutputSCRIP:/compyfs/hass877/e3sm_scratch/ggen_test/ne16pg2_SCRIP.nc[cmd]:ncremap--alg_typ=fv2fv_flx--src_grd=/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc--dst_grd=/compyfs/hass877/e3sm_scratch/ggen_test/ne16pg2_SCRIP.nc--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.nc

Grid(src):/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc
Grid(dst):/compyfs/hass877/e3sm_scratch/ggen_test/ne16pg2_SCRIP.nc


Generatedmap_RLL384x576_ne16pg2.ncmappingfilein/compyfs/hass877/e3sm_scratch/ggen_test

InputSCRIP:/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc
OutputSCRIP:/compyfs/hass877/e3sm_scratch/ggen_test/ne32pg2_SCRIP.nc[cmd]:ncremap--alg_typ=fv2fv_flx--src_grd=/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc--dst_grd=/compyfs/hass877/e3sm_scratch/ggen_test/ne32pg2_SCRIP.nc--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.nc

Grid(src):/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc
Grid(dst):/compyfs/hass877/e3sm_scratch/ggen_test/ne32pg2_SCRIP.nc


Generatedmap_RLL384x576_ne32pg2.ncmappingfilein/compyfs/hass877/e3sm_scratch/ggen_test

InputSCRIP:/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc
OutputSCRIP:/compyfs/hass877/e3sm_scratch/ggen_test/RLL180x360_SCRIP.nc[cmd]:ncremap--alg_typ=fv2fv_flx--src_grd=/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc--dst_grd=/compyfs/hass877/e3sm_scratch/ggen_test/RLL180x360_SCRIP.nc--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.nc

Grid(src):/compyfs/hass877/e3sm_scratch/ggen_test/RLL384x576_SCRIP.nc
Grid(dst):/compyfs/hass877/e3sm_scratch/ggen_test/RLL180x360_SCRIP.nc


Generatedmap_RLL384x576_RLL180x360.ncmappingfilein/compyfs/hass877/e3sm_scratch/ggen_test===gen_weightsdone===Appliedmultiprocessing.

Appliedmultiprocessing.

Applying/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.ncon/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.nc[cmd]:ncremap--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.nc/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.nc/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_elev_1850-2014_c20191108_RLL384x576_ne16pg2.nc


Appliedmultiprocessing.

Applying/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.ncon/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.nc[cmd]:ncremap--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.nc/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.nc/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_surf_1850-2014_c20191108_RLL384x576_ne16pg2.nc


Appliedmultiprocessing.

Applying/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.ncon/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.nc[cmd]:ncremap--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.nc/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.nc/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_elev_1850-2014_c20191108_RLL384x576_ne32pg2.nc


Appliedmultiprocessing.

Applying/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.ncon/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.nc[cmd]:ncremap--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.nc/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.nc/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_surf_1850-2014_c20191108_RLL384x576_ne32pg2.nc


Appliedmultiprocessing.

Applying/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.ncon/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.nc[cmd]:ncremap--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.nc/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.nc/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_elev_1850-2014_c20191108_RLL384x576_RLL180x360.nc


Applying/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.ncon/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.nc[cmd]:ncremap--map=/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.nc/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.nc/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_surf_1850-2014_c20191108_RLL384x576_RLL180x360.nc

Input#00: /compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.ncMap/Wgt:/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.nc


Generatedremappedfile/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_surf_1850-2014_c20191108_RLL384x576_ne16pg2.nc===apply_weightsdone===Input#00: /compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.ncMap/Wgt:/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.nc


Generatedremappedfile/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_surf_1850-2014_c20191108_RLL384x576_ne32pg2.nc===apply_weightsdone===Input#00: /compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_surf_1850-2014_c20191108.ncMap/Wgt:/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.nc


Generatedremappedfile/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_surf_1850-2014_c20191108_RLL384x576_RLL180x360.nc===apply_weightsdone===Input#00: /compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.ncMap/Wgt:/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne16pg2.nc


Generatedremappedfile/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_elev_1850-2014_c20191108_RLL384x576_ne16pg2.nc===apply_weightsdone===Input#00: /compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.ncMap/Wgt:/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_ne32pg2.nc


Generatedremappedfile/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_elev_1850-2014_c20191108_RLL384x576_ne32pg2.nc===apply_weightsdone===Input#00: /compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/cmip6_mam4_bc_a4_elev_1850-2014_c20191108.ncMap/Wgt:/compyfs/hass877/e3sm_scratch/ggen_test/map_RLL384x576_RLL180x360.nc


Generatedremappedfile/compyfs/hass877/e3sm_scratch/ggen_test/cmip6_mam4_bc_a4_elev_1850-2014_c20191108_RLL384x576_RLL180x360.nc===apply_weightsdone======gen_remapped_filesdone===Finishedin348.79second(s)################################## Process Finished ########################################################################################################################Submit as a batch jobExample batch script#!/bin/bash -l#SBATCH --job-name=ggen#SBATCH --output=ggen.o%j#SBATCH --account=project#SBATCH --nodes=1#SBATCH --time=00:30:00#SBATCH --partition=shortsource/share/apps/E3SM/conda_envs/load_latest_e3sm_unified_compy.sh
pythonggen.py-r16,32,180x360-f"*bc*"-ind/compyfs/inputdata/atm/cam/chem/trop_mozart_aero/emis/DECK_ne120/-out/compyfs/hass877/e3sm_scratch/ggen_test-mpReferences[1]Ullrich, Paul A and Taylor, Mark A (2015).
Arbitrary-order conservative and consistent remapping and a theory of linear maps: Part I.
Monthly Weather Review, 143, 2419-2440.[2]Ullrich, Paul A and Devendran, Dharshi and Johansen, Hans (2016).
Arbitrary-order conservative and consistent remapping and a theory of linear maps: Part II.
Monthly Weather Review, 144, 1529-1549.[3]Zender, Charles S (2008).
Analysis of self-describing gridded geoscience data with netCDF Operators (NCO).
Environmental Modelling & Software, 23, 1338-1342