From a28db0f3624b53b0ecfa729234731b0e6826d54d Mon Sep 17 00:00:00 2001 From: Tracy Date: Mon, 17 Aug 2020 16:33:05 -0600 Subject: [PATCH 01/33] Add grib2 output tables for MRW/SRW to InputOutput documentation --- docs/InputsOutputs.rst | 23 ++-- docs/MRW_GFSPRS_table.csv | 188 ++++++++++++++++++++++++++++ docs/MRW_GFSPRS_table.rst | 11 ++ docs/SRW_BGDAWP_table.csv | 254 ++++++++++++++++++++++++++++++++++++++ docs/SRW_BGDAWP_table.rst | 11 ++ docs/SRW_BGRD3D_table.csv | 213 ++++++++++++++++++++++++++++++++ docs/SRW_BGRD3D_table.rst | 11 ++ 7 files changed, 703 insertions(+), 8 deletions(-) create mode 100644 docs/MRW_GFSPRS_table.csv create mode 100644 docs/MRW_GFSPRS_table.rst create mode 100644 docs/SRW_BGDAWP_table.csv create mode 100644 docs/SRW_BGDAWP_table.rst create mode 100644 docs/SRW_BGRD3D_table.csv create mode 100644 docs/SRW_BGRD3D_table.rst diff --git a/docs/InputsOutputs.rst b/docs/InputsOutputs.rst index 4e16c4590..f558d2473 100644 --- a/docs/InputsOutputs.rst +++ b/docs/InputsOutputs.rst @@ -46,8 +46,15 @@ The user interacts with unipost through the control file to define what fields a A default control file, *postxconfig-NT.txt*, is provided and read by unipost. For users wishing to customize the control file to add or remove fields and/or levels, they may do so by modyfying the postcntrl.xml and then remaking the text file required by unipost. -The `GRIB2 Output Table `_ lists basic and derived fields currently produced by unipost -for grib2. +The tables below list all fields that are included in the released versions of the various UFS applications. All fields in the tables may not be present in your output depending on whether the field dependencies are available in your model output. + +UFS MRW Table + - :doc:`MRW_GFSPRS_table` + +UFS SRW Tables + - :doc:`SRW_BGDAWP_table` + - :doc:`SRW_BGRD3D_table` + Controlling which variables unipost outputs ------------------------------------------- @@ -98,21 +105,21 @@ for output. The following levels are currently available for output: Creating the Flat Text File --------------------------- -For outputting GRIB2 format using version 4.0, a preprocessing step -is required by the user to convert the xml file +If the control file requires any modifications, a preprocessing step +will be required by the user to convert the modified xml file *parm/postcntrl.xml* to a flat text file -*parm/postxconfig-NT.txt*. The flat file is quicker to process -than the xml file. The user will first need to edit the +*parm/postxconfig-NT.txt*. The user will first need to edit the *postcntrl.xml* file to declare which fields are to be output from UPP. In order to ensure that the user-edited xml files are error free, XML stylesheets (*parm/EMC\_POST\_CTRL\_Schema.xsd* and -*EMC\_POST\_Avblflds\_Schema.xsd*) are used to validate both the +*EMC\_POST\_Avblflds\_Schema.xsd*) can be used to validate both the *postcntrl.xml* and *post\_avblflds.xml* files, respectively. Confirmation of validation will be given (e.g. postcntrl.xml validates) or otherwise return errors if it does not match the -schema. To run the validation: +schema. This step is optional, but acts as a safe-guard to avoid run-time +failures with UPP. To run the validation: *xmllint --noout --schema EMC\_POST\_CTRL\_Schema.xsd postcntrl.xml* diff --git a/docs/MRW_GFSPRS_table.csv b/docs/MRW_GFSPRS_table.csv new file mode 100644 index 000000000..db595d16d --- /dev/null +++ b/docs/MRW_GFSPRS_table.csv @@ -0,0 +1,188 @@ +No.,Field Description,Level Type,Short Name,nlvl +1,Height on pressure surface,isobaric,HGT,57 +2,Temperature on pressure surface,isobaric,TMP,57 +3,Specific humidity on pressure surface,isobaric,SPFH,57 +4,Relative humidity on pressure surface,isobaric,RH,57 +5,U component of wind on pressure surface,isobaric,UGRD,57 +6,V component of wind on pressure surface,isobaric,VGRD,57 +7,Vertical velocity on pressure surface,isobaric,DZDT,45 +8,Omega on pressure surface,isobaric,VVEL,45 +9,Absolute vorticity on pressure surface,isobaric,ABSV,57 +10,Ozone on pressure surface,isobaric,O3MR,32 +11,Cloud water mixing ratio on pressure surface,isobaric,CLWMR,39 +12,Cloud ice mixing ratio on pressure surface,isobaric,ICMR,39 +13,Rain mixing ratio on pressure surface,isobaric,RWMR,39 +14,Snow mixing ratio on pressure surface,isobaric,SNMR,39 +15,Graupel mixing ratio on pressure surface,isobaric,GRLE,39 +16,Composite radar reflectivity,entire atmosphere,REFC,1 +17,Mesinger (Membrane) sea level pressure,mean sea level,MSLET,1 +18,Shuell sea level pressure,mean sea level,PRES,1 +19,Temperature at 2m,height agl,TMP,1 +20,Specific humidity at 2m,height agl,SPFH,1 +21,Dew point temperature at 2m,height agl,DPT,1 +22,Relative humidity at 2m,height agl,RH,1 +23,U component of wind at 10m,height agl,UGRD,1 +24,V component of wind at 10m,height agl,VGRD,1 +25,Surface Pressure,surface,PRES,1 +26,Terrain height,surface,HGT,1 +27,Skin temperature,surface,TMP,1 +28,Soil temperature in between each soil layer,depth below land surface,TSOIL,4 +29,Soil moisture in between each soil layer,depth below land surface,SOILW,4 +30,Liquid soil moisture in between each soil layer,depth below land surface,SOILL,4 +31,Plant canopy surface water,surface,CNWAT,1 +32,Snow water equivalent,surface,WEASD,1 +33,Potential evaporation,surface,PEVPR,1 +34,Ice thickness,surface,ICETK,1 +35,Snow depth,surface,SNOD,1 +36,Wilting point,surface,WILT,1 +37,Field Capacity,surface,FLDCP,1 +38,Surface lifted index,surface,LFTX,1 +39,Best lifted index (4 layer),surface,4LFTX,1 +40,Parcel lifted index,pressure above ground,PLI,1 +41,Convective available potential energy,surface,CAPE,1 +42,Best cape,pressure above ground,CAPE,1 +43,Unstable cape,pressure above ground,CAPE,1 +44,Convective inhibition,surface,CIN,1 +45,Best cin,pressure above ground,CIN,1 +46,Unstable cin,pressure above ground,CIN,1 +47,Column integrated precipitable water,entire atmosphere,PWAT,1 +48,Helicity,height agl,HLCY,1 +49,U component storm motion,height agl,USTM,1 +50,V component storm motion,height agl,VSTM,1 +51,Accumulated total precipitation,surface,APCP,1 +52,Accumulated convective precipitation,surface,ACPCP,1 +53,Accumulated grid-scale precipitation,surface,NCPCP,1 +54,Continuous accumulated total precipitation,surface,APCP,1 +55,Continuous accumulated convective precipitation,surface,ACPCP,1 +56,Continuous accumulated grid-scale precipitation,surface,NCPCP,1 +57,Categorical rain (instantaneous),surface,CRAIN,1 +58,Categorical snow (instantaneous),surface,CSNOW,1 +59,Categorical ice pellets (instantaneous),surface,CICEP,1 +60,Categorical freezing rain (instantaneous),surface,CFRZR,1 +61,Categorical rain (average),surface,CRAIN,1 +62,Categorical snow (average),surface,CSNOW,1 +63,Categorical ice pellets (average),surface,CICEP,1 +64,Categorical freezing rain (average),surface,CFRZR,1 +65,Average precipitation rate,surface,PRATE,1 +66,Average convective precipitation rate,surface,CPRAT,1 +67,Average low cloud fraction,low cloud layer,TCDC,1 +68,Average mid cloud fraction,mid cloud layer,TCDC,1 +69,Average high cloud fraction,high cloud layer,TCDC,1 +70,Average total cloud fraction,entire atmosphere,TCDC,1 +71,Visibility,surface,VIS,1 +72,Average incoming surface shortwave radiation,surface,DSWRF,1 +73,Average clear sky incoming UV-B shortwave,surface,CDUVB,1 +74,Average incoming UV-B shortwave,surface,DUVB,1 +75,Average incoming surface longwave radiation,surface,DLWRF,1 +76,Average outgoing surface shortwave radiation,surface,USWRF,1 +77,Average outgoing surface longwave radiation,surface,ULWRF,1 +78,Average outgoing model top shortwave radiation,top of atmosphere,USWRF,1 +79,Average outgoing model top longwave radiation,top of atmosphere,ULWRF,1 +80,Total spectrum brightness temperature,top of atmosphere,BRTMP,1 +81,Roughness length,surface,SFCR,1 +82,Friction velocity,surface,FRICV,1 +83,Average surface sensible heat flux,surface,SHTFL,1 +84,Average ground heat flux,surface,GFLUX,1 +85,Average surface latent heat flux,surface,LHTFL,1 +86,Average surface zonal momentum flux,surface,UFLX,1 +87,Average surface meridional momentum flux,surface,VFLX,1 +88,Land sea mask (land=1 sea=0),surface,LAND,1 +89,Sea ice mask,surface,ICEC,1 +90,Average albedo,surface,ALBDO,1 +91,Pressure at tropopause,tropopause,PRES,1 +92,Height at tropopause,tropopause,HGT,1 +93,Temperature at tropopause,tropopause,TMP,1 +94,U component of wind at tropopause,tropopause,UGRD,1 +95,V component of wind at tropopause,tropopause,VGRD,1 +96,Wind shear at tropopause,tropopause,VWSH,1 +97,Temperature at flight levels,height msl,TMP,8 +98,U component of wind at flight levels,height msl,UGRD,8 +99,V component of wind at flight levels,height msl,VGRD,8 +100,Temperature at flight levels,height agl,TMP,2 +101,U component of wind at flight levels,height agl,UGRD,6 +102,V component of wind at flight levels,height agl,VGRD,6 +103,Pressure at flight levels,height agl,PRES,1 +104,Specific humidity at flight levels,height agl,SPFH,1 +105,Freezing level height,0 degree isotherm,HGT,1 +106,Freezing level relative humidity,0 degree isotherm,RH,1 +107,Highest freezing level height,highest tropospheric frz lvl,HGT,1 +108,Highest freezing level relative humidity,highest tropospheric frz lvl,RH,1 +109,Temperature in layer between pressure levels,pressure layer agl,TMP,6 +110,Dew point temperature in layer between pressure levels,pressure layer agl,DPT,1 +111,Specific humidity in layer between pressure levels,pressure layer agl,SPFH,6 +112,Relative humidity in layer between pressure levels,pressure layer agl,RH,6 +113,Precipitable water in layer between pressure levels,pressure layer agl,PWAT,1 +114,U component of wind in layer between pressure levels,pressure layer agl,UGRD,6 +115,V component of wind in layer between pressure levels,pressure layer agl,VGRD,6 +116,Relative humidity on sigma level 0.33-1.0,sigma level,RH,1 +117,Relative humidity on sigma level 0.44-1.0,sigma level,RH,1 +118,Relative humidity on sigma level 0.72-0.94,sigma level,RH,1 +119,Relative humidity on sigma level 0.44-0.72,sigma level,RH,1 +120,Temperature on sigma level 0.9950,sigma level,TMP,1 +121,Potential temperature on sigma level 0.9950,sigma level,POT,1 +122,Relative humidity on sigma level 0.9950,sigma level,RH,1 +123,U component of wind on sigma level 0.9950,sigma level,UGRD,1 +124,V component of wind on sigma level 0.9950,sigma level,VGRD,1 +125,Omega on sigma level 0.9950,sigma level,VVEL,1 +126,Maximum wind pressure level,max wind,PRES,1 +127,Maximum wind height,max wind,HGT,1 +128,U component of maximum wind,max wind,UGRD,1 +129,V component of maximum wind,max wind,VGRD,1 +130,Temperature at maximum wind level,max wind,TMP,1 +131,Planetary boundary layer height,surface,HPBL,1 +132,Convective cloud bottom pressure,convective cloud bottom,PRES,1 +133,Convective cloud top pressure,convective cloud top,PRES,1 +134,Average low cloud bottom pressure,low cloud bottom,PRES,1 +135,Average mid cloud bottom pressure,mid cloud bottom,PRES,1 +136,Average high cloud bottom pressure,high cloud bottom,PRES,1 +137,Average low cloud top pressure,low cloud top,PRES,1 +138,Average mid cloud top pressure,mid cloud top,PRES,1 +139,Average high cloud top pressure,high cloud top,PRES,1 +140,Average low cloud top temperature,low cloud top,TMP,1 +141,Average mid cloud top temperature,mid cloud top,TMP,1 +142,Average high cloud top temperature,high cloud top,TMP,1 +143,Total cloud fraction on convective cloud layer,entire atmosphere,TCDC,1 +144,Column integrated cloud water,entire atmosphere,CWAT,1 +145,Total column relative humidity,entire atmosphere,RH,1 +146,Total column ozone,entire atmosphere,TOZNE,1 +147,Surface wind gust,surface,GUST,1 +148,LCL level pressure,pressure layer agl,PLPL,1 +149,Cloud fraction on pressure surface,isobaric,TCDC,39 +150,U component of wind on theta surface,isentropic,UGRD,1 +151,V component of wind on theta surface,isentropic,VGRD,1 +152,Temperature on theta surface,isentropic,TMP,1 +153,Potential vorticity on theta surface,isentropic,PVORT,1 +154,Montgomery stream function on theta surface,isentropic,MNTSF,1 +155,U component of wind on constant PV surface,potential vorticity surface,UGRD,8 +156,V component of wind on constant PV surface,potential vorticity surface,VGRD,8 +157,Temperature on constant PV surface,potential vorticity surface,TMP,8 +158,Height on constant PV surface,potential vorticity surface,HGT,8 +159,Pressure on constant PV surface,potential vorticity surface,PRES,8 +160,Wind shear on constant PV surface,potential vorticity surface,VWSH,8 +161,Average planetary boundary layer cloud fraction,boundary layer cloud layer,TCDC,1 +162,Cloud work function,entire atmosphere,CWORK,1 +163,Average zonal gravity wave stress,surface,U-GWD,1 +164,Average meridional gravity wave stress,surface,V-GWD,1 +165,Average water runoff,surface,WATR,1 +166,Maximum 2m temperature,height agl,TMAX,1 +167,Minimum 2m temperature,height agl,TMIN,1 +168,ICAO height at maximum wind level,max wind,ICAHT,1 +169,ICAO height at tropopause,tropopause,ICAHT,1 +170,Sunshine duration,surface,SUNSD,1 +171,Transport u component of wind,planetary boundary layer,UGRD,1 +172,Transport v component of wind,planetary boundary layer,VGRD,1 +173,Ventilation rate,planetary boundary layer,VRATE,1 +174,Haines index,surface,HINDEX,1 +175,Fraction of frozen precipitation,surface,CPOFP,1 +176,Apparent temperature at 2m,height agl,APTMP,1 +177,Instantaneous precipitation rate,surface,PRATE,1 +178,Convective precipitation rate,surface,CPRAT,1 +179,Snow mixing ratio on model surface,hybrid,SNMR,1 +180,Rain mixing ratio on model surface,hybrid,RWMR,1 +181,Cloud water mixing ratio on model surface,hybrid,CLWMR,1 +182,Cloud ice mixing ratio on model surface,hybrid,ICMR,1 +183,Graupel mixing ratio on model surface,hybrid,GRLE,1 +184,Ice growth rate,height msl,ICEG,1 +185,Soil type,surface,SOTYP,1 +186,Vegetation cover,surface,VEG,1 +187,Sea ice skin temperature,surface,ICETMP,1 diff --git a/docs/MRW_GFSPRS_table.rst b/docs/MRW_GFSPRS_table.rst new file mode 100644 index 000000000..a667226bf --- /dev/null +++ b/docs/MRW_GFSPRS_table.rst @@ -0,0 +1,11 @@ +*************************************************** +Fields Requested in the UPP Parameter Table for MRW +*************************************************** + +Field description (column 1), level type as defined by WMO (column 2), abbreviated names +as they appear in the Grib2 output file (column 3), and number of levels output (column 4). + +.. csv-table:: + :file: MRW_GFSPRS_table.csv + :widths: 5, 40, 30, 15, 10 + :header-rows: 1 diff --git a/docs/SRW_BGDAWP_table.csv b/docs/SRW_BGDAWP_table.csv new file mode 100644 index 000000000..00ae6d370 --- /dev/null +++ b/docs/SRW_BGDAWP_table.csv @@ -0,0 +1,254 @@ +No.,Field Description,Level Type,Short Name,nlvl +1,Pressure on model surface,hybrid,PRES,2 +2,Height on model surface,hybrid,HGT,2 +3,Temperature on model surface,hybrid,TMP,2 +4,Potential temperature on model surface,hybrid,POT,2 +5,Dew point temperature on model surface,hybrid,DPT,2 +6,Specific humidity on model surface,hybrid,SPFH,1 +7,Relative humidity on model surface,hybrid,RH,1 +8,U component of wind on model surface,hybrid,UGRD,2 +9,V component of wind on model surface,hybrid,VGRD,2 +10,Omega on model surface,hybrid,VVEL,1 +11,Vertical velocity on model surface,hybrid,DZDT,1 +12,Turbulent kinetic energy on model surface,hybrid,TKE,2 +13,Rain mixing ratio on model surface,hybrid,RWMR,2 +14,Snow mixing ratio on model surface,hybrid,SNMR,2 +15,Rimming factor for Ferrier scheme on model surface,hybrid,RIME,2 +16,Total condensate for Ferrier scheme on mode surface,hybrid,TCOND,2 +17,Radar reflectivity on model surface,hybrid,REFD,2 +18,Master length scale on model surface,hybrid,BMIXL,1 +19,Height on pressure surface,isobaric,HGT,46 +20,Temperature on pressure surface,isobaric,TMP,46 +21,Dew point temperature on pressure surface,isobaric,DPT,46 +22,Specific humidity on pressure surface,isobaric,SPFH,46 +23,Relative humidity on pressure surface,isobaric,RH,46 +24,Moisture convergence on pressure surface,isobaric,MCONV,2 +25,U component of wind on pressure surface,isobaric,UGRD,46 +26,V component of wind on pressure surface,isobaric,VGRD,46 +27,Vertical velocity on pressure surface,isobaric,DZDT,46 +28,Omega on pressure surface,isobaric,VVEL,46 +29,Absolute vorticity on pressure surface,isobaric,ABSV,10 +30,Geostrophic streamfunction on pressure surface,isobaric,STRM,2 +31,Turbulent kinetic energy on pressure surface,isobaric,TKE,46 +32,Cloud ice mixing ratio on pressure surface,isobaric,ICMR,46 +33,Cloud water mixing ratio on pressure surface,isobaric,CLWMR,46 +34,Rain mixing ratio on pressure surface,isobaric,RWMR,46 +35,Snow mixing ratio on pressure surface,isobaric,SNMR,46 +36,Rimming factor for Ferrier scheme on pressure surface,isobaric,RIME,46 +37,Mesinger (Membrane) sea level pressure,mean sea level,MSLET,1 +38,Shuell sea level pressure,mean sea level,PRES,1 +39,Temperature at 2m,height agl,TMP,1 +40,Specific humidity at 2m,height agl,SPFH,1 +41,Dew point temperature at 2m,height agl,DPT,1 +42,Relative humidity at 2m,height agl,RH,1 +43,U component of wind at 10m,height agl,UGRD,1 +44,V component of wind at 10m,height agl,VGRD,1 +45,Surface wind gust,surface,GUST,1 +46,LCL level pressure,pressure layer agl,PLPL,1 +47,Potential temperature at 10m,height agl,POT,1 +48,Specific humidity at 10m,height agl,SPFH,1 +49,Surface Pressure,surface,PRES,1 +50,Terrain height,surface,HGT,1 +51,Skin potential temperature,surface,POT,1 +52,Skin specific humidity,surface,SPFH,1 +53,Skin temperature,surface,TMP,1 +54,Soil temperature at 3m,depth below land surface,TSOIL,1 +55,Soil temperature in between each soil layer,depth below land surface,TSOIL,4 +56,Soil moisture in between each soil layer,depth below land surface,SOILW,4 +57,Liquid soil moisture in between each soil layer,depth below land surface,SOILL,4 +58,Total soil moisture,depth below land surface,SOILM,1 +59,Plant canopy surface water,surface,CNWAT,1 +60,Snow water equivalent,surface,WEASD,1 +61,Snow cover in percentage,surface,SNOWC,1 +62,Heat exchange coeff at surface,surface,SFEXC,1 +63,Vegetation cover,surface,VEG,1 +64,Vegetation type,surface,VGTYP,1 +65,Soil type,surface,SOTYP,1 +66,Snow free albedo,surface,SNFALB,1 +67,Maximum snow albedo,surface,MXSALB,1 +68,Canopy conductance,surface,CCOND,1 +69,Canopy conductance - solar component,surface,RCS,1 +70,Canopy conductance - temperature component,surface,RCT,1 +71,Canopy conductance - humidity component,surface,RCQ,1 +72,Canopy conductance - soil component,surface,RCSOL,1 +73,Soil moist reference,surface,SMREF,1 +74,Soil moist porosity,surface,POROS,1 +75,Number of root layers,surface,RLYRS,1 +76,Minimum stomatal resistance,surface,RSMIN,1 +77,Snow depth,surface,SNOD,1 +78,Air dry soil moisture,surface,SMDRY,1 +79,Soil moist wilting point,surface,WILT,1 +80,Soil moisture availability,depth below land surface,MSTAV,1 +81,Ground heat flux (instantaneous),surface,GFLUX,1 +82,Lifted index—surface based (500-1000 hPa),isobaric,LFTX,1 +83,Lifted index—best,pressure above ground,4LFTX,1 +84,Lifted index—parcel,pressure above ground,PLI,1 +85,Convective available potential energy,surface,CAPE,1 +86,Best cape,pressure above ground,CAPE,1 +87,Mixed layer cape,pressure above ground,CAPE,1 +88,Unstable cape,pressure above ground,CAPE,1 +89,Convective inhibition,surface,CIN,1 +90,Best cin,pressure above ground,CIN,1 +91,Mixed layer cin,pressure above ground,CIN,1 +92,Unstable cin,pressure above ground,CIN,1 +93,Column integrated precipitable water,entire atmosphere,PWAT,1 +94,Helicity,height agl,HLCY,2 +95,U component storm motion,height agl,USTM,1 +96,V component storm motion,height agl,VSTM,1 +97,Accumulated total precipitation,surface,APCP,1 +98,Accumulated grid-scale precipitation,surface,NCPCP,1 +99,Accumulated snowfall,surface,WEASD,1 +100,Accumulated total snow melt,surface,SNOM,1 +101,Accumulated storm surface runoff,surface,SSRUN,1 +102,Accumulated base flow runoff,surface,BGRUN,1 +103,Average water runoff,surface,WATR,1 +104,Categorical rain (instantaneous),surface,CRAIN,1 +105,Categorical snow (instantaneous),surface,CSNOW,1 +106,Categorical ice pellets (instantaneous),surface,CICEP,1 +107,Categorical freezing rain (instantaneous),surface,CFRZR,1 +108,Precipitation rate (instantaneous),surface,PRATE,1 +109,Fraction of frozen precipitation,surface,CPOFP,1 +110,Cloud water mixing ratio on model surface,hybrid,CLWMR,2 +111,Cloud ice mixing ratio on model surface,hybrid,ICMR,2 +112,Graupel mixing ratio on model surface,hybrid,GRLE,1 +113,Cloud fraction on model surface,hybrid,TCDC,2 +114,Low level cloud fraction,low cloud layer,LCDC,1 +115,Mid level cloud fraction,mid cloud layer,MCDC,1 +116,High level cloud fraction,high cloud layer,HCDC,1 +117,Total cloud fraction,entire atmosphere,TCDC,1 +118,Total cloud fraction (time-averaged),entire atmosphere,TCDC,1 +119,stratospheric cloud fraction (time-averaged),entire atmosphere,CDLYR,1 +120,Visibility,surface,VIS,1 +121,GSD visibility,cloud top,VIS,1 +122,Above-ground height of LCL,adiabatic condensation from surface,HGT,1 +123,Pressure of LCL,adiabatic condensation from surface,PRES,1 +124,Outgoing surface shortwave radiation (instantaneous),surface,USWRF,1 +125,Outgoing surface longwave radiation (instantaneous),surface,ULWRF,1 +126,Incoming surface shortwave radiation (time-averaged),surface,DSWRF,1 +127,Incoming surface longwave radiation (time-averaged),surface,DLWRF,1 +128,Outgoing surface shortwave radiation (time-averaged),surface,USWRF,1 +129,Outgoing surface longwave radiation (time-averaged),surface,ULWRF,1 +130,Outgoing model top shortwave radiation (time-averaged),top of atmosphere,USWRF,1 +131,Outgoing model top longwave radiation (time-averaged),top of atmosphere,ULWRF,1 +132,Outgoing longwave at top of atmosphere (instantaneous),top of atmosphere,ULWRF,1 +133,Total spectrum brightness temperature,top of atmosphere,BRTMP,1 +134,Incoming surface shortwave radiation (instantaneous),surface,DSWRF,1 +135,Incoming surface longwave radiation (instantaneous),surface,DLWRF,1 +136,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 +137,Roughness length,surface,SFCR,1 +138,Friction velocity,surface,FRICV,1 +139,Surface drag coefficient,surface,CD,1 +140,Surface u wind stress,surface,UFLX,1 +141,Surface v wind stress,surface,VFLX,1 +142,Surface sensible heat flux (time-averaged),surface,SHTFL,1 +143,Ground heat flux (time-averaged),surface,GFLUX,1 +144,Snow phase change heat flux (time-averaged),surface,SNOHF,1 +145,Surface latent heat flux (time-averaged),surface,LHTFL,1 +146,Accumulated surface evaporation,surface,EVP,1 +147,Accumulated potential evaporation,surface,PEVAP,1 +148,Surface sensible heat flux (instantaneous),surface,SHTFL,1 +149,Surface latent heat flux (instantaneous),surface,LHTFL,1 +150,Latitude,surface,NLAT,1 +151,Longitude,surface,ELON,1 +152,Land sea mask (land=1 sea=0),surface,LAND,1 +153,Sea ice mask,surface,ICEC,1 +154,Surface albedo,surface,ALBDO,1 +155,Sea surface temperature,surface,WTMP,1 +156,Pressure at tropopause,tropopause,PRES,1 +157,Height at tropopause,tropopause,HGT,1 +158,Temperature at tropopause,tropopause,TMP,1 +159,Potential temperature at tropopause,tropopause,POT,1 +160,U component of wind at tropopause,tropopause,UGRD,1 +161,V component of wind at tropopause,tropopause,VGRD,1 +162,Wind shear at tropopause,tropopause,VWSH,1 +163,U component of 0-6km level wind shear,height agl,VUCSH,1 +164,V-component of 0-6km level wind shear,height agl,VVCSH,1 +165,Temperature at flight levels,height msl,TMP,10 +166,Temperature at flight levels,height agl,TMP,4 +167,U component of wind at flight levels,height msl,UGRD,10 +168,U component of wind at flight levels,height agl,UGRD,4 +169,V component of wind at flight levels,height msl,VGRD,10 +170,V component of wind at flight levels,height agl,VGRD,4 +171,Specific humidity at flight levels,height msl,SPFH,1 +172,Specific humidity at flight levels,height agl,SPFH,4 +173,Pressure at flight levels,height agl,PRES,4 +174,Freezing level height,0 degree isotherm,HGT,1 +175,Freezing level relative humidity,0 degree isotherm,RH,1 +176,Highest freezing level height,highest tropospheric frz lvl,HGT,1 +177,Lowest wet bulb zero height,lowest lvl wet bulb zero,HGT,1 +178,Pressure in boundary layer (30 mb means),pressure agl,PRES,6 +179,Temperature in boundary layer (30 mb means),pressure agl,TMP,6 +180,Potential temperature in boundary layer (30 mb means),pressure agl,POT,1 +181,Dew point temperature in boundary layer (30 mb means),pressure agl,DPT,1 +182,Specific humidity in boundary layer (30 mb means),pressure agl,SPFH,6 +183,RH in boundary layer (30 mb means),pressure agl,RH,6 +184,Moisture convergence in boundary layer (30 mb means),pressure agl,MCONV,1 +185,Precipitable water in boundary layer (30 mb means),pressure agl,PWAT,1 +186,U wind in boundary layer (30 mb means),pressure agl,UGRD,6 +187,V wind in boundary layer (30 mb means),pressure agl,VGRD,6 +188,Omega in boundary layer (30 mb means),pressure agl,VVEL,3 +189,Cloud bottom pressure,cloud base,PRES,1 +190,Cloud top pressure,cloud top,PRES,1 +191,Cloud top temperature,cloud top,TMP,1 +192,Cloud bottom height (above MSL),cloud base,HGT,1 +193,Cloud top height (above MSL),cloud top,HGT,1 +194,Maximum wind pressure level,max wind,PRES,1 +195,Maximum wind height,max wind,HGT,1 +196,U-component of maximum wind,max wind,UGRD,1 +197,V-component of maximum wind,max wind,VGRD,1 +198,Composite radar reflectivity,entire atmosphere,REFC,1 +199,Composite rain radar reflectivity,entire atmosphere,REFZR,1 +200,Composite ice radar reflectivity,entire atmosphere,REFZI,1 +201,Radar reflectivity at certain above ground heights,height agl,REFD,2 +202,Radar reflectivity from rain,height agl,REFZR,2 +203,Radar reflectivity from ice,height agl,REFZI,2 +204,Planetary boundary layer height,surface,HPBL,1 +205,Grid scale cloud bottom pressure,grid scale cloud bottom,PRES,1 +206,Grid scale cloud top pressure,grid scale cloud top,PRES,1 +207,Column integrated cloud water,entire atmosphere,TCOLW,1 +208,Column integrated cloud ice,entire atmosphere,TCOLI,1 +209,Column integrated rain,entire atmosphere,TCOLR,1 +210,Column integrated snow,entire atmosphere,TCOLS,1 +211,Column integrated total condensate,entire atmosphere,TCOLC,1 +212,Column integrated super cool liquid water,entire atmosphere,TCLSW,1 +213,Column integrated melting ice,entire atmosphere,TCOLM,1 +214,Height of lowest level super cool liquid water,lwst bot lvl of supercooled liq wtr,HGT,1 +215,Height of highest level super cool liquid water,hghst top lvl of supercooled liq wtr,HGT,1 +216,Ceiling height,cloud ceiling,HGT,1 +217,Accumulated land surface model precipitation,surface,LSPA,1 +218,Model top pressure,top of atmosphere,PRES,1 +219,Total column shortwave temperature tendency,entire atmosphere,SWHR,1 +220,Total column longwave temperature tendency,entire atmosphere,LWHR,1 +221,Total column gridded temperature tendency,entire atmosphere,LRGHR,1 +222,Column integrated moisture convergence,entire atmosphere,MCONV,1 +223,Temperature on sigma levels,sigma level,TMP,5 +224,Planetary boundary layer regime,surface,PBLREG,1 +225,Transport wind u component,planetary boundary layer,UGRD,1 +226,Transport wind v component,planetary boundary layer,VGRD,1 +227,Richardson number planetary boundary layer height,planetary boundary layer,HGT,1 +228,Mixing height,surface,MIXHT,1 +229,Radar echo top,entire atmosphere,RETOP,1 +230,Ventilation rate,planetary boundary layer,VRATE,1 +231,Haines index,surface,HINDEX,1 +232,Maximum 2m temperature,height agl,TMAX,1 +233,Minimum 2m temperature,height agl,TMIN,1 +234,Maximum 2m RH,height agl,MAXRH,1 +235,Minimum 2m RH,height agl,MINRH,1 +236,Maximum U-component wind at 10m,height agl,MAXUW,1 +237,Maximum V-component wind at 10m,height agl,MAXVW,1 +238,Maximum wind speed at 10m,height agl,WIND,1 +239,Maximum 1km reflectivity,height agl,MAXREF,1 +240,Maximum updraft vertical velocity,isobaric layer,MAXUVV,1 +241,Maximum downdraft vertical velocity,isobaric layer,MAXDVV,1 +242,Lightning,surface,LTNG,1 +243,Radar derived vertically integrated liquid,entire atmosphere,VIL,1 +244,Updraft helicity (2-5 km),height agl,UPHL,1 +245,Maximum updraft helicity (2-5 km),height agl,MXUPHL,1 +246,Minimum updraft helicity (2-5 km),height agl,MNUPHL,1 +247,Minimum updraft helicity (0-3 km),height agl,MNUPHL,1 +248,Maximum updraft helicity (0-3 km),height agl,MXUPHL,1 +249,Maximum relative vertical vorticity (0-1 km),height agl,RELV,1 +250,Maximum relative vertical vorticity at hybrid level 1,hybrid,RELV,1 +251,Maximum relative vertical vorticity (0-2 km),height agl,RELV,1 +252,Maximum derived radar reflectivity at -10 C,isothermal,MAXREF,1 +253,Radar reflectivity at -10 C,isothermal,REFD,1 \ No newline at end of file diff --git a/docs/SRW_BGDAWP_table.rst b/docs/SRW_BGDAWP_table.rst new file mode 100644 index 000000000..f578bd310 --- /dev/null +++ b/docs/SRW_BGDAWP_table.rst @@ -0,0 +1,11 @@ +********************************************************** +Fields Requested in the UPP Parameter Table for SRW BGDAWP +********************************************************** + +Field description (column 1), level type as defined by WMO (column 2), abbreviated names +as they appear in the Grib2 output file (column 3), and number of levels output (column 4). + +.. csv-table:: + :file: SRW_BGDAWP_table.csv + :widths: 5, 40, 30, 15, 10 + :header-rows: 1 diff --git a/docs/SRW_BGRD3D_table.csv b/docs/SRW_BGRD3D_table.csv new file mode 100644 index 000000000..ac12f6b85 --- /dev/null +++ b/docs/SRW_BGRD3D_table.csv @@ -0,0 +1,213 @@ +No.,Field Description,Level Type,Short Name,nlvl +1,Height on pressure surface,isobaric,HGT,4 +2,Temperature on pressure surface,isobaric,TMP,5 +3,Relative humidity on pressure surface,isobaric,RH,4 +4,U component of wind on pressure surface,isobaric,UGRD,4 +5,V component of wind on pressure surface,isobaric,VGRD,4 +6,Omega on pressure surface,isobaric,VVEL,4 +7,Specific humidity on pressure surface,isobaric,SPFH,4 +8,Absolute vorticity on pressure surface,isobaric,ABSV,4 +9,Pressure on model surface,hybrid,PRES,64 +10,Height on model surface,hybrid,HGT,64 +11,Temperature on model surface,hybrid,TMP,64 +12,Specific humidity on model surface,hybrid,SPFH,64 +13,U component of wind on model surface,hybrid,UGRD,64 +14,V component of wind on model surface,hybrid,VGRD,64 +15,Omega on model surface,hybrid,VVEL,64 +16,Vertical velocity on model surface,hybrid,DZDT,64 +17,Turbulent kinetic energy on model surface,hybrid,TKE,64 +18,Temperature tendency from grid scale latent heat release (time-averaged),hybrid,LRGHR,64 +19,Mesinger (Membrane) sea level pressure,mean sea level,MSLET,1 +20,Shuell sea level pressure,mean sea level,PRES,1 +21,Temperature at 2m,height agl,TMP,1 +22,Specific humidity at 2m,height agl,SPFH,1 +23,Dew point temperature at 2m,height agl,DPT,1 +24,Relative humidity at 2m,height agl,RH,1 +25,U component of wind at 10m,height agl,UGRD,1 +26,V component of wind at 10m,height agl,VGRD,1 +27,Potential temperature at 10m,height agl,POT,1 +28,Specific humidity at 10m,height agl,SPFH,1 +29,Surface Pressure,surface,PRES,1 +30,Terrain height,surface,HGT,1 +31,Skin potential temperature,surface,POT,1 +32,Skin specific humidity,surface,SPFH,1 +33,Skin temperature,surface,TMP,1 +34,Maximum updraft vertical velocity (10-100 hPa),isobaric,MAXUVV,1 +35,Maximum downdraft vertical velocity (10-100 hPa),isobaric,MAXDVV,1 +36,Maximum updraft helicity (0-3 km),height agl,MXUPHL,1 +37,Maximum updraft helicity (2-5 km),height agl,MXUPHL,1 +38,Minimum updraft helicity (2-5 km),height agl,MNUPHL,1 +39,Minimum updraft helicity (0-3 km),height agl,MNUPHL,1 +40,Maximum relative vertical vorticity (0-1 km),height agl,RELV,1 +41,Maximum relative vertical vorticity at hybrid level 1,hybrid,RELV,1 +42,Maximum relative vertical vorticity (0-2 km),height agl,RELV,1 +43,Maximum U-component wind at 10m,height agl,MAXUW,1 +44,Maximum V-component wind at 10m,height agl,MAXVW,1 +45,Maximum derived radar reflectivity at 1 km,height agl,MAXREF,1 +46,Maximum derived radar reflectivity at -10 C,isothermal,MAXREF,1 +47,Radar reflectivity at -10 C,isothermal,REFD,1 +48,Maximum 2m temperature,height agl,TMAX,1 +49,Minimum 2m temperature,height agl,TMIN,1 +50,Maximum 2m RH,height agl,MAXRH,1 +51,Minimum 2m RH,height agl,MINRH,1 +52,Soil temperature in between each soil layer,depth below land surface,TSOIL,4 +53,Soil moisture in between each soil layer,depth below land surface,SOILW,4 +54,Total soil moisture,depth below land surface,SOILM,1 +55,Heat exchange coeff at surface,surface,SFEXC,1 +56,Vegetation cover,surface,VEG,1 +57,Soil moisture availability,depth below land surface,MSTAV,1 +58,Soil temperature at 3m,depth below land surface,TSOIL,1 +59,Ground heat flux (instantaneous),surface,GFLUX,1 +60,Plant canopy surface water,surface,CNWAT,1 +61,Snow water equivalent,surface,WEASD,1 +62,Lifted index—best,pressure above ground,4LFTX,1 +63,Column integrated precipitable water,entire atmosphere,PWAT,1 +64,Accumulated total precipitation,surface,APCP,1 +65,Accumulated grid-scale precipitation,surface,NCPCP,1 +66,Accumulated snowfall,surface,WEASD,1 +67,Accumulated total snow melt,surface,SNOM,1 +68,Accumulated storm surface runoff,surface,SSRUN,1 +69,Accumulated base flow runoff,surface,BGRUN,1 +70,Categorical rain (instantaneous),surface,CRAIN,1 +71,Categorical snow (instantaneous),surface,CSNOW,1 +72,Categorical ice pellets (instantaneous),surface,CICEP,1 +73,Categorical freezing rain (instantaneous),surface,CFRZR,1 +74,Precipitation rate (instantaneous),surface,PRATE,1 +75,Fraction of frozen precipitation,surface,CPOFP,1 +76,Cloud water mixing ratio on model surface,hybrid,CLWMR,64 +77,Cloud ice mixing ratio on model surface,hybrid,ICMR,64 +78,Cloud fraction on model surface,hybrid,TCDC,64 +79,Rain mixing ratio on model surface,hybrid,RWMR,64 +80,Snow mixing ratio on model surface,hybrid,SNMR,64 +81,Rimming factor for Ferrier scheme on model surface,hybrid,RIME,64 +82,Total condensate for Ferrier scheme on mode surface,hybrid,TCOND,64 +83,Model level fraction of rain for Ferrier scheme,hybrid,FRAIN,64 +84,Model level fraction of ice for Ferrier scheme,hybrid,FICE,64 +85,Low level cloud fraction,low cloud layer,LCDC,1 +86,Mid level cloud fraction,mid cloud layer,MCDC,1 +87,High level cloud fraction,high cloud layer,HCDC,1 +88,Total cloud fraction,entire atmosphere,TCDC,1 +89,Total cloud fraction (time-averaged),entire atmosphere,TCDC,1 +90,stratospheric cloud fraction (time-averaged),entire atmosphere,CDLYR,1 +91,Outgoing surface shortwave radiation (instantaneous),surface,USWRF,1 +92,Outgoing surface longwave radiation (instantaneous),surface,ULWRF,1 +93,Incoming surface shortwave radiation (time-averaged),surface,DSWRF,1 +94,Incoming surface longwave radiation (time-averaged),surface,DLWRF,1 +95,Outgoing surface shortwave radiation (time-averaged),surface,USWRF,1 +96,Outgoing surface longwave radiation (time-averaged),surface,ULWRF,1 +97,Outgoing model top shortwave radiation (time-averaged),top of atmosphere,USWRF,1 +98,Outgoing model top longwave radiation (time-averaged),top of atmosphere,ULWRF,1 +99,Incoming surface shortwave radiation (instantaneous),surface,DSWRF,1 +100,Incoming surface longwave radiation (instantaneous),surface,DLWRF,1 +101,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 +102,Roughness length,surface,SFCR,1 +103,Friction velocity,surface,FRICV,1 +104,Surface drag coefficient,surface,CD,1 +105,Surface u wind stress,surface,UFLX,1 +106,Surface v wind stress,surface,VFLX,1 +107,Surface sensible heat flux (time-averaged),surface,SHTFL,1 +108,Ground heat flux (time-averaged),surface,GFLUX,1 +109,Snow phase change heat flux (time-averaged),surface,SNOHF,1 +110,Surface latent heat flux (time-averaged),surface,LHTFL,1 +111,Accumulated surface evaporation,surface,EVP,1 +112,Accumulated potential evaporation,surface,PEVAP,1 +113,Surface sensible heat flux (instantaneous),surface,SHTFL,1 +114,Surface latent heat flux (instantaneous),surface,LHTFL,1 +115,Latitude,surface,NLAT,1 +116,Longitude,surface,ELON,1 +117,Land sea mask (land=1 sea=0),surface,LAND,1 +118,Sea ice mask,surface,ICEC,1 +119,Mass point at eta surface mask,surface,LMH,1 +120,Velocity point at eta surface mask,surface,LMV,1 +121,Surface albedo,surface,ALBDO,1 +122,Sea surface temperature,surface,WTMP,1 +123,Pressure in boundary layer (30 mb means),pressure agl,PRES,6 +124,Temperature in boundary layer (30 mb means),pressure agl,TMP,6 +125,Potential temperature in boundary layer (30 mb means),pressure agl,POT,1 +126,Dew point temperature in boundary layer (30 mb means),pressure agl,DPT,1 +127,Specific humidity in boundary layer (30 mb means),pressure agl,SPFH,6 +128,RH in boundary layer (30 mb means),pressure agl,RH,6 +129,Moisture convergence in boundary layer (30 mb means),pressure agl,MCONV,1 +130,Precipitable water in boundary layer (30 mb means),pressure agl,PWAT,1 +131,U wind in boundary layer (30 mb means),pressure agl,UGRD,6 +132,V wind in boundary layer (30 mb means),pressure agl,VGRD,6 +133,Accumulated land surface model precipitation,surface,LSPA,1 +134,Model top pressure,top of atmosphere,PRES,1 +135,Pressure thickness,hybrid,PRES,1 +136,Sigma pressure thickness,hybrid,PRES,1 +137,Plant canopy surface water,surface,CNWAT,1 +138,Ground heat flux (instantaneous),surface,GFLUX,1 +139,Lifted index—surface based (500-1000 hPa),isobaric,LFTX,1 +140,Convective available potential energy,surface,CAPE,1 +141,Best cape,pressure above ground,CAPE,1 +142,Mixed layer cape,pressure above ground,CAPE,1 +143,Unstable cape,pressure above ground,CAPE,1 +144,Convective inhibition,surface,CIN,1 +145,Best cin,pressure above ground,CIN,1 +146,Mixed layer cin,pressure above ground,CIN,1 +147,Unstable cin,pressure above ground,CIN,1 +148,LCL level pressure,pressure layer agl,PLPL,1 +149,Helicity,height agl,HLCY,2 +150,U component storm motion,height agl,USTM,1 +151,V component storm motion,height agl,VSTM,1 +152,Cloud bottom pressure,cloud base,PRES,1 +153,Cloud top pressure,cloud top,PRES,1 +154,Cloud top temperature,cloud top,TMP,1 +155,Pressure at tropopause,tropopause,PRES,1 +156,Height at tropopause,tropopause,HGT,1 +157,Temperature at tropopause,tropopause,TMP,1 +158,U component of wind at tropopause,tropopause,UGRD,1 +159,V component of wind at tropopause,tropopause,VGRD,1 +160,Wind shear at tropopause,tropopause,VWSH,1 +161,Temperature at flight levels,height msl,TMP,10 +162,U component of wind at flight levels,height msl,UGRD,10 +163,V component of wind at flight levels,height msl,VGRD,10 +164,Freezing level height,0 degree isotherm,HGT,1 +165,Freezing level relative humidity,0 degree isotherm,RH,1 +166,Highest freezing level height,highest tropospheric frz lvl,HGT,1 +167,Maximum wind pressure level,max wind,PRES,1 +168,Maximum wind height,max wind,HGT,1 +169,U-component of maximum wind,max wind,UGRD,1 +170,V-component of maximum wind,max wind,VGRD,1 +171,Maximum wind speed at 10m,height agl,WIND,1 +172,Cloud bottom height (above MSL),cloud base,HGT,1 +173,Cloud top height (above MSL),cloud top,HGT,1 +174,Visibility,surface,VIS,1 +175,Composite radar reflectivity,entire atmosphere,REFC,1 +176,Grid scale cloud bottom pressure,grid scale cloud bottom,PRES,1 +177,Grid scale cloud top pressure,grid scale cloud top,PRES,1 +178,Column integrated cloud water,entire atmosphere,TCOLW,1 +179,Column integrated cloud ice,entire atmosphere,TCOLI,1 +180,Column integrated rain,entire atmosphere,TCOLR,1 +181,Column integrated snow,entire atmosphere,TCOLS,1 +182,Column integrated total condensate,entire atmosphere,TCOLC,1 +183,Vegetation type,surface,VGTYP,1 +184,Soil type,surface,SOTYP,1 +185,Canopy conductance,surface,CCOND,1 +186,Planetary boundary layer height,surface,HPBL,1 +187,Snow depth,surface,SNOD,1 +188,Snow sublimation,surface,SBSNO,1 +189,Air dry soil moisture,surface,SMDRY,1 +190,Soil moist porosity,surface,POROS,1 +191,Minimum stomatal resistance,surface,RSMIN,1 +192,Number of root layers,surface,RLYRS,1 +193,Soil moist wilting point,surface,WILT,1 +194,Soil moist reference,surface,SMREF,1 +195,Canopy conductance - solar component,surface,RCS,1 +196,Canopy conductance - temperature component,surface,RCT,1 +197,Canopy conductance - humidity component,surface,RCQ,1 +198,Canopy conductance - soil component,surface,RCSOL,1 +199,Potential evaporation,surface,PEVPR,1 +200,Surface wind gust,surface,GUST,1 +201,Lowest wet bulb zero height,lowest lvl wet bulb zero,HGT,1 +202,Leaf area index,surface,LAI,1 +203,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 +204,Cloud fraction on sigma surface,sigma,TCDC,22 +205,Richardson number planetary boundary layer height,planetary boundary layer,HGT,1 +206,Mixing height,surface,MIXHT,1 +207,Temperature at 10m,height agl,TMP,1 +208,Time-averaged percentage snow cover,surface,SNOWC,1 +209,Time-averaged surface pressure,surface,PRES,1 +210,Time-averaged 10m temperature,height agl,TMP,1 +211,Time-averaged mass exchange coefficient,surface,AKHS,1 +212,Time-averaged wind exchange coefficient,surface,AKMS,1 \ No newline at end of file diff --git a/docs/SRW_BGRD3D_table.rst b/docs/SRW_BGRD3D_table.rst new file mode 100644 index 000000000..246c178a1 --- /dev/null +++ b/docs/SRW_BGRD3D_table.rst @@ -0,0 +1,11 @@ +********************************************************** +Fields Requested in the UPP Parameter Table for SRW BGRD3D +********************************************************** + +Field description (column 1), level type as defined by WMO (column 2), abbreviated names +as they appear in the Grib2 output file (column 3), and number of levels output (column 4). + +.. csv-table:: + :file: SRW_BGRD3D_table.csv + :widths: 5, 40, 30, 15, 10 + :header-rows: 1 From 491f2d210bed4cac1b16c066fc26677a6bc3f468 Mon Sep 17 00:00:00 2001 From: Tracy Date: Mon, 17 Aug 2020 16:35:41 -0600 Subject: [PATCH 02/33] Include a variety of examples for regridding instead of a single generic example --- docs/Regridding.rst | 142 ++++++++++++++++++++++++++++++++------------ 1 file changed, 105 insertions(+), 37 deletions(-) diff --git a/docs/Regridding.rst b/docs/Regridding.rst index 70c05bc12..81bf5774b 100644 --- a/docs/Regridding.rst +++ b/docs/Regridding.rst @@ -4,11 +4,7 @@ Regridding Users that wish to interpolate their unipost output to a different grid may do so with the *wgrib2* utility. The general format for re-gridding -to a lat-lon grid is given in the example. - -================== -Examples of wgrib2 -================== +to various common projections are outlined in the following examples. *Wgrib2* is a versatile program that has the ability to convert grib2 files from one grid to another for various user-defined grids as @@ -17,39 +13,111 @@ re-gridding for all available grid definitions can be found at: http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/new_grid.html. -Sample command line usage for calling wgrib2: - - *wgrib2 -new\_grid\_winds W -new\_grid A B C outfile* - -Where, - - **W** = earth or grid - - earth: winds oriented to the earths north and south directions - - grid: winds are rotated so that north is relative to the grid - - **A**, **B**, and **C** represent the output grid description - - Sample lat-lon grid description: - - **A** = latlon - - **B** = lon0:nlon:dlon - - lon0 is longitude of first grid point in degrees - - nlon is number of longitudes - - dlon is grid resolution in degrees of longitude - - **C** = lat0:nlat:dlat - - lat0 is latitude of first grid point - - nlat is number of latitudes +================== +Examples of wgrib2 +================== - dlat is grid resolution in degrees of latitude +**Example 1: Latitude-Longitude Grid** + +*-new_grid latlon lon0:nlon:dlon lat0:nlat:dlat outfile* + ++----------+------------------------------------------+ +| Variable | Description | ++==========+==========================================+ +| lon0 | Longitude of first grid point in degrees | ++----------+------------------------------------------+ +| nlon | Number of longitudes | ++----------+------------------------------------------+ +| dlon | Grid resolution in degrees of longitude | ++----------+------------------------------------------+ +| lat0 | Latitude of first grid point in degrees | ++----------+------------------------------------------+ +| nlat | Number of latitudes | ++----------+------------------------------------------+ +| dlat | Grid resolution in degrees of latitude | ++----------+------------------------------------------+ + +**Example 2: Lambert Conic Conformal Grid** + +*-new_grid lambert:lov:latin1:latin2 lon0:nx:dx lat0:ny:dy outfile* + ++----------+-----------------------------------------------------------------+ +| Variable | Description | ++==========+=================================================================+ +| lov | Longitude where y axis is parallel to meridian in degrees | ++----------+-----------------------------------------------------------------+ +| latin1 | First latitude from pole which cuts the secant cone in degrees | ++----------+-----------------------------------------------------------------+ +| latin2 | Second latitude from pole which cuts the secant cone in degrees | ++----------+-----------------------------------------------------------------+ +| lon0 | Longitude of the first grid point in degrees | ++----------+-----------------------------------------------------------------+ +| nx | Total number of grid points along x | ++----------+-----------------------------------------------------------------+ +| dx | Grid cell size in meters in x direction | ++----------+-----------------------------------------------------------------+ +| lat0 | Latitude of the first grid point in degrees | ++----------+-----------------------------------------------------------------+ +| ny | Total number of grid points along y | ++----------+-----------------------------------------------------------------+ +| dy | Grid cell size in meters in y direction | ++----------+-----------------------------------------------------------------+ + +**Example 3: Polar Stereographic Grid** + +*-new_grid nps(or SPS):lov:lad lon0:nx:dx lat0:ny:dy outfile* + ++----------+-----------------------------------------------------------+ +| Variable | Description | ++==========+===========================================================+ +| nps/sps | North/south polar stereographic | ++----------+-----------------------------------------------------------+ +| lov | Longitude where y axis is parallel to meridian in degrees | ++----------+-----------------------------------------------------------+ +| lad | Latitude where dx and dy are specified | ++----------+-----------------------------------------------------------+ +| lon0 | Longitude of the first grid point in degrees | ++----------+-----------------------------------------------------------+ +| nx | Total number of grid points along x | ++----------+-----------------------------------------------------------+ +| dx | Grid cell distance in meters in x direction at lad | ++----------+-----------------------------------------------------------+ +| lat0 | Latitude of the first grid point in degrees | ++----------+-----------------------------------------------------------+ +| ny | Total number of grid points along y | ++----------+-----------------------------------------------------------+ +| dy | Grid cell distance in meters in y direction at lad | ++----------+-----------------------------------------------------------+ + +**Winds** + +*-new_grid_winds grid(or earth)* + ++----------+---------------------------------------------+ +| Variable | Description | ++==========+=============================================+ +| grid | U-wind goes from grid (i,J) to (i+1,j) | ++----------+---------------------------------------------+ +| earth | U-wind goes eastward, V-wind goes northward | ++----------+---------------------------------------------+ + +**Interpolation** + +The default interpolation type is bilinear, but it can be set to another type (e.g. neighbor, budget). + +*-new_grid_interpolation type* + +**Operational Example** + +Interpolates to a 0.25 degree latitude-longitude grid using various interpolation types depending on the variable. + +| *wgrib2 infile -set_grib_type same -new_grid_winds earth |* +| *-new_grid_interpolation bilinear |* +| *-if ":(CRAIN|CICEP|CFRZR|CSNOW|ICSEV):" -new_grid_interpolation neighbor -fi |* +| *-set_bitmap 1 -set_grib_max_bits 16 |* +| *-if ":(APCP|ACPCP|PRATE|CPRAT):" -set_grib_max_bits 25 -fi |* +| *-if ":(APCP|ACPCP|PRATE|CPRAT|DZDT):" -new_grid_interpolation budget -if |* +| *-new_grid "latlon 0:1440:0.25 90:721:-0.25" outfile* **Note:** *wgrib2 is not distributed within the UFS weather application. Users may download and install from From 4123463bb82a38d9187fecd69970aa415fdb7509 Mon Sep 17 00:00:00 2001 From: Tracy Date: Mon, 17 Aug 2020 16:36:29 -0600 Subject: [PATCH 03/33] Minor mod to Acknowledgments --- docs/Acknowledgments.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Acknowledgments.rst b/docs/Acknowledgments.rst index 5a08249b9..6be16342a 100644 --- a/docs/Acknowledgments.rst +++ b/docs/Acknowledgments.rst @@ -12,7 +12,7 @@ Jovic and Mathew Pyle (NCEP/EMC). Transitioning of the documentation from the WRF Post Processor to the Unified Post Processor was performed by Nicole McKee (NCEP/EMC), Hui-ya Chuang (NCEP/EMC), and Jamie Wolff (NCAR/RAL/DTC). Implementation of the Community Unified Post Processor -was performed by Tricia Slovacek and Kate Fossell (NCAR/RAL/DTC). +was performed by Tricia Slovacek, Kate Fossell, and Tracy Hertneky (NCAR/RAL/DTC). Acknowledgement From 3a1595dddefd4b924e5346259a25ef461720b3b3 Mon Sep 17 00:00:00 2001 From: ericaligo-NOAA <48365233+ericaligo-NOAA@users.noreply.github.com> Date: Wed, 26 Aug 2020 09:58:23 -0400 Subject: [PATCH 04/33] Replace cld_amt, the 3D cloud fraction from the GFDL mp with the same field for all (#170) microphysics schemes, cldfra. --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 637e89e22..221d97284 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -472,12 +472,12 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) end if if(me==0)print*,'nhcas= ',nhcas if (nhcas == 0 ) then !non-hydrostatic case - nrec=15 + nrec=14 allocate (recname(nrec)) recname=[character(len=20) :: 'ugrd','vgrd','spfh','tmp','o3mr', & 'presnh','dzdt', 'clwmr','dpres', & 'delz','icmr','rwmr', & - 'snmr','grle','cld_amt'] + 'snmr','grle'] else nrec=8 allocate (recname(nrec)) @@ -848,9 +848,6 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l & ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,recname(14) & ,lm,qqg(1,jsta_2l,1)) - call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l & - ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,recname(15) & - ,lm,cfr(1,jsta_2l,1)) ! calculate CWM from FV3 output do l=1,lm do j=jsta,jend @@ -1255,6 +1252,16 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) ! end do ! end do +! instantaneous 3D cloud fraction + VarName='cldfra' +! do l=1,lm + call read_netcdf_3d_scatter(me,ncid2d,1,im,jm,jsta,jsta_2l & + ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName & + ,lm,cfr(1,jsta_2l,1)) +! if(debugprint)print*,'sample ',VarName,'isa,jsa,l =' & +! ,cfr(isa,jsa,l),isa,jsa,l +! enddo + VarName='refl_10cm' ! do l=1,lm call read_netcdf_3d_scatter(me,ncid2d,1,im,jm,jsta,jsta_2l & From b660c4594f47f1991b51c929477553393e773789 Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:44:35 -0400 Subject: [PATCH 05/33] Add (gnu) compiler option to allow argument mismatch. (#179) gfortran 10.x treats argument mismatch as error --- sorc/ncep_post.fd/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sorc/ncep_post.fd/CMakeLists.txt b/sorc/ncep_post.fd/CMakeLists.txt index aaf9599bc..13f8d7e02 100644 --- a/sorc/ncep_post.fd/CMakeLists.txt +++ b/sorc/ncep_post.fd/CMakeLists.txt @@ -185,6 +185,9 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") "-g -fbacktrace -ffree-form -ffree-line-length-none -fconvert=big-endian") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -ggdb -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check") + if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") + endif() endif() set(LIBNAME "nceppost") From 54111a69a7bec5feb914d11dca3d39eefa5f6950 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 22 Sep 2020 10:32:29 -0600 Subject: [PATCH 06/33] Change control files names fv3sar->fv3lam to be in-line with SRW release --- parm/{fv3sar.xml => fv3lam.xml} | 0 parm/{fv3sar.xml-new => fv3lam.xml-new} | 0 parm/{fv3sar_goes.xml => fv3lam_goes.xml} | 0 ..._avblflds.xml => fv3lam_post_avblflds.xml} | 0 parm/makefile | 22 +++++++++---------- 5 files changed, 11 insertions(+), 11 deletions(-) rename parm/{fv3sar.xml => fv3lam.xml} (100%) rename parm/{fv3sar.xml-new => fv3lam.xml-new} (100%) rename parm/{fv3sar_goes.xml => fv3lam_goes.xml} (100%) rename parm/{fv3sar_post_avblflds.xml => fv3lam_post_avblflds.xml} (100%) diff --git a/parm/fv3sar.xml b/parm/fv3lam.xml similarity index 100% rename from parm/fv3sar.xml rename to parm/fv3lam.xml diff --git a/parm/fv3sar.xml-new b/parm/fv3lam.xml-new similarity index 100% rename from parm/fv3sar.xml-new rename to parm/fv3lam.xml-new diff --git a/parm/fv3sar_goes.xml b/parm/fv3lam_goes.xml similarity index 100% rename from parm/fv3sar_goes.xml rename to parm/fv3lam_goes.xml diff --git a/parm/fv3sar_post_avblflds.xml b/parm/fv3lam_post_avblflds.xml similarity index 100% rename from parm/fv3sar_post_avblflds.xml rename to parm/fv3lam_post_avblflds.xml diff --git a/parm/makefile b/parm/makefile index e0ddbd650..54b5f3df0 100644 --- a/parm/makefile +++ b/parm/makefile @@ -20,7 +20,7 @@ NGACFLATFILENAME = postxconfig-NT-NGAC.txt GEFSFLATFILENAME = postxconfig-NT-GEFS.txt GEFSANLFLATFILENAME = postxconfig-NT-GEFS-ANL.txt GEFSF00FLATFILENAME = postxconfig-NT-GEFS-F00.txt -FV3SARFLATFILENAME = postxconfig-NT-fv3sar.txt +FV3LAMFLATFILENAME = postxconfig-NT-fv3lam.txt HAFSFLATFILENAME = postxconfig-NT-hafs.txt GFSTWOFLATFILENAME = postxconfig-NT-GFS-TWO.txt GFSTWOF00FLATFILENAME = postxconfig-NT-GFS-F00-TWO.txt @@ -44,8 +44,8 @@ GEFSAVAILXMLFILENAME = post_avblflds.xml GEFSCTRLFILENAME = postcntrl_gefs.xml GEFSANLCTRLFILENAME = postcntrl_gefs_anl.xml GEFSCTRLF00FILENAME = postcntrl_gefs_f00.xml -FV3SARAVAILXMLFILENAME = fv3sar_post_avblflds.xml -FV3SARCTRLFILENAME = fv3sar.xml +FV3LAMAVAILXMLFILENAME = fv3lam_post_avblflds.xml +FV3LAMCTRLFILENAME = fv3lam.xml HAFSCTRLFILENAME = hafs.xml GFSTWOCTRLFILENAME = postcntrl_gfs_two.xml GFSTWOF00CTRLFILENAME = postcntrl_gfs_f00_two.xml @@ -67,8 +67,8 @@ PERLXMLNGAC = /usr/bin/perl $(PERLXML) $(NGACCTRLFILENAME) $(NGACAVAILXMLFILENA PERLXMLGEFS = /usr/bin/perl $(PERLXML) $(GEFSCTRLFILENAME) $(GFSAVAILXMLFILENAME) $(GEFSFLATFILENAME) PERLXMLGEFSANL = /usr/bin/perl $(PERLXML) $(GEFSANLCTRLFILENAME) $(GFSAVAILXMLFILENAME) $(GEFSANLFLATFILENAME) PERLXMLGEFSF00 = /usr/bin/perl $(PERLXML) $(GEFSCTRLF00FILENAME) $(GFSAVAILXMLFILENAME) $(GEFSF00FLATFILENAME) -PERLXMLFV3SAR = /usr/bin/perl $(PERLXML) $(FV3SARCTRLFILENAME) $(FV3SARAVAILXMLFILENAME) $(FV3SARFLATFILENAME) -PERLXMLHAFS = /usr/bin/perl $(PERLXML) $(HAFSCTRLFILENAME) $(FV3SARAVAILXMLFILENAME) $(HAFSFLATFILENAME) +PERLXMLFV3LAM = /usr/bin/perl $(PERLXML) $(FV3LAMCTRLFILENAME) $(FV3LAMAVAILXMLFILENAME) $(FV3LAMFLATFILENAME) +PERLXMLHAFS = /usr/bin/perl $(PERLXML) $(HAFSCTRLFILENAME) $(FV3LAMAVAILXMLFILENAME) $(HAFSFLATFILENAME) PERLXMLGFSTWO = /usr/bin/perl $(PERLXML) $(GFSTWOCTRLFILENAME) $(GFSAVAILXMLFILENAME) $(GFSTWOFLATFILENAME) PERLXMLGFSTWOF00 = /usr/bin/perl $(PERLXML) $(GFSTWOF00CTRLFILENAME) $(GFSAVAILXMLFILENAME) $(GFSTWOF00FLATFILENAME) @@ -86,14 +86,14 @@ NGACXMLS = $(NGACAVAILXMLFILENAME) $(NGACCTRLFILENAME) GEFSXMLS = $(GFSAVAILXMLFILENAME) $(GEFSCTRLFILENAME) GEFSANLXMLS = $(GFSAVAILXMLFILENAME) $(GEFSANLCTRLFILENAME) GEFSF00XMLS = $(GFSAVAILXMLFILENAME) $(GEFSCTRLF00FILENAME) -FV3SARXMLS = $(FV3SARAVAILXMLFILENAME) $(FV3SARCTRLFILENAME) -HAFSXMLS = $(FV3SARAVAILXMLFILENAME) $(HAFSCTRLFILENAME) +FV3LAMXMLS = $(FV3LAMAVAILXMLFILENAME) $(FV3LAMCTRLFILENAME) +HAFSXMLS = $(FV3LAMAVAILXMLFILENAME) $(HAFSCTRLFILENAME) GFSTWOXMLS = $(GFSAVAILXMLFILENAME) $(GFSTWOCTRLFILENAME) GFSTWOF00XMLS = $(GFSAVAILXMLFILENAME) $(GFSTWOF00CTRLFILENAME) # If action is triggered; run the following -all: $(GFSFLATFILENAME) $(GFSGOESFLATFILENAME) $(GFSANLFLATFILENAME) $(GFSF00FLATFILENAME) $(GFSFLUXFLATFILENAME) $(GFSFLUXF00FLATFILENAME) $(NMMFLATFILENAME) $(NGACFLATFILENAME) $(GEFSFLATFILENAME) $(GEFSANLFLATFILENAME) $(GEFSF00FLATFILENAME) $(FV3SARFLATFILENAME) $(HAFSFLATFILENAME) $(GFSTWOFLATFILENAME) $(GFSTWOF00FLATFILENAME) +all: $(GFSFLATFILENAME) $(GFSGOESFLATFILENAME) $(GFSANLFLATFILENAME) $(GFSF00FLATFILENAME) $(GFSFLUXFLATFILENAME) $(GFSFLUXF00FLATFILENAME) $(NMMFLATFILENAME) $(NGACFLATFILENAME) $(GEFSFLATFILENAME) $(GEFSANLFLATFILENAME) $(GEFSF00FLATFILENAME) $(FV3LAMFLATFILENAME) $(HAFSFLATFILENAME) $(GFSTWOFLATFILENAME) $(GFSTWOF00FLATFILENAME) $(GFSFLATFILENAME): $(GFSXMLS) $(PERLXMLGFS) $(GFSGOESFLATFILENAME): $(GFSGOESXMLS) @@ -116,8 +116,8 @@ $(GEFSANLFLATFILENAME): $(GEFSANLXMLS) $(PERLXMLGEFSANL) $(GEFSF00FLATFILENAME): $(GEFSF00XMLS) $(PERLXMLGEFSF00) -$(FV3SARFLATFILENAME): $(FV3SARXMLS) - $(PERLXMLFV3SAR) +$(FV3LAMFLATFILENAME): $(FV3LAMXMLS) + $(PERLXMLFV3LAM) $(HAFSFLATFILENAME): $(HAFSXMLS) $(PERLXMLHAFS) $(GFSTWOFLATFILENAME): $(GFSTWOXMLS) @@ -131,4 +131,4 @@ $(GFSTWOF00FLATFILENAME): $(GFSTWOF00XMLS) clean: @echo @echo '==== CLEAN ===================================================' - /bin/rm -f $(GFSFLATFILENAME) $(GFSGOESFLATFILENAME) $(GFSANLFLATFILENAME) $(GFSF00FLATFILENAME) $(NMMFLATFILENAME) $(NGACFLATFILENAME) $(GEFSFLATFILENAME) $(GEFSANLFLATFILENAME) $(GEFSF00FLATFILENAME) $(FV3SARFLATFILENAME) $(HAFSFLATFILENAME) $(GFSTWOFLATFILENAME) $(GFSTWOF00FLATFILENAME) + /bin/rm -f $(GFSFLATFILENAME) $(GFSGOESFLATFILENAME) $(GFSANLFLATFILENAME) $(GFSF00FLATFILENAME) $(NMMFLATFILENAME) $(NGACFLATFILENAME) $(GEFSFLATFILENAME) $(GEFSANLFLATFILENAME) $(GEFSF00FLATFILENAME) $(FV3LAMFLATFILENAME) $(HAFSFLATFILENAME) $(GFSTWOFLATFILENAME) $(GFSTWOF00FLATFILENAME) From b2d5abec7b7a9b0d00cac1f3e455d86db1c7df2e Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 22 Sep 2020 10:40:12 -0600 Subject: [PATCH 07/33] Change flat file names fv3sar->fv3lam --- parm/{postxconfig-NT-fv3sar.txt => postxconfig-NT-fv3lam.txt} | 0 ...txconfig-NT-fv3sar_goes.txt => postxconfig-NT-fv3lam_goes.txt} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename parm/{postxconfig-NT-fv3sar.txt => postxconfig-NT-fv3lam.txt} (100%) rename parm/{postxconfig-NT-fv3sar_goes.txt => postxconfig-NT-fv3lam_goes.txt} (100%) diff --git a/parm/postxconfig-NT-fv3sar.txt b/parm/postxconfig-NT-fv3lam.txt similarity index 100% rename from parm/postxconfig-NT-fv3sar.txt rename to parm/postxconfig-NT-fv3lam.txt diff --git a/parm/postxconfig-NT-fv3sar_goes.txt b/parm/postxconfig-NT-fv3lam_goes.txt similarity index 100% rename from parm/postxconfig-NT-fv3sar_goes.txt rename to parm/postxconfig-NT-fv3lam_goes.txt From 0e6bdd1f32c16f047b312c8c08fb99c1f2fd556b Mon Sep 17 00:00:00 2001 From: Yunheng Wang Date: Thu, 1 Oct 2020 14:49:45 +0000 Subject: [PATCH 08/33] Updated support on Odin & Stampede to use NCEPLIBS public-v2 release --- modulefiles/post/v8.0.0-odin | 82 ++++++++++++-------------------- modulefiles/post/v8.0.0-stampede | 58 ++++++++++++---------- 2 files changed, 63 insertions(+), 77 deletions(-) diff --git a/modulefiles/post/v8.0.0-odin b/modulefiles/post/v8.0.0-odin index cde6d1d3b..6c8eca1ad 100644 --- a/modulefiles/post/v8.0.0-odin +++ b/modulefiles/post/v8.0.0-odin @@ -1,14 +1,12 @@ #%Module###################################################################### ############################################################# -## Lin.Gan@noaa.gov -## EMC -## post v7.0.0 -## Wen Meng 07/2018: set post to v8.0.0 for fv3gfs +## NSSL +## post v8.0.0 ############################################################# proc ModulesHelp { } { -puts stderr "Set environment veriables for post" -puts stderr "This module initializes the users environment" -puts stderr "to build the post for WCOSS production.\n" + puts stderr "Set environment veriables for post" + puts stderr "This module initializes the users environment" + puts stderr "to build the post for WCOSS production.\n" } module-whatis "post" @@ -24,59 +22,39 @@ module load cray-libsci module load cray-netcdf-hdf5parallel module load cray-parallel-netcdf module load cray-hdf5-parallel -module load gcc/6.1.0 +module load gcc/8.3.0 module load slurm # Loding nceplibs modules -module use -a /oldscratch/ywang/external/modulefiles -module load sigio/v2.0.1 -#module load jasper/v1.900.1 -#module load png/v1.2.44 -#module load z/v1.2.6 -module load sfcio/v1.0.0 -module load nemsio/v2.2.2 -module load bacio/v2.0.2 -#module load g2/v2.5.2 -#module load xmlparse/v2.0.0 -module load gfsio/v1.1.0 -module load ip/v3.0.0 -module load sp/v2.0.2 -module load w3emc/v2.3.0 -module load w3nco/v2.0.6 -module load crtm/v2.2.5 -module load g2/v3.1.0 -module load g2tmpl/v1.5.0 -module load wrfio/1.1.1 -#module load netcdf/3.6.3 -#module load netcdf/4.6.1 +module use -a /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/modules +module load sigio +module load sfcio +module load nemsio +module load bacio +#module load g2 +module load gfsio +module load ip +module load sp +module load w3emc +module load w3nco +module load crtm +module load g2 +module load g2tmpl +module load wrf_io + +setenv SIGIO_INC4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sigio-2.3.2/include +setenv GFSIO_INC4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/gfsio-1.4.1/include +setenv SFCIO_INC4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sfcio-1.4.1/include + +setenv GFSIO_LIB4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/gfsio-1.4.1/lib/libgfsio.a +setenv SIGIO_LIB4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sigio-2.3.2/lib/libsigio.a +setenv SFCIO_LIB4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sfcio-1.4.1/lib/libsfcio.a +setenv WRFIO_LIB /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/wrf_io-1.1.1/lib/libwrf_io.a setenv NETCDF /opt/cray/pe/netcdf-hdf5parallel/4.6.3.2/INTEL/19.0 setenv JASPER_LIB "-ljasper" setenv PNG_LIB "-lpng" -#setenv NCEPLIBS /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib - -#module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles -#module load g2tmpl-intel/1.5.0 - -#module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/modulefiles -#module load wrf-io-v1.1.1 -# -#setenv WRFIO_LIB /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/v1.1.1/lib/wrf_io/libwrfio_nf.a - - -#set dlib /mnt/lfs3/projects/hfv3gfs/gwv/ltmp2/lib/g2/v3.1.0/ -#set bname "G2" -# -### Export environment variables -#setenv ${bname}_SRC $dlib/src -#setenv ${bname}_INC4 $dlib/intel/include/g2_v3.1.0_4 -#setenv ${bname}_INCd $dlib/intel/include/g2_v3.1.0_d -#setenv ${bname}_LIB4 $dlib/intel/libg2_v3.1.0_4.a -#setenv ${bname}_LIBd $dlib/intel/libg2_v3.1.0_d.a -#setenv ${bname}_VER v3.1.0 - -#setenv WRFPATH /mnt/lfs3/projects/hfv3gfs/nwprod/wrf_shared.v1.1.0/ setenv myFC ftn setenv OPENMP "-qopenmp" setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp -target-cpu=x86-64" diff --git a/modulefiles/post/v8.0.0-stampede b/modulefiles/post/v8.0.0-stampede index 95ad14a5c..1502090eb 100644 --- a/modulefiles/post/v8.0.0-stampede +++ b/modulefiles/post/v8.0.0-stampede @@ -1,15 +1,14 @@ #%Module###################################################################### ############################################################# -## Lin.Gan@noaa.gov -## EMC -## post v7.0.0 -## Wen Meng 07/2018: set post to v8.0.0 for fv3gfs +## NSSL +## post v8.0.0 ############################################################# proc ModulesHelp { } { -puts stderr "Set environment veriables for post" -puts stderr "This module initializes the users environment" -puts stderr "to build the post for WCOSS production.\n" + puts stderr "Set environment veriables for post" + puts stderr "This module initializes the users environment" + puts stderr "to build the post for WCOSS production.\n" } + module-whatis "post" set ver v8.0.0 @@ -22,23 +21,32 @@ module load parallel-netcdf/4.6.2 module load phdf5/1.10.4 # Loding nceplibs modules -#module use -a /mnt/lfs3/projects/hfv3gfs/nwprod/lib/modulefiles -module use -a /work/00315/tg455890/stampede2/external/modulefiles -module load sigio/v2.1.0 -module load sfcio/v1.0.0 -module load nemsio/v2.2.3 -module load bacio/v2.0.2 -#module load g2/v2.5.2 -#module load xmlparse/v2.0.0 -module load gfsio/v1.1.0 -module load ip/v3.0.0 -module load sp/v2.0.2 -module load w3emc/v2.3.0 -module load w3nco/v2.0.6 -module load crtm/v2.2.3 -module load g2/v3.1.0 -module load g2tmpl/v1.6.0 -module load wrfio/1.1.1 +# DH* todo - shared directory +module use -a /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/modules +# *DH +module load bacio/2.4.0 +module load crtm/2.3.0 +module load g2/3.4.0 +module load g2tmpl/1.9.0 +module load ip/3.3.0 +module load nemsio/2.5.1 +module load sp/2.3.0 +module load w3emc/2.7.0 +module load w3nco/2.4.0 + +module load gfsio/1.4.0 +module load sfcio/1.4.0 +module load sigio/2.3.0 +module load wrf_io/1.1.1 + +setenv SIGIO_INC4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sigio-2.3.0/include +setenv GFSIO_INC4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/gfsio-1.4.0/include +setenv SFCIO_INC4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sfcio-1.4.0/include + +setenv GFSIO_LIB4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/gfsio-1.4.0/lib/libgfsio.a +setenv SIGIO_LIB4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sigio-2.3.0/lib/libsigio.a +setenv SFCIO_LIB4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sfcio-1.4.0/lib/libsfcio.a +setenv WRFIO_LIB /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/wrf_io-1.1.1/lib/libwrf_io.a setenv NETCDF /opt/apps/intel18/netcdf/4.6.2/x86_64 setenv JASPER_LIB "-ljasper" @@ -50,5 +58,5 @@ setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenm # #setenv myFCFLAGS "-O0 -convert big_endian -fp-model source -openmp -g -check all -ftrapuv -fp-stack-check -fstack-protector -heap-arrays -recursive -traceback" -setenv myCPP /lib/cpp +setenv myCPP /lib/cpp setenv myCPPFLAGS "-P" From 0011769ed71b8af86755c546ff82ce4f928f5cff Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Fri, 2 Oct 2020 08:30:10 -0600 Subject: [PATCH 09/33] Change executable name of cmake build for public-v2 to be ncep_post, consistent with other applications --- sorc/ncep_post.fd/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/CMakeLists.txt b/sorc/ncep_post.fd/CMakeLists.txt index 13f8d7e02..4214a2288 100644 --- a/sorc/ncep_post.fd/CMakeLists.txt +++ b/sorc/ncep_post.fd/CMakeLists.txt @@ -191,7 +191,7 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") endif() set(LIBNAME "nceppost") -set(EXENAME "nceppost.x") +set(EXENAME "ncep_post") set(module_dir "${CMAKE_CURRENT_BINARY_DIR}/include") From 8c7c01f4fc00fec39f5ca75c30a0391ceea511e9 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 7 Oct 2020 09:03:23 -0600 Subject: [PATCH 10/33] Update submodule pointer for CMakeModules to fix linker problem against static NetCDF libraries --- CMakeModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules b/CMakeModules index fece613c2..8aaef34fa 160000 --- a/CMakeModules +++ b/CMakeModules @@ -1 +1 @@ -Subproject commit fece613c2968bf1000e9b57e6bfc526169063a7f +Subproject commit 8aaef34fa720212cf14fe50e3f959ac8036bf388 From 0c97410b5931612c8623609cd95505c2c51caea4 Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Tue, 20 Oct 2020 08:22:19 -0600 Subject: [PATCH 11/33] Starting UPP version numbers with 10.0.0 for develop branch --- VERSION | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 64a3d8066..a13e7b9c8 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1 @@ -9.9.9 -# This is a placeholder version number. -# It will be replaced with an appropriate version following a discussion within the UPP management. +10.0.0 From 396596655db8d24bdb99058fac2ac8c9a51e0f1b Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Tue, 20 Oct 2020 08:31:22 -0600 Subject: [PATCH 12/33] Starting release/public-v2 branch with UPP version 9.0.0 --- VERSION | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 64a3d8066..f7ee06693 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1 @@ -9.9.9 -# This is a placeholder version number. -# It will be replaced with an appropriate version following a discussion within the UPP management. +9.0.0 From 7675b82a9bfbb96882768646bcca3977c3d3428a Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Tue, 27 Oct 2020 13:22:43 -0600 Subject: [PATCH 13/33] Remove old community build libraries and gnu make utilities --- .gitmodules | 3 - sorc/arch/Config.pl | 326 ------- sorc/arch/configure.defaults | 692 --------------- sorc/arch/postamble | 58 -- sorc/arch/preamble | 18 - sorc/arch/version | 19 - sorc/comlibs/crtm2 | 1 - sorc/comlibs/crtm2.makefile | 49 - sorc/comlibs/makefile | 40 - sorc/comlibs/wrfmpi_stubs/makefile | 52 -- sorc/comlibs/wrfmpi_stubs/mpi.h | 16 - sorc/comlibs/wrfmpi_stubs/mpi_c.c | 276 ------ sorc/comlibs/wrfmpi_stubs/mpi_fortran.f | 543 ------------ sorc/comlibs/wrfmpi_stubs/mpif.h | 250 ------ sorc/comlibs/xml/make_xmlreadf90 | 26 - sorc/comlibs/xml/makefile | 45 - sorc/comlibs/xml/post_t.xml | 62 -- sorc/comlibs/xml/read_from_buffer.inc | 79 -- sorc/comlibs/xml/read_xml_array.inc | 54 -- sorc/comlibs/xml/read_xml_prims.f90 | 359 -------- sorc/comlibs/xml/read_xml_scalar.inc | 40 - sorc/comlibs/xml/xmlparse.f90 | 1019 --------------------- sorc/comlibs/xml/xmlreader.conf | 12 - sorc/comlibs/xml/xmlreader.f90 | 1082 ----------------------- 24 files changed, 5121 deletions(-) delete mode 100644 sorc/arch/Config.pl delete mode 100644 sorc/arch/configure.defaults delete mode 100644 sorc/arch/postamble delete mode 100644 sorc/arch/preamble delete mode 100644 sorc/arch/version delete mode 160000 sorc/comlibs/crtm2 delete mode 100755 sorc/comlibs/crtm2.makefile delete mode 100644 sorc/comlibs/makefile delete mode 100755 sorc/comlibs/wrfmpi_stubs/makefile delete mode 100644 sorc/comlibs/wrfmpi_stubs/mpi.h delete mode 100644 sorc/comlibs/wrfmpi_stubs/mpi_c.c delete mode 100644 sorc/comlibs/wrfmpi_stubs/mpi_fortran.f delete mode 100644 sorc/comlibs/wrfmpi_stubs/mpif.h delete mode 100644 sorc/comlibs/xml/make_xmlreadf90 delete mode 100644 sorc/comlibs/xml/makefile delete mode 100644 sorc/comlibs/xml/post_t.xml delete mode 100755 sorc/comlibs/xml/read_from_buffer.inc delete mode 100755 sorc/comlibs/xml/read_xml_array.inc delete mode 100755 sorc/comlibs/xml/read_xml_prims.f90 delete mode 100755 sorc/comlibs/xml/read_xml_scalar.inc delete mode 100755 sorc/comlibs/xml/xmlparse.f90 delete mode 100755 sorc/comlibs/xml/xmlreader.conf delete mode 100755 sorc/comlibs/xml/xmlreader.f90 diff --git a/.gitmodules b/.gitmodules index f387f5779..669c691de 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,6 +2,3 @@ path = CMakeModules url = https://github.com/noaa-emc/CMakeModules branch = develop -[submodule "comupp/src/lib/crtm2"] - path = sorc/comlibs/crtm2 - url = https://github.com/NCAR/UPP_CRTM diff --git a/sorc/arch/Config.pl b/sorc/arch/Config.pl deleted file mode 100644 index 78c840f50..000000000 --- a/sorc/arch/Config.pl +++ /dev/null @@ -1,326 +0,0 @@ -#!/usr/bin/perl -# -# Build configuration file used during UPP compile command -# BE SURE TO RUN AS ./configure (to avoid getting a system configure -# command by mistake). -# -# This file will ask the user which type of compile they would like to -# configure for - based on machine and available compilers. -# -# After receiving valid user input the preamble file is placed in the -# configuration file, followed by the machine dependent -# compiler/linker/archive setting, followed by the postamble. This will -# be the configure.upp file which is used to compile all of UPP or any -# subdirectory. - -# Make STDOUT hot no matter what -select((select(STDOUT), $|=1)[0]); - -# -# Initialize variables -$sw_netcdf_path = "" ; -$sw_usenetcdff = "" ; # for 3.6.2 and greater, the fortran bindings - # might be in a separate lib file -$sw_os = "ARCH" ; # ARCH will match any -$sw_mach = "ARCH" ; # ARCH will match any -$sw_fc = "\$(SFC)" ; -$sw_cc = "\$(SCC)" ; -$sw_f90 = "\$(SF90)" ; -$sw_dmparallel = "" ; -$sw_ompparallel = "" ; # Not supported -$sw_comms_obj = "" ; -$sw_comms_objst = "" ; -$sw_comms_lib = "" ; -$sw_serial_mpi_stub = "" ; # Assume parallel build -$sw_serial_mpi_lib = "" ; -$sw_bindir = "" ; # bin directory -$sw_incmod = "" ; # include directory -$sw_libdir = "" ; # library directory -$sw_debug = 0 ; # Default is NOT to set debugging flags -$sw_spv = "" ; # splib version number -$sw_sigiov = "" ; # sigiolib version number -$sw_w3emcv = "" ; # w3emclib version number -$sw_w3ncov = "" ; # w3ncolib version number -$sw_sfciov = "" ; # sfciolib version number -$sw_g2v = "" ; # g2lib version number -$sw_g2tmplv = "" ; # g2tmpllib version number - -# make sure we do not buffer stdout -select((select(STDOUT), $|=1)[0]); - -# -# Read in command line arguments :: set local variables -while ( substr( $ARGV[0], 0, 1 ) eq "-" ) - { - if ( substr( $ARGV[0], 1, 7 ) eq "netcdf=" ) - { - $sw_netcdf_path = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 3 ) eq "os=" ) - { - $sw_os = substr( $ARGV[0], 4 ) ; - } - if ( substr( $ARGV[0], 1, 5 ) eq "mach=" ) - { - $sw_mach = substr( $ARGV[0], 6 ) ; - } - if ( substr( $ARGV[0], 1, 11 ) eq "dmparallel=" ) - { - $sw_dmparallel=substr( $ARGV[0], 12 ) ; - } - if ( substr( $ARGV[0], 1, 12 ) eq "ompparallel=" ) - { - $sw_ompparallel=substr( $ARGV[0], 13 ) ; - } - if ( substr( $ARGV[0], 1, 11 ) eq "USENETCDFF=" ) - { - $sw_usenetcdff = substr( $ARGV[0], 12 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "bindir=" ) - { - $sw_bindir = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "incmod=" ) - { - $sw_incmod = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "libdir=" ) - { - $sw_libdir = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "debug=1" ) - { - $sw_debug = 1; - } - if ( substr( $ARGV[0], 1, 4 ) eq "spv=" ) - { - $sw_spv = substr( $ARGV[0], 5 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "sigiov=" ) - { - $sw_sigiov = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "w3emcv=" ) - { - $sw_w3emcv = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "w3ncov=" ) - { - $sw_w3ncov = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 7 ) eq "sfciov=" ) - { - $sw_sfciov = substr( $ARGV[0], 8 ) ; - } - if ( substr( $ARGV[0], 1, 4 ) eq "g2v=" ) - { - $sw_g2v = substr( $ARGV[0], 5 ) ; - } - if ( substr( $ARGV[0], 1, 8 ) eq "g2tmplv=" ) - { - $sw_g2tmplv = substr( $ARGV[0], 9 ) ; - } - shift @ARGV ; - } - -# Build string of nceplib flags based off input from configure script -$nceplib_flags = "-lwrfio -lg2_v${sw_g2v}_4 -lg2tmpl_v${sw_g2tmplv} -lnemsio_d -lsigio_v${sw_sigiov}_4 -lsfcio_v${sw_sfciov}_4 -lgfsio_4 -lsp_v${sw_spv}_d -lw3nco_v${sw_w3ncov}_4 -lw3emc_v${sw_w3emcv}_4 -lbacio_4" ; - - -# -# Display the choices to the user and get selection -$validresponse = 0 ; - -## UPP only supports dmpar @platforms for this release -@platforms = qw ( serial dmpar ) ; - -until ( $validresponse ) { - print "-"x73 . "\n" . - "Please select from among the following supported platforms.\n\n" ; - - open CONFIGURE_DEFAULTS, "< ./sorc/arch/configure.defaults" - or die "Cannot open ./sorc/arch/configure.defaults for reading" ; - -# -# Read configure.defaults :: display all records which contain the ARCH -# directive, a matching OS, and a matching machine - $opt = 1 ; - while ( ) - { - for $paropt ( @platforms ) - { - if ( substr( $_, 0, 5 ) eq "#ARCH" - && ( index( $_, $sw_os) >= 0 ) - && ( index( $_, $sw_mach) >= 0 ) - && ( index( $_, $paropt) >= 0 ) ) - { - $optstr[$opt] = substr($_,6) ; - $optstr[$opt] =~ s/^[ ]*// ; - $optstr[$opt] =~ s/#.*$//g ; - chomp($optstr[$opt]) ; - $optstr[$opt] = $optstr[$opt]." (".$paropt.")" ; - if ( substr( $optstr[$opt], 0,4 ) ne "NULL" ) - { - printf " %2d. %s\n",$opt,$optstr[$opt] ; - $opt++ ; - } - } - } - } - close CONFIGURE_DEFAULTS ; - -# -# Get to end of our array - $opt -- ; - -# -# Get response - ask again and again - unless -1 -> exit - printf "\nEnter selection [%d-%d] : ",1,$opt ; - $response = ; - - if ( $response == -1 ) { exit ; } - - if ( $response >= 1 && $response <= $opt ) - { $validresponse = 1 ; } - else - { printf("\nInvalid response (%d)\n",$response);} -} -print "-"x73 . "\n"; - -$optchoice = $response ; - -# -# Open configure.defaults again to read record configuration settings -open CONFIGURE_DEFAULTS, "< ./sorc/arch/configure.defaults" - or die "Cannot open ./sorc/arch/configure.defaults for reading" ; -$latchon = 0 ; -while ( ) -{ - if ( substr( $_, 0, 5 ) eq "#ARCH" && $latchon == 1 ) - { - $latchon = 0 ; - } - -# -# Got our record make substitutions with local variables set above - if ( $latchon == 1 ) - { - $_ =~ s/CONFIGURE_FC/$sw_fc/g ; - $_ =~ s/CONFIGURE_F90/$sw_f90/g ; - $_ =~ s/CONFIGURE_CC/$sw_cc/g ; - - if ($sw_debug) - { - $_ =~ s/\bCONFIGURE_FFLAGS\b/\$(FDEBUG)/g ; - $_ =~ s/\bCONFIGURE_FFLAGS_CRTM\b/\$(FDEBUG)/g ; - $_ =~ s/\bCONFIGURE_CFLAGS\b/\$(CDEBUG)/g ; - } - else - { - $_ =~ s/\bCONFIGURE_FFLAGS\b/\$(FOPT)/g ; - $_ =~ s/\bCONFIGURE_FFLAGS_CRTM\b/\$(FOPT)/g ; - $_ =~ s/\bCONFIGURE_CFLAGS\b/\$(COPT)/g ; - } - - @machopts = ( @machopts, $_ ) ; - } - -# -# Loop through records to find the match based on ARCH directive and latchon -# matching OS, matching machine, matching processor selection - for $paropt ( @platforms ) - { - if ( substr( $_, 0, 5 ) eq "#ARCH" && $latchon == 0 - && ( index( $_, $sw_os ) >= 0 ) && ( index( $_, $sw_mach ) >= 0 ) - && ( index($_, $paropt) >= 0 ) ) - { - $x=substr($_,6) ; - $x=~s/^[ ]*// ; - $x =~ s/#.*$//g ; - chomp($x) ; - $x = $x." (".$paropt.")" ; - if ( $x eq $optstr[$optchoice] ) - { - $latchon = 1 ; - $sw_ompparallel = "" ; - $sw_dmparallel = "" ; - $validresponse = 0 ; - -# Serial compile uses a stub library for mpi calls - if ( $paropt eq 'serial' ) - { - die "\nERROR ERROR ERROR ERROR ERROR ERROR\n\nserial builds are not available for this release;\nThis option will be re-implemented in the future\n\nERROR ERROR ERROR ERROR ERROR ERROR\n"; - $sw_serial_mpi_stub = "wrfmpi_stubs" ; - $sw_serial_mpi_lib = "-lmpi" ; - $sw_dmparallelflag = "-DSTUBMPI" ; - } -# DM parallel - elsif ( $paropt eq 'dmpar' ) - { - $sw_comms_lib = "" ; - $sw_comms_obj = "" ; - $sw_comms_objst = ""; - $sw_dmparallel = "" ; - $sw_dmparallelflag = "-DDM_PARALLEL" ; - $sw_fc = "\$(DM_FC)" ; - $sw_f90 = "\$(DM_F90)" ; - $sw_cc = "\$(DM_CC)" ; - } - } - } - } -} -close CONFIGURE_DEFAULTS ; - -# -# Build configure.upp -open CONFIGURE_UPP, "> configure.upp" or die "cannot append configure.upp" ; - -# -# preamble -open ARCH_PREAMBLE, "< sorc/arch/preamble" or die "cannot open sorc/arch/preamble" ; -my @preamble; -# -# apply substitutions to the preamble... -while ( ) - { - @preamble = ( @preamble, $_ ) ; - } -close ARCH_PREAMBLE ; - -print CONFIGURE_UPP @preamble ; -close ARCH_PREAMBLE ; - -# -# machine/compiler configuration values -printf CONFIGURE_UPP "# Settings for %s", $optstr[$optchoice] ; -print CONFIGURE_UPP @machopts ; - -# -# postamble -open ARCH_POSTAMBLE, "< sorc/arch/postamble" or die "cannot open sorc/arch/postamble" ; -while ( ) { - $_ =~ s/CONFIGURE_NETCDF_PATH/$sw_netcdf_path/g ; - $_ =~ s/CONFIGURE_NETCDF_LIBS/$sw_usenetcdff -lnetcdf/g ; - $_ =~ s/CONFIGURE_COMMS_OBJST/$sw_comms_objst/g ; - $_ =~ s/CONFIGURE_COMMS_OBJ/$sw_comms_obj/g ; - $_ =~ s/CONFIGURE_COMMS_LIB/$sw_comms_lib/g ; - $_ =~ s/CONFIGURE_GRIB2_LIBS/$sw_grib2_libs/g ; - $_ =~ s/CONFIGURE_GRIB2_INC/$sw_grib2_inc/g ; - $_ =~ s/CONFIGURE_SERIAL_MPI_STUB/$sw_serial_mpi_stub/g ; - $_ =~ s/CONFIGURE_SERIAL_MPI_LIB/$sw_serial_mpi_lib/g ; - $_ =~ s/CONFIGURE_BLD_BINDIR/$sw_bindir/g ; - $_ =~ s/CONFIGURE_BLD_INCMOD/$sw_incmod/g ; - $_ =~ s/CONFIGURE_BLD_LIBDIR/$sw_libdir/g ; - $_ =~ s/CONFIGURE_PARALLEL_FLAG/$sw_dmparallelflag/g ; - $_ =~ s/CONFIGURE_NCEPLIB_FLAGS/$nceplib_flags/g ; - print CONFIGURE_UPP; - } -close ARCH_POSTAMBLE ; - -close CONFIGURE_UPP ; - -print "Configuration successful. To build the UPP, type: compile \n" . - "-"x73 . "\n"; - - diff --git a/sorc/arch/configure.defaults b/sorc/arch/configure.defaults deleted file mode 100644 index 2c79c6d46..000000000 --- a/sorc/arch/configure.defaults +++ /dev/null @@ -1,692 +0,0 @@ -########################################################### -# This file defines the compilation, link, and archive flags for -# supported systems. Each record entry should follow the same -# format -# -# Preprocessor flags -# IBM4, IBM8, LINUX, CRAY90, HP, SGI, LINUXF90, VPP500 -# VERBOSE -########################################################### -#ARCH AIX #serial dmpar -# -SFC = xlf_r -SF90 = xlf90_r -qfree=f90 -SCC = cc_r - -DM_FC = mpxlf_r -DM_F90 = mpxlf90_r -qfree=f90 -DM_CC = mpcc_r -DMPI2_SUPPORT - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /usr/bin/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPBIGENDIAN -SIZE_I8R8 = -qintsize=8 -qrealsize=8 -SIZE_I4R8 = -qintsize=4 -qrealsize=8 -SIZE_I4R4 = -qintsize=4 -qrealsize=4 -SIZE = - -PPDEFINE = -WF,-DCOMMCODE -WF,-DIBM4 -WF,-D$(BYTE_ORDER) -PPDEFINE_C = -DCOMMCODE -DIBM4 -DAIX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -qfullpath -qflttrap=inv:ov:zero:en -qcheck -qsigtrap -CRTMDBUG= -CDEBUG = -g -O0 - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS= -P -traditional-cpp $(PPDEFINE_C) -INC_FLAGS= -LDFLAGS = -lessl -FFLAGS = -qmaxmem=-1 -qarch=auto -q64 -qessl -qnosave $(SIZE) \ - -qinitauto=FF911299 $(FPPDEFINE) CONFIGURE_FFLAGS -CFLAGS = -q64 -C -qfullpath -qcpluscmt -qarch=auto $(PPDEFINE_C) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -qmaxmem=-1 -qarch=auto -q64 -qessl -qnosave -qfloat=nomaf - -qinitauto -qhalt=W -qsuffix=f=f90:cpp=F90 $(SIZE) \ - CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux i486 i586 i686, PGI compiler #serial dmpar -# -SFC = pgf90 -SF90 = pgf90 -Mfree -SCC = pgcc - -DM_FC = mpif90 -DM_F90 = mpif90 -Mfree -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -i8 -r8 -SIZE_I4R8 = -i4 -r8 -SIZE_I4R4 = -i4 -r4 -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -Mbounds -Mchkfpstk -Mchkptr -Mchkstk -traceback \ - -Ktrap=ovf,divz -CRTMDBUG= -CDEBUG = -g -O0 -Mbounds -Mchkfpstk -Mchkstk -traceback \ - -Ktrap=ovf,divz - - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -Kieee -FFLAGS = -Kieee -pc 32 -byteswapio $(SIZE) $(FPPDEFINE) \ - CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -byteswapio -Mchkstk -Mdclchk $(SIZE)\ - -Minform,inform -Mnosave -Mref_externals -Kieee \ - CONFIGURE_FFLAGS_CRTM -FL_CRTM = -Kieee - -########################################################### -#ARCH Linux x86_64, PGI compiler # serial dmpar -# -SFC = pgf90 -SF90 = pgf90 -Mfree -SCC = pgcc - -DM_FC = mpif90 -DM_F90 = mpif90 -Mfree -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -i8 -r8 -SIZE_I4R8 = -i4 -r8 -SIZE_I4R4 = -i4 -r4 -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -O0 -g -Mbounds -Mchkfpstk -Mchkptr -Mchkstk -traceback \ - -Ktrap=ovf,divz -CRTMDBUG= -CDEBUG = -O0 -g -Mbounds -Mchkfpstk -Mchkstk -traceback \ - -Ktrap=ovf,divz - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -Kieee -FFLAGS = -Kieee -pc 64 -byteswapio $(SIZE) $(FPPDEFINE) \ - CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -byteswapio -Mchkstk -Mdclchk $(SIZE)\ - -Minform,inform -Mnosave -Mref_externals -Kieee \ - CONFIGURE_FFLAGS_CRTM -FL_CRTM = -Kieee - -########################################################### -#ARCH Linux i486 i586 i686, Intel compiler # serial dmpar -# -SFC = ifort -SF90 = ifort -free -SCC = icc - -DM_FC = mpif90 -DM_F90 = mpif90 -free -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -r8 -i8 -SIZE_I4R8 = -r8 -i4 -SIZE_I4R4 = -r4 -i4 -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -O0 -g -traceback -check all -ftrapuv -fpe0 -CRTMDBUG= -CDEBUG = -O0 -g -traceback -debug all -Wall -check-uninit - -FOPT = -O3 -CRTMOPT = -O3 -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -FFLAGS = -fp-model source -ftz -assume byterecl -convert big_endian \ - -heap-arrays $(SIZE) $(FPPDEFINE) CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fp-model source -ftz -assume byterecl \ - -convert big_endian $(SIZE) CONFIGURE_FFLAGS_CRTM -#FFLAGS_CRTM = -c -checkbound -convert big_endian -e03 -assume byterecl -fp-stack-check -mieee-fp -FL_CRTM = - -########################################################### -#ARCH Linux x86_64, Intel compiler # serial dmpar -# -SFC = ifort -SF90 = ifort -free -SCC = icc - -DM_FC = mpif90 -DM_F90 = mpif90 -free -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -r8 -i8 -SIZE_I4R8 = -r8 -i4 -SIZE_I4R4 = -r4 -i4 -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -O0 -g -traceback -check all -ftrapuv -fpe0 -CRTMDBUG= -O0 -g -traceback -check all -ftrapuv -fpe0 -CDEBUG = -O0 -g -traceback -debug all -Wall -check-uninit - -FOPT = -O3 -CRTMOPT = -O3 -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -FFLAGS = -fp-model source -ftz -assume byterecl -convert big_endian \ - -heap-arrays $(SIZE) $(FPPDEFINE) CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fp-model source -ftz -assume byterecl -convert big_endian \ - $(SIZE) CONFIGURE_FFLAGS_CRTM -#FFLAGS_CRTM = -c -checkbound -convert big_endian -e03 -free -assume byterecl -fp-stack-check -mieee-fp -FL_CRTM = - -########################################################### -#ARCH Linux x86_64, Intel compiler, SGI MPT # serial dmpar -# -SFC = ifort -SF90 = ifort -free -SCC = icc - -DM_FC = mpif90 -DM_F90 = mpif90 -free -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -r8 -i8 -SIZE_I4R8 = -r8 -i4 -SIZE_I4R4 = -r4 -i4 -SIZE = - -PPDEFINE = -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -O0 -g -traceback -check all -ftrapuv -fpe0 -CRTMDBUG= -O0 -g -traceback -check all -ftrapuv -fpe0 -CDEBUG = -O0 -g -traceback -debug all -Wall -check-uninit - -FOPT = -O3 -CRTMOPT = -O3 -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -I$(MPI_ROOT)/include -LDFLAGS = -Wl,-noinhibit-exec -L$(MPI_ROOT)/lib -LDFLAGS_MPI += -lmpi -FFLAGS = -fp-model source -ftz -assume byterecl -convert big_endian \ - -heap-arrays $(SIZE) $(FPPDEFINE) -I$(MPI_ROOT)/include \ - CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fp-model source -ftz -assume byterecl \ - -convert big_endian -I$(MPI_ROOT)/include \ - $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux i486 i586 i686, gfortran compiler # serial dmpar -# -FORMAT_FREE = -ffree-form -ffree-line-length-none - -SFC = gfortran -SF90 = gfortran $(FORMAT_FREE) -SCC = gcc - -DM_FC = mpif90 -DM_F90 = mpif90 $(FREE_FORMAT) -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = TIMEF.o -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -fdefault-integer-8 -fdefault-real-8 -SIZE_I4R8 = -fdefault-real-8 -SIZE_I4R4 = -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -ffpe-trap=overflow,zero -fbounds-check -Wuninitialized \ - -ftrapv -Wall -CRTMDBUG= -CDEBUG = -g -O0 -Wall - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -FFLAGS = -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - $(FPPDEFINE) $(SIZE) -fno-range-check CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) -D_OPENMP CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - -ggdb -static $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux x86_64, gfortran compiler # serial dmpar -# -FORMAT_FREE = -ffree-form -ffree-line-length-none - -SFC = gfortran -SF90 = gfortran $(FORMAT_FREE) -SCC = gcc - -DM_FC = mpif90 -DM_F90 = mpif90 $(FORMAT_FREE) -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = TIMEF.o -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -fdefault-integer-8 -fdefault-real-8 -SIZE_I4R8 = -fdefault-real-8 -SIZE_I4R4 = -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -ffpe-trap=overflow,zero -fbounds-check -Wuninitialized \ - -ftrapv -Wall -CRTMDBUG= -CDEBUG = -g -O0 -Wall - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -FFLAGS = -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - $(FPPDEFINE) $(SIZE) -fno-range-check CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) -D_OPENMP CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - -ggdb -static $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux x86_64, Intel compiler, IBM POE # serial dmpar -# -SFC = ifort -SF90 = ifort -free -SCC = icc - -DM_FC = mpfort -DM_F90 = mpfort -free -DM_CC = mpcc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -i8 -r8 -SIZE_I4R8 = -i4 -r8 -SIZE_I4R4 = -i4 -r4 -SIZE = - -PPDEFINE = -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -O0 -g -check all -ftrapuv -fpe0 -CRTMDBUG= -O0 -g -check all -ftrapuv -fpe0 -CDEBUG = -O0 -g -debug all -Wall -check-uninit - -FOPT = -O3 -msse2 -CRTMOPT = -O3 -msse2 -COPT = -O3 -msse2 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -I$(MPI_ROOT)/include -LDFLAGS = -Wl,-noinhibit-exec -L$(MPI_ROOT)/lib -FFLAGS = -fp-model source -ftz -assume byterecl -convert big_endian \ - -heap-arrays $(SIZE) $(FPPDEFINE) -I$(MPI_ROOT)/include \ - CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fp-model source -ftz -assume byterecl -convert big_endian \ - $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux i486 i586 i686, gfortran compiler: -f90=gfortran # serial dmpar -# -FORMAT_FREE = -ffree-form -ffree-line-length-none - -SFC = gfortran -SF90 = gfortran $(FORMAT_FREE) -SCC = gcc - -DM_FC = mpif90 -f90=$(SFC) -DM_F90 = mpif90 $(FREE_FORMAT) -f90=$(SFC) -DM_CC = mpicc -cc=$(SCC) - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = TIMEF.o -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -fdefault-integer-8 -fdefault-real-8 -SIZE_I4R8 = -fdefault-real-8 -SIZE_I4R4 = -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -ffpe-trap=overflow,zero -fbounds-check -Wuninitialized \ - -ftrapv -Wall -CRTMDBUG= -CDEBUG = -g -O0 -Wall - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -FFLAGS = -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - $(FPPDEFINE) $(SIZE) -fno-range-check CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) -D_OPENMP CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - -ggdb -static $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux x86_64, gfortran compiler: -f90=gfortran # serial dmpar -# -FORMAT_FREE = -ffree-form -ffree-line-length-none - -SFC = gfortran -SF90 = gfortran $(FORMAT_FREE) -SCC = gcc - -DM_FC = mpif90 -f90=$(SFC) -DM_F90 = mpif90 $(FORMAT_FREE) -f90=$(SFC) -DM_CC = mpicc -cc=$(SCC) - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = TIMEF.o -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -fdefault-integer-8 -fdefault-real-8 -SIZE_I4R8 = -fdefault-real-8 -SIZE_I4R4 = -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -ffpe-trap=overflow,zero -fbounds-check -Wuninitialized \ - -ftrapv -Wall -CRTMDBUG= -CDEBUG = -g -O0 -Wall - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -FFLAGS = -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - $(FPPDEFINE) $(SIZE) -fno-range-check CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) -D_OPENMP CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - -ggdb -static $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH Linux i486 i586 i686, PGI compiler: -f90=pgf90 #serial dmpar -# -SFC = pgf90 -SF90 = pgf90 -Mfree -SCC = pgcc - -DM_FC = mpif90 -f90=$(SFC) -DM_F90 = mpif90 -Mfree -f90=$(SFC) -DM_CC = mpicc -cc=$(SCC) - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -i8 -r8 -SIZE_I4R8 = -i4 -r8 -SIZE_I4R4 = -i4 -r4 -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -Mbounds -Mchkfpstk -Mchkptr -Mchkstk -traceback \ - -Ktrap=ovf,divz -CRTMDBUG= -CDEBUG = -g -O0 -Mbounds -Mchkfpstk -Mchkstk -traceback \ - -Ktrap=ovf,divz - - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -Kieee -FFLAGS = -Kieee -pc 32 -byteswapio $(SIZE) $(FPPDEFINE) \ - CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -byteswapio -Mchkstk -Mdclchk $(SIZE)\ - -Minform,inform -Mnosave -Mref_externals -Kieee \ - CONFIGURE_FFLAGS_CRTM -FL_CRTM = -Kieee - -########################################################### -#ARCH Linux x86_64, PGI compiler: -f90=pgf90 # serial dmpar -# -SFC = pgf90 -SF90 = pgf90 -Mfree -SCC = pgcc - -DM_FC = mpif90 -f90=$(SFC) -DM_F90 = mpif90 -Mfree -f90=$(SFC) -DM_CC = mpicc -cc=$(SCC) - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = /lib/cpp - -LINUX_OBJ = -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -i8 -r8 -SIZE_I4R8 = -i4 -r8 -SIZE_I4R4 = -i4 -r4 -SIZE = - -PPDEFINE = -DCOMMCODE -DLINUX -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -O0 -g -Mbounds -Mchkfpstk -Mchkptr -Mchkstk -traceback \ - -Ktrap=ovf,divz -CRTMDBUG= -CDEBUG = -O0 -g -Mbounds -Mchkfpstk -Mchkstk -traceback \ - -Ktrap=ovf,divz - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = -Wl,-noinhibit-exec -Kieee -FFLAGS = -Kieee -pc 64 -byteswapio $(SIZE) $(FPPDEFINE) \ - CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -byteswapio -Mchkstk -Mdclchk $(SIZE)\ - -Minform,inform -Mnosave -Mref_externals -Kieee \ - CONFIGURE_FFLAGS_CRTM -FL_CRTM = -Kieee - -########################################################### -#ARCH Darwin (MACOS) gfortran with gcc #serial smpar dmpar dm+sm -# -FORMAT_FREE = -ffree-form -ffree-line-length-none - -SFC = gfortran -SF90 = gfortran $(FORMAT_FREE) -SCC = gcc - -DM_FC = mpif90 -DM_F90 = mpif90 $(FORMAT_FREE) -DM_CC = mpicc - -FC = CONFIGURE_FC -F90 = CONFIGURE_F90 -CC = CONFIGURE_CC -CPP = cpp -x assembler-with-cpp - -LINUX_OBJ = TIMEF.o -BYTE_ORDER = UPPLITTLEENDIAN -SIZE_I8R8 = -fdefault-integer-8 -fdefault-real-8 -SIZE_I4R8 = -fdefault-real-8 -SIZE_I4R4 = -SIZE = - -PPDEFINE = -DCOMMCODE -D$(BYTE_ORDER) -FPPDEFINE = $(PPDEFINE) - -FDEBUG = -g -O0 -ffpe-trap=overflow,zero -fbounds-check -Wuninitialized \ - -ftrapv -Wall -CRTMDBUG= -CDEBUG = -g -O0 -Wall - -FOPT = -O3 -CRTMOPT = -COPT = -O3 - -CPP_FLAGS = -P -traditional-cpp $(FPPDEFINE) -INC_FLAGS = -LDFLAGS = #Left blank intentionally; --noinhibit-exec option does not seem to exist for MacOS linker -FFLAGS = -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - $(FPPDEFINE) $(SIZE) -fno-range-check CONFIGURE_FFLAGS -CFLAGS = $(PPDEFINE) -D_OPENMP CONFIGURE_CFLAGS -ARFLAGS = ru - -FFLAGS_CRTM = -c -fconvert=big-endian -fno-second-underscore -frecord-marker=4 \ - -ggdb -static $(SIZE) CONFIGURE_FFLAGS_CRTM -FL_CRTM = - -########################################################### -#ARCH NULL - diff --git a/sorc/arch/postamble b/sorc/arch/postamble deleted file mode 100644 index 016adf52d..000000000 --- a/sorc/arch/postamble +++ /dev/null @@ -1,58 +0,0 @@ -# -# Macros, these should be generic for all machines -LN = ln -sf -MAKE = make -RM = /bin/rm -f -CP = /bin/cp -MV = /bin/mv -AR = ar -RANLIB = ranlib - -NCEPLIBLIB = CONFIGURE_NCEPLIBS_LIB -NCEPLIBINC = CONFIGURE_NCEPLIBS_INC -NCEPLIB_FLAGS = CONFIGURE_NCEPLIB_FLAGS - -NETCDFPATH = CONFIGURE_NETCDF_PATH -NETCDFLIBS = CONFIGURE_NETCDF_LIBS - -COMMS_ADD_OBJ = CONFIGURE_COMMS_OBJ -COMMS_ADD_OBJST = CONFIGURE_COMMS_OBJST -COMMS_LIB = CONFIGURE_COMMS_LIB - -SERIAL_MPI_STUB = CONFIGURE_SERIAL_MPI_STUB -SERIAL_MPI_LIB = CONFIGURE_SERIAL_MPI_LIB - -PARALLEL_FLAG = CONFIGURE_PARALLEL_FLAG - -GRIB2SUPT_LIB = CONFIGURE_GRIB2_LIBS -GRIB2SUPT_INC = CONFIGURE_GRIB2_INC - -BINDIR = CONFIGURE_BLD_BINDIR -INCMOD = CONFIGURE_BLD_INCMOD -LIBDIR = CONFIGURE_BLD_LIBDIR - -# -# These files may be changed to enable other files with the same -# functions definitions, but different logic. This is typically -# how backward compatibilty is achieved for the community code. -GRIBIT = GRIBIT.f -CALRAD = CALRAD_WCLOUD_crtm.f - -# There is probably no reason to modify these rules -.SUFFIXES : .c .f .f90 -.c.o: - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< - -.f.o: - $(FC) $(FFLAGS) $(EXTRA_FFLAGS) $< - -.f90.o : - $(F90) $(FFLAGS) $(EXTRA_FFLAGS) $< - -.F.o: - $(CPP) $(CPP_FLAGS) $< > $*.f - $(FC) $(FFLAGS) $(EXTRA_FFLAGS) $< - -.F90.o: - $(CPP) $(CPP_FLAGS) $< > $*.f90 - $(F90) $(FFLAGS) $(EXTRA_FFLAGS) $< diff --git a/sorc/arch/preamble b/sorc/arch/preamble deleted file mode 100644 index fe5556b39..000000000 --- a/sorc/arch/preamble +++ /dev/null @@ -1,18 +0,0 @@ -# configure.upp -# -# This file was automatically generated by the configure script in the -# top level directory. You may make changes to the settings in this -# file but be aware they will be overwritten each time you run configure. -# Ordinarily, it is necessary to run configure once, when the code is -# first installed. -# -# To permanently change options, change the settings for your platform -# in the file arch/configure.defaults then rerun configure. -# - -SHELL = /bin/sh - -LDFLAGS_MPI = # to be overridden later - -#### Architecture specific settings #### - diff --git a/sorc/arch/version b/sorc/arch/version deleted file mode 100644 index cd5e75810..000000000 --- a/sorc/arch/version +++ /dev/null @@ -1,19 +0,0 @@ -Community release_version = 'UPPV4.0.1' - -Synced with NCEP vesion 'v8.0.0' - -Library Versions: -* --> libs with custom mods for community version -bacio - v2.0.1 -g2 - v3.1.0* -g2tmpl - v1.5.0* -gfsio - v1.1.0 -ip - v3.0.0 -nemsio - v2.2.2* -sfcio - v1.1.0 -sigio - v2.1.0 -sp - v2.0.2* -w3emc - v2.2.0 -w3nco - v2.0.6 -xml - v2.0.0 -crtm - v2.2.3 diff --git a/sorc/comlibs/crtm2 b/sorc/comlibs/crtm2 deleted file mode 160000 index c87b0a507..000000000 --- a/sorc/comlibs/crtm2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c87b0a50726446e6aaf10cbd139718be72cd5bd5 diff --git a/sorc/comlibs/crtm2.makefile b/sorc/comlibs/crtm2.makefile deleted file mode 100755 index e23b2e8af..000000000 --- a/sorc/comlibs/crtm2.makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# This is transitional makefile from Community UPP to the CRTM library -# -#============================================================================== -# -# Community Radiate Transfer Model (CRTM) Makefile -# The library name is set in the CRTM makefiles -- so this file must -# be modified if CRTM uodates theirs -#============================================================================== - -SHELL = /bin/sh -LIB = libCRTM.a -INCMOD_CRTM = $(INCMOD)/crtm2 - -# -# configuration file contains architecture and compile information -include ../../../configure.upp - -# -# Needed system commands - -# -# Extra Flags -EXTRA_FFLAGS = -c $(PROMOTION) -EXTRA_CFLAGS = -c -EXTRA_ARFLAGS = - -# -# TARGETS -all : - ( cd src && echo "Making CRTM library in `pwd`" ; \ - $(MAKE) FC="$(F90)" FL="$(F90)" FC_FLAGS="$(FFLAGS_CRTM)" FL_FLAGS="$(FL_CRTM)" install; \ - \ - $(CP) lib/libCRTM.a $(LIBDIR)/$(LIB) ; \ - $(LN) `pwd`/include $(INCMOD_CRTM) ; \ - ) - -# -# Make clean - always use crtm distclean -clean: - ( cd src && echo "Cleaning CRTM library" && \ - $(MAKE) distclean ; \ - $(RM) $(INCMOD_CRTM) ; \ - $(RM) $(LIBDIR)/$(LIB) ; \ - ) -distclean: clean - -.IGNORE: -.PHONY: distclean clean diff --git a/sorc/comlibs/makefile b/sorc/comlibs/makefile deleted file mode 100644 index 301b11e88..000000000 --- a/sorc/comlibs/makefile +++ /dev/null @@ -1,40 +0,0 @@ -# -# This is a makefile for the UPP libraries -SHELL=/bin/sh - -# -# The configuration file created based on the architecture and compiler -include ../../configure.upp - -# -# Note crtm2 library not part of the UPP repository at NCAR - but is available -# at NCAR in the external-lib repository -- the library is bundled as part -# of UPP for any official release -SUBDIRS = crtm2 xml $(SERIAL_MPI_STUB) -LIBDIR = ../../lib -INCMOD = ../../include - -#---------------------------------------------------------------------------- -# Make all directories - -all: $(SUBDIRS) - $(CP) crtm2.makefile crtm2/makefile - @for dir in $(SUBDIRS); do \ - ( cd $$dir; \ - echo -e "\n===== Making $@ in `pwd` =====" ; \ - $(MAKE) $@ ) ; \ - done - -#----------------------------------------------------------------------------- -# clean all directories -- being tidy - -clean: $(SUBDIRS) wrfmpi_stubs - @for dir in $(SUBDIRS) wrfmpi_stubs; do \ - ( cd $$dir && \ - echo -e "\n====== $@ in `pwd` ======" && \ - $(MAKE) $@ ) ; \ - done - $(RM) -f crtm2/makefile - -.IGNORE: -.PHONY: clean diff --git a/sorc/comlibs/wrfmpi_stubs/makefile b/sorc/comlibs/wrfmpi_stubs/makefile deleted file mode 100755 index e76d36f0d..000000000 --- a/sorc/comlibs/wrfmpi_stubs/makefile +++ /dev/null @@ -1,52 +0,0 @@ -#------------------------------------------------------------------------- -# This makefile is for the wrfmpi_stubs library -#------------------------------------------------------------------------- - -SHELL = /bin/sh -LIB = libmpi.a - -# -# configuration based on architecture and compiler -include ../../../configure.upp - -# -#extra flags -EXTRA_FFLAGS = -c $(PROMOTION) -I$(INCMOD) -EXTRA_CFLAGS = -c $(PROMOTION) -I$(INCMOD) -EXTRA_ARFLAGS = - -# -# Library object files -OBJS_F = -OBJS_F77 = mpi_fortran.o -OBJS_C = mpi_c.o -OBJS = $(OBJS_F) $(OBJS_F77) $(OBJS_C) - -SRCS_F = -SRCS_F77 = $(OBJS_F77:.o=.f) -SRCS_C = $(OBJS_C:.o=.c) -SRCS = $(SRCS_F) $(SRCS_F77) $(SRCS_C) - -INCLUDE = mpi.h - -# -# TARGETs -# all - build the library and install it -all: $(LIB) - -# -# Link must be made when using mpi stub for serial compiles -$(LIB): $(OBJS) - $(AR) $(ARFLAGS) $(EXTRA_ARFLAGS) $@ $(OBJS) - $(CP) $(LIB) $(LIBDIR) - if [ $(SERIAL_MPI_STUB) != "" ] ; then \ - $(LN) ../lib/wrfmpi_stubs/mpif.h ../../unipost/mpif.h ; \ - fi - -clean: - $(RM) ../../unipost/mpif.h - $(RM) $(LIBDIR)/$(LIB) - $(RM) $(OBJS) $(LIB) - -.IGNORE: -.PHONY: clean diff --git a/sorc/comlibs/wrfmpi_stubs/mpi.h b/sorc/comlibs/wrfmpi_stubs/mpi.h deleted file mode 100644 index 32f8d55fe..000000000 --- a/sorc/comlibs/wrfmpi_stubs/mpi.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Dummy defs for MPI C stubs */ - -#define MPI_Comm int -#define MPI_Request int -#define MPI_Status int -#define MPI_Datatype int -#define MPI_Op int - -#define MPI_INT 6 -#define MPI_FLOAT 10 -#define MPI_DOUBLE 11 -#define MPI_BYTE 3 - -#define MPI_SUM 102 -#define MPI_MAX 100 -#define MPI_MIN 101 diff --git a/sorc/comlibs/wrfmpi_stubs/mpi_c.c b/sorc/comlibs/wrfmpi_stubs/mpi_c.c deleted file mode 100644 index 4d928fa66..000000000 --- a/sorc/comlibs/wrfmpi_stubs/mpi_c.c +++ /dev/null @@ -1,276 +0,0 @@ -/* Stub versions of MPI C routines (single processor) - most do nothing */ - -#include "mpi.h" -#include "stdio.h" - -/* function prototypes */ - -void mpi_copy_integer(int *, int *, int); -void mpi_copy_float(float *, float *, int); -void mpi_copy_double(double *, double *, int); -void mpi_copy_byte(char *, char *, int); - -/* MPI Functions */ - -void MPI_Comm_rank(MPI_Comm comm, int *me) -{ - *me = 0; -} - -void MPI_Comm_size(MPI_Comm comm, int *nprocs) -{ - *nprocs = 1; -} - -void MPI_Send(void *buf, int count, MPI_Datatype datatype, - int dest, int tag, MPI_Comm comm) -{ - printf("MPI Stub WARNING: Should not send message to self\n"); -} - -void MPI_Recv(void *buf, int count, MPI_Datatype datatype, - int source, int tag, MPI_Comm comm, MPI_Status *status) -{ - printf("MPI Stub WARNING: Should not recv message from self\n"); -} - -void MPI_Irecv(void *buf, int count, MPI_Datatype datatype, - int source, int tag, MPI_Comm comm, MPI_Request *request) -{ - printf("MPI Stub WARNING: Should not recv message from self\n"); -} - -void MPI_Isend(void *buf, int count, MPI_Datatype datatype, - int source, int tag, MPI_Comm comm, MPI_Request *request) -{ - printf("MPI Stub WARNING: Should not send message from self\n"); -} - - -void MPI_Wait(MPI_Request *request, MPI_Status *status) -{ - printf("MPI Stub WARNING: Should not wait on message from self\n"); -} - -void MPI_Abort(MPI_Comm comm, MPI_Status *status) -{ - printf("MPI Stub : from Abort\n"); -} - -void MPI_Finalize( void ) -{ - printf("MPI Stub WARNING: Should not MPI_Finalize\n"); -} - -void MPI_Initialized( int * tag ) -{ - printf("MPI Stub WARNING: Should not MPI_Initialize\n"); -} - - -void MPI_Waitany(int count, MPI_Request *request, int *index, - MPI_Status *status) -{ - printf("MPI Stub WARNING: Should not wait on message from self\n"); -} - -void MPI_Comm_dup(MPI_Comm comm, MPI_Comm *comm_out) { } - -void MPI_Comm_free(MPI_Comm *comm) { } - -int MPI_Bcast(void *sendbuf, int sendcount, MPI_Datatype datatype, - int task, MPI_Comm comm) -{ - return 0; -} - -/* copy values from data1 to data2 */ - -void MPI_Allreduce(void *sendbuf, void *recvbuf, int sendcount, - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) -{ - if (datatype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcount); - else if (datatype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf, sendcount); - else if (datatype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf, sendcount); - else if (datatype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf, sendcount); -} - -/* copy values from data1 to data2 */ - -void MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype, - void *recvbuf, int recvcount, MPI_Datatype recvtype, - int task, MPI_Comm comm) -{ - if (sendtype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf,sendcount); -} - -/* copy values from data1 to data2 */ - -void MPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, - void *recvbuf, int *recvcounts, MPI_Datatype recvtype, - int *task, MPI_Comm comm) -{ - if (sendtype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf,sendcount); -} - -/* copy values from data1 to data2 */ - -void MPI_Scatterv(void *sendbuf, int sendcount, int *displs, - MPI_Datatype sendtype, void *recvbuf, - int *recvcounts, MPI_Datatype recvtype, - int *task, MPI_Comm comm) -{ - if (sendtype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf,sendcount); -} - -/* copy values from data1 to data2 */ - -void MPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype, - void *recvbuf, int recvcount, MPI_Datatype recvtype, - MPI_Comm comm) -{ - if (sendtype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf,sendcount); -} - -/* copy values from data1 to data2 */ - -void MPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype, - void *recvbuf, int *recvcounts, int *displs, - MPI_Datatype recvtype, MPI_Comm comm) -{ - if (sendtype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf,sendcount); - else if (sendtype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf,sendcount); -} - -/* copy values from data1 to data2 */ - -void MPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts, - MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) -{ - if (datatype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,*recvcounts); - else if (datatype == MPI_FLOAT) - mpi_copy_float(sendbuf,recvbuf,*recvcounts); - else if (datatype == MPI_DOUBLE) - mpi_copy_double(sendbuf,recvbuf,*recvcounts); - else if (datatype == MPI_BYTE) - mpi_copy_byte(sendbuf,recvbuf,*recvcounts); -} - - -/* -------------------- -Added routines for data copying -------------------- -*/ - -void mpi_copy_integer(int *data1, int *data2, int n) -{ - int i; - for (i = 0; i < n; i++) data2[i] = data1[i]; -} - -void mpi_copy_float(float *data1, float *data2, int n) -{ - int i; - for (i = 0; i < n; i++) data2[i] = data1[i]; -} - -void mpi_copy_double(double *data1, double *data2, int n) -{ - int i; - for (i = 0; i < n; i++) data2[i] = data1[i]; -} - -void mpi_copy_byte(char *data1, char *data2, int n) -{ - int i; - for (i = 0; i < n; i++) data2[i] = data1[i]; -} - -void MPI_Cart_shift(MPI_Comm comm,int direction,int disp, - int *rank_source,int *rank_dest) -{ - -} - - -int MPI_Cart_rank ( MPI_Comm comm, int *coords, int *rank ) -{ - return 0; -} - -int MPI_Alltoall ( void *sendbuf, int *sendcnts, MPI_Datatype sendtype, - void *recvbuf, int *recvcnts, MPI_Datatype recvtype, MPI_Comm comm ) -{ - if (sendtype == MPI_INT) - mpi_copy_integer(sendbuf,recvbuf,sendcnts[0]); - else if (sendtype == MPI_FLOAT) - mpi_copy_float((float *)sendbuf,(float *)recvbuf, sendcnts[0]); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double((double *)sendbuf,(double *)recvbuf, sendcnts[0]); - else if (sendtype == MPI_BYTE) - mpi_copy_byte((char *)sendbuf,(char *)recvbuf, sendcnts[0]); - return 0; -} - -int MPI_Alltoallv ( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, - void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype recvtype, MPI_Comm comm ) -{ - int *recv_offset; - - recv_offset = recvbuf + *sdispls; - - if (sendtype == MPI_INT) - mpi_copy_integer((int *)sendbuf,(int *)recv_offset,sendcnts[0]); - else if (sendtype == MPI_FLOAT) - mpi_copy_float((float *)sendbuf,(float *)recv_offset, sendcnts[0]); - else if (sendtype == MPI_DOUBLE) - mpi_copy_double((double *)sendbuf,(double *)recv_offset, sendcnts[0]); - else if (sendtype == MPI_BYTE) - mpi_copy_byte((char *)sendbuf,(char *)recv_offset, sendcnts[0]); - return 0; -} - -int MPI_Cart_coords ( MPI_Comm comm, int rank, int maxdims, int *coords ) -{ - return 0; -} diff --git a/sorc/comlibs/wrfmpi_stubs/mpi_fortran.f b/sorc/comlibs/wrfmpi_stubs/mpi_fortran.f deleted file mode 100644 index 06a997497..000000000 --- a/sorc/comlibs/wrfmpi_stubs/mpi_fortran.f +++ /dev/null @@ -1,543 +0,0 @@ -c Stub versions of MPI F77 routines (single processor) - most do nothing -c 20101228 slovacek add mpi_file_open and mpi_file_read_at declarations -c these files will do nothing, but report that serial bbuilds -c don't support the functionalty and return a failure code - -c timer routine -c can replace etime with standard UNIX call on a particular system - - double precision function mpi_wtime() - real array(2) - - mpi_wtime = etime(array) - - return - end - - - subroutine mpi_init(ierror) - - return - end - - subroutine mpi_initialized(mpi_inited, ierror) - logical mpi_inited - - return - end - - - - subroutine mpi_finalize(ierror) - - return - end - - - subroutine mpi_abort(mpi_comm,ierror) - - stop - end - -c return me = 0 - - subroutine mpi_comm_rank(mpi_comm,me,ierror) - - me = 0 - - return - end - -c return nprocs = 1 - - subroutine mpi_comm_size(mpi_comm,nprocs,ierror) - - nprocs = 1 - - return - end - - - subroutine mpi_barrier(mpi_comm,ierror) - - return - end - -c warn against sending message to self, since no data copy is done - - subroutine mpi_send(data,n,mpi_datatype,iproc,itag, - $ mpi_comm,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not send message to self' - - return - end - - subroutine mpi_comm_dup(oldcomm, newcomm,ierror) - integer oldcomm, newcomm,ierror - newcomm = oldcomm - return - end - - subroutine mpi_isend(buf,count,datatype,source, - & tag,comm,request,ierror) - integer buf(*), count,datatype,source,tag,comm, - & request,ierror - call mpi_error() - return - end - - subroutine mpi_error() - print *, 'mpi_error called' - stop - end - - subroutine mpi_comm_group (com,group,ierr ) - integer com,group,ierr - write(6,*) 'dont want to see this' - group=com - return - end - - subroutine mpi_group_excl(intin,n,ranks,ngroup,ierr) - integer intin,n,ranks(n),ngroup,ierr - ngroup=intin - return - end - - subroutine mpi_group_free (intin,ierr ) - integer intin,ierr - return - end - - subroutine mpi_intercomm_create (lcom,llead,ipeer,irem,itag, - & newcom,ierr ) - integer lcom,llead,ipeer,irem,itag,newcom,ierr - newcom=lcom - write(6,*) 'shouldnt be calling this!' - return - end - - subroutine mpi_comm_create (com,group,ncom,ierr ) - integer com,group,ncom,ierr - ncom=com - return - end - - subroutine mpi_sendrecv(sendbuf,sendcount,sendtype, - + dest,sendtag,recvbuf,recvcount,recvtype,source,recvtag, - + comm,status,ierr) - - integer sendcount,sendtype - integer dest,sendtag,recvcount - integer recvtype,source,recvtag,comm,ierr,status(*) - - write(6,*) 'should never execute this when running with one CPU' - - return - end - - subroutine mpi_gatherv(sendbuf,sendcount,sendtype, - + recvbuf,recvcounts,displs,recvtype,root,comm,ierr) - - integer sendcount,sendtype,recvcounts(*),displs(*) - integer recvtype,root,comm,ierr - write(6,*) 'should never execute this when running with one CPU' - - return - end - - subroutine mpi_alltoall(sendbuf,sendcount,sendtype, - + recvbuf, recvcount, recvtype, comm,ierr) - - integer sendcount,sendtype,recvcount,recvtype,comm - integer ierr=0 - - if (sendtype.eq.mpi_integer) then - call mpi_copy_integer(sendbuf,recvbuf,sendcount) - else if (sendtype.eq.mpi_real) then - call mpi_copy_real(sendbuf,recvbuf,sendcount) - else if (sendtype.eq.mpi_double_precision) then - call mpi_copy_double_precision(sendbuf,recvbuf,sendcount) - else if (sendtype.eq.mpi_real8) then - call mpi_copy_double_precision(sendbuf,recvbuf,sendcount) - endif - - return - end - - subroutine mpi_alltoallv(sendbuf,sendcount,sdispls, sendtype, - + recvbuf, recvcount, rdispls, recvtype, comm,ierr) - - integer sendcount,sendtype,recvcount,recvtype,comm - integer sdispls, rdispls - integer ierr - integer recv_offset - - ierr = 0 - recv_offset = recvbuf + rdispls(1) - if (sendtype.eq.mpi_integer) then - call mpi_copy_integer(sendbuf,recv_offset,sendcount) - else if (sendtype.eq.mpi_real) then - call mpi_copy_real(sendbuf,recv_offset,sendcount) - else if (sendtype.eq.mpi_double_precision) then - call mpi_copy_double_precision(sendbuf,recv_offset,sendcount) - else if (sendtype.eq.mpi_real8) then - call mpi_copy_double_precision(sendbuf,recv_offset,sendcount) - endif - - return - end - -c warn against sending message to self, since no data copy is done - - subroutine mpi_rsend(data,n,mpi_datatype,iproc,itag, - $ mpi_comm,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not send message to self' - - return - end - -c warn against receiving message from self, since no data copy is done - - subroutine mpi_probe(iproc,itag,mpi_comm,istatus,ierror) - - return - end - - - subroutine mpi_recv(data,n,mpi_datatype,iproc,itag, - $ mpi_comm,istatus,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not recv message from self' - - return - end - -c warn against querying message from self, since no data copy is done - - subroutine mpi_get_count(istatus,mpi_datatype,icount,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not query message from self' - - return - end - - -c warn against receiving message from self, since no data copy is done - - subroutine mpi_irecv(data,n,mpi_datatype,iproc,itag, - $ mpi_comm,irequest,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not recv message from self' - - return - end - -c warn against waiting on message from self, since no data copy is done - - subroutine mpi_wait(irequest,istatus,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not wait on message from self' - - return - end - -c warn against waiting on message from self, since no data copy is done - - subroutine mpi_waitall(icount,irequest,istatus,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not wait on message from self' - - return - end - -c warn against waiting on message from self, since no data copy is done - - subroutine mpi_waitany(icount,array_of_requests, - $ index,istatus,ierror) - - write (6,*) - $ 'MPI Stub WARNING: Should not wait on message from self' - - return - end - - - subroutine mpi_bcast(data,n,mpi_datatype,node,mpi_comm,ierror) - - return - end - - subroutine mpi_type_size(mpi_datatype,isize,ierror) - - return - end - -c copy values from data1 to data2 - - subroutine mpi_reduce(data1,data2,n,mpi_datatype, - $ mpi_operation,io_task,mpi_comm,ierror) - include "mpif.h" - - if (mpi_datatype.eq.mpi_integer) then - call mpi_copy_integer(data1,data2,n) - else if (mpi_datatype.eq.mpi_real) then - call mpi_copy_real(data1,data2,n) - else if (mpi_datatype.eq.mpi_double_precision) then - call mpi_copy_double_precision(data1,data2,n) - else if (mpi_datatype.eq.mpi_real8) then - call mpi_copy_double_precision(data1,data2,n) - endif - - return - end - - - subroutine mpi_allreduce(data1,data2,n,mpi_datatype, - $ mpi_operation,mpi_comm,ierror) - include "mpif.h" - - print *,'allreduce ',mpi_datatype,mpi_integer,mpi_real - if (mpi_datatype.eq.mpi_integer) then - call mpi_copy_integer(data1,data2,n) - else if (mpi_datatype.eq.mpi_real) then - call mpi_copy_real(data1,data2,n) - else if (mpi_datatype.eq.mpi_double_precision) then - call mpi_copy_double_precision(data1,data2,n) - else if (mpi_datatype.eq.mpi_real8) then - call mpi_copy_double_precision(data1,data2,n) - endif - - return - end - - subroutine mpi_gather(data1,nsend,mpi_sendtype,data2, - $ nrecv,mpi_recvtype,io_task,mpi_comm,ierror) - include "mpif.h" - - if (mpi_sendtype.eq.mpi_integer) then - call mpi_copy_integer(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_real) then - call mpi_copy_real(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_double_precision) then - call mpi_copy_double_precision(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_real8) then - call mpi_copy_double_precision(data1,data2,nsend) - endif - - return - end - - -c copy values from data1 to data2 - - subroutine mpi_allgather(data1,nsend,mpi_sendtype, - $ data2,nrecv,mpi_recvtype,mpi_comm,ierror) - include "mpif.h" - - if (mpi_sendtype.eq.mpi_integer) then - call mpi_copy_integer(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_real) then - call mpi_copy_real(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_double_precision) then - call mpi_copy_double_precision(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_real8) then - call mpi_copy_double_precision(data1,data2,nsend) - endif - - return - end - - -c copy values from data1 to data2 - - subroutine mpi_allgatherv(data1,nsend,mpi_sendtype, - $ data2,nrecv,ndispls,mpi_recvtype,mpi_comm,ierror) - include "mpif.h" - - if (mpi_sendtype.eq.mpi_integer) then - call mpi_copy_integer(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_real) then - call mpi_copy_real(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_double_precision) then - call mpi_copy_double_precision(data1,data2,nsend) - else if (mpi_sendtype.eq.mpi_real8) then - call mpi_copy_double_precision(data1,data2,nsend) - endif - - return - end - - -c copy values from data1 to data2 - - subroutine mpi_reduce_scatter(data1,data2,n,mpi_datatype, - $ mpi_operation,mpi_comm,ierror) - include "mpif.h" - - if (mpi_datatype.eq.mpi_integer) then - call mpi_copy_integer(data1,data2,n) - else if (mpi_datatype.eq.mpi_real) then - call mpi_copy_real(data1,data2,n) - else if (mpi_datatype.eq.mpi_double_precision) then - call mpi_copy_double_precision(data1,data2,n) - else if (mpi_datatype.eq.mpi_real8) then - call mpi_copy_double_precision(data1,data2,n) - endif - - return - end - - - subroutine mpi_cart_create(mpi_comm,ndims,dims, - $ periods,reorder,mpi_comm_cart,ierror) - logical periods(*),reorder - integer dims(*) - - return - end - - -c set all coords = 0 - - subroutine mpi_cart_get(mpi_comm,ndims,dims,periods, - $ coords,ierror) - logical periods(*) - integer dims(*),coords(*) - - do i = 1,ndims - coords(i) = 0 - enddo - - return - end - - -c set isource = idest = self = 0 - - subroutine mpi_cart_shift(mpi_comm,idir,idisp, - $ isource,idest,ierror) - - isource = 0 - idest = 0 - - return - end - - - subroutine mpi_comm_split(mpi_comm,icolor,ikey,new_comm,ierror) - - return - end - - - subroutine mpi_comm_free(mpi_comm,ierror) - - return - end - - -c ------------------- -c Added routines for data copying -c ------------------- - - subroutine mpi_copy_integer(data1,data2,n) - integer data1(*),data2(*) - - do i = 1,n - data2(i) = data1(i) - enddo - - return - end - - - subroutine mpi_copy_real(data1,data2,n) - real data1(*),data2(*) - - do i = 1,n - data2(i) = data1(i) - enddo - - return - end - - - subroutine mpi_copy_double_precision(data1,data2,n) - double precision data1(*),data2(*) - - do i = 1,n - data2(i) = data1(i) - enddo - - return - end - - subroutine mpi_cart_coords(mpi_comm, rank, maxdims, coords, ierr) - integer coords(*) - - return - end - - subroutine mpi_scatterv(globbuf, counts, displs, gettype, - $ field, my_count, sendtype, root, comm, ierr) - return - end - - subroutine mpi_group_incl(group,n,ranks,newgroup,ierror) - return - end - -c----------------------------- -c Add file IO routines - which are littly supported -c----------------------------- - subroutine mpi_file_open(comm, filename, amode, info, fh, ierr) - character(*) filename - integer comm, amode, info, fh - integer ierr=0 - - print *, "MPI STUB - file open ignored " - - return - end - - subroutine mpi_file_read_at(fh, offset, buf, count, dtype, status, - $ ierr) - integer ierr - - print *, "MPI STUB - mpi_file_read_at not supported" - ierr = 255 - - return - end - - subroutine mpi_file_write_at(fh, offset, buf, count, dtype, status, - & ierr) - include "mpif.h" - - integer fh, count, dtype, status - integer ierr=0 - - ! This is from bacio - and count is expected as 4 byte quantity - ! We ignore count as this should be serial and one big fat write - ! operation - print *, "MPI STUB - file write on ", FH - print *, " byte count assumed to be 4 byte relative" - CALL WRYTE(FH, COUNT, BUF) - - return - end - - subroutine mpi_file_close(fh, ierr) - integer ierr=0 - return - end diff --git a/sorc/comlibs/wrfmpi_stubs/mpif.h b/sorc/comlibs/wrfmpi_stubs/mpif.h deleted file mode 100644 index 069b43404..000000000 --- a/sorc/comlibs/wrfmpi_stubs/mpif.h +++ /dev/null @@ -1,250 +0,0 @@ -! -! -! (C) 1993 by Argonne National Laboratory and Mississipi State University. -! All rights reserved. See COPYRIGHT in top-level directory. -! -! -! user include file for MPI programs, with no dependencies -! -! It really is not possible to make a perfect include file that can -! be used by both F77 and F90 compilers, but this is close. We have removed -! continuation lines (allows free form input in F90); systems whose -! Fortran compilers support ! instead of just C or * for comments can -! globally replace a C in the first column with !; the resulting file -! should work for both Fortran 77 and Fortran 90. -! -! If your Fortran compiler supports ! for comments, you can run this -! through sed with -! sed -e 's/^C/\!/g' -! -! We have also removed the use of contractions (involving the single quote) -! character because some users use .F instead of .f files (to invoke the -! cpp preprocessor) and further, their preprocessor is determined to find -! matching single quote pairs (and probably double quotes; given the -! different rules in C and Fortran, this sounds like a disaster). Rather than -! take the position that the poor users should get a better system, we -! have removed the text that caused problems. Of course, the users SHOULD -! get a better system... -! -! return codes - INTEGER MPI_SUCCESS,MPI_ERR_BUFFER,MPI_ERR_COUNT,MPI_ERR_TYPE - INTEGER MPI_ERR_TAG,MPI_ERR_COMM,MPI_ERR_RANK,MPI_ERR_ROOT - INTEGER MPI_ERR_GROUP - INTEGER MPI_ERR_OP,MPI_ERR_TOPOLOGY,MPI_ERR_DIMS,MPI_ERR_ARG - INTEGER MPI_ERR_UNKNOWN,MPI_ERR_TRUNCATE,MPI_ERR_OTHER - INTEGER MPI_ERR_INTERN,MPI_ERR_IN_STATUS,MPI_ERR_PENDING - INTEGER MPI_ERR_REQUEST, MPI_ERR_LASTCODE - PARAMETER (MPI_SUCCESS=0,MPI_ERR_BUFFER=1,MPI_ERR_COUNT=2) - PARAMETER (MPI_ERR_TYPE=3,MPI_ERR_TAG=4,MPI_ERR_COMM=5) - PARAMETER (MPI_ERR_RANK=6,MPI_ERR_ROOT=7,MPI_ERR_GROUP=8) - PARAMETER (MPI_ERR_OP=9,MPI_ERR_TOPOLOGY=10,MPI_ERR_DIMS=11) - PARAMETER (MPI_ERR_ARG=12,MPI_ERR_UNKNOWN=13) - PARAMETER (MPI_ERR_TRUNCATE=14,MPI_ERR_OTHER=15) - PARAMETER (MPI_ERR_INTERN=16,MPI_ERR_IN_STATUS=17) - PARAMETER (MPI_ERR_PENDING=18,MPI_ERR_REQUEST=19) - PARAMETER (MPI_ERR_LASTCODE=1073741823) -! - INTEGER MPI_UNDEFINED - parameter (MPI_UNDEFINED = (-32766)) -! - INTEGER MPI_GRAPH, MPI_CART - PARAMETER (MPI_GRAPH = 1, MPI_CART = 2) - INTEGER MPI_PROC_NULL - PARAMETER ( MPI_PROC_NULL = (-1) ) -! - INTEGER MPI_BSEND_OVERHEAD - PARAMETER ( MPI_BSEND_OVERHEAD = 512 ) - - INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR - PARAMETER(MPI_SOURCE=2, MPI_TAG=3, MPI_ERROR=4) - INTEGER MPI_STATUS_SIZE - PARAMETER (MPI_STATUS_SIZE=4) - INTEGER MPI_MAX_PROCESSOR_NAME, MPI_MAX_ERROR_STRING - PARAMETER (MPI_MAX_PROCESSOR_NAME=256) - PARAMETER (MPI_MAX_ERROR_STRING=512) - INTEGER MPI_MAX_NAME_STRING - PARAMETER (MPI_MAX_NAME_STRING=63) -! - INTEGER MPI_COMM_NULL - PARAMETER (MPI_COMM_NULL=0) -! - INTEGER MPI_DATATYPE_NULL - PARAMETER (MPI_DATATYPE_NULL = 0) - - INTEGER MPI_ERRHANDLER_NULL - PARAMETER (MPI_ERRHANDLER_NULL = 0) - - INTEGER MPI_GROUP_NULL - PARAMETER (MPI_GROUP_NULL = 0) - - INTEGER MPI_KEYVAL_INVALID - PARAMETER (MPI_KEYVAL_INVALID = 0) - - INTEGER MPI_REQUEST_NULL - PARAMETER (MPI_REQUEST_NULL = 0) -! - INTEGER MPI_IDENT, MPI_CONGRUENT, MPI_SIMILAR, MPI_UNEQUAL - PARAMETER (MPI_IDENT=0, MPI_CONGRUENT=1, MPI_SIMILAR=2) - PARAMETER (MPI_UNEQUAL=3) -! -! MPI_BOTTOM needs to be a known address; here we put it at the -! beginning of the common block. The point-to-point and collective -! routines know about MPI_BOTTOM, but MPI_TYPE_STRUCT as yet does not. -! -! MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects -! Until the underlying MPI library implements the C version of these -! (a null pointer), these are declared as arrays of MPI_STATUS_SIZE -! -! The types MPI_INTEGER1,2,4 and MPI_REAL4,8 are OPTIONAL. -! Their values are zero if they are not available. Note that -! using these reduces the portability of code (though may enhance -! portability between Crays and other systems) -! - INTEGER MPI_TAG_UB, MPI_HOST, MPI_IO - INTEGER MPI_BOTTOM - INTEGER MPI_STATUS_IGNORE(MPI_STATUS_SIZE) - INTEGER MPI_STATUSES_IGNORE(MPI_STATUS_SIZE) - INTEGER MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION - INTEGER MPI_COMPLEX, MPI_DOUBLE_COMPLEX,MPI_LOGICAL - INTEGER MPI_CHARACTER, MPI_BYTE, MPI_2INTEGER, MPI_2REAL - INTEGER MPI_2DOUBLE_PRECISION, MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX - INTEGER MPI_UB, MPI_LB - INTEGER MPI_PACKED, MPI_WTIME_IS_GLOBAL - INTEGER MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY - INTEGER MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND - INTEGER MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC - INTEGER MPI_MAXLOC - INTEGER MPI_OP_NULL - INTEGER MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN -! - PARAMETER (MPI_ERRORS_ARE_FATAL=119) - PARAMETER (MPI_ERRORS_RETURN=120) -! - PARAMETER (MPI_COMPLEX=23,MPI_DOUBLE_COMPLEX=24,MPI_LOGICAL=25) - PARAMETER (MPI_REAL=26,MPI_DOUBLE_PRECISION=27,MPI_INTEGER=28) - PARAMETER (MPI_2INTEGER=29,MPI_2COMPLEX=30,MPI_2DOUBLE_COMPLEX=31) - PARAMETER (MPI_2REAL=32,MPI_2DOUBLE_PRECISION=33,MPI_CHARACTER=1) - PARAMETER (MPI_BYTE=3,MPI_UB=16,MPI_LB=15,MPI_PACKED=14) - - INTEGER MPI_ORDER_C, MPI_ORDER_FORTRAN - PARAMETER (MPI_ORDER_C=56, MPI_ORDER_FORTRAN=57) - INTEGER MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC - INTEGER MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG - PARAMETER (MPI_DISTRIBUTE_BLOCK=121, MPI_DISTRIBUTE_CYCLIC=122) - PARAMETER (MPI_DISTRIBUTE_NONE=123) - PARAMETER (MPI_DISTRIBUTE_DFLT_DARG=-49767) - INTEGER MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL - PARAMETER (MPI_MAX_INFO_KEY=255, MPI_MAX_INFO_VAL=1024) - INTEGER MPI_INFO_NULL - PARAMETER (MPI_INFO_NULL=0) - -! -! Optional Fortran Types. Configure attempts to determine these. -! - INTEGER MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4, MPI_INTEGER8 - INTEGER MPI_INTEGER16 - INTEGER MPI_REAL4, MPI_REAL8, MPI_REAL16 - INTEGER MPI_COMPLEX8, MPI_COMPLEX16, MPI_COMPLEX32 - PARAMETER (MPI_INTEGER1=1,MPI_INTEGER2=4) - PARAMETER (MPI_INTEGER4=6) - PARAMETER (MPI_INTEGER8=13) - PARAMETER (MPI_INTEGER16=0) - PARAMETER (MPI_REAL4=10) - PARAMETER (MPI_REAL8=11) - PARAMETER (MPI_REAL16=0) - PARAMETER (MPI_COMPLEX8=23) - PARAMETER (MPI_COMPLEX16=24) - PARAMETER (MPI_COMPLEX32=0) -! -! This is now handled with either the "pointer" extension or this same -! code, appended at the end. -! COMMON /MPIPRIV/ MPI_BOTTOM,MPI_STATUS_IGNORE,MPI_STATUSES_IGNORE -!C -!C Without this save, some Fortran implementations may make the common -!C dynamic! -!C -!C For a Fortran90 module, we might replace /MPIPRIV/ with a simple -!C SAVE MPI_BOTTOM -!C -! SAVE /MPIPRIV/ -! - PARAMETER (MPI_MAX=100,MPI_MIN=101,MPI_SUM=102,MPI_PROD=103) - PARAMETER (MPI_LAND=104,MPI_BAND=105,MPI_LOR=106,MPI_BOR=107) - PARAMETER (MPI_LXOR=108,MPI_BXOR=109,MPI_MINLOC=110) - PARAMETER (MPI_MAXLOC=111, MPI_OP_NULL=0) -! - PARAMETER (MPI_GROUP_EMPTY=90,MPI_COMM_WORLD=91,MPI_COMM_SELF=92) - PARAMETER (MPI_TAG_UB=80,MPI_HOST=82,MPI_IO=84) - PARAMETER (MPI_WTIME_IS_GLOBAL=86) -! - INTEGER MPI_ANY_SOURCE - PARAMETER (MPI_ANY_SOURCE = (-2)) - INTEGER MPI_ANY_TAG - PARAMETER (MPI_ANY_TAG = (-1)) -! - INTEGER MPI_VERSION, MPI_SUBVERSION - PARAMETER (MPI_VERSION = 1, MPI_SUBVERSION = 2) -! -! There are additional MPI-2 constants - INTEGER MPI_ADDRESS_KIND, MPI_OFFSET_KIND - PARAMETER (MPI_ADDRESS_KIND=4) - PARAMETER (MPI_OFFSET_KIND=8) -! -! All other MPI routines are subroutines -! This may cause some Fortran compilers to complain about defined and -! not used. Such compilers should be improved. -! -! Some Fortran compilers will not link programs that contain -! external statements to routines that are not provided, even if -! the routine is never called. Remove PMPI_WTIME and PMPI_WTICK -! if you have trouble with them. -! -! DOUBLE PRECISION MPI_WTIME, MPI_WTICK,PMPI_WTIME,PMPI_WTICK -! EXTERNAL MPI_WTIME, MPI_WTICK,PMPI_WTIME,PMPI_WTICK -! -! The attribute copy/delete subroutines are symbols that can be passed -! to MPI routines -! -! EXTERNAL MPI_NULL_COPY_FN, MPI_NULL_DELETE_FN, MPI_DUP_FN -! COMMON /MPIPRIV/ MPI_BOTTOM,MPI_STATUS_IGNORE,MPI_STATUSES_IGNORE -! -! Without this save, some Fortran implementations may make the common -! dynamic! -! -! For a Fortran90 module, we might replace /MPIPRIV/ with a simple -! SAVE MPI_BOTTOM -! -! SAVE /MPIPRIV/ -! -! $Id: mpiof.h.in,v 1.3 1999/08/06 18:33:09 thakur Exp $ -! -! Copyright (C) 1997 University of Chicago. -! See COPYRIGHT notice in top-level directory. -! -! -! user include file for Fortran MPI-IO programs -! - INTEGER MPI_MODE_RDONLY, MPI_MODE_RDWR, MPI_MODE_WRONLY - INTEGER MPI_MODE_DELETE_ON_CLOSE, MPI_MODE_UNIQUE_OPEN - INTEGER MPI_MODE_CREATE, MPI_MODE_EXCL - INTEGER MPI_MODE_APPEND, MPI_MODE_SEQUENTIAL - PARAMETER (MPI_MODE_RDONLY=2, MPI_MODE_RDWR=8, MPI_MODE_WRONLY=4) - PARAMETER (MPI_MODE_CREATE=1, MPI_MODE_DELETE_ON_CLOSE=16) - PARAMETER (MPI_MODE_UNIQUE_OPEN=32, MPI_MODE_EXCL=64) - PARAMETER (MPI_MODE_APPEND=128, MPI_MODE_SEQUENTIAL=256) -! - INTEGER MPI_FILE_NULL - PARAMETER (MPI_FILE_NULL=0) -! - INTEGER MPI_MAX_DATAREP_STRING - PARAMETER (MPI_MAX_DATAREP_STRING=128) -! - INTEGER MPI_SEEK_SET, MPI_SEEK_CUR, MPI_SEEK_END - PARAMETER (MPI_SEEK_SET=600, MPI_SEEK_CUR=602, MPI_SEEK_END=604) -! - INTEGER MPIO_REQUEST_NULL - PARAMETER (MPIO_REQUEST_NULL=0) -! - integer*8 MPI_DISPLACEMENT_CURRENT - PARAMETER (MPI_DISPLACEMENT_CURRENT=-54278278) - diff --git a/sorc/comlibs/xml/make_xmlreadf90 b/sorc/comlibs/xml/make_xmlreadf90 deleted file mode 100644 index 5f1170152..000000000 --- a/sorc/comlibs/xml/make_xmlreadf90 +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# This makefile is used at NCEP/EMC to build the post_t.f90 file -# based on the post_t.xml. The post_t.f90 file is part of the -# unipost source code. It is unlikely a community user will -# need to utilize this routine - -echo post_t > xmlreader.inp -xmlreader -cp post_t.f90 .. - -echo "created and installed post_t.f90" - -exit 0 - -echo postcntrl_t > xmlreader.inp -xmlreader - -echo "created postcntrl_t.f90" - -echo postavblfld_t > xmlreader.inp -xmlreader - -echo "created postavblfld_t.f90" - -exit 0 diff --git a/sorc/comlibs/xml/makefile b/sorc/comlibs/xml/makefile deleted file mode 100644 index 2ceb7dd26..000000000 --- a/sorc/comlibs/xml/makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# for the XML-Fortran modules and parsing library -SHELL = /bin/sh -x -LIB = libxmlparse.a -PGM = xmlreader - -# -#configuration file contains architecture and compile information -include ../../../configure.upp - -# -# extra flags -EXTRA_CPPFLAGS = -EXTRA_FFLAGS = -c -O2 -EXTRA_CFLAGS = -c -EXTRA_ARFLAGS = - -all : $(LIB) - -# -# PGM xmlreader is a program which creates the template file for -# post to build with - not created or used for building community post -$(PGM) : xmlreader.o $(LIB) - $(FC) -o $(PGM) xmlreader.o $(LIB) - -$(LIB) : xmlparse.o read_xml_prims.o - $(AR) $(ARFLAGS) $@ $? - $(CP) *.mod $(INCMOD) - $(CP) $(LIB) $(LIBDIR) - -clean: - @for f in `ls *.mod` ; do \ - $(RM) $$f ; $(RM) $(INCMOD)/$$f ; \ - done - $(RM) *.o - $(RM) *.mod - $(RM) *.a - $(RM) $(LIBDIR)/$(LIB) - $(RM) $(PGM) - -.f90.o: - $(FC) $(FFLAGS) $(EXTRA_FFLAGS) $< - -#-------------Dependencies------------------------------------ -read_xml_prims.o : read_xml_array.inc read_xml_scalar.inc read_from_buffer.inc diff --git a/sorc/comlibs/xml/post_t.xml b/sorc/comlibs/xml/post_t.xml deleted file mode 100644 index aafe8519c..000000000 --- a/sorc/comlibs/xml/post_t.xml +++ /dev/null @@ -1,62 +0,0 @@ - - diff --git a/sorc/comlibs/xml/read_from_buffer.inc b/sorc/comlibs/xml/read_from_buffer.inc deleted file mode 100755 index 0cb6ee959..000000000 --- a/sorc/comlibs/xml/read_from_buffer.inc +++ /dev/null @@ -1,79 +0,0 @@ -! Part of XML-Fortran library: -! -! $Id: read_from_buffer.inc,v 1.2 2006/03/26 19:05:48 arjenmarkus Exp $ -! - character(len=*), intent(in) :: buffer - integer, intent(inout) :: ierror - - integer :: n - integer :: i - integer :: step - integer :: ierr - ! - ! First allocate an array that is surely large enough - ! Note: - ! This is not completely failsafe: with list-directed - ! input you can also use repeat counts (10000*1.0 for - ! instance). - ! - allocate( work(len(buffer)/2+1) ) - - ! - ! NOTE: - ! This is not portable!! - ! - ! read( buffer, *, iostat = ierror ) (work(n), n=1,size(work)) - ! - ! So, use a different strategy: a binary search - ! First: establish that we have at least one item to read - ! Second: do the binary search - ! -! read( buffer, *, iostat = ierr ) work(1) -! if ( ierr /= 0 ) then -! n = 0 -! else - n = 1 - do while ( n <= size(work) ) - n = 2 * n - enddo - n = n / 2 - step = n / 2 -! step = n / 2 - - do while ( step > 0 ) - read( buffer, *, iostat = ierr ) (work(i), i = 1,n) - if ( ierr /= 0 ) then - ierror = ierr ! Store the error code for later use - n = n - step - else - n = n + step - endif - step = step / 2 - enddo -! endif - - ! - ! Then allocate an array of the actual size needed - ! and copy the data - ! - ! - if ( associated( var ) ) then - deallocate( var ) - endif - ! - ! One complication: we may have one too many - ! (consequence of the binary search) - ! - read( buffer, *, iostat = ierr ) (work(i), i = 1,n) - if ( ierr < 0 ) then - n = n - 1 - endif - - allocate( var(n) ) - var(1:n) = work(1:n) - deallocate( work ) - - if ( ierror .lt. 0 ) then - ierror = 0 - endif - diff --git a/sorc/comlibs/xml/read_xml_array.inc b/sorc/comlibs/xml/read_xml_array.inc deleted file mode 100755 index a88086e74..000000000 --- a/sorc/comlibs/xml/read_xml_array.inc +++ /dev/null @@ -1,54 +0,0 @@ -! Part of XML-Fortran library: -! -! $Id: read_xml_array.inc,v 1.3 2007/02/26 20:33:38 arjenmarkus Exp $ -! - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - logical, intent(inout) :: endtag - character(len=*), dimension(:,:), intent(in) :: attribs - integer, intent(in) :: noattribs - character(len=*), dimension(:), intent(in) :: data - integer, intent(in) :: nodata - logical, intent(inout) :: has_var - - character(len=len(attribs(1,1))) :: buffer - integer :: idx - integer :: ierr - - ! - ! The big trick: - ! A string long enough to hold all data strings - ! - character(len=nodata*(len(data(1))+1)) :: bufferd - integer :: start - - ! - ! The value can be stored in an attribute values="..." or in - ! the data - ! - has_var = .false. - idx = xml_find_attrib( attribs, noattribs, 'values', buffer ) - if ( idx .gt. 0 ) then - call read_from_buffer( buffer, var, ierr ) - if ( buffer .ne. ' ' ) then - has_var = .true. - endif - else - bufferd = ' ' - start = 1 - do idx = 1,nodata - if ( data(idx) .ne. ' ' ) then - bufferd(start:) = data(idx) - start = start + len(data(idx)) + 1 - endif - enddo - call read_from_buffer( bufferd, var, ierr ) - if ( bufferd .ne. ' ' ) then - has_var = .true. - endif - endif - - if ( ierr .ne. 0 ) then - write(*,*) 'Error reading variable - tag = ', trim(tag) - has_var = .false. - endif diff --git a/sorc/comlibs/xml/read_xml_prims.f90 b/sorc/comlibs/xml/read_xml_prims.f90 deleted file mode 100755 index 80975c054..000000000 --- a/sorc/comlibs/xml/read_xml_prims.f90 +++ /dev/null @@ -1,359 +0,0 @@ -! read_xml_prims.f90 - Read routines for primitive data -! -! $Id: read_xml_prims.f90,v 1.5 2007/02/26 20:33:38 arjenmarkus Exp $ -! -! Arjen Markus -! -! General information: -! This module is part of the XML-Fortran library. Its -! purpose is to help read individual items from an XML -! file into the variables that have been connected to -! the various tags. It is used by the code generated -! by the make_xml_reader program. -! -! Because the routines differ mostly by the type of the -! output variable, the body is included, to prevent -! too much repeated blocks of code with all the maintenance -! issues that causes. -! -! Program log: -! Feb 2011 Jun Wang adopted from xml parser to read xml file -! -! -module read_xml_primitives - use xmlparse - implicit none - - private :: read_from_buffer - private :: read_from_buffer_integers - private :: read_from_buffer_reals - private :: read_from_buffer_doubles - private :: read_from_buffer_logicals - private :: read_from_buffer_words - - interface read_from_buffer - module procedure read_from_buffer_integers - module procedure read_from_buffer_reals - module procedure read_from_buffer_doubles - module procedure read_from_buffer_logicals - module procedure read_from_buffer_words - end interface - -contains - -! skip_until_endtag -- -! Routine to read the XML file until the end tag is encountered -! -! Arguments: -! info The XML file data structure -! tag The tag in question -! attribs Array of attributes and their values -! data Array of strings, representing the data -! error Has an error occurred? -! -subroutine skip_until_endtag( info, tag, attribs, data, error ) - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - character(len=*), dimension(:,:), intent(inout) :: attribs - character(len=*), dimension(:), intent(inout) :: data - logical, intent(out) :: error - - integer :: noattribs - integer :: nodata - integer :: ierr - logical :: endtag - character(len=len(tag)) :: newtag - - error = .true. - do - call xml_get( info, newtag, endtag, attribs, noattribs, & - data, nodata ) - if ( xml_error(info) ) then - error = .true. - exit - endif - if ( endtag .and. newtag .eq. tag ) then - exit - endif - enddo -end subroutine skip_until_endtag - -! read_xml_integer -- -! Routine to read a single integer from the parsed data -! -! Arguments: -! info XML parser structure -! tag The tag in question (error message only) -! endtag End tag found? (Dummy argument, actually) -! attribs Array of attributes and their values -! noattribs Number of attributes found -! data Array of strings, representing the data -! nodata Number of data strings -! var Variable to be filled -! has_var Has the variable been set? -! -subroutine read_xml_integer( info, tag, endtag, attribs, noattribs, data, nodata, & - var, has_var ) - integer, intent(inout) :: var - - include 'read_xml_scalar.inc' - -end subroutine read_xml_integer - -! read_xml_line -- -! Routine to read a single line of text from the parsed data -! -! Arguments: -! info XML parser structure -! tag The tag in question (error message only) -! endtag End tag found? (Dummy argument, actually) -! attribs Array of attributes and their values -! noattribs Number of attributes found -! data Array of strings, representing the data -! nodata Number of data strings -! var Variable to be filled -! has_var Has the variable been set? -! -subroutine read_xml_line( info, tag, endtag, attribs, noattribs, data, nodata, & - var, has_var ) - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - logical, intent(inout) :: endtag - character(len=*), dimension(:,:), intent(in) :: attribs - integer, intent(in) :: noattribs - character(len=*), dimension(:), intent(in) :: data - integer, intent(in) :: nodata - character(len=*), intent(inout) :: var - logical, intent(inout) :: has_var - - character(len=len(attribs(1,1))) :: buffer - integer :: idx - integer :: ierr - - ! - ! The value can be stored in an attribute value="..." or in - ! the data - ! - has_var = .false. - idx = xml_find_attrib( attribs, noattribs, 'value', buffer ) - if ( idx .gt. 0 ) then - var = buffer - has_var = .true. - else - do idx = 1,nodata - if ( data(idx) .ne. ' ' ) then - var = data(idx) - has_var = .true. - exit - endif - enddo - endif -end subroutine read_xml_line - -! read_xml_real, ... -- -! See read_xml_integer for an explanation -! -subroutine read_xml_real( info, tag, endtag, attribs, noattribs, data, nodata, & - var, has_var ) - real, intent(inout) :: var - - include 'read_xml_scalar.inc' - -end subroutine read_xml_real - -subroutine read_xml_double( info, tag, endtag, attribs, noattribs, data, nodata, & - var, has_var ) - real(kind=kind(1.0d00)), intent(inout) :: var - - include 'read_xml_scalar.inc' - -end subroutine read_xml_double - -subroutine read_xml_logical( info, tag, endtag, attribs, noattribs, data, nodata, & - var, has_var ) - logical, intent(inout) :: var - - include 'read_xml_scalar.inc' - -end subroutine read_xml_logical - -subroutine read_xml_word( info, tag, endtag, attribs, noattribs, data, nodata, & - var, has_var ) - character(len=*), intent(inout) :: var - - include 'read_xml_scalar.inc' - -end subroutine read_xml_word - -! read_xml_integer_array -- -! Routine to read a one-dimensional integer array from the parsed -! ata -! -! Arguments: -! info XML parser structure -! tag The tag in question (error message only) -! endtag End tag found? (Dummy argument, actually) -! attribs Array of attributes and their values -! noattribs Number of attributes found -! data Array of strings, representing the data -! nodata Number of data strings -! var Variable to be filled -! has_var Has the variable been set? -! -subroutine read_xml_integer_array( info, tag, endtag, attribs, noattribs, data, & - nodata, var, has_var ) - integer, dimension(:), pointer :: var - - include 'read_xml_array.inc' - -end subroutine read_xml_integer_array - -! read_xml_line_array -- -! Routine to read an array of lines of text from the parsed data -! -! Arguments: -! info XML parser structure -! tag The tag in question (error message only) -! attribs Array of attributes and their values -! noattribs Number of attributes found -! data Array of strings, representing the data -! nodata Number of data strings -! var Variable to be filled -! has_var Has the variable been set? -! -subroutine read_xml_line_array( info, tag, endtag, attribs, noattribs, data, & - nodata, var, has_var ) - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - logical, intent(inout) :: endtag - character(len=*), dimension(:,:), intent(in) :: attribs - integer, intent(in) :: noattribs - character(len=*), dimension(:), intent(in) :: data - integer, intent(in) :: nodata - character(len=*), dimension(:), pointer :: var - logical, intent(inout) :: has_var - - character(len=len(attribs(1,1))) :: buffer - integer :: idx - integer :: idxv - integer :: ierr - logical :: started - - ! - ! The value can be stored in an attribute values="..." or in - ! the data - ! - has_var = .false. - idx = xml_find_attrib( attribs, noattribs, 'values', buffer ) - if ( idx .gt. 0 ) then - allocate( var(1:1) ) - var(1) = buffer - if ( buffer .ne. ' ' ) then - has_var = .true. - endif - else - idxv = 0 - started = .false. - do idx = 1,nodata - if ( data(idx) .ne. ' ' .or. started ) then - if ( .not. started ) then - allocate( var(1:nodata-idx+1) ) - started = .true. - endif - idxv = idxv + 1 - var(idxv) = data(idx) - endif - enddo - if ( started ) then - has_var = .true. - endif - endif -end subroutine read_xml_line_array - -! read_xml_real_array, ... -- -! See read_xml_integer_array for an explanation -! -subroutine read_xml_real_array( info, tag, endtag, attribs, noattribs, data, & - nodata, var, has_var ) - real, dimension(:), pointer :: var - - include 'read_xml_array.inc' - -end subroutine read_xml_real_array - -subroutine read_xml_double_array( info, tag, endtag, attribs, noattribs, data, & - nodata, var, has_var ) - real(kind=kind(1.0d00)), dimension(:), pointer :: var - - include 'read_xml_array.inc' - -end subroutine read_xml_double_array - -subroutine read_xml_logical_array( info, tag, endtag, attribs, noattribs, data, & - nodata, var, has_var ) - logical, dimension(:), pointer :: var - - include 'read_xml_array.inc' - -end subroutine read_xml_logical_array - -subroutine read_xml_word_array( info, tag, endtag, attribs, noattribs, data, & - nodata, var, has_var ) - character(len=*), dimension(:), pointer :: var - - include 'read_xml_array.inc' - -end subroutine read_xml_word_array - -! read_from_buffer_integers -- -! Routine to read all integers from a long string -! -! Arguments: -! buffer String containing the data -! var Variable to be filled -! ierror Error flag -! -subroutine read_from_buffer_integers( buffer, var, ierror ) - integer, dimension(:), pointer :: var - integer, dimension(:), pointer :: work - - include 'read_from_buffer.inc' - -end subroutine read_from_buffer_integers - -! read_xml_from_buffer_reals, ... - -! See read_xml_from_buffer_integers for an explanation -! -subroutine read_from_buffer_reals( buffer, var, ierror ) - real, dimension(:), pointer :: var - real, dimension(:), pointer :: work - - include 'read_from_buffer.inc' - -end subroutine read_from_buffer_reals - -subroutine read_from_buffer_doubles( buffer, var, ierror ) - real(kind=kind(1.0d00)), dimension(:), pointer :: var - real(kind=kind(1.0d00)), dimension(:), pointer :: work - - include 'read_from_buffer.inc' - -end subroutine read_from_buffer_doubles - -subroutine read_from_buffer_logicals( buffer, var, ierror ) - logical, dimension(:), pointer :: var - logical, dimension(:), pointer :: work - - include 'read_from_buffer.inc' - -end subroutine read_from_buffer_logicals - -subroutine read_from_buffer_words( buffer, var, ierror ) - character(len=*), dimension(:), pointer :: var - character(len=len(var)), dimension(:), pointer :: work - - include 'read_from_buffer.inc' - -end subroutine read_from_buffer_words - -end module read_xml_primitives diff --git a/sorc/comlibs/xml/read_xml_scalar.inc b/sorc/comlibs/xml/read_xml_scalar.inc deleted file mode 100755 index b28ba3c7a..000000000 --- a/sorc/comlibs/xml/read_xml_scalar.inc +++ /dev/null @@ -1,40 +0,0 @@ -! Part of XML-Fortran library: -! -! $Id: read_xml_scalar.inc,v 1.3 2007/02/26 20:33:38 arjenmarkus Exp $ -! - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - logical, intent(inout) :: endtag - character(len=*), dimension(:,:), intent(in) :: attribs - integer, intent(in) :: noattribs - character(len=*), dimension(:), intent(in) :: data - integer, intent(in) :: nodata - logical, intent(inout) :: has_var - - character(len=len(attribs(1,1))) :: buffer - integer :: idx - integer :: ierr - - ! - ! The value can be stored in an attribute value="..." or in - ! the data - ! - has_var = .false. - idx = xml_find_attrib( attribs, noattribs, 'value', buffer ) - if ( idx .gt. 0 ) then - read( buffer, *, iostat=ierr ) var - has_var = .true. - else - do idx = 1,nodata - if ( data(idx) .ne. ' ' ) then - read( data(idx), *, iostat=ierr ) var - has_var = .true. - exit - endif - enddo - endif - - if ( ierr .ne. 0 ) then - write(*,*) 'Error reading variable - tag = ', trim(tag) - has_var = .false. - endif diff --git a/sorc/comlibs/xml/xmlparse.f90 b/sorc/comlibs/xml/xmlparse.f90 deleted file mode 100755 index 0c194bf8c..000000000 --- a/sorc/comlibs/xml/xmlparse.f90 +++ /dev/null @@ -1,1019 +0,0 @@ -! xmlparse.f90 - Simple, limited XML parser in Fortran -! -! $Id: xmlparse.f90,v 1.13 2007/04/03 19:23:20 arjenmarkus Exp $ -! -! Arjen Markus -! -! General information: -! The module reads XML files by: -! - Identifying the tag and all attributes and data belonging -! to the tag. -! - Returning to the calling subprogram to let it take care of -! the tag, attributes and data. -! - If the tag is actually an ending tag, then this is flagged -! too. -! - Handling all the data is left to the calling subprogram, -! the module merely facilitates in the parsing. -! -! Note: -! The module in its current version has a number of limitations: -! - It does not handle escape sequences (like >. to signify -! a ">" sign) -! - It does not handle tags with attributes that are spread -! over more than one line -! - The maximum length of a line is 1000 characters -! - It may report too many lines of data (empty lines) -! - No DOM support nor support for an object tree -! - It is probably not very robust in detecting malformed XML files -! -! Some questions: -! - What to do with leading blanks? -! -! Update - several ideas: -! - Introduce at least two options (via xml_options): -! - ignore_whitespace - remove leading blanks and leading and trailing -! empty lines from the PCDATA -! - no_data_truncation - consider truncation of data (more -! attributes or lines of character data than -! can be stored) a read error -! - Introduce convenience functions and subroutines: -! - xml_ok() - all is well, reading can continue -! - xml_data_trunc() - was there truncation of the data? -! - xml_find_attrib() - find an attribute by name -! -! Program log: -! Feb 2011 Jun Wang adopted from xml parser to read xml file -! Jan 2012 Jun Wang set initial value for primitive data type -! -module xmlparse - - implicit none - - integer, parameter :: XML_BUFFER_LENGTH = 1000 - ! - ! Define the data type that holds the parser information - ! - type XML_PARSE - integer :: lun ! LU-number of the XML-file - integer :: level ! Indentation level (output) - integer :: lineno ! Line in file - logical :: ignore_whitespace ! Ignore leading blanks etc. - logical :: no_data_truncation ! Do not allow data truncation - logical :: too_many_attribs ! More attributes than could be stored? - logical :: too_many_data ! More lines of data than could be stored? - logical :: eof ! End of file? - logical :: error ! Invalid XML file or other error? - character(len=XML_BUFFER_LENGTH) :: line ! Buffer - end type XML_PARSE - - ! - ! Global options - ! - integer, parameter :: XML_STDOUT = -1 -! integer, private :: report_lun_ = XML_STDOUT - integer, private :: report_lun_ = 600 - logical, private :: report_errors_ = .false. - logical, private :: report_details_ = .false. - - ! - ! Global data (the ampersand must come first) - ! - character(len=10), dimension(2,3), save, private :: entities = & - reshape( (/ '& ', '&', & - '> ', '> ', & - '< ', '< ' /), (/2,3/) ) - - ! - ! Auxiliary routines - private - - private :: xml_compress_ - private :: xml_put_open_tag_ - private :: xml_put_element_ - private :: xml_put_close_tag_ - private :: xml_replace_entities_ - ! - ! Interfaces to reporting routines - ! - private :: xml_report_details_int_ - private :: xml_report_details_string_ - private :: xml_report_errors_int_ - private :: xml_report_errors_string_ - - interface xml_report_details - module procedure xml_report_details_int_ - module procedure xml_report_details_string_ - end interface - interface xml_report_errors - module procedure xml_report_errors_int_ - module procedure xml_report_errors_string_ - module procedure xml_report_errors_extern_ - end interface - -contains - -! xml_report_details_int_ -- -! Routine to write a text with an integer value -! Arguments: -! text Text to be written -! int Integer value to be added -! -subroutine xml_report_details_int_( text, int ) - character(len=*), intent(in) :: text - integer, intent(in) :: int - - if ( report_details_ ) then - if ( report_lun_ .eq. XML_STDOUT ) then - write(*,*) trim(text), int - else - write(report_lun_,*) trim(text), int - endif - endif -end subroutine xml_report_details_int_ - -! xml_report_details_string_ -- -! Routine to write a text with a string value -! Arguments: -! text Text to be written -! string String to be added -! -subroutine xml_report_details_string_( text, string ) - character(len=*), intent(in) :: text - character(len=*), intent(in) :: string - - if ( report_details_ ) then - if ( report_lun_ .eq. XML_STDOUT ) then - write(*,*) trim(text), ' ', trim(string) - else - write(report_lun_,*) trim(text), ' ', trim(string) - endif - endif -end subroutine xml_report_details_string_ - - -! xml_report_errors_string_ -- -! Routine to write an error message text with an integer value -! Arguments: -! text Text to be written -! int Integer value to be added -! lineno Line number in the file -! -subroutine xml_report_errors_int_( text, int, lineno ) - character(len=*), intent(in) :: text - integer, intent(in) :: int - integer, optional, intent(in) :: lineno - - if ( report_errors_ .or. report_details_ ) then - if ( report_lun_ .eq. XML_STDOUT ) then - write(*,*) trim(text), int - if ( present(lineno) ) then - write(*,*) ' At or near line', lineno - endif - else - write(report_lun_,*) trim(text), int - if ( present(lineno) ) then - write(report_lun_,*) ' At or near line', lineno - endif - endif - endif -end subroutine xml_report_errors_int_ - -! xml_report_errors_string_ -- -! Routine to write an error message text with a string value -! Arguments: -! text Text to be written -! string String to be added -! lineno Line number in the file -! -subroutine xml_report_errors_string_( text, string, lineno ) - character(len=*), intent(in) :: text - character(len=*), intent(in) :: string - integer, optional, intent(in) :: lineno - - if ( report_errors_ .or. report_details_ ) then - if ( report_lun_ .eq. XML_STDOUT ) then - write(*,*) trim(text), ' ', trim(string) - if ( present(lineno) ) then - write(*,*) ' At or near line', lineno - endif - else - write(report_lun_,*) trim(text), ' ', trim(string) - if ( present(lineno) ) then - write(report_lun_,*) ' At or near line', lineno - endif - endif - endif -end subroutine xml_report_errors_string_ - -! xml_report_errors_extern_ -- -! Routine to write an error message text with a string value -! Arguments: -! info Structure holding information on the XML-file -! text Text to be written -! Note: -! This routine is meant for use by routines outside -! this module -! -subroutine xml_report_errors_extern_( info, text ) - type(XML_PARSE), intent(in) :: info - character(len=*), intent(in) :: text - - if ( report_lun_ .eq. XML_STDOUT ) then - write(*,*) trim(text), ' - at or near line', info%lineno - else - write(report_lun_,*) trim(text), ' - at or near line', info%lineno - endif -end subroutine xml_report_errors_extern_ - -! xml_open -- -! Routine to open an XML file for reading or writing -! Arguments: -! info Structure holding information on the XML-file -! fname Name of the file -! mustread The file will be read (.true.) or written (.false.) -! -subroutine xml_open( info, fname, mustread ) - character(len=*), intent(in) :: fname - logical, intent(in) :: mustread - type(XML_PARSE), intent(out) :: info - - integer :: i - integer :: k - integer :: kend - integer :: ierr - logical :: opend - logical :: exists - - info%lun = 10 - info%ignore_whitespace = .false. - info%no_data_truncation = .false. - info%too_many_attribs = .false. - info%too_many_data = .false. - info%eof = .false. - info%error = .false. - info%level = -1 - info%lineno = 0 - - do i = 10,99 - inquire( unit = i, opened = opend ) - if ( .not. opend ) then - info%lun = i - inquire( file = fname, exist = exists ) - if ( .not. exists .and. mustread ) then - call xml_report_errors( 'XML_OPEN: file does not exist:', trim(fname)) - info%lun = -1 - info%error = .true. - else - open( unit = info%lun, file = fname ) - call xml_report_details( 'XML_OPEN: opened file ', trim(fname) ) - call xml_report_details( 'at LU-number: ', info%lun ) - endif - exit - endif - enddo - if ( .not. info%error .and. mustread ) then - k = 1 - do while ( k .ge. 1 ) - read( info%lun, '(a)', iostat = ierr ) info%line - if ( ierr .eq. 0 ) then - info%line = adjustl( info%line ) - k = index( info%line, ' appears on a single line! - ! - if ( k .ge. 1 ) then - kend = index( info%line, '?>' ) - if ( kend .le. 0 ) then - call xml_report_errors( 'XML_OPEN: error reading file with LU-number: ', info%lun ) - call xml_report_errors( 'Line starting with ""', ' ' ) - info%error = .true. - exit - endif - endif - else - call xml_report_errors( 'XML_OPEN: error reading file with LU-number: ', info%lun ) - call xml_report_errors( 'Possibly no line starting with "' - endif -end subroutine xml_open - -! xml_close -- -! Routine to close an XML file -! Arguments: -! info Structure holding information on the XML-file -! -subroutine xml_close( info ) - type(XML_PARSE), intent(inout) :: info - - close( info%lun ) - - ! - ! Only clean up the LU-number, so that the calling program - ! can examine the last condition - ! - call xml_report_details( 'XML_CLOSE: Closing file with LU-number ', info%lun ) - info%lun = -1 -end subroutine xml_close - -! xml_get -- -! Routine to get the next bit of information from an XML file -! Arguments: -! info Structure holding information on the XML-file -! tag Tag that was encountered -! endtag Whether the end of the element was encountered -! attribs List of attribute-value pairs -! no_attribs Number of pairs in the list -! data Lines of character data found -! no_data Number of lines of character data -! -subroutine xml_get( info, tag, endtag, attribs, no_attribs, & - data, no_data ) - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(out) :: tag - logical, intent(out) :: endtag - character(len=*), intent(out), dimension(:,:) :: attribs - integer, intent(out) :: no_attribs - character(len=*), intent(out), dimension(:) :: data - integer, intent(out) :: no_data - - integer :: kspace - integer :: kend - integer :: keq - integer :: kfirst - integer :: ksecond - integer :: idxat - integer :: idxdat - integer :: ierr - logical :: close_bracket - logical :: comment_tag - character(len=XML_BUFFER_LENGTH) :: nextline - - ! - ! Initialise the output - ! - endtag = .false. - no_attribs = 0 - no_data = 0 - - info%too_many_attribs = .false. - info%too_many_data = .false. - - if ( info%lun .lt. 0 ) then - call xml_report_details( 'XML_GET on closed file ', ' ' ) - return - endif - - ! - ! From the previous call or the call to xmlopen we have - ! the line that we need to parse already in memory: - ! - ! - comment_tag = .false. - close_bracket = .false. - kspace = index( info%line, ' ' ) - kend = index( info%line, '>' ) - do while ( kend .le. 0 ) - read( info%lun, '(a)', iostat = ierr ) nextline - info%lineno = info%lineno + 1 - - if ( ierr .eq. 0 ) then - info%line = trim(info%line) // ' ' // adjustl(nextline) - else - info%error = .true. - call xml_report_errors( 'XML_GET - end of tag not found ', & - '(buffer too small?)', info%lineno ) - call xml_close( info ) - return - endif - kend = index( info%line, '>' ) - enddo - if ( kend .gt. kspace ) then - kend = kspace - else - close_bracket = .true. - endif - - ! - ! Check for the end of an ordianry tag and of - ! a comment tag - ! - if ( info%line(1:3) .eq. '-->' ) then - endtag = .true. - tag = info%line(4:kend-1) - else if ( info%line(1:2) .eq. '' ) - if ( keq .gt. kend ) keq = 0 ! Guard against multiple tags - ! with attributes on one line - - ! - ! No attributes any more? - ! - if ( keq .lt. 1 ) then - kend = index( info%line, '/>' ) - if ( kend .ge. 1 ) then - kend = kend + 1 ! To go beyond the ">" character - endtag = .true. - else - kend = index( info%line, '>' ) - if ( kend .lt. 1 ) then - call xml_report_errors( 'XML_GET - wrong ending of tag ', & - trim(info%line), info%lineno ) - info%error = .true. ! Wrong ending of line! - call xml_close( info ) - return - else - close_bracket = .true. - endif - endif - if ( kend .ge. 1 ) then - info%line = adjustl( info%line(kend+1:) ) - endif - exit - endif - - idxat = idxat + 1 - if ( idxat .le. size(attribs,2) ) then - no_attribs = idxat - attribs(1,idxat) = adjustl(info%line(1:keq-1)) ! Use adjustl() to avoid - ! multiple spaces, etc - info%line = adjustl( info%line(keq+1:) ) - - ! - ! We have almost found the start of the attribute's value - ! - kfirst = index( info%line, '"' ) - if ( kfirst .lt. 1 ) then - call xml_report_errors( 'XML_GET - malformed attribute-value pair: ', & - trim(info%line), info%lineno ) - info%error = .true. ! Wrong form of attribute-value pair - call xml_close( info ) - return - endif - - ksecond = index( info%line(kfirst+1:), '"' ) + kfirst - if ( ksecond .lt. 1 ) then - call xml_report_errors( 'XML_GET - malformed attribute-value pair: ', & - trim(info%line), info%lineno ) - info%error = .true. ! Wrong form of attribute-value pair - call xml_close( info ) - return - endif - - attribs(2,idxat) = info%line(kfirst+1:ksecond-1) - info%line = adjustl( info%line(ksecond+1:) ) - endif - - if ( idxat .gt. size(attribs,2) ) then - call xml_report_errors( 'XML_GET - more attributes than could be stored: ', & - trim(info%line), info%lineno ) - info%too_many_attribs = .true. - info%line = ' ' - exit - endif - enddo - - ! - ! Now read the data associated with the current tag - ! - all the way to the next "<" character - ! - ! To do: reduce the number of data lines - empty ones - ! at the end should not count. - ! - do - if ( comment_tag ) then - kend = index( info%line, '-->' ) - else - kend = index( info%line, '<' ) - endif - idxdat = idxdat + 1 - if ( idxdat .le. size(data) ) then - no_data = idxdat - if ( kend .ge. 1 ) then - data(idxdat) = info%line(1:kend-1) - info%line = info%line(kend:) - else - data(idxdat) = info%line - endif - else - call xml_report_errors( 'XML_GET - more data lines than could be stored: ', & - trim(info%line), info%lineno ) - info%too_many_data = .true. - exit - endif - - ! - ! No more data? Otherwise, read on - ! - if ( kend .ge. 1 ) then - exit - else - read( info%lun, '(a)', iostat = ierr ) info%line - info%lineno = info%lineno + 1 - - if ( ierr .lt. 0 ) then - call xml_report_details( 'XML_GET - end of file found - LU-number: ', & - info%lun ) - info%eof = .true. - elseif ( ierr .gt. 0 ) then - call xml_report_errors( 'XML_GET - error reading file with LU-number ', & - info%lun, info%lineno ) - info%error = .true. - endif - if ( ierr .ne. 0 ) then - exit - endif - endif - enddo - - ! - ! Compress the data? - ! - if ( info%ignore_whitespace ) then - call xml_compress_( data, no_data ) - endif - - ! - ! Replace the entities, if any - ! - call xml_replace_entities_( data, no_data ) - - call xml_report_details( 'XML_GET - number of attributes: ', no_attribs ) - call xml_report_details( 'XML_GET - number of data lines: ', no_data ) - -end subroutine xml_get - -! xml_put -- -! Routine to write a tag with the associated data to an XML file -! Arguments: -! info Structure holding information on the XML-file -! tag Tag that was encountered -! endtag Whether the end of the element was encountered -! attribs List of attribute-value pairs -! no_attribs Number of pairs in the list -! data Lines of character data found -! no_data Number of lines of character data -! type Type of action: -! open - just the opening tag with attributes -! elem - complete element -! close - just the closing tag -! -subroutine xml_put(info, tag, attribs, no_attribs, & - data, no_data, type) - - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - character(len=*), intent(in), dimension(:,:) :: attribs - integer, intent(in) :: no_attribs - character(len=*), intent(in), dimension(:) :: data - integer, intent(in) :: no_data - character(len=*) :: type - - integer :: i - - character(len=300), parameter :: indent = ' ' - - select case(type) - case('open') - call xml_put_open_tag_(info, tag, attribs, no_attribs, & - data, no_data) - case('elem') - call xml_put_element_(info, tag, attribs, no_attribs, & - data, no_data) - case('close') - call xml_put_close_tag_(info, tag, attribs, no_attribs, & - data, no_data) - end select - -end subroutine xml_put - -! xml_put_open_tag_ -- -! Routine to write the opening tag with the attributes -! Arguments: -! info Structure holding information on the XML-file -! tag Tag that was encountered -! endtag Whether the end of the element was encountered -! attribs List of attribute-value pairs -! no_attribs Number of pairs in the list -! data Lines of character data found -! no_data Number of lines of character data -! -subroutine xml_put_open_tag_(info, tag, attribs, no_attribs, & - data, no_data) - - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - character(len=*), intent(in), dimension(:,:) :: attribs - integer, intent(in) :: no_attribs - character(len=*), intent(in), dimension(:) :: data - integer, intent(in) :: no_data - - character(len=1) :: aa - integer :: i - - character(len=300), parameter :: indent = ' ' - - write( info%lun, '(3a)', advance = 'no' ) & - indent(1:3*info%level), '<', adjustl(tag) - do i=1,no_attribs - if (attribs(2,i).ne.'') then - write( info%lun, '(5a)', advance = 'no' ) & - ' ',trim(attribs(1,i)),'="', trim(attribs(2,i)),'"' - endif - enddo - write( info%lun, '(a)' ) '>' - info%level = info%level + 1 - -end subroutine xml_put_open_tag_ - -! xml_put_element_ -- -! Routine to write the complete element -! Arguments: -! info Structure holding information on the XML-file -! tag Tag that was encountered -! endtag Whether the end of the element was encountered -! attribs List of attribute-value pairs -! no_attribs Number of pairs in the list -! data Lines of character data found -! no_data Number of lines of character data -! -subroutine xml_put_element_(info, tag, attribs, no_attribs, & - data, no_data) - - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - character(len=*), intent(in), dimension(:,:) :: attribs - integer, intent(in) :: no_attribs - character(len=*), intent(in), dimension(:) :: data - integer, intent(in) :: no_data - - logical :: logic - character(len=1) :: aa - integer :: i, ii - - character(len=300), parameter :: indent = ' ' - - if ( (no_attribs.eq.0 .and. no_data.eq.0) ) then - return - else - logic = .true. - do ii = 1,no_attribs - logic = logic .and. (attribs(2,ii).eq.'') - enddo - do ii = 1,no_data - logic = logic .and. (data(ii).eq.'') - enddo - if ( logic ) then - return - else - write( info%lun, '(3a)', advance = 'no' ) & - indent(1:3*info%level), '<', adjustl(tag) - do i = 1,no_attribs - if (attribs(2,i).ne.'') then - write( info%lun, '(5a)', advance = 'no' ) & - ' ',trim(attribs(1,i)),'="', trim(attribs(2,i)),'"' - endif - enddo - if ( no_attribs.gt.0 .and. no_data.eq.0 ) then - aa='a' - elseif ( (no_attribs.gt.0 .and. no_data.gt.0) .or. & - (no_attribs.eq.0 .and. no_data.gt.0) ) then - aa='b' - else - write(*,*) no_attribs, no_data - endif - endif - endif - - select case(aa) - case('a') - write( info%lun, '(a)' ) '/>' - case('b') - write( info%lun, '(a)',advance='no' ) '>' - write( info%lun, '(2a)', advance='no') & - ( ' ', trim(data(i)), i=1,no_data ) - write( info%lun, '(4a)' ) ' ','' - end select - -end subroutine xml_put_element_ - -! xml_put_close_tag_ -- -! Routine to write the closing tag -! Arguments: -! info Structure holding information on the XML-file -! tag Tag that was encountered -! endtag Whether the end of the element was encountered -! attribs List of attribute-value pairs -! no_attribs Number of pairs in the list -! data Lines of character data found -! no_data Number of lines of character data -! -subroutine xml_put_close_tag_(info, tag, attribs, no_attribs, & - data, no_data) - - type(XML_PARSE), intent(inout) :: info - character(len=*), intent(in) :: tag - character(len=*), intent(in), dimension(:,:) :: attribs - integer, intent(in) :: no_attribs - character(len=*), intent(in), dimension(:) :: data - integer, intent(in) :: no_data - - integer :: i - - character(len=300), parameter :: indent = ' ' - - info%level=info%level-1 - write( info%lun, '(4a)' ) & - indent(1:3*info%level), '' - -end subroutine xml_put_close_tag_ - -! xml_compress_ -- -! Routine to remove empty lines from the character data -! Arguments: -! data Lines of character data found -! no_data (Nett) number of lines of character data -! -subroutine xml_compress_( data, no_data ) - character(len=*), intent(inout), dimension(:) :: data - integer, intent(inout) :: no_data - - integer :: i - integer :: j - logical :: empty - - j = 0 - empty = .true. - do i = 1,no_data - if ( len_trim(data(i)) .ne. 0 .or. .not. empty ) then - j = j + 1 - data(j) = adjustl(data(i)) - empty = .false. - endif - enddo - - no_data = j - - do i = no_data,1,-1 - if ( len_trim(data(i)) .ne. 0 ) then - exit - else - no_data = no_data - 1 - endif - enddo - -end subroutine xml_compress_ - -! xml_replace_entities_ -- -! Routine to replace entities such as > by their -! proper character representation -! Arguments: -! data Lines of character data found -! no_data (Nett) number of lines of character data -! -subroutine xml_replace_entities_( data, no_data ) - character(len=*), intent(inout), dimension(:) :: data - integer, intent(inout) :: no_data - - integer :: i - integer :: j - integer :: j2 - integer :: k - integer :: pos - logical :: found - - do i = 1,no_data - j = 1 - do - do k = 1,size(entities,2) - found = .false. - pos = index( data(i)(j:), trim(entities(2,k)) ) - if ( pos .gt. 0 ) then - found = .true. - j = j + pos - 1 - j2 = j + len_trim(entities(2,k)) - data(i)(j:) = trim(entities(1,k)) // data(i)(j2:) - j = j2 - endif - enddo - if ( .not. found ) exit - enddo - enddo - -end subroutine xml_replace_entities_ - -! xml_options -- -! Routine to handle the parser options -! Arguments: -! info Structure holding information on the XML-file -! ignore_whitespace Ignore whitespace (leading blanks, empty lines) or not -! no_data_truncation Consider truncation of strings an error or not -! report_lun LU-number for reporting information -! report_errors Write messages about errors or not -! report_details Write messages about all kinds of actions or not -! -subroutine xml_options( info, ignore_whitespace, no_data_truncation, & - report_lun, report_errors, & - report_details ) - type(XML_PARSE), intent(inout) :: info - logical, intent(in), optional :: ignore_whitespace - logical, intent(in), optional :: no_data_truncation - - integer, intent(in), optional :: report_lun - logical, intent(in), optional :: report_errors - logical, intent(in), optional :: report_details - - if ( present(ignore_whitespace) ) then - info%ignore_whitespace = ignore_whitespace - endif - if ( present(no_data_truncation) ) then - info%no_data_truncation = no_data_truncation - endif - if ( present(report_lun) ) then - report_lun_ = report_lun - endif - if ( present(report_errors) ) then - report_errors_ = report_errors - endif - if ( present(report_details) ) then - report_details_ = report_details - endif -end subroutine xml_options - -! xml_ok -- -! Function that returns whether all was okay or not -! Arguments: -! info Structure holding information on the XML-file -! Returns: -! .true. if there was no error, .false. otherwise -! -logical function xml_ok( info ) - type(XML_PARSE), intent(in) :: info - - xml_ok = info%eof .or. info%error .or. & - ( info%no_data_truncation .and. & - ( info%too_many_attribs .or. info%too_many_data ) ) - xml_ok = .not. xml_ok -end function xml_ok - -! xml_error -- -! Function that returns whether there was an error -! Arguments: -! info Structure holding information on the XML-file -! Returns: -! .true. if there was an error, .false. if there was none -! -logical function xml_error( info ) - type(XML_PARSE), intent(in) :: info - - xml_error = info%error .or. & - ( info%no_data_truncation .and. & - ( info%too_many_attribs .or. info%too_many_data ) ) -end function xml_error - -! xml_data_trunc -- -! Function that returns whether data were truncated or not -! Arguments: -! info Structure holding information on the XML-file -! Returns: -! .true. if data were truncated, .false. otherwise -! -logical function xml_data_trunc( info ) - type(XML_PARSE), intent(in) :: info - - xml_data_trunc = info%too_many_attribs .or. info%too_many_data -end function xml_data_trunc - -integer function xml_find_attrib( attribs, no_attribs, name, value, inival ) - character(len=*), dimension(:,:) :: attribs - integer :: no_attribs - character(len=*) :: name - character(len=*) :: value - character(len=*),optional :: inival - - integer :: i - - xml_find_attrib = -1 - do i = 1,no_attribs - if ( name .eq. attribs(1,i) ) then - value = attribs(2,i) - print *,'value=',trim(value),present(inival),'size(attribs,1)=',size(attribs,1) - if(present(inival).and.size(attribs,1)==4) then - inival = attribs(4,i) - print *,'in xml_find_attrib,value=',attribs(2,i),'inival=',inival,attribs(4,i) - endif -! if(present(inival)) inival = attribs(4,i) - xml_find_attrib = i - exit - endif - enddo - -end function xml_find_attrib - -! xml_process -- -! Routine to read the XML file as a whole and distribute processing -! the contents over three user-defined subroutines -! Arguments: -! filename Name of the file to process -! attribs Array for holding the attributes -! data Array for holding the character data -! startfunc Subroutine to handle the start of elements -! datafunc Subroutine to handle the character data -! endfunc Subroutine to handle the end of elements -! error Indicates if there was an error or not -! -subroutine xml_process( filename, attribs, data, startfunc, datafunc, endfunc, lunrep, error ) - character(len=*) :: filename - character(len=*), dimension(:,:) :: attribs - character(len=*), dimension(:) :: data - integer :: lunrep - logical :: error - - interface - subroutine startfunc( tag, attribs, error ) - character(len=*) :: tag - character(len=*), dimension(:,:) :: attribs - logical :: error - end subroutine - end interface - - interface - subroutine datafunc( tag, data, error ) - character(len=*) :: tag - character(len=*), dimension(:) :: data - logical :: error - end subroutine - end interface - - interface - subroutine endfunc( tag, error ) - character(len=*) :: tag - logical :: error - end subroutine - end interface - - type(XML_PARSE) :: info - character(len=80) :: tag - logical :: endtag - integer :: noattribs - integer :: nodata - - call xml_options( info, report_lun = lunrep, report_details = .false. ) - call xml_open( info, filename, .true. ) - - error = .false. - do - call xml_get( info, tag, endtag, attribs, noattribs, data, nodata ) - if ( .not. xml_ok(info) ) then - exit - endif - - if ( xml_error(info) ) then - write(lunrep,*) 'Error reading XML file!' - error = .true. - exit - endif - - if ( .not. endtag .or. noattribs .ne. 0 ) then - call startfunc( tag, attribs(:,1:noattribs), error ) - if ( error ) exit - - call datafunc( tag, data(1:nodata), error ) - if ( error ) exit - endif - - if ( endtag ) then - call endfunc( tag, error ) - if ( error ) exit - endif - enddo - call xml_close( info ) -end subroutine xml_process - -end module xmlparse diff --git a/sorc/comlibs/xml/xmlreader.conf b/sorc/comlibs/xml/xmlreader.conf deleted file mode 100755 index ab8007480..000000000 --- a/sorc/comlibs/xml/xmlreader.conf +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/sorc/comlibs/xml/xmlreader.f90 b/sorc/comlibs/xml/xmlreader.f90 deleted file mode 100755 index 84e4744d8..000000000 --- a/sorc/comlibs/xml/xmlreader.f90 +++ /dev/null @@ -1,1082 +0,0 @@ -! ------------------------------------------------------------------- -! XMLREADER: -! Read an XML-file that contains a template for the data and the XML -! files that will be used in a program and generate a module with -! reading routines. -! -! $Id: xmlreader.f90,v 1.19 2007/06/19 19:44:15 arjenmarkus Exp $ -! -! TODO: -! - Private routines! -! - Error for unknown data types -! - Length for character items -! ------------------------------------------------------------------- -! -program xmlreader - use XMLPARSE - implicit none - - character(len=60) :: fname - type(XML_PARSE) :: info - - character(len=80) :: tag - character(len=80) :: starttag - logical :: endtag - character(len=80), dimension(1:2,1:20) :: attribs - integer :: noattribs - character(len=200), dimension(1:100) :: data - integer :: nodata - integer :: i - integer :: idx - integer :: j - integer, parameter :: notmps = 5 ! Number of temporary files needed! - integer :: ludef - integer :: ludeflt - integer :: luinit - integer :: lusubs - integer :: luprolog - integer :: lustart - integer :: luloop - integer :: luend - integer :: lumain - logical :: prolog_written - logical :: comp - logical :: error - logical :: contains = .false. - logical :: begin_loop = .true. - logical :: begin_main_loop = .true. - logical :: begin_component = .false. - logical :: strict - logical :: global_type - logical :: dyn_strings - - character(len=32) :: root_name - character(len=32) :: global_name - character(len=32) :: typename - character(len=32), dimension(1:20) :: placeholder - integer :: no_placeholders - - character(len=50) :: declare - character(len=10) :: declare_inival - character(len=50), dimension(1:4,1:30) :: predefined_types - character(len=50), dimension(:,:), pointer :: types - character(len=50), dimension(:,:), pointer :: new_types - integer :: notypes = 21 - data ((predefined_types(i,j) , i=1,4), j=1,21 ) / & -'logical' ,' logical' , 'read_xml_logical', '=.false.', & -'logical-array' ,' logical, dimension(:), pointer' , 'read_xml_logical_array', ' ', & -'logical-shape' ,' logical, dimension(SHAPE)' , 'read_xml_logical_array', ' ', & -'integer' ,' integer' , 'read_xml_integer', '=0', & -'integer-array' ,' integer, dimension(:), pointer' , 'read_xml_integer_array', ' ', & -'integer-shape' ,' integer, dimension(SHAPE)' , 'read_xml_integer_array', ' ', & -'real' ,' real' , 'read_xml_real' , '=0.0', & -'real-array' ,' real, dimension(:), pointer' , 'read_xml_real_array', ' ', & -'real-shape' ,' real, dimension(SHAPE)' , 'read_xml_real_array', ' ', & -'double' ,' real(kind=kind(1.0d0))' , 'read_xml_double', '=0.0', & -'double-array' ,' real(kind=kind(1.0d0)), dimension(:), pointer' , & - 'read_xml_double_array', ' ', & -'double-shape' ,' real(kind=kind(1.0d0)), dimension(SHAPE)' , & - 'read_xml_double_array', ' ', & -'word' ,' character(len=?)' , 'read_xml_word', '=\'\'', & -'word-array' ,' character(len=?), dimension(:), pointer' , 'read_xml_word_array', '', & -'word-shape' ,' character(len=?), dimension(SHAPE)' , 'read_xml_word_array', '', & -'line' ,' character(len=?)' , 'read_xml_line', '=\'\'', & -'line-array' ,' character(len=?), dimension(:), pointer' , 'read_xml_line_array', ' ', & -'line-shape' ,' character(len=?), dimension(SHAPE)' , 'read_xml_line_array', ' ', & -'character' ,' character(len=?)' , 'read_xml_line', '', & -'character-array',' character(len=?), dimension(:), pointer' , 'read_xml_line_array', ' ', & -'character-shape',' character(len=?), dimension(SHAPE)' , 'read_xml_line_array', ' ' / - - allocate( types(1:4,1:notypes) ) - types = predefined_types(1:4,1:notypes) - - ! - ! Read the global options file, if present - ! - strict = .false. - global_type = .false. - dyn_strings = .true. - call get_global_options( attribs, noattribs, strict, global_type, global_name, & - root_name, dyn_strings ) - - ! - ! Open the input file and read the name of the template. - ! Load the template into a tree and then generate it all - ! in stages - ! - open( 10, file = 'xmlreader.inp' ) - open( 20, file = 'xmlreader.out' ) - - call xml_options( info, report_lun = 20, report_details = .true. ) - read( 10, '(a)' ) fname - close( 10 ) - - prolog_written = .false. - ! - ! Set the defaults - ! - global_type = .false. - global_name = fname - root_name = fname - - ludef = 21 - lusubs = 22 - luinit = 23 - open( ludef, file = trim(fname)//'.f90' ) - open( lusubs, status = 'scratch' ) - open( luinit, status = 'scratch' ) - call open_tmp_files( 31 ) - - lumain = luloop - - ! Read the template file and act as we go along: - ! - write the declarations - ! - write the main reading routine - ! - write the individual reading routines - ! - the root element is needed because of the definition of XML files, - ! but we ignore it. - ! - call xml_open( info, trim(fname)//'.xml', .true. ) - - error = .false. - comp = .false. - no_placeholders = 0 - - call xml_get( info, starttag, endtag, attribs, noattribs, data, nodata ) - - do - call xml_get( info, tag, endtag, attribs, noattribs, data, nodata ) - write(20,*) 'tag: ',tag - write(20,*) 'attribs: ',noattribs - if ( noattribs .gt. 0 ) then - write(20,'(4a)') ( ' ', trim(attribs(1,i)), ' = ', trim(attribs(2,i)), i=1,noattribs ) - endif - write(20,*) 'data: ',nodata - if ( nodata .gt. 0 ) then - write(20,'(3a)') ( ' >', trim(data(i)), '<', i=1,nodata ) - endif - if ( xml_error(info) ) then - write(*,*) 'Error reading template file!' - !stop - exit - endif - - ! - ! When encountering the endtag, then close the - ! current definition - ! - if ( endtag .and. noattribs .eq. 0 ) then - select case ( tag ) - case ( 'typedef' ) - call close_typedef( begin_component ) - case ( 'placeholder' ) - !if ( comp ) then - ! call close_placeholder - !endif - !comp = .false. - call close_placeholder - case default - ! - ! Have we found the end of the definition? - ! - if ( tag .eq. starttag ) then - exit - endif - end select - - if ( xml_ok(info) ) then - cycle - else - exit - endif - - endif - - ! - ! Opening tags: dispatch on the actual tag - ! - select case( tag ) - case( 'options' ) - call set_options( attribs, noattribs, strict, global_type, & - global_name, root_name, dyn_strings ) - if ( .not. prolog_written ) then - prolog_written = .true. - call write_prolog - else - write(20,*) 'Options element should be the first child of the root element',& - 'Otherwise it has no effect!' - endif - - if ( strict ) then - write( lumain, '(a)' ) & - & ' strict_ = .true.' - else - write( lumain, '(a)' ) & - & ' strict_ = .false.' - endif - - case( 'comment', '!--' ) - ! Do nothing - - case( 'placeholder' ) - if ( .not. prolog_written ) then - prolog_written = .true. - call write_prolog - endif - if ( begin_loop .or. begin_main_loop ) then - begin_main_loop = .false. - call add_begin_loop( .true., .false. ) - endif - call add_placeholder(strict, dyn_strings ) - begin_component = .false. - - case( 'typedef' ) - if ( .not. prolog_written ) then - prolog_written = .true. - call write_prolog - endif - call add_typedef(strict, dyn_strings ) - - case( 'variable' ) - if ( .not. prolog_written ) then - prolog_written = .true. - call write_prolog - endif - if ( begin_loop .or. begin_main_loop ) then - begin_main_loop = .false. - call add_begin_loop( .true., begin_component ) - endif - call add_variable( component=comp ) - - case( 'component' ) - ! - ! Components of derived types are treated in much the - ! same way as ordinary variables - with one syntactic - ! difference - ! - if ( .not. prolog_written ) then - prolog_written = .true. - call write_prolog - endif - if ( begin_loop ) then - call add_begin_loop( .true., .true. ) - endif - call add_variable( component=.true. ) - begin_component = .true. - - case default - write(20,*) 'Unknown tag: ',trim(tag) - write(20,*) '-- terminating the program!' - stop - end select - end do - - ! - ! Now finish it all - ! - write( luend, '(a)' ) & - & ' if ( present(errout) ) errout = error', & - & 'end subroutine' - - call append_files( luprolog ) - call merge_files - - write( ludef, '(/,a)' ) & - & 'end subroutine', & - & 'end module' - - if ( error ) then - write(*,*) 'Errors found in the definition - please check!' - endif - stop -contains - -! get_global_options -- -! Routine to get the global options from the configuration file -! Arguments: -! strict Option to make the parser check for unknown tags -! global_type Option to generate an overall derived type -! global_name Name of that overall derived type (if requested) -! root_name Name of the root element of the XML file -! dyn_strings Whether to use dynamic strings or not -! -subroutine get_global_options( attribs, noattribs, strict, global_type, global_name, & - root_name, dyn_strings ) - character(len=*), dimension(:,:), intent(inout) :: attribs - integer, intent(inout) :: noattribs - logical, intent(inout) :: strict - logical, intent(inout) :: global_type - character(len=*), intent(inout) :: global_name - character(len=*), intent(inout) :: root_name - logical, intent(inout) :: dyn_strings - - character(len=20) :: tag - character(len=20), dimension(1) :: data - integer :: nodata - logical :: exists - logical :: endtag - type(XML_PARSE) :: info - - inquire( file = 'xmlreader.conf', exist = exists ) - if ( exists ) then - call xml_open( info, 'xmlreader.conf', .true. ) - do while ( xml_ok(info) ) - call xml_get( info, tag, endtag, attribs, noattribs, data, nodata ) - if ( tag .eq. 'xmlreader' ) then - call set_options( attribs, noattribs, strict, global_type, & - global_name, root_name, dyn_strings ) - endif - enddo - call xml_close( info ) - endif -end subroutine get_global_options - -! set_options -- -! Routine to set the options that influence the parser -! Arguments: -! attribs List of attributes -! noattribs Number of attributes -! strict Option to make the parser check for unknown tags -! global_type Option to generate an overall derived type -! global_name Name of that overall derived type (if requested) -! root_name Name of the root element of the XML file -! dyn_strings Whether to use dynamic strings or not -! -subroutine set_options( attribs, noattribs, strict, global_type, global_name, root_name, dyn_strings ) - character(len=*), dimension(:,:), intent(in) :: attribs - integer, intent(in) :: noattribs - logical, intent(inout) :: strict - logical, intent(inout) :: global_type - character(len=*), intent(inout) :: global_name - character(len=*), intent(inout) :: root_name - logical, intent(inout) :: dyn_strings - - integer :: i - - do i = 1,noattribs - select case (attribs(1,i)) - case ('strict') - if ( attribs(2,i) == 'yes' ) then - strict = .true. - else - strict = .false. - endif - case ('globaltype') - if ( attribs(2,i) == 'yes' ) then - global_type = .true. - else - global_type = .false. - endif - case ('globalname') - global_name = attribs(2,i) - case ('rootname') - root_name = attribs(2,i) - case ('dynamicstrings') - if ( attribs(2,i) == 'yes' ) then - dyn_strings = .true. - else - dyn_strings = .false. - endif - case default - write(20,*) 'Unknown option: ',trim(attribs(1,i)), ' - ignored' - end select - enddo -end subroutine set_options - -! open_tmp_files -- -! Routine to open the temporary files -! Arguments: -! lufirst First LU-number to use -! -subroutine open_tmp_files( lufirst ) - integer, intent(in) :: lufirst - - luprolog = lufirst - lustart = lufirst + 1 - luloop = lufirst + 2 - luend = lufirst + 3 - ludeflt = lufirst + 4 - open( luprolog, status = 'scratch' ) - open( lustart, status = 'scratch' ) - open( luloop, status = 'scratch' ) - open( luend, status = 'scratch' ) - open( ludeflt, status = 'unknown' ) -end subroutine open_tmp_files - -! close_tmp_files -- -! Routine to close the temporary files -! Arguments: -! None -! -subroutine close_tmp_files - close( luprolog ) - close( lustart ) - close( luloop ) - close( luend ) - - luprolog = luprolog - notmps - lustart = lustart - notmps - luloop = luloop - notmps - luend = luend - notmps - ludeflt = ludeflt - notmps -end subroutine close_tmp_files - -! append_tmp_files -- -! Routine to append the contents of the temporary files -! Arguments: -! lufirst First LU-number to use -! -subroutine append_files( lufirst ) - integer, intent(in) :: lufirst - - integer :: lu - integer :: io - character(len=120) :: line - - ! - ! If we have not written a subroutine yet, then - ! now is the time to close the overall initialisation - ! routine - ! -- no longer needed - ! - !if ( .not. contains ) then - ! write( lusubs, '(a,/)' ) 'end subroutine' - ! contains = .true. - !endif - - ! - ! Copy the contents of the scratch files - ! - do lu = lufirst,lufirst+notmps-1 - rewind( lu ) - do - read( lu, '(a)', iostat=io ) line - if ( io .ne. 0 ) exit - write( lusubs, '(a)' ) trim(line) - enddo - rewind( lu ) - enddo -end subroutine append_files - -! merge_files -- -! Routine to merge all temporary files into the definite file -! Arguments: -! None -! -subroutine merge_files - - integer :: io - character(len=120) :: line - - ! - ! Copy the contents of the "subroutines" file - ! - rewind( lusubs ) - do - read( lusubs, '(a)', iostat=io ) line - if ( io .ne. 0 ) exit - write( ludef, '(a)' ) trim(line) - enddo - - ! - ! Copy the contents of the "initialisation subroutine" file - ! - rewind( luinit ) - do - read( luinit, '(a)', iostat=io ) line - if ( io .ne. 0 ) exit - write( ludef, '(a)' ) trim(line) - enddo -end subroutine merge_files - -! write_prolog -- -! Routine to write the beginning of the module -! Arguments: -! None -! -subroutine write_prolog - write( ludef, '(a)' ) & - & 'module xml_data_' // trim(fname), & - & ' use READ_XML_PRIMITIVES', & - & ' use XMLPARSE', & - & ' implicit none', & - & ' integer, private :: lurep_', & - & ' logical, private :: strict_' - - write( luprolog, '(a)' ) & - & 'subroutine read_xml_file_'//trim(fname)//'(fname, lurep, errout)' , & - & ' character(len=*), intent(in) :: fname' , & - & ' integer, intent(in), optional :: lurep' , & - & ' logical, intent(out), optional :: errout' , & - & ' ' , & - & ' type(XML_PARSE) :: info' , & - & ' logical :: error' , & - & ' character(len=80) :: tag' , & - & ' character(len=80) :: starttag' , & - & ' logical :: endtag' , & - & ' character(len=80), dimension(1:2,1:20) :: attribs' , & - & ' integer :: noattribs' , & - & ' character(len=200), dimension(1:100) :: data' , & - & ' integer :: nodata' - - write( lusubs, '(a)' ) & - & 'contains' - write( luinit, '(a)' ) & - & 'subroutine init_xml_file_'//trim(fname) - - write( lumain, '(a)' ) & - & ' ', & - & ' call init_xml_file_'//trim(fname), & - & ' call xml_open( info, fname, .true. )', & - & ' call xml_options( info, report_errors=.true., ignore_whitespace=.true.)', & - & ' lurep_ = 0', & - & ' if ( present(lurep) ) then', & - & ' lurep_ = lurep', & - & ' call xml_options( info, report_lun=lurep )', & - & ' endif', & - & ' do', & - & ' call xml_get( info, starttag, endtag, attribs, noattribs, &', & - & ' data, nodata)', & - & ' if ( starttag .ne. ''!--'' ) exit', & - & ' enddo', & - & ' if ( starttag .ne. "' // trim(root_name) // '" ) then', & - & ' call xml_report_errors( info, &', & - & ' ''XML-file should have root element "' // trim(root_name) // '"'')', & - & ' error = .true.', & - & ' call xml_close(info)', & - & ' return', & - & ' endif' - - call add_end_loop -end subroutine write_prolog - -! add_begin_loop -- -! Routine to write the start of the reading loop -! Arguments: -! checktag Whether code for checking the tag is required -! component Whether this is an ordinary variable or a component -! in a derived type -! -subroutine add_begin_loop( checktag, component ) - logical :: checktag - logical :: component - - if ( component ) then - write( luloop, '(a)' ) & - & ' call init_xml_type_'//trim(typename)//'(dvar)', & - & ' has_dvar = .true.' - endif - - begin_loop = .false. - - if ( component ) then - write( luloop, '(a)' ) & - & ' error = .false.' ,& - & ' att_ = 0' ,& - & ' noatt_ = noattribs+1' ,& - & ' endtag_org = endtag' ,& - & ' do', & - & ' if ( nodata .ne. 0 ) then' ,& - & ' noattribs = 0' ,& - & ' tag = starttag' ,& - & ' elseif ( att_ .lt. noatt_ .and. noatt_ .gt. 1 ) then' ,& - & ' att_ = att_ + 1' ,& - & ' if ( att_ .le. noatt_-1 ) then' ,& - & ' tag = attribs(1,att_)' ,& - & ' data(1) = attribs(2,att_)' ,& - & ' noattribs = 0' ,& - & ' nodata = 1' ,& - & ' endtag = .false.' ,& - & ' else' ,& - & ' tag = starttag' ,& - & ' noattribs = 0' ,& - & ' nodata = 0' ,& - & ' endtag = .true.' ,& - & ' cycle' ,& - & ' endif' ,& - & ' else', & - & ' if ( endtag_org ) then', & - & ' return', & - & ' else', & - & ' call xml_get( info, tag, endtag, attribs, noattribs, data, nodata )' ,& - & ' if ( xml_error(info) ) then' ,& - & ' write(lurep_,*) ''Error reading input file!''',& - & ' error = .true.' ,& - & ' return' ,& - & ' endif' ,& - & ' endif' ,& - & ' endif' - else - write( luloop, '(a)' ) & - & ' error = .false.' ,& - & ' do', & - & ' call xml_get( info, tag, endtag, attribs, noattribs, data, nodata )' ,& - & ' if ( xml_error(info) ) then' ,& - & ' write(lurep_,*) ''Error reading input file!''' ,& - & ' error = .true.' ,& - & ' return' ,& - & ' endif' - endif - if ( checktag ) then - write( luloop, '(a)' ) & - & ' if ( endtag .and. tag .eq. starttag ) then' ,& - & ' exit' ,& - & ' endif' - endif - write( luloop, '(a)' ) & - & ' if ( endtag .and. noattribs .eq. 0 ) then' ,& - & ' if ( xml_ok(info) ) then' ,& - & ' cycle' ,& - & ' else' ,& - & ' exit' ,& - & ' endif' ,& - & ' endif' ,& - & ' select case( tag )' -end subroutine add_begin_loop - -! add_end_loop -- -! Routine to write the end of the reading loop -! Arguments: -! None -! -subroutine add_end_loop - - write( luend, '(a)' ) & - & ' case (''comment'', ''!--'')' ,& - & ' ! Simply ignore', & - & ' case default' ,& - & ' if ( strict_ ) then', & - & ' error = .true.', & - & ' call xml_report_errors( info, &', & - & ' ''Unknown or wrongly placed tag: '' // trim(tag))',& - & ' endif' - - write( luend, '(a)' ) & - & ' end select' ,& - & ' nodata = 0' ,& - & ' if ( .not. xml_ok(info) ) exit' , & - & ' end do' -end subroutine add_end_loop - -! add_variable -- -! Routine to write the definition of variables or components of -! derived types -! Arguments: -! component Whether this is an ordinary variable or a component -! in a derived type -! -subroutine add_variable( component ) - logical :: component - - integer :: idx1 - integer :: idx2 - integer :: idx3 - integer :: idx4 - integer :: idx5 - integer :: idx6 - integer :: k - - character(len=32) :: varname - character(len=40) :: varcomp - character(len=40) :: varshape - character(len=100) :: vardefault - character(len=32) :: vartype - character(len=32) :: vartag - character(len=10) :: dim - character(len=10) :: strlength - character(len=32) :: initptr - - idx1 = xml_find_attrib( attribs, noattribs, 'name', varname ) - idx2 = xml_find_attrib( attribs, noattribs, 'type', vartype ) - strlength = "--" - idx5 = xml_find_attrib( attribs, noattribs, 'length', strlength ) - if ( idx1 .le. 0 ) then - write( 20, * ) 'Variable/component found which has no name' - error = .true. - endif - if ( idx2 .le. 0 ) then - write( 20, * ) 'Variable/component found which has no type - ',trim(varname) - error = .true. - else - dim = '--' - idx2 = xml_find_attrib( attribs, noattribs, 'dimension', dim ) - idx6 = xml_find_attrib( attribs, noattribs, 'shape', varshape ) - if ( idx2 .ge. 1 ) then - if ( dim .eq. '1' ) then - vartype = trim(vartype) // '-array' - else - error = .true. - write(20,*) 'Dimension not supported: ',dim - endif - endif - if ( idx6 .ge. 1 ) then - vartype = trim(vartype) // '-shape' - endif - - print *,'types=',size(types,1),size(types,2),notypes,'vartype=',vartype -! print *,'types=',types(4,:) - declare_inival='' - idx3 = xml_find_attrib( types, notypes, vartype, declare, inival=declare_inival ) - print *,'declare=',declare,'declare_inival=',declare_inival - if ( idx3 .le. 0 ) then - write( 20, * ) & - 'Variable/component with unknown type - ',trim(varname) - error = .true. - endif - endif - - idx4 = xml_find_attrib( attribs, noattribs, 'default', vardefault ) - - if ( component ) then - varcomp = 'dvar%'//varname - else - varcomp = varname - endif - - idx1 = xml_find_attrib( attribs, noattribs, 'tag', vartag ) - if ( idx1 .lt. 1 ) then - vartag = varname - endif - - if ( .not. error ) then - if ( index( declare, "pointer" ) .gt. 0 ) then - initptr = " => null()" - else - initptr = "" - - endif -! - k = index( declare, 'SHAPE' ) - if ( k .gt. 0 ) then - declare = declare(1:k-1) // trim(varshape) // declare(k+5:) - endif - - if ( index( declare, "?" ) .le. 0 ) then - write( ludef, '(4a,4a)' ) declare, ' :: ', trim(varname), trim(initptr),trim(declare_inival) - else - if ( strlength .eq. "--" ) then - strlength = "1" ! Hm, error is better? - endif - idx5 = index( declare, "?" ) - write( ludef, '(6a,4a)' ) declare(1:idx5-1), trim(strlength), declare(idx5+1:), & - ' :: ', trim(varname), trim(initptr),trim(declare_inival) - endif - - if ( idx6 .gt. 0 ) then - k = index( types(2,idx3-1), '?' ) - if ( k .le. 0 ) then - write( luprolog, '(3a)' ) types(2,idx3-1), ' :: ', 'p_'//trim(varname) - else - write( luprolog, '(6a)' ) types(2,idx3-1)(1:k-1), trim(strlength), & - types(2,idx3-1)(k+1:), ' :: ', 'p_'//trim(varname) - endif - endif - write( luprolog, '(3a)' ) types(2,1), ' :: ', 'has_'//trim(varname) - write( lustart, '(3a)' ) ' has_', varname, ' = .false.' - if ( dim .ne. '--' ) then - write( lustart, '(3a)' ) ' allocate(' // trim(varcomp), '(0))' - endif - write( luloop, '(a)' ) ' case('''//trim(vartag)//''')' - - if ( idx6 .le. 0 ) then - write( luloop, '(a)' ) & - &' call '//trim(types(3,idx3))//'( &', & - &' info, tag, endtag, attribs, noattribs, data, nodata, &',& - &' ' // trim(varcomp) // ', has_'//trim(varname) // ' )' - else - write( luloop, '(a)' ) & - &' call '//trim(types(3,idx3))//'( &', & - &' info, tag, endtag, attribs, noattribs, data, nodata, &',& - &' p_' // trim(varname) // ', has_'//trim(varname) // ' )',& - &' if ( has_'//trim(varname) // ') then',& - &' if ( size(shape(' // trim(varcomp) //')) == 1 ) then',& - &' '//trim(varcomp)//' = reshape(p_'//trim(varname)//', shape('//trim(varcomp)//'))',& - &' else if ( size(p_'//trim(varname)//') .ge. size('//trim(varcomp)//') ) then',& - &' '//trim(varcomp)//' = reshape(p_'//trim(varname)//', shape('//trim(varcomp)//'))',& - &' else',& - &' has_'//trim(varname)//' = .false.',& - &' call xml_report_errors(info, ''Incorrect number of values for '//trim(varname)//''')', & - &' endif',& - &' endif',& - &' deallocate( p_'//trim(varname)//' )' - endif - if ( idx4 .le. 0 ) then - write( luend, '(a)' ) & - &' if ( .not. has_'//trim(varname)//' ) then' - - if ( component ) then - write( luend, '(a)' ) & - &' has_dvar = .false.' - else - write( luend, '(a)' ) & - &' error = .true.' - endif - - write( luend, '(a)' ) & - &' call xml_report_errors(info, ''Missing data on '//trim(varname)//''')', & - &' endif' - else - ! - ! Note: the attribute value is supposed to have the quotes, if that - ! is relevant for the variable's type - ! - if ( component ) then - write( ludeflt, '(4a)' ) & - &' dvar%', trim(varname), ' = ', attribs(2,idx4) - else - write( luinit, '(4a)' ) & - &' ', trim(varname), ' = ', attribs(2,idx4) - endif - endif - endif - -end subroutine add_variable - -! add_typedef -- -! Routine to write the definition and other code for a derived type -! Arguments: -! strict Whether checking for unknown flags is required -! dyn_strings Whether dynamic string lengths are allowed -! -subroutine add_typedef( strict, dyn_strings ) - logical, intent(in) :: strict - logical, intent(in) :: dyn_strings - - integer :: idx1 - integer :: idx2 - - character(len=32) :: typetag - - idx1 = xml_find_attrib( attribs, noattribs, 'name', typename ) - if ( idx1 .le. 0 ) then - write( 20, * ) 'Type definition found which has no name' - error = .true. - endif - - ! - ! We need a new set of temporary files - ! - call open_tmp_files( luprolog+notmps ) - - idx2 = xml_find_attrib( attribs, noattribs, 'tag', typetag ) - if ( idx1 .lt. 1 ) then - typetag = typename - endif - - if ( .not. error ) then - write( ludef, '(/,2a)' ) 'type ',trim(typename) - write( luprolog, '(a)' ) & - & 'subroutine read_xml_type_'//trim(typename)//'_array( &' ,& - & ' info, tag, endtag, attribs, noattribs, data, nodata, &',& - & ' dvar, has_dvar )' ,& - & ' type(XML_PARSE) :: info' ,& - & ' character(len=*), intent(inout) :: tag ',& - & ' logical, intent(inout) :: endtag ',& - & ' character(len=*), dimension(:,:), intent(inout) :: attribs',& - & ' integer, intent(inout) :: noattribs',& - & ' character(len=*), dimension(:), intent(inout) :: data ',& - & ' integer, intent(inout) :: nodata ',& - & ' type('//trim(typename)//'), dimension(:), pointer :: dvar ',& - & ' logical, intent(inout) :: has_dvar ',& - & ' ' ,& - & ' integer :: newsize ',& - & ' type('//trim(typename)//'), dimension(:), pointer :: newvar',& - & ' ' ,& - & ' newsize = size(dvar) + 1' ,& - & ' allocate( newvar(1:newsize) )' ,& - & ' newvar(1:newsize-1) = dvar' ,& - & ' deallocate( dvar )' ,& - & ' dvar => newvar' ,& - & ' ' ,& - & ' call read_xml_type_'//trim(typename)// & - & '( info, tag, endtag, attribs, noattribs, data, nodata, &',& - & ' dvar(newsize), has_dvar )' ,& - & 'end subroutine read_xml_type_'//trim(typename)//'_array' ,& - & ' ' - - write( luprolog, '(a)' ) & - & 'subroutine read_xml_type_'//trim(typename)//& - & '( info, starttag, endtag, attribs, noattribs, data, nodata, &' ,& - & ' dvar, has_dvar )' ,& - & ' type(XML_PARSE) :: info' ,& - & ' character(len=*), intent(in) :: starttag',& - & ' logical, intent(inout) :: endtag ',& - & ' character(len=*), dimension(:,:), intent(inout) :: attribs',& - & ' integer, intent(inout) :: noattribs',& - & ' character(len=*), dimension(:), intent(inout) :: data ',& - & ' integer, intent(inout) :: nodata ',& - & ' type('//trim(typename)//'), intent(inout) :: dvar' ,& - & ' logical, intent(inout) :: has_dvar ',& - & ' ' ,& - & ' integer :: att_ ',& - & ' integer :: noatt_ ',& - & ' logical :: error ',& - & ' logical :: endtag_org' - if ( dyn_strings ) then - write( luprolog, '(a)' ) & - & ' character(len=len(starttag)) :: tag ' - else - write( luprolog, '(a)' ) & - & ' character(len=80) :: tag ' - endif - - ! - ! Note: this may require a more sophisticated approach - ! when the components of the type are also pointers ... - ! - write( ludeflt, '(a)' ) & - & 'subroutine init_xml_type_'//trim(typename)//'_array( dvar ) ',& - & ' type('//trim(typename)//'), dimension(:), pointer :: dvar ',& - & ' if ( associated( dvar ) ) then' ,& - & ' deallocate( dvar )' ,& - & ' endif' ,& - & ' allocate( dvar(0) )' ,& - & 'end subroutine init_xml_type_'//trim(typename)//'_array' ,& - & 'subroutine init_xml_type_'//trim(typename)//'(dvar)' ,& - & ' type('//trim(typename)//') :: dvar ' - - begin_loop = .true. - - call add_end_loop - - ! - ! Add the names of the two new types to the list - ! - allocate( new_types(1:4,1:notypes+3) ) - new_types(:,1:notypes) = types - deallocate( types ) - types => new_types - - types(1,notypes+1) = typename - types(2,notypes+1) = ' type('//trim(typename)//')' - types(3,notypes+1) = 'read_xml_type_'//trim(typename) - - types(1,notypes+2) = trim(typename) // '-array' - types(2,notypes+2) = ' type('//trim(typename)//'), dimension(:), pointer' - types(3,notypes+2) = 'read_xml_type_'//trim(typename)//'_array' - - types(1,notypes+3) = trim(typename) // '-shape' - types(2,notypes+3) = ' type('//trim(typename)//'), dimension(SHAPE)' - types(3,notypes+3) = 'read_xml_type_'//trim(typename)//'_array' - - notypes = notypes + 3 - - endif -end subroutine add_typedef - -! close_typedef -- -! Routine to write the last code fragments for a derived type -! Arguments: -! component Turn off the "component" parameter -! -subroutine close_typedef( component ) - logical, intent(out) :: component - - component = .false. - write( ludef, '(a)' ) 'end type '//trim(typename) - write( luend, '(a)' ) & - & 'end subroutine read_xml_type_'//trim(typename) - write( ludeflt, '(a)' ) & - & 'end subroutine init_xml_type_'//trim(typename) - call append_files( luprolog ) - call close_tmp_files - -end subroutine close_typedef - -! add_placeholder -- -! Routine to write the starting code fragments for a placeholder tag -! Arguments: -! strict Whether checking for unknown flags is required -! dyn_strings Whether dynamic string lengths are allowed -! -subroutine add_placeholder( strict, dyn_strings ) - logical, intent(in) :: strict - logical, intent(in) :: dyn_strings - - integer :: idx1 - integer :: idx2 - - character(len=32) :: tag - character(len=20) :: optional - - idx1 = xml_find_attrib( attribs, noattribs, 'tag', tag ) - if ( idx1 .le. 0 ) then - write( 20, * ) 'Placeholder definition found which has no tag name' - error = .true. - endif - - optional = 'no' - idx2 = xml_find_attrib( attribs, noattribs, 'optional', optional ) - - if ( optional .eq. 'yes' ) then - if ( begin_loop ) then - call add_begin_loop( .false., .false. ) - endif - write( luloop, '(a)' ) & - ' case('''//trim(tag)//''')',& - ' ! Simply ignore the tag' - else - no_placeholders = no_placeholders + 1 - placeholder(no_placeholders) = tag - - write( luloop, '(a)' ) & - ' case('''//trim(tag)//''')',& - &' call read_xml_place_'//trim(tag)//'( info, &', & - &' tag, attribs, noattribs, data, nodata )' - comp = .false. - - ! - ! We need a new set of temporary files - ! - call open_tmp_files( luprolog+notmps ) - - ! - ! Write the first part of the routine - ! NOTE: - ! Will require an extra argument when collecting all variables - ! in one derived type - ! - write( luprolog, '(a)' ) & - & 'subroutine read_xml_place_'//trim(tag)//& - & '( info, starttag, attribs, noattribs, data, nodata )' ,& - & ' type(XML_PARSE) :: info' ,& - & ' character(len=*), intent(in) :: starttag',& - & ' character(len=*), dimension(:,:), intent(inout) :: attribs',& - & ' integer, intent(inout) :: noattribs',& - & ' character(len=*), dimension(:), intent(inout) :: data ',& - & ' integer, intent(inout) :: nodata ',& - & ' ' ,& - & ' logical :: error ',& - & ' logical :: endtag ' - if ( dyn_strings ) then - write( luprolog, '(a)' ) & - & ' character(len=len(starttag)) :: tag ' - else - write( luprolog, '(a)' ) & - & ' character(len=80) :: tag ' - endif - - begin_loop = .true. - - call add_end_loop - - endif -end subroutine add_placeholder - -! close_placeholder -- -! Routine to write the last code fragments for a placeholder -! Arguments: -! None -! -subroutine close_placeholder - - write( luend, '(a)' ) & - & 'end subroutine read_xml_place_'//trim(placeholder(no_placeholders)) - call append_files( luprolog ) - call close_tmp_files - - no_placeholders = no_placeholders - 1 - -end subroutine close_placeholder - -end program From 95d4ad55b722fa77ab6cb62bbef308f52932899e Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Tue, 27 Oct 2020 13:24:50 -0600 Subject: [PATCH 14/33] Remove configure/compile/clean utilties for old community build --- clean | 57 ------- compile | 40 ----- configure | 433 ------------------------------------------------------ 3 files changed, 530 deletions(-) delete mode 100755 clean delete mode 100755 compile delete mode 100755 configure diff --git a/clean b/clean deleted file mode 100755 index 62d62f2b5..000000000 --- a/clean +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -if [[ "$1" == '-a' ]]; then - CLEANALL=true -fi -# execute all make clean in subshell to retain PWD -# we don't care about failures so ignore 'em -printf "\n\n<><><><><><><><> CLEAN BEGIN <><><><><><><><>\n\n" -TOPDIR=$PWD -#Use make as specified in configure file unless it is empty -if [ ! -e configure.upp ]; then - MAKE="make" -else - MAKE=`awk '($1~/^MAKE/) {print substr($0,index($0,"=")+1) }' configure.upp` - MAKE=${MAKE:-make} # If above command returned nothing, set MAKE to "make" -fi -cd $TOPDIR/sorc/comlibs -$MAKE clean -cd $TOPDIR/sorc/ncep_post.fd -$MAKE clean -f makefile_dtc -cd $TOPDIR - -# -# clear configuration file to force a reconfigure after a clean -# Configuration file exists -if [ -e configure.upp ]; then - # - # If configuration file is empty don't overwrite backup - if [ -s configure.upp ]; then - /bin/mv configure.upp configure.upp.backup - fi -fi - -# empty file for clean op -touch configure.upp - -printf "\n\n<><><><><><><> CLEAN COMPLETE <><><><><><><><>\n\n" -# Now remove this to force a reconfigure - -# -# clean -a -- look for anything that may not have been cleaned up and -# remove it -if [[ "$CLEANALL" == 'true' ]]; then - printf "\n\n<><><><><><><> CLEAN ALL <><><><><><><><>\n\n" - set -x - /bin/rm -rf ./netcdf_links - find . -name \*.exe -exec \rm {} \; - find . -name \*.o -exec \rm {} \; - find . -name \*.a -exec \rm {} \; - find . -name \*.mod -exec \rm {} \; - - rm -rf exec - rm -rf lib - rm -rf include - set +x - printf "\n\n<><><><><><> CLEAN ALL COMPLETE <><><><><><><><>\n\n" -fi diff --git a/compile b/compile deleted file mode 100755 index 0881e8902..000000000 --- a/compile +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# Set current directory for easy navigation -TOPDIR=`pwd` - -# The only arguments should be for the NCEP build; if that's the case -# then configure.upp is not necessary and will be ignored if it exists -if [ "$#" -eq 0 ]; then - if [ ! -e configure.upp ]; then - echo "ERR :: No configure.upp file => Do './configure' first" - exit 1 - elif [ ! -s configure.upp ]; then - echo "ERR :: Empty configure.upp file => Do './configure' first" - exit 2 - fi - - echo "**** Compiling UPP and all libs ****" - MAKE=`awk '($1~/^MAKE/) {print substr($0,index($0,"=")+1) }' configure.upp` - MAKE=${MAKE:-make} # If above command returned nothing, set MAKE to "make" - cd $TOPDIR/sorc/comlibs - $MAKE - cd $TOPDIR/sorc/ncep_post.fd - $MAKE -f makefile_dtc - cd $TOPDIR -else - cd $TOPDIR/sorc - ./build_ncep_post.sh $1 - RETURN=$? - if [ "$RETURN" -ne 0 ]; then - echo "*******************************" - echo " " - echo "Unrecognized compile target $1." - echo " " - echo " For ncep_post, you must provide a valid machine name" - echo " " - echo "*******************************" - exit 1 - fi -fi - diff --git a/configure b/configure deleted file mode 100755 index f527357ef..000000000 --- a/configure +++ /dev/null @@ -1,433 +0,0 @@ -#!/bin/bash - -# -# Name of this script -SCRIPT=configure - -# -# Process any command line arguments -args=`getopt :d $*` -if [ $? != 0 ] ; then - echo 'Usage: $0 [-d]' - exit 64 # EX_USAGE -fi -set -- $args -for arg ; do - case "$arg" in - -d) DEBUG=1; echo 'Compiling with DEBUG option'; shift;; - esac -done - -# First, check if CRTM submodule has been properly checked out; quit if not -if [ ! -f "sorc/comlibs/crtm2/src/makefile" ] ; then - echo "sorc/comlibs/crtm2/src/makefile does not exist!" - echo "If you cloned the code from github, you probably have not checked out the crtm submodule" - echo "" - echo "Try the following command to fix this issue:" - echo "" - echo "git submodule update --init --recursive --progress" - echo "" - exit 2 -fi - -# ============================================================================= -# If NETCDF is not set, look for legacy locations: -# ============================================================================= -if [ -z "$NETCDF" ] ; then - echo $SCRIPT ": NETCDF environment variable not set" -# User supplied - if [ -d ./netcdf_links ] ; then - NETCDF=`pwd`/netcdf_links -# System default - elif [ -d /usr/local/netcdf ] ; then - NETCDF=/usr/local/netcdf - else - echo "Could not find netCDF libraries" - echo "" - exit 2 #ERROR - fi -fi - -echo "Will use NETCDF in: " $NETCDF -# -# NETCDF 3.6.2 and greater there might be a second library, libnetcdff.a -USENETCDFF="" -if [ -f "$NETCDF/lib/libnetcdff.a" -o -f "$NETCDF/lib/libnetcdff.so" ] ; then - USENETCDFF="-lnetcdff" -fi - - -# Find individual NCEP libs, includes, and other files, if they are specified -NCEPLIBLIB='' -NCEPLIBINC='' - -# Create array of required libs and incs -# This way if all required libs and incs are specified, NCEPLIBS_DIR is not required -declare -a REQUIREDDIRS=("BACIOLIBDIR" "SPLIBDIR" "SIGIOLIBDIR" "SIGIOINCDIR" "W3EMCLIBDIR" "W3EMCINCDIR" "W3NCOLIBDIR" "NEMSIOLIBDIR" "NEMSIOINCDIR" "SFCIOLIBDIR" "SFCIOINCDIR" "G2LIBDIR" "G2TMPLLIBDIR" "G2TMPLINCDIR" "GFSIOLIBDIR" "GFSIOINCDIR" "WRFIOLIBDIR" ) - -if [ ! -z "$BACIOLIBDIR" ]; then - BACIOFILE=$BACIOLIBDIR/libbacio.a - if [ -f $BACIOFILE ]; then - echo "Found BACIO library: $BACIOFILE" - NCEPLIBLIB="-L$BACIOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"BACIOLIBDIR"}" ) - else - echo "ERROR: BACIOLIBDIR is set but the library does not exist" - echo " BACIOLIBDIR = $BACIOLIBDIR" - echo " Library file should be $BACIOFILE" - exit 4 - fi -fi -if [ ! -z "$SPLIBDIR" ]; then - SPFILE=$SPLIBDIR/libsp.a - if [ -f $SPFILE ]; then - echo "Found SP library: $SPFILE" - NCEPLIBLIB="-L$SPLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"SPLIBDIR"}" ) - else - echo "ERROR: SPLIBDIR is set but the library does not exist" - echo " SPLIBDIR = $SPLIBDIR" - echo " Library file should be $SPFILE" - exit 4 - fi -fi -if [ -z "$SPLIB_VERSION" ]; then - SPLIB_VERSION=2.0.2 -fi -if [ ! -z "$SIGIOLIBDIR" ]; then - SIGIOFILE=$SIGIOLIBDIR/libsigio.a - if [ -f $SIGIOFILE ]; then - echo "Found SIGIO library: $SIGIOFILE" - NCEPLIBLIB="-L$SIGIOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"SIGIOLIBDIR"}" ) - else - echo "ERROR: SIGIOLIBDIR is set but the library does not exist" - echo " SIGIOLIBDIR = $SIGIOLIBDIR" - echo " Library file should be $SIGIOFILE" - exit 4 - fi -fi -if [ ! -z "$SIGIOINCDIR" ]; then - SIGIOFILES=( "$SIGIOINCDIR/sigio_module.mod" "$SIGIOINCDIR/sigio_r_module.mod" ) - for f in "${SIGIOFILES[@]}"; do - if [ -f $f ]; then - echo "Found SIGIO include file: $f" - else - echo "ERROR: SIGIOINCDIR is set but one or more necessary include files are missing" - echo " SIGIOINCDIR = $SIGIOINCDIR" - echo " Included file(s) should be ${SIGIOFILES[@]}" - exit 4 - fi - done - NCEPLIBINC="-I$SIGIOINCDIR $NCEPLIBINC" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"SIGIOINCDIR"}" ) -fi -if [ -z "$SIGIOLIB_VERSION" ]; then - SIGIOLIB_VERSION=2.0.1 -fi -if [ ! -z "$W3EMCLIBDIR" ]; then - W3EMCFILE=$W3EMCLIBDIR/libw3emc.a - if [ -f $W3EMCFILE ]; then - echo "Found W3EMC library: $W3EMCFILE" - NCEPLIBLIB="-L$W3EMCLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"W3EMCLIBDIR"}" ) - else - echo "ERROR: W3EMCLIBDIR is set but the library does not exist" - echo " W3EMCLIBDIR = $W3EMCLIBDIR" - echo " Library file should be $W3EMCFILE" - exit 4 - fi -fi -if [ ! -z "$W3EMCINCDIR" ]; then - W3EMCFILES=( "$W3EMCINCDIR/mersenne_twister.mod" ) - for f in "${W3EMCFILES[@]}"; do - if [ -f $f ]; then - echo "Found W3EMC include file: $f" - else - echo "ERROR: W3EMCINCDIR is set but one or more necessary include files are missing" - echo " W3EMCINCDIR = $W3EMCINCDIR" - echo " Included file(s) should be ${W3EMCFILES[@]}" - exit 4 - fi - done - NCEPLIBINC="-I$W3EMCINCDIR $NCEPLIBINC" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"W3EMCINCDIR"}" ) -fi -if [ -z "$W3EMCLIB_VERSION" ]; then - W3EMCLIB_VERSION=2.2.0 -fi -if [ ! -z "$W3NCOLIBDIR" ]; then - W3NCOFILE=$W3NCOLIBDIR/libw3nco.a - if [ -f $W3NCOFILE ]; then - echo "Found W3NCO library: $W3NCOFILE" - NCEPLIBLIB="-L$W3NCOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"W3NCOLIBDIR"}" ) - else - echo "ERROR: W3NCOLIBDIR is set but the library does not exist" - echo " W3NCOLIBDIR = $W3NCOLIBDIR" - echo " Library file should be $W3NCOFILE" - exit 4 - fi -fi -if [ -z "$W3NCOLIB_VERSION" ]; then - W3NCOLIB_VERSION=2.0.6 -fi -if [ ! -z "$NEMSIOLIBDIR" ]; then - NEMSIOFILE=$NEMSIOLIBDIR/libnemsio.a - if [ -f $NEMSIOFILE ]; then - echo "Found NEMSIO library: $NEMSIOFILE" - NCEPLIBLIB="-L$NEMSIOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"NEMSIOLIBDIR"}" ) - else - echo "ERROR: NEMSIOLIBDIR is set but the library does not exist" - echo " NEMSIOLIBDIR = $NEMSIOLIBDIR" - echo " Library file should be $NEMSIOFILE" - exit 4 - fi -fi -if [ ! -z "$NEMSIOINCDIR" ]; then - NEMSIOFILES=( "$NEMSIOINCDIR/nemsio_module.mod" "$NEMSIOINCDIR/nemsio_module_mpi.mod" ) - for f in "${NEMSIOFILES[@]}"; do - if [ -f $f ]; then - echo "Found NEMSIO include file: $f" - else - echo "ERROR: NEMSIOINCDIR is set but one or more necessary include files are missing" - echo " NEMSIOINCDIR = $NEMSIOINCDIR" - echo " Included file(s) should be ${NEMSIOFILES[@]}" - exit 4 - fi - done - NCEPLIBINC="-I$NEMSIOINCDIR $NCEPLIBINC" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"NEMSIOINCDIR"}" ) -fi -if [ ! -z "$SFCIOLIBDIR" ]; then - SFCIOFILE=$SFCIOLIBDIR/libsfcio.a - if [ -f $SFCIOFILE ]; then - echo "Found SFCIO library: $SFCIOFILE" - NCEPLIBLIB="-L$SFCIOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"SFCIOLIBDIR"}" ) - else - echo "ERROR: SFCIOLIBDIR is set but the library does not exist" - echo " SFCIOLIBDIR = $SFCIOLIBDIR" - echo " Library file should be $SFCIOFILE" - exit 4 - fi -fi -if [ ! -z "$SFCIOINCDIR" ]; then - SFCIOFILES=( "$SFCIOINCDIR/sfcio_module.mod" ) - for f in "${SFCIOFILES[@]}"; do - if [ -f $f ]; then - echo "Found SFCIO include file: $f" - else - echo "ERROR: SFCIOINCDIR is set but one or more necessary include files are missing" - echo " SFCIOINCDIR = $SFCIOINCDIR" - echo " Included file(s) should be ${SFCIOFILES[@]}" - exit 4 - fi - done - NCEPLIBINC="-I$SFCIOINCDIR $NCEPLIBINC" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"SFCIOINCDIR"}" ) -fi -if [ -z "$SFCIOLIB_VERSION" ]; then - SFCIOLIB_VERSION=1.0.0 -fi -if [ ! -z "$G2LIBDIR" ]; then - G2FILE=$G2LIBDIR/libg2.a - if [ -f $G2FILE ]; then - echo "Found G2 library: $G2FILE" - NCEPLIBLIB="-L$G2LIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"G2LIBDIR"}" ) - else - echo "ERROR: G2LIBDIR is set but the library does not exist" - echo " G2LIBDIR = $G2LIBDIR" - echo " Library file should be $G2FILE" - exit 4 - fi -fi -if [ -z "$G2LIB_VERSION" ]; then - G2LIB_VERSION=3.1.0 -fi -if [ ! -z "$G2TMPLLIBDIR" ]; then - G2TMPLFILE=$G2TMPLLIBDIR/libg2tmpl.a - if [ -f $G2TMPLFILE ]; then - echo "Found G2TMPL library: $G2TMPLFILE" - NCEPLIBLIB="-L$G2TMPLLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"G2TMPLLIBDIR"}" ) - else - echo "ERROR: G2TMPLLIBDIR is set but the library does not exist" - echo " G2TMPLLIBDIR = $G2TMPLLIBDIR" - echo " Library file should be $G2TMPLFILE" - exit 4 - fi -fi -if [ ! -z "$G2TMPLINCDIR" ]; then - G2TMPLFILES=( "$G2TMPLINCDIR/grib2_all_tables_module.mod" ) - for f in "${G2TMPLFILES[@]}"; do - if [ -f $f ]; then - echo "Found G2TMPL include file: $f" - else - echo "ERROR: G2TMPLINCDIR is set but one or more necessary include files are missing" - echo " G2TMPLINCDIR = $G2TMPLINCDIR" - echo " Included file(s) should be ${G2TMPLFILES[@]}" - exit 4 - fi - done - NCEPLIBINC="-I$G2TMPLINCDIR $NCEPLIBINC" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"G2TMPLINCDIR"}" ) -fi -if [ -z "$G2TMPLLIB_VERSION" ]; then - G2TMPLLIB_VERSION=1.5.0 -fi -if [ ! -z "$GFSIOLIBDIR" ]; then - GFSIOFILE=$GFSIOLIBDIR/libgfsio.a - if [ -f $GFSIOFILE ]; then - echo "Found GFSIO library: $GFSIOFILE" - NCEPLIBLIB="-L$GFSIOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"GFSIOLIBDIR"}" ) - else - echo "ERROR: GFSIOLIBDIR is set but the library does not exist" - echo " GFSIOLIBDIR = $GFSIOLIBDIR" - echo " Library file should be $GFSIOFILE" - exit 4 - fi -fi -if [ ! -z "$GFSIOINCDIR" ]; then - GFSIOFILES=( "$GFSIOINCDIR/gfsio_module.mod" ) - for f in "${GFSIOFILES[@]}"; do - if [ -f $f ]; then - echo "Found GFSIO include file: $f" - else - echo "ERROR: GFSIOINCDIR is set but one or more necessary include files are missing" - echo " GFSIOINCDIR = $GFSIOINCDIR" - echo " Included file(s) should be ${GFSIOFILES[@]}" - exit 4 - fi - done - NCEPLIBINC="-I$GFSIOINCDIR $NCEPLIBINC" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"GFSIOINCDIR"}" ) -fi -if [ ! -z "$WRFIOLIBDIR" ]; then - WRFIOFILE=$WRFIOLIBDIR/libwrfio.a - if [ -f $WRFIOFILE ]; then - echo "Found WRFIO library: $WRFIOFILE" - NCEPLIBLIB="-L$WRFIOLIBDIR $NCEPLIBLIB" - REQUIREDDIRS=( "${REQUIREDDIRS[@]/"WRFIOLIBDIR"}" ) - else - echo "ERROR: WRFIOLIBDIR is set but the library does not exist" - echo " WRFIOLIBDIR = $WRFIOLIBDIR" - echo " Library file should be $WRFIOFILE" - exit 4 - fi -fi - -declare -a UNSETLIBS -for i in "${REQUIREDDIRS[@]}"; do - if [ -z $i ]; then continue; fi #If the variable has been removed from the list, don't add to new array - UNSETDIRS+=($i) #This syntax appends existing array with new element -done - -# Find location of NCEPLIBS full package, if necessary -if [ -z "$NCEPLIBS_DIR" -a ${#UNSETDIRS[@]} -ne 0 ] ; then # Quit if NCEPLIBS_DIR is not set, but only if UNSETDIRS is not empty - echo "ERROR: You must define the location of the NCEP libraries (NCEPLIBS_DIR)" - echo " OR" - echo " You must define the following library/include paths:" - for i in "${UNSETDIRS[@]}"; do - echo " $i" - done - exit 1 -else - if [ ! -z "$NCEPLIBS_DIR" ]; then - echo "Will use NCEPlibs in: " $NCEPLIBS_DIR - NCEPLIBLIB="$NCEPLIBLIB -L$NCEPLIBS_DIR/lib" - NCEPLIBINC="-I$NCEPLIBS_DIR/include" - fi -fi - -# -# if the uname command exists, give it a shot and see if -# we can narrow the choices; otherwise, spam 'em -os="ARCH" -mach="ARCH" -type uname > /dev/null -if [ $? -eq 0 ] ; then - os=`uname` - if [ "$os" = "AIX" -o "$os" = "IRIX" -o "$os" = "IRIX64" -o "$os" = "SunOS" -o "$os" = "HP-UX" -o "$os" = "Darwin" ] ; then - mach="ARCH" - else - if [ "$os" = "OSF1" -o "$os" = "Linux" -o "$os" = "UNICOS/mp" -o "$os" = "UNIX_System_V" ] ; then - mach=`uname -m` - else - os="ARCH" - mach="ARCH" - fi - fi -fi - -# -# Add directory support for build -pwd=`pwd` -if [ ! -e ./exec ] ; then - echo "$SCRIPT: making ./exec" - mkdir ./exec -fi - -#Directory where binary file goes -BINDIR=${pwd}/exec -echo "bindir " ${BINDIR} - -if [ ! -e ./include ] ; then - echo "$SCRIPT: making ./include" - mkdir ./include -fi -INCMOD=${pwd}/include -echo "incmod " ${INCMOD} - -if [ ! -e ./lib ] ; then - echo "$SCRIPT: making ./lib" - mkdir ./lib -fi -LIBDIR=${pwd}/lib -echo "libdir " ${LIBDIR} - -# -# See if the env var DEBUG is set (overriding any arguments passed in) -if [ ! -z "$DEBUG" ] ; then - DEBUG=1 -fi - -# -# proceed with configuration if OS is supported -srch=`grep -i "^#ARCH.*$os" sorc/arch/configure.defaults | grep -i "$mach"` -if [ -n "$srch" ] ; then - perl sorc/arch/Config.pl -netcdf=$NETCDF -USENETCDFF=$USENETCDFF \ - -os=$os -mach=$mach \ - -bindir=$BINDIR -incmod=$INCMOD -libdir=$LIBDIR \ - -debug=$DEBUG -spv=$SPLIB_VERSION \ - -sigiov=$SIGIOLIB_VERSION -w3emcv=$W3EMCLIB_VERSION \ - -w3ncov=$W3NCOLIB_VERSION -sfciov=$SFCIOLIB_VERSION \ - -g2v=$G2LIB_VERSION -g2tmplv=$G2TMPLLIB_VERSION -else - echo '***********************************************' - echo '*** ERROR ERROR ERROR ERROR ***' - echo '*** ***' - echo '*** This platform is not supported: ***' - echo " $os $mach " - echo '*** ***' - echo '*** Edit sorc/arch/configure.defaults to ***' - echo '*** set up a custom configuration file ***' - echo '***********************************************' - exit 2 -fi - -#Escape slashes and spaces -NCEPLIBLIBESC=$(echo $NCEPLIBLIB | sed 's/ /\\ /g') -NCEPLIBLIBESC=$(echo $NCEPLIBLIBESC | sed 's|/|\\/|g') #Hooray for alternate delimiters! -NCEPLIBINCESC=$(echo $NCEPLIBINC | sed 's/ /\\ /g') -NCEPLIBINCESC=$(echo $NCEPLIBINCESC | sed 's|/|\\/|g') #Of course, this assumes that user does not have files or directories with | in the name - #....they wouldn't do that to me, would they?? - -#Add specified NCEPLIBs paths to configure.upp; don't edit file in place because -#sed has platform-specific differences for this functionality -sed "s|CONFIGURE_NCEPLIBS_LIB|$NCEPLIBLIBESC|g" configure.upp > .configure.upp.edit -sed "s/CONFIGURE_NCEPLIBS_INC/$NCEPLIBINCESC/g" .configure.upp.edit > configure.upp - From 6dd7d588280100759208f10be95ed0fe41d62cf3 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 3 Nov 2020 16:31:08 -0700 Subject: [PATCH 15/33] Modified UPP stand-alone run script with name change to run_upp --- scripts/{run_unipost => run_upp} | 289 +++++++++++-------------------- 1 file changed, 105 insertions(+), 184 deletions(-) rename scripts/{run_unipost => run_upp} (58%) diff --git a/scripts/run_unipost b/scripts/run_upp similarity index 58% rename from scripts/run_unipost rename to scripts/run_upp index a755e2b59..362d25ca1 100755 --- a/scripts/run_unipost +++ b/scripts/run_upp @@ -19,47 +19,40 @@ set -x # October 2019: Modified for new unified build system; # ndate.exe and copygb.exe have been removed # +# October 2020: Modified to remove WRF and grib1; Add FV3LAM +# Updates for cmake build, Change exec name +# #-------------------------------------------------------- # -# This script runs the community version of UPP, unipost.exe +# This script runs the stand-alone community version of UPP, ncep_post # #-------------------------------------------------------- #---------------------------------------------------------------------------------- #--- USER EDIT DESCIPTIONS -------------------------------------------------------- # See UPP User's Guide for more information -# http://www.dtcenter.org/upp/users/docs/user_guide/V4/upp_users_guide.pdf +# https://upp.readthedocs.io/en/ufs-v2.0.0/ #---------------------------------------------------------------------------------- -# TOP_DIR : Top level directory for source codes (UPPV4.0) +# TOP_DIR : Top level directory for building and running UPP # DOMAINPATH : Working directory for this run. -# UNIPOST_HOME : Where the UPP build directory located -# POSTEXEC : Where the UPP executables are located -# SCRIPTS : Where the UPP scripts directory is (i.e. UPPV4.0/scripts/) -# modelDataPath : Where are the model data files to be processed located -# e.g. "wrfprd/" for WRF-based runs -# FV3 model filename examples (may need to alter in script) -# inFileName=dynf012.nemsio (default) or gfs.t00z.atmf012.nemsio -# flxFileName=phyf012.nemsio (default) or gfs.t00z.sfcf012.nemsio -# paramFile : Name and location of cntrl.parm file (wrf_cntrl.parm) -# Text file lists desired fields for grib1 output. Template in UPPV4.0/parm/ -# txtCntrlFile : Name and location of post flat file (postxconfig-NT.txt) for grib2 -# Text file listing desired fields to be generated by the user before running UPP. -# Step 1: Edit postcntrl.xml to include desired fields (template in UPPV4.0/parm) -# Step 2: Validate postcntrl.xml and post_avblflds.xml -# Step 3: Type 'make' in parm directory to generate the post flat file -# dyncore : What model is used ARW (WRF) or FV3 (GFS) +# UNIPOST_HOME : Location of the EMC-post directory +# POSTEXEC : Location of the UPP executable +# modelDataPath : Location of the model output data files to be post-processed +# txtCntrlFile : Name and location of the flat text file that lists desired fields for output +# GFS: postxconfig-NT-GFS-F00.txt (0-hour lead) and postxconfig-NT-GFS.txt (all other +# leads) +# LAM (Limited Area Model): postxconfig-NT-fv3lam.txt +# model : What model is used? GFS or LAM (Limited Area Model) # inFormat : Format of the model data -# arw - "netcdf" -# fv3 - "binarynemsiompiio" or "netcdf" +# GFS - "binarynemsiompiio" or "netcdf" +# LAM - "netcdf" # outFormat : Format of output from UPP -# grib (WRF only) # grib2 # startdate : Forecast start date (YYYYMMDDHH) # fhr : First forecast hour to be post-processed # lastfhr : Last forecast hour to be post-processed # incrementhr : Increment (in hours) between forecast files # * Do not set to 0 or the script will loop continuously * -# domain_list : List of domains for run # RUN_COMMAND : System run command for serial or parallel runs, examples below. # #---------------------------------------------------------------------------------- @@ -68,42 +61,36 @@ set -x # Set relevant paths and data information # This script assumes you created a directory $DOMAINPATH/postprd -# and that your model output is in $DOMAINPATH/wrfprd # as recommended in the users guide where UPP will output. export TOP_DIR=/home/username -export DOMAINPATH=${TOP_DIR}/DOMAINS/test_case -export UNIPOST_HOME=${TOP_DIR}/UPPV4.0 -export POSTEXEC=${UNIPOST_HOME}/exec -export SCRIPTS=${UNIPOST_HOME}/scripts -export modelDataPath=${DOMAINPATH}/wrfprd -export paramFile=${DOMAINPATH}/parm/wrf_cntrl.parm # grib1 (WRF only) -export txtCntrlFile=${DOMAINPATH}/parm/postxconfig-NT-WRF.txt # grib2 (or postxconfig-NT-GFS.txt) - -# Specify Dyn Core (ARW or FV3 in upper case) -export dyncore="ARW" - -# Set input format from model and ouput format from unipost +export DOMAINPATH=${TOP_DIR}/test_case +export UNIPOST_HOME=${TOP_DIR}/EMC_post +export POSTEXEC=${UNIPOST_HOME}/bin +export modelDataPath=/path/to/model/data +export txtCntrlFile=${DOMAINPATH}/parm/postxconfig-NT-GFS.txt + +# Specify model ("GFS" or "LAM" in upper case) +export model="GFS" + +# Set input format from model and ouput format from UPP export inFormat="netcdf" export outFormat="grib2" # Set date/time information -export startdate=2014020412 +export startdate=2020020400 export fhr=00 export lastfhr=06 export incrementhr=03 -# Set domain lists -export domain_list="d01" - # Set run command: -# Serial command example -export RUN_COMMAND="${POSTEXEC}/unipost.exe " +# Single processor command example +#export RUN_COMMAND="${POSTEXEC}/ncep_post " # Parallel command examples: -#export RUN_COMMAND="mpirun -np 1 ${POSTEXEC}/unipost.exe " -#export RUN_COMMAND="mpirun.lsf ${POSTEXEC}/unipost.exe " -#export RUN_COMMAND="mpiexec_mpt ${POSTEXEC}/unipost.exe " +export RUN_COMMAND="mpirun -np 1 ${POSTEXEC}/ncep_post " +#export RUN_COMMAND="mpirun.lsf ${POSTEXEC}/ncep_post " +#export RUN_COMMAND="mpiexec_mpt ${POSTEXEC}/ncep_post " # DEBUG command example found further below, search "DEBUG" @@ -132,47 +119,44 @@ if [ ! -d ${POSTEXEC} ]; then exit 1 fi -if [ ! -x ${POSTEXEC}/unipost.exe ]; then - echo "ERROR: unipost.exe, '${POSTEXEC}/unipost.exe', does not exist or is not executable." +if [ ! -x ${POSTEXEC}/ncep_post ]; then + echo "ERROR: ncep_post, '${POSTEXEC}/ncep_post', does not exist or is not executable." exit 1 fi -# Set tag based on user defined $dyncore (ARW or FV3 in upper case) -if [ $dyncore = "ARW" ]; then - export tag=NCAR -elif [ $dyncore = "FV3" ]; then +# Set tag based on user defined model (GFS or LAM) +if [ $model = "GFS" ]; then export tag=GFS +elif [ $model = "LAM" ]; then + export tag=FV3R else - echo "${dyncore} is not supported. Edit script to choose ARW or FV3 dyncore." - exit + echo "${model} is not supported. Edit script to choose 'GFS' or 'LAM' model." + exit fi -if [[ ${dyncore} == "ARW" ]]; then - if [[ ${inFormat} != "netcdf" ]]; then - echo "ERROR: 'inFormat' must be 'netcdf' for ARW model output. Exiting... " - exit 1 - fi -elif [ ${dyncore} == "FV3" ]; then +if [ ${model} == "GFS" ]; then if [[ ${inFormat} == "binarynemsiompiio" ]]; then - echo "Check: You are using 'dyncore' 'inFormat'!" + echo "Check: You are using 'model' 'inFormat'!" elif [[ ${inFormat} == "netcdf" ]]; then - echo "Check: You are using 'dyncore' 'inFormat'!" + echo "Check: You are using 'model' 'inFormat'!" else - echo "ERROR: 'inFormat' must be 'binarynemsiompiio' or 'netcdf' for FV3 model output. Exiting... " + echo "ERROR: 'inFormat' must be 'binarynemsiompiio' or 'netcdf' for GFS model output. Exiting... " exit 1 fi -fi - -if [[ ${outFormat} == "grib" ]]; then - if [ ! -e ${paramFile} ]; then - echo "ERROR: 'paramFile' not found in '${paramFile}'. Exiting... " +elif [[ ${model} == "LAM" ]]; then + if [[ ${inFormat} != "netcdf" ]]; then + echo "ERROR: 'inFormat' must be 'netcdf' for LAM model output. Exiting... " exit 1 fi -elif [[ ${outFormat} == "grib2" ]]; then +fi + +if [[ ${outFormat} == "grib2" ]]; then if [ ! -e ${txtCntrlFile} ]; then echo "ERROR: 'txtCntrlFile' not found in '${txtCntrlFile}'. Exiting... " exit 1 fi +else + echo "${outFormat} is not supported. Edit script to choose 'grib2' for 'outFormat'. Exiting... " fi if [ ! -d ${DOMAINPATH}/postprd ]; then @@ -202,26 +186,16 @@ if test "$err1" -ne 0; then exit 1 fi -# Get local copy of parm file -# For GRIB1 the code uses wrf_cntrl.parm to select variables for output -# the available fields are set at compilation -if [[ ${outFormat} == "grib" ]]; then - if [[ ${dyncore} == "ARW" ]]; then - ln -fs ${paramFile} wrf_cntrl.parm - elif [[ ${dyncore} == "FV3" ]]; then - echo "ERROR: FV3 not available for grib1 output. Use GRIB2 output. Exiting..." - exit 1 - fi -elif [[ ${outFormat} == "grib2" ]]; then -# For GRIB2 the code reads postxconfig-NT.txt to select variables for output -# the available fields are defined in post_avlbflds.xml -- while we +# For GRIB2 the code reads a flat text tile to select variables for output. +# The available fields are defined in post_avlbflds.xml -- while we # set a link to this file for reading during runtime it is not typical # for one to update this file, therefore the link goes back to the # program directory - this is true for params_grib2_tbl_new also - a # file which defines the GRIB2 table values -ln -fs ${txtCntrlFile} postxconfig-NT.txt -ln -fs ${UNIPOST_HOME}/parm/post_avblflds.xml post_avblflds.xml -ln -fs ${UNIPOST_HOME}/parm/params_grib2_tbl_new params_grib2_tbl_new +if [[ ${outFormat} == "grib2" ]]; then + ln -fs ${txtCntrlFile} postxconfig-NT.txt + ln -fs ${UNIPOST_HOME}/parm/post_avblflds.xml post_avblflds.xml + ln -fs ${UNIPOST_HOME}/parm/params_grib2_tbl_new params_grib2_tbl_new fi # Link microphysics tables - code will use based on mp_physics option @@ -230,7 +204,7 @@ ln -fs ${UNIPOST_HOME}/parm/nam_micro_lookup.dat . ln -fs ${UNIPOST_HOME}/parm/hires_micro_lookup.dat . # link coefficients for crtm2 (simulated synthetic satellites) -CRTMDIR=${UNIPOST_HOME}/sorc/comlibs/crtm2/src/fix +CRTMDIR=${UNIPOST_HOME}/crtm/fix ln -fs $CRTMDIR/EmisCoeff/IR_Water/Big_Endian/Nalli.IRwater.EmisCoeff.bin ./ ln -fs $CRTMDIR/EmisCoeff/MW_Water/Big_Endian/FASTEM4.MWwater.EmisCoeff.bin ./ ln -fs $CRTMDIR/EmisCoeff/MW_Water/Big_Endian/FASTEM5.MWwater.EmisCoeff.bin ./ @@ -283,9 +257,9 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ahi_himawari8.TauCoeff.bin ./ ln -fs $CRTMDIR/SpcCoeff/Big_Endian/ahi_himawari8.SpcCoeff.bin ./ ####################################################### -# 1. Run Unipost +# 1. Run UPP # -# The Unipost is used to read native WRF model +# The UPP is used to read native GFS and LAM model # output and put out isobaric state fields and derived fields. ####################################################### @@ -313,74 +287,41 @@ iHH=`echo $startdate | cut -c9-10` echo 'NEWDATE' $NEWDATE echo 'YY' $YY -# Begin looping through domains list -for domain in ${domain_list}; do - # Create model file name (inFileName) -dom_id=`echo "${domain}" | cut -d 'd' -f 2` -if [[ ${dyncore} == "ARW" ]]; then - inFileName=${modelDataPath}/wrfout_d${dom_id}_${YY}-${MM}-${DD}_${HH}:00:00 -elif [ ${dyncore} == "FV3" ]; then -if [[ ${inFormat} == "binarynemsiompiio" ]]; then - inFileName=${modelDataPath}/dynf${fhour}.nemsio - flxFileName=${modelDataPath}/phyf${fhour}.nemsio -elif [ ${inFormat} == "netcdf" ]; then - inFileName=${modelDataPath}/gfs.t${fhr}z.atmf006.nc - flxFileName=${modelDataPath}/gfs.t${fhr}z.sfcf006.nc -fi +if [ ${model} == "GFS" ]; then + if [[ ${inFormat} == "binarynemsiompiio" ]]; then + inFileName=${modelDataPath}/atmf${fhour}.nemsio + flxFileName=${modelDataPath}/sfcf${fhour}.nemsio + elif [ ${inFormat} == "netcdf" ]; then + inFileName=${modelDataPath}/atmf${fhour}.nc + flxFileName=${modelDataPath}/sfcf${fhour}.nc + fi +elif [ ${model} == "LAM" ]; then + if [ ${inFormat} == "netcdf" ]; then + inFileName=${modelDataPath}/dynf${fhour}.nc + flxFileName=${modelDataPath}/dynf${fhour}.nc + fi fi # Check if the files exist if [[ ! -e ${inFileName} ]]; then - echo "ERROR: Can't find 'inFileName': ${inFileName}. Directory or file does not exist. Exiting..." - echo "ERROR: Check if 'modelDataPath': ${modelDataPath} exists." - if [[ ${dyncore} == "ARW" ]]; then - echo "ERROR: Check if file: 'wrfout_d${dom_id}_${YY}-${MM}-${DD}_${HH}:00:00' exists in modelDataPath." - elif [ ${dyncore} == "FV3" ]; then - echo "ERROR: Check if file: 'dynf${fhour}.nemsio' exists in modelDataPath." -# echo "ERROR: Check if file: 'gfs.t${iHH}z.sfcf${fhour}.nemsio' exists in modelDataPath." - fi - exit 1 + echo "ERROR: Can't find 'inFileName': ${inFileName}. Directory or file does not exist. Exiting..." + echo "ERROR: Check if 'modelDataPath': ${modelDataPath} exists." + exit 1 fi -# Check if that flux file exists for FV3 -if [ ${dyncore} == "FV3" ]; then - if [[ ! -e ${flxFileName} ]]; then - echo "ERROR: Can't find 'flxFileName': ${flxFileName}. Directory or file does not exist. Exiting..." - echo "ERROR: Check if 'modelDataPath': ${modelDataPath} exists." - echo "ERROR: Check if file: 'phyf${fhour}.nemsio' exists in modelDataPath." -# echo "ERROR: Check if file: 'gfs.t${iHH}z.sfcf${fhour}.nemsio' exists in modelDataPath." - exit 1 - fi +if [[ ! -e ${flxFileName} ]]; then + echo "ERROR: Can't find 'flxFileName': ${flxFileName}. Directory or file does not exist. Exiting..." + echo "ERROR: Check if 'modelDataPath': ${modelDataPath} exists." + exit 1 fi # Create itag based on user provided info. # Output format now set by user so if-block below uses this # to generate the correct itag. -if [[ ${outFormat} == "grib" ]]; then - -cat > itag < itag < itag < unipost_${domain}.${fhr}.out 2>&1 -elif [ ${dyncore} == "FV3" ]; then - ${RUN_COMMAND} > unipost.${fhr}.out 2>&1 +if [[ ${model} == "GFS" || ${model} == "LAM" ]]; then + ${RUN_COMMAND} > upp.f${fhour}.out 2>&1 fi -#---------------------------------------------------------------------- -# DEBUG Example, uncomment below and comment ${RUN_COMMAND} line above. - -# debugger runs - enter your debugger and hour of error -#if [[ $((10#${fhr})) -eq 3 ]]; then -# mpirun.dbg.totalview -progname ${POSTEXEC}/unipost.exe > unipost_${domain}.${fhr}.out 2>&1 -#else -# mpirun -np 1 ${POSTEXEC}/unipost.exe > unipost_${domain}.${fhr}.out 2>&1 -#fi -#---------------------------------------------------------------------- - -# This prefix was given in the wrf_cntl.parm file (GRIB1) -# or postcntrl.xml(GRIB2) +# The prefixes are given in the postcntrl.xml file datset variable (GRIB2) -if [[ ${dyncore} == "ARW" ]]; then - mv WRFPRS${fhr}.${tmmark} WRFPRS_${domain}.${fhr} -elif [ ${dyncore} == "FV3" ]; then - mv GFSPRS.GrbF${fhr} GFSPRS.${fhr} +if [[ ${model} == "GFS" ]]; then + mv GFSPRS.GrbF${fhr} GFSPRS.${fhour} +elif [ ${model} == "LAM" ]; then + mv BGDAWP${fhr}.tm00 BGDAWP.${fhour} + mv BGRD3D${fhr}.tm00 BGRD3D.${fhour} fi # #---------------------------------------------------------------------- -# End of unipost job +# End of ncep_post job #---------------------------------------------------------------------- -# check to make sure UPP was successful and script linked the file -if [[ ${dyncore} == "ARW" ]]; then - ls -l WRFPRS_${domain}.${fhr} +# check to make sure UPP was successful +if [[ ${model} == "GFS" ]]; then + ls -l GFSPRS.${fhour} err1=$? -elif [ ${dyncore} == "FV3" ]; then - ls -l GFSPRS.${fhr} +elif [ ${model} == "LAM" ]; then + ls -l BGDAWP.${fhour} err1=$? + ls -l BGRD3D.${fhour} + err2=$? fi -if test "$err1" -ne 0; then - echo 'UNIPOST FAILED, EXITTING' +if [[ ${err1} -ne 0 || ${err2} -ne 0 ]]; then + echo 'UPP FAILED, EXITTING' exit -fi - -done +fi fhr=$((10#${fhr}+$((${incrementhr})))) From d3199e87377ce2040e28405e8096f2da611dd058 Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Tue, 10 Nov 2020 07:38:37 -0500 Subject: [PATCH 16/33] Bug fix for FV3 LAM/LAMX (#219) * Fix of total cloud fraction in CLDRAD.f for FV3/LAMX. * Setting iSF_SURFACE_PHYSICS as 2 in regional FV3 read interface. --- sorc/ncep_post.fd/CLDRAD.f | 6 ++++-- sorc/ncep_post.fd/INITPOST_NETCDF.f | 11 ++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sorc/ncep_post.fd/CLDRAD.f b/sorc/ncep_post.fd/CLDRAD.f index 51ab9f111..0827781d8 100644 --- a/sorc/ncep_post.fd/CLDRAD.f +++ b/sorc/ncep_post.fd/CLDRAD.f @@ -1007,8 +1007,10 @@ SUBROUTINE CLDRAD FRAC=0. DO JC=max(1,J-numr),min(JM,J+numr) DO IC=max(1,I-numr),min(IM,I+numr) - NUMPTS=NUMPTS+1 - FRAC=FRAC+FULL_CLD(IC,JC) + IF(FULL_CLD(IC,JC) /= SPVAL) THEN + NUMPTS=NUMPTS+1 + FRAC=FRAC+FULL_CLD(IC,JC) + ENDIF ENDDO ENDDO IF (NUMPTS>0) FRAC=FRAC/REAL(NUMPTS) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 221d97284..46346ae59 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -75,7 +75,8 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) jend_m, imin, imp_physics, dt, spval, pdtop, pt, qmin, nbin_du, nphs, dtq2, ardlw,& ardsw, asrfc, avrain, avcnvc, theat, gdsdegr, spl, lsm, alsl, im, jm, im_jm, lm, & jsta_2l, jend_2u, nsoil, lp1, icu_physics, ivegsrc, novegtype, nbin_ss, nbin_bc, & - nbin_oc, nbin_su, gocart_on, pt_tbl, hyb_sigp, filenameFlux, fileNameAER + nbin_oc, nbin_su, gocart_on, pt_tbl, hyb_sigp, filenameFlux, fileNameAER, & + iSF_SURFACE_PHYSICS use gridspec_mod, only: maptype, gridtype, latstart, latlast, lonstart, lonlast, cenlon, & dxval, dyval, truelat2, truelat1, psmapf, cenlat,lonstartv, lonlastv, cenlonv, & latstartv, latlastv, cenlatv,latstart_r,latlast_r,lonstart_r,lonlast_r, STANDLON @@ -205,6 +206,14 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) else if(me==0)print*,'ak5= ',ak5 end if + Status=nf90_get_att(ncid3d,nf90_global,'sf_surface_physi', & + iSF_SURFACE_PHYSICS) + if(Status/=0)then + print*,'sf_surface_physi not found; assigning to 2' + iSF_SURFACE_PHYSICS=2 !set LSM physics to 2 for NOAH + else + if(me==0)print*,'SF_SURFACE_PHYSICS= ',iSF_SURFACE_PHYSICS + endif Status=nf90_get_att(ncid3d,nf90_global,'idrt',idrt) if(Status/=0)then print*,'idrt not in netcdf file,reading grid' From ffe1e027f823377dec61d7934d05cd93acc86228 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 17 Nov 2020 14:46:05 -0700 Subject: [PATCH 17/33] Add/modify RST documentation files for UPP release/public-v2 --- docs/Acknowledgments.rst | 25 +-- docs/AddNewVariable.rst | 352 ++++++++++++++++++++++++++++++ docs/CodeOverview.rst | 25 ++- docs/InputsOutputs.rst | 171 ++++++++------- docs/Installation.rst | 126 +++++++++++ docs/Introduction.rst | 18 +- docs/Regridding.rst | 53 ++--- docs/Running.rst | 126 +++++++++++ docs/SRW_BGDAWP_table.csv | 442 +++++++++++++++++++------------------- docs/SRW_BGRD3D_table.csv | 298 ++++++++++++------------- docs/UPP_GRIB2_Table.csv | 439 +++++++++++++++++++++++++++++++++++++ docs/UPP_GRIB2_Table.rst | 14 ++ docs/_static/custom.css | 12 ++ docs/conf.py | 6 + docs/index.rst | 3 +- 15 files changed, 1606 insertions(+), 504 deletions(-) create mode 100644 docs/AddNewVariable.rst create mode 100644 docs/Installation.rst create mode 100644 docs/Running.rst create mode 100644 docs/UPP_GRIB2_Table.csv create mode 100644 docs/UPP_GRIB2_Table.rst create mode 100644 docs/_static/custom.css diff --git a/docs/Acknowledgments.rst b/docs/Acknowledgments.rst index 6be16342a..593777040 100644 --- a/docs/Acknowledgments.rst +++ b/docs/Acknowledgments.rst @@ -2,24 +2,19 @@ Acknowledgments *************** -The adaptation of the original WRF Post Processor package and Users -Guide (by Mike Baldwin of NSSL/CIMMS and Hui-Ya Chuang of NCEP/EMC) was -done by Lígia Bernardet (NOAA/ESRL/DTC) in collaboration with Dusan -Jovic (NCEP/EMC), Robert Rozumalski (COMET), Wesley Ebisuzaki -(NWS/HQTR), and Louisa Nance (NCAR/RAL/DTC). Upgrades to WRF Post -Processor versions 2.2 and higher were performed by Hui-Ya Chuang, Dusan -Jovic and Mathew Pyle (NCEP/EMC). Transitioning of the documentation -from the WRF Post Processor to the Unified Post Processor was performed -by Nicole McKee (NCEP/EMC), Hui-ya Chuang (NCEP/EMC), and Jamie Wolff -(NCAR/RAL/DTC). Implementation of the Community Unified Post Processor -was performed by Tricia Slovacek, Kate Fossell, and Tracy Hertneky (NCAR/RAL/DTC). +The adaptation of the original WRF Post Processor package and Users Guide (by Mike Baldwin of +NSSL/CIMMS and Hui-Ya Chuang of NCEP/EMC) was done by Lígia Bernardet (NOAA/ESRL/DTC) in collaboration +with Dusan Jovic (NCEP/EMC), Robert Rozumalski (COMET), Wesley Ebisuzaki (NWS/HQTR), and Louisa Nance +(NCAR/RAL/DTC). Upgrades to WRF Post Processor versions 2.2 and higher were performed by Hui-Ya Chuang, +Dusan Jovic and Mathew Pyle (NCEP/EMC). Transitioning of the documentation from the WRF Post Processor +to the Unified Post Processor was performed by Nicole McKee (NCEP/EMC), Hui-ya Chuang (NCEP/EMC), and +Jamie Wolff (NCAR/RAL/DTC). Implementation of the Community Unified Post Processor was performed by +Tricia Slovacek, Kate Fossell, and Tracy Hertneky (NCAR/RAL/DTC). Acknowledgement - -If significant help was provided via the UPP helpdesk for work resulting -in a publication, please acknowledge the Developmental Testbed Center -UPP Team. +If significant help was provided via the UPP helpdesk for work resulting in a publication, please +acknowledge the Developmental Testbed Center UPP Team. For referencing this document please use: diff --git a/docs/AddNewVariable.rst b/docs/AddNewVariable.rst new file mode 100644 index 000000000..d0477271b --- /dev/null +++ b/docs/AddNewVariable.rst @@ -0,0 +1,352 @@ +********************* +Adding a New Variable +********************* + +This document provides general procedures and an example of how to add a new variable to the UPP code. +Please keep in mind it may not be an exhaustive step-by-step depending on your particular situation. +While we can provide general assistance for adding a new variable, users should be aware that this +requires good knowledge of Fortran and thorough understanding of the code. + +We encourage users to contact us at upp-help@ucar.edu to make us aware of modifications you are making. +In some cases, if we determine the changes you are making may be relevant for operational and/or +community purposes, we will be interested in incorporating your changes into the code base for support +and future release. We would then work with you to make this possible. + +The following outlines a brief description of the steps to be taken and are described in more detail +with examples in the sections below. + +1. Allocate the field: ALLOCATE.f + + *This file is the instantiation or allocation of the variable. Note that the variables are defined + based on the parallel processing capability of UPP - use an example from the file.* + +2. Deallocate the field: DEALLOCATE.f + + *All good programmers give back their resources when they are done. Please update this routine to + return your resource to the system.* + +3. Declare the new variable: VRBLS2D_mod.f, VRBLS3D_mod.f, or VRBLS4D_mod.f + + *The variable is declared in one of these modules defining files depending on its dimension.* + +4. Define field for grib1: RQSTFLD.f + + *This file contains a list of all possible fields to be output by UPP, corresponding + key-word character string user places in wrf_cntrl.parm file, UPP ID for internal + code, and grib IDs.* + +5. Read model output: INITPOST_GFS_NEMS_MPIIO.f (GFS nemsio), INITPOST_GFS_NETCDF (GFS netcdf), + INITPOST_NETCDF (LAM netcdf) + + *These files are used for reading the model output files. The appropriate one will need to be + chosen based off the model and model output format.* + +6. Add to appropriate routine for filling the new variable: e.g. SURFCE.f, MDLFLD.f, MDL2P.f, etc + + *This is the place that you will fill the array with the data and output the field.* + +7. Define table/grib2 parameters for grib2 output: params_grib2_tbl_new + + *This table contains the necessary parameter information for grib2 fields.* + +8. Define the field for grib2 output: post_avlbflds.xml + + *This file is used for defining all available grib2 fields.* + +9. Define control file entry for output: postcntrl.xml & postxconfig-NT.txt + + *These files are used for controlling which fields are output by UPP for grib2.* + + +**Example Procedure: Steps for adding the new variable ‘ACLHF’** + +- This example illustrates a new variable from the WRF output that will be read into UPP + and directly output into the grib output files (i.e. no additional computations/calculations + are needed for the field). +- Additions to each of the routines are highlighted in green. +- Locations of routines are in /EMC_post/sorc/ncep_post.fd unless specified otherwise. +- A sample wrfout file for the following procedures is available for download from: + - https://dtcenter.org/sites/default/files/community-code/AddNewVariableData.tar.gz + - This data is the 6-hr forecast of a WRF initialization of 2009-12-17_12:00:00 + + New variable to add:: + + float ACLHF(Time, south_north, west_east) ; + ACLHF:FieldType = 104 ; + ACLHF:MemoryOrder = "XY" ; + ACLHF:description = "ACCUMULATED UPWARD LATENT HEAT FLUX AT THE SURFACE" ; + ACLHF:units = "J m-2" ; + ACLHF:stagger = "" ; + ACLHF:coordinates = "XLONG XLAT" ; + +1. Allocate the new variable in ALLOCATE_ALL.f + This file is the instantiation or allocation of the variable. Note that the variables are defined + based on the parallel processing capability of UPP - use an example from the file. + + User Procedure + - Add in VRBLS2D section as: + + :: + + allocate(aclhf(im,jsta_2l:jend_2u)) + +2. De-allocate the variable to give the resources back in DEALLOCATE.f + All good programmers give back their resources when they are done. Please update this + routine to return your resource to the system. + + User procedure + - Add as: + + :: + + deallocate(aclhf) + +3. Declare the new variable in the appropriate file depending on its dimensions; + VRBLS2D_mod.f, VRBLS3D_mod.f or VRBLS4D_mod.f + + User procedure + - ACLHF is a 2-dimensional field, so declare it in VRBLS2D_mod.f + - Add to the end of the first section of allocations as: + + :: + + ACLHF(:,:) + +4. List the new variable in RQSTFLD.F which includes a list of all possible fields to be output by + UPP, as well as the corresponding key-word character string the user places in wrf_cntrl.parm + file, the UPP ID for internal code, and grib IDs. Be sure to pick a unique identifier that is not + already used for the new variable. The unique identifier or index are typically assigned in groups + Hopefully a community area will be added in the future or a defined method to avoid overwriting + others values. Right now using 900's for community contributions. + + Example Entry + + | ! HWRF addition for v_flux as pass through variable: + + | DATA IFILV(901),AVBL(901),IQ(901),IS(901),AVBLGRB2(901) & + | & /1,'MODEL SFC V WIND STR’,125,001, & + | & 'V_FLX ON surface’/ + + Where: + - **IFILV** Identifies field as MASS/VELOCITY point (e.g. 1) + - **AVBL** is the model output character string variable name for grib1 (e.g. MODEL SFC V WIND STR) + - **IQ** is the GRIB PDS OCTET 9 (table 2) - Indicator of parameter and units (e.g. 125) + - **IS** is the GRIB PDS OCTET 10 (table 3&3a) - Indicator of type of level or layer (e.g. 001) + - **AVBLGRB2** is the model output character string variable name for grib2 (e.g. V_FLX ON surface) + - A UNIQUE array location UPP uses to store this variable in parallel arrays (e.g. **901**) + + User procedure + - A latent heat flux variable (LHTFL) was found in the GRIB1 parameter tables, so add a + new unused parameter number (237) using Table 130 to define the new field. + http://www.nco.ncep.noaa.gov/pmb/docs/on388/table2.html + - Use level type surface, which is 001 + http://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html + - Add as: + + :: + + DATA IFILV(950),AVBL(950),IQ(950),IS(950),AVBLGRB2(950) & + & /1,'ACC SFC LAT HEAT FX ',237,001, & + & 'ACC LHTFL ON surface '/ !Table 130 + +5. Read the model output field from the wrfout file by adding the new variable into INITPOST.F + This file is used for reading the WRF-ARW model output files in netcdf format. + + User procedure + - Add using the 2D variable SNDEPAC (snowfall accumulation), which is also a 2D + surface based accumulation field, as a template by following it through the routine. + - Add to top section of the routine in ‘use vrbls2d’ to initiate the new variable as: + + :: + + aclhf + + - Read in the new variable as: + + :: + + VarName='ACLHF' + call getVariable(fileName,DateStr,DataHandle,VarName,DUMMY, & + IM,1,JM,1,IM,JS,JE,1) + do j = jsta_2l, jend_2u + do i = 1, im + ACLHF ( i, j ) = dummy ( i, j ) + end do + end do + +6. Determine the correct routine to add the new variable to (e.g. SURFCE.f, MDLFLD.f, + MDL2P.f, etc). You will need to determine the correct routine to add your field into; this is the + place that you will fill the array with the data and call gribit to output the field. The correct routine + will depend on what your field is. For example, if you have a new diagnostic called foo, and you + want it interpolated to pressure levels, you would need to add it to MDL2P.f. If foo was only a + surface variable, you would add it to SURFCE.f. If you wanted foo on native model levels, you + would add it to MDLFLD.f. If you’re not sure which routine to add the new variable to, choose a + similar variable as a template. + + Note: This is also where you would add any calculations needed for your new variable, should it + be required. + + User procedure + - Treat ACLHF like a surface field (SURFCE.f) + - Using the variable SNDEPAC (accumulated depth of snowfall) as a template which is + also an accumulated field that is just being read through and output, similar to what we + want. + - Add in top section in ‘use vrbls2d, only’ to initiate the new variable as: + + :: + + aclhf + + - Add in main section using the template variable as a guide. + - Note that ID(02), which is the ID for table version number, is added and set to 130. + This is the table that we are adding the new variable to. + - The block of code within the '--' is for metadata for the accumulation field being added + in this example and is not needed unless an accumulated type field is being added. + For example, for an instantaneous field, you would not need that block. + + :: + + ! ACCUM UPWARD LATENT HEAT FLUX AT SURFACE + IF (IGET(950).GT.0) THEN + ID(1:25) = 0 + ID(02) = 130 + !----------------------------------------------------------- + ITPREC = NINT(TPREC) + !mp + IF(ITPREC .NE. 0) THEN + IFINCR = MOD(IFHR,ITPREC) + IF(IFMIN .GE. 1)IFINCR = MOD(IFHR*60+IFMIN,ITPREC*60) + ELSE + IFINCR = 0 + ENDIF + !mp + ID(18) = 0 + ID(19) = IFHR + IF(IFMIN .GE. 1)ID(19)=IFHR*60+IFMIN + ID(20) = 4 + IF (IFINCR.EQ.0) THEN + ID(18) = IFHR-ITPREC + ELSE + ID(18) = IFHR-IFINCR + IF(IFMIN .GE. 1)ID(18)=IFHR*60+IFMIN-IFINCR + ENDIF + IF (ID(18).LT.0) ID(18) = 0 + !----------------------------------------------------------- + if(grib=='grib1') then + DO J=JSTA,JEND + DO I=1,IM + GRID1(I,J) = ACLHF(I,J) + ENDDO + ENDDO + CALL GRIBIT(IGET(950),LVLS(1,IGET(950)), GRID1,IM,JM) + elseif(grib=='grib2') then + cfld=cfld+1 + fld_info(cfld)%ifld=IAVBLFLD(IGET(950)) + fld_info(cfld)%ntrange=1 + fld_info(cfld)%tinvstat=IFHR-ID(18) + !$omp parallel do private(i,j,jj) + do j=1,jend-jsta+1 + jj = jsta+j-1 + do i=1,im + datapd(i,j,cfld) = ACLHF(i,jj) + enddo + enddo + endif + ENDIF + +7. Add the new variable to /EMC_post/parm/params_grib2_tbl_new. + For all current UPP output fields, this table lists, in order, the: + - Discipline (http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table0-0.shtml) + - Category (http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-1.shtml) + - Parameter Number (http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2.shtml) + - Table information (0 for parameters from the WMO table; 1 for parameters from the local + NCEP table) + - Abbreviated Variable Name (from the parameters table) + + User Procedure + - Since there is already a latent heat flux (LHTFL) parameter in this table, create a new + Latent Heat Flux parameter so as to not overwrite the current one, just in case you want + both to be output + - Latent heat flux is a meteorological field (discipline=0) + - Latent heat flux is a temperature product (category=0) + - Pick an unused parameter number from the table defined by discipline=0 and + category=0 (Table 4.2-0-0: http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4- + 2-0-0.shtml). In this case, the unused parameter number 205 was chosen. + - Add using the NCEP local table (table=1) + - Choose an abbreviated parameter name to describe your field (e.g. ACLHF) + - Add as: + + :: + + 0 0 205 1 ACLHF + +8. Add the new variable to the /EMC_post/parm/post_avblflds.xml, which lists all fields available + for output in GRIB2 format. + - Post_avblfldidx: the unique array number given in the RQSTFLD.f routine. + - Shortname: name describing the variable and level type + - Pname: the abbreviation for your variable + - Table info: table used if not standard WMO + - Fixed_sfc1_type: level type + - Scale: precision of data written out to grib2 file + + User procedure + - Add as: + + :: + + + 950 + ACC_LATENT_HEAT_FLUX_ON_SURFACE + ACLHF + NCEP + surface + 4.0 + + +9. Add the new variable to the /EMC_post/parm/postcntrl.xml file, which lists all fields and levels + you wish to output for GRIB2. Remake the /UPPV4.1/parm/postxconfig-NT.txt file, which + contains the information from the xml that UPP reads. + - See the User’s guide on steps for creating the text control file + + User procedure + - Add as: + + :: + + + ACC_LATENT_HEAT_FLUX_ON_SURFACE + ACLHF + 4.0 + + +10. Run clean on the code and recompile the code to include the changes before running your + UPP run script. + + User procedure + + :: + + >> ./clean -a + >> ./configure + >> ./compile >& compile.log & + +11. Assuming the modified code compiled successfully and you were able to produce grib + output, you can check the grib file for your new variable. + + GRIB2 output of the new variable from this example procedure (using the wgrib2 utility if + available on your system). + - The new variable will not be defined by the variable name. Instead it will be defined + using the grib2 parameter information you entered into params_grib2_tbl_new from + step 7 of this procedure. + + :: + + 456:43204412:vt=2009121718:surface:6 hour fcst:var discipline=0 center=7 local_table=1 + parmcat=0 parm=205: + ndata=121002:undef=0:mean=1.97108e+06:min=-1.12e+06:max=2.406e+07 + grid_template=30:winds(grid): + Lambert Conformal: (402 x 301) input WE:SN output WE:SN res 8 + Lat1 14.807213 Lon1 231.818604 LoV 258.040009 + LatD 38.270000 Latin1 38.270000 Latin2 38.270000 + LatSP 0.000000 LonSP 0.000000 + North Pole (402 x 301) Dx 15000.000000 m Dy 15000.000000 m mode 8 diff --git a/docs/CodeOverview.rst b/docs/CodeOverview.rst index a1b8fe399..01a9d3bef 100644 --- a/docs/CodeOverview.rst +++ b/docs/CodeOverview.rst @@ -2,20 +2,19 @@ Code Overview ************* -The UPP can be used to post-process WRF-ARW, WRF-NMM, NMMB, GFS, CFS, and FV3 forecasts with current support within UFS available for FV3 only. It can ingest FV3 history files (dyn*/phy*) in netCDF and binarynemsiompiio format. +The UPP can be used to post-process WRF-ARW, WRF-NMM, NMMB, GFS, CFS, and FV3 forecasts with current +support within UFS applications available for FV3 only. It can ingest FV3 write component files in +netCDF and binarynemsiompiio format. -Unipost Functionalities: +UPP Functionalities: - - Interpolates the forecasts from the models native vertical - coordinate to NWS standard output levels (e.g., pressure, height) - and computes mean sea level pressure. If the requested parameter - is on a models native level, then no vertical interpolation is - performed. + - Interpolates the forecasts from the models native vertical coordinate to NWS standard output + levels (e.g., pressure, height) and computes mean sea level pressure. If the requested parameter + is on a models native level, then no vertical interpolation is performed. - - Computes diagnostic output quantities (e.g., convective available - potential energy, helicity, relative humidity). A full list of - fields that can be generated by *unipost* is provided in - https://dtcenter.org/sites/default/files/community-code/upp-grib2-table_0.pdf. + - Computes diagnostic output quantities (e.g., convective available potential energy, helicity, + relative humidity). A full list of fields that can be generated by the UPP is provided in + :doc:`UPP_GRIB2_Table`. - - Outputs the results in NWS and WMO standard GRIB2 format (for GRIB - documentation, see http://www.nco.ncep.noaa.gov/pmb/docs/). + - Outputs the results in NWS and WMO standard GRIB2 format (see `Grib documentation + `_). diff --git a/docs/InputsOutputs.rst b/docs/InputsOutputs.rst index f558d2473..ce807b70b 100644 --- a/docs/InputsOutputs.rst +++ b/docs/InputsOutputs.rst @@ -1,8 +1,13 @@ +.. role:: underline + :class: underline +.. role:: bolditalic + :class: bolditalic + ****************** Inputs and Outputs ****************** -This section describes the input files used when running the UPP and the resulting output files +This section describes the input files used when running the UPP and the resulting output files. =========== Input files @@ -17,22 +22,22 @@ The UPP requires the following input files: ITAG ---- -The *itag* namelist that is read in by *unipost.exe* from -stdin (unit 5) is generated automatically in the *run\_unipost* -script based on user-defined options. It should not be -necessary to edit this. For description purposes, the namelist -(*itag*) contains 7 lines for FV3: +The :bolditalic:`itag` namelist that is read in by :bolditalic:`ncep_post` from stdin (unit 5) is +generated automatically within the UFS application workflow or stand-alone run script based on +user-defined options. It should not be necessary to edit this. For description purposes, the namelist +(:bolditalic:`itag`) contains 7 lines for +FV3: #. Name of the FV3 (pressure level) output file to be posted. -#. Format of FV3 model output (netcdf, binarynemsio). +#. Format of FV3 model output (netcdf, binarynemsiompiio). #. Format of UPP output (GRIB2) -#. Forecast valid time (not model start time) in FV3 format (the - forecast time desired to be post-processed). +#. Forecast valid time (not model start time) in YYYY-MM-DD_HH:00:00 format (the forecast time desired + to be post-processed). -#. Dynamic core used (GFS). +#. Model used (GFS, FV3R - regional FV3; also the LAM - Limited Area Model). #. Name of the FV3 (surface) output file to be post-processed. @@ -42,108 +47,110 @@ necessary to edit this. For description purposes, the namelist Control File ------------ -The user interacts with unipost through the control file to define what fields and levels to output. It is composed of a header and a body. The header specifies the output file information. The body includes which fields and levels to process. +The user interacts with the UPP through the control file to define what fields and levels to output. It +is composed of a header and a body. The header specifies the output file information. The body includes +which fields and levels to process. + +A default control file, :bolditalic:`postxconfig-NT.txt`, is provided and read by the UPP. For users +wishing to customize the control file to add or remove fields and/or levels, they may do so by +modyfying the :bolditalic:`postcntrl.xml` and then remaking the text file required by the UPP. -A default control file, *postxconfig-NT.txt*, is provided and read by unipost. For users wishing to customize the control file to add or remove fields and/or levels, they may do so by modyfying the postcntrl.xml and then remaking the text file required by unipost. +.. Note:: + The control file names :bolditalic:`postxconfig-NT.txt` and :bolditalic:`postcntrl.xml` are generic + names and are different depending on the application used. -The tables below list all fields that are included in the released versions of the various UFS applications. All fields in the tables may not be present in your output depending on whether the field dependencies are available in your model output. +The tables below list all fields that are included in the control files for the various UFS +applications. All fields in the tables may not be present in your output depending on whether the field +dependencies are available in your model output. -UFS MRW Table +UFS MRW Table (GFS model) - :doc:`MRW_GFSPRS_table` -UFS SRW Tables +UFS SRW Tables (LAM - Limited Area Model) - :doc:`SRW_BGDAWP_table` - :doc:`SRW_BGRD3D_table` - -Controlling which variables unipost outputs +Controlling which variables the UPP outputs ------------------------------------------- -To output a field, the body of the control file needs to contain an -entry for the appropriate variable. For variables found on isobaric or -height levels, the desired levels to be output must be listed (see next -section: *Controlling which levels unipost outputs*). If an entry for -a particular field is not yet available in the control file, it may be -added to the control file with the appropriate entries for that field. +To output a field, the body of the control file needs to contain an entry for the appropriate variable. +If an entry for a particular field is not yet available in the control file, it may be added to the +control file with the appropriate entries for that field. For variables found on vertical levels (e.g. +isobaric or height levels), the desired levels to be output must be listed (see next section: +:ref:`control_levels`). + +.. _control_levels: -Controlling which levels unipost outputs +Controlling which levels the UPP outputs ---------------------------------------- -The tag in the postcntrl.xml is used to list the desired levels -for output. The following levels are currently available for output: +The tag in the postcntrl.xml is used to list the desired levels for output. The following +levels are currently available for output: -- For isobaric output, 46 levels are possible, from 2 to 1000 hPa (*2, - 5, 7, 10, 20, 30, 50, 70 mb and then every 25 mb from 75 to 1000 - mb*). The complete list of levels is specified in *src/unipost/CTLBLK.f*. +- For isobaric output, 46 levels are possible, from 2 to 1000 hPa (*2, 5, 7, 10, 20, 30, 50, 70 mb and + then every 25 mb from 75 to 1000 mb*). The complete list of levels is specified in + :bolditalic:`sorc/ncep_post.fd/CTLBLK.f`. - - Modify specification of variable LSMDEF to change the number of - pressure levels: LSMDEF=47 - - Modify specification of SPLDEF array to change the values of - pressure levels: (/200.,500.,700.,1000.,2000.,3000. - &,5000.,7000.,7500.,10000.,12500.,15000.,17500.,20000., …/) + - Modify specification of variable LSMDEF to change the number of pressure levels: LSMDEF=47 + - Modify specification of SPLDEF array to change the values of pressure levels: + (/200.,500.,700.,1000.,2000.,3000.,5000.,7000.,7500.,10000.,12500.,15000.,17500.,20000., …/) -- For model-level output, all model levels are possible, from the - highest to the lowest. -- When using the Noah LSM, the soil layers are 0-10 cm, 10-40 cm, - 40-100 cm, and 100-200 cm. -- When using the RUC LSM, the soil levels are 0 cm, 1 cm, 4 cm, 10 cm, - 30 cm, 60 cm, 100 cm, 160 cm, and 300 cm. (For the old RUC LSM, - there are only 6 layers and if using this, you will need to change - “RUC LSM” from 9 to 6 in the WRFPOST.f routine.) +- For model-level output, all model levels are possible, from the highest to the lowest. +- When using the Noah LSM, the soil layers are 0-10 cm, 10-40 cm, 40-100 cm, and 100-200 cm. +- When using the RUC LSM, the soil levels are 0 cm, 1 cm, 4 cm, 10 cm, 30 cm, 60 cm, 100 cm, 160 cm, + and 300 cm. (For the old RUC LSM, there are only 6 layers and if using this, you will need to change + “RUC LSM” from 9 to 6 in the :bolditalic:`sorc/ncep_post.fd/WRFPOST.f` routine.) - When using Pliem-Xiu LSM, there are two layers: 0-1 cm, 1-100 cm -- For low, mid, and high cloud layers, the layers are :math:`\geq`\ 642 - hPa, :math:`\geq`\ 350 hPa, and <350 hPa, respectively. -- For PBL layer averages, the levels correspond to 6 layers with a - thickness of 30 hPa each. -- For flight level, the levels are 30 m, 50 m, 80 m, 100 m, 305 m, 457 - m, 610 m, 914 m, 1524 m, 1829 m, 2134 m, 2743 m, 3658 m, 4572 m, 6000 - m, 7010 m. -- For AGL radar reflectivity, the levels are 4000 and 1000 m (see - Appendix A for details). +- For low, mid, and high cloud layers, the layers are :math:`\geq`\ 642 hPa, :math:`\geq`\ 350 hPa, and + <350 hPa, respectively. +- For PBL layer averages, the levels correspond to 6 layers with a thickness of 30 hPa each. +- For flight level, the levels are 30 m, 50 m, 80 m, 100 m, 305 m, 457 m, 610 m, 914 m, 1524 m, 1829 m, + 2134 m, 2743 m, 3658 m, 4572 m, 6000 m, 7010 m. +- For AGL radar reflectivity, the levels are 4000 and 1000 m (see Appendix A for details). - For surface or shelter-level output, the is not necessary. Creating the Flat Text File --------------------------- -If the control file requires any modifications, a preprocessing step -will be required by the user to convert the modified xml file -*parm/postcntrl.xml* to a flat text file -*parm/postxconfig-NT.txt*. The user will first need to edit the -*postcntrl.xml* file to declare which fields are to be output -from UPP. +If the control file requires any modifications, a preprocessing step will be required by the user to +convert the modified xml file :bolditalic:`parm/postcntrl.xml` to a flat text file +:bolditalic:`parm/postxconfig-NT.txt`. The user will first need to edit the :bolditalic:`postcntrl.xml` +file to declare which fields are to be output from the UPP. -In order to ensure that the user-edited xml files are error free, XML -stylesheets (*parm/EMC\_POST\_CTRL\_Schema.xsd* and -*EMC\_POST\_Avblflds\_Schema.xsd*) can be used to validate both the -*postcntrl.xml* and *post\_avblflds.xml* files, respectively. -Confirmation of validation will be given (e.g. postcntrl.xml -validates) or otherwise return errors if it does not match the -schema. This step is optional, but acts as a safe-guard to avoid run-time -failures with UPP. To run the validation: +In order to ensure that the user-edited xml files are error free, XML stylesheets +(:bolditalic:`parm/EMC\_POST\_CTRL\_Schema.xsd` and :bolditalic:`EMC\_POST\_Avblflds\_Schema.xsd`) can +be used to validate both the :bolditalic:`postcntrl.xml` and :bolditalic:`post\_avblflds.xml` files, +respectively. Confirmation of validation will be given (e.g. postcntrl.xml validates) or otherwise +return errors if it does not match the schema. This step is optional, but acts as a safe-guard to avoid +run-time failures with UPP. To run the validation: - *xmllint --noout --schema EMC\_POST\_CTRL\_Schema.xsd - postcntrl.xml* +.. code-block:: console - *xmllint --noout --schema EMC\_POST\_Avblflds\_Schema.xsd - post\_avblflds.xml* + xmllint --noout --schema EMC_POST_CTRL_Schema.xsd postcntrl.xml + xmllint --noout --schema EMC_POST_Avblflds_Schema.xsd post_avblflds.xml -Once the xmls are validated, the user will need to generate the flat -file. Edit the *parm/makefile* if necessary to point to the -desired flat file directory and xmls. The makefile will call the perl -program *parm/POSTXMLPreprocessor.pl* to generate the post flat -file *postxconfig-NT.txt*. Generate the flat file: +Once the xmls are validated, the user will need to generate the flat file. The makefile will call the +perl program :bolditalic:`parm/POSTXMLPreprocessor.pl` to regenerate any post flat files +:bolditalic:`postxconfig-NT.txt` where modifications were made since it was last run. Generate the flat +file: - *make* +.. code-block:: console + + make ============ Output Files ============ -Upon a successful run, *unipost* will generate GRIB2 output files -*GFSPRS.hh* in the postprocessor working directory, where *hh* denotes -the forecast hour. These files will include all fields that were -requested in the control file. +Upon a successful run, :bolditalic:`ncep_post` will generate GRIB2 output files in the post-processor +working directory. These files will include all fields that were requested in the control file. + +When running UPP stand-alone, the following Grib2 output files will be generated: + + | **GFS Model**: GFSPRS.HHH + | **LAM (Limeted Area Model)**: BGDAWP.HHH (surface and other 2D fields) and BGRD3D.HHH (model level + fields) -If the run did not complete successfully, a log file in the -post-processor working directory called *unipost.hh.out*, where *hh* -is the forecast hour, may be consulted for further information. +If the run did not complete successfully, a log file in the post-processor working directory called +:bolditalic:`upp.fHHH.out` where :bolditalic:`HHH` is the forecast hour, may be consulted for further +information. diff --git a/docs/Installation.rst b/docs/Installation.rst new file mode 100644 index 000000000..5eef8f3f9 --- /dev/null +++ b/docs/Installation.rst @@ -0,0 +1,126 @@ +.. role:: underline + :class: underline +.. role:: bolditalic + :class: bolditalic + +******************** +Building Stand-Alone +******************** + +===================== +Software Requirements +===================== + +Before installing the UPP code, it is necessary to ensure that you have the required libraries +available on your system. These libraries include: + + - The external NCEP libraries + https://github.com/NOAA-EMC/NCEPLIBS-external + + - The NCEP libraries + https://github.com/NOAA-EMC/NCEPLIBS + +An introduction of each can be found in their respective top level :bolditalic:`README.md` file. +Detailed instructions for building the libraries on various platforms can be found in the repository +**NCEPLIBS-external/doc** directory. + +Certain machines do have the NCEP libraries in a pre-installed location for use to build UPP. + ++---------------+----------------------+--------------------------------------------------------------------------------+ +| System | Compiler and Version | Directory where NCEPLIBS-external and NCEPLIBS are installed in | ++===============+======================+================================================================================+ +| NCAR Cheyenne | Intel 19.1.1 | /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/intel-19.1.1/mpt-2.19 | +| +----------------------+--------------------------------------------------------------------------------+ +| | GNU 9.1.0 | /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/gnu-9.1.0/mpt-2.19 | ++---------------+----------------------+--------------------------------------------------------------------------------+ +| NOAA Hera | Intel 18.0.5.274 | /scratch1/BMC/gmtb/software/NCEPLIBS-ufs-v2.0.0/intel-18.0.5.274/impi-2018.0.4 | +| +----------------------+--------------------------------------------------------------------------------+ +| | GNU 9.2.0 | /scratch1/BMC/gmtb/software/NCEPLIBS-ufs-v2.0.0/gnu-9.2.0/mpich-3.3.2 | ++---------------+----------------------+--------------------------------------------------------------------------------+ + +============================ +Obtaining and Installing UPP +============================ + +Building and running UPP V9.0.0 has been tested on the following platforms using pre-configured libraries. + ++---------------+----------------------+ +| System | Compiler and Version | ++===============+======================+ +| NCAR Cheyenne | Intel 19.1.1 | +| +----------------------+ +| | GNU 9.1.0 | ++---------------+----------------------+ +| NOAA Hera | Intel 18.0.5.274 | +| +----------------------+ +| | GNU 9.2.0 | ++---------------+----------------------+ + +Move to the directory where you want to clone and build UPP and clone the repository into the directory +EMC_post. + +.. code-block:: console + + git clone -b release-tag-name --recurse-submodules https://github.com/NOAA-EMC/EMC_post + +where, ``release-tag-name`` is the release tag you wish to clone (e.g. for stand-alone UPP +version 9, use the release tag :bolditalic:`upp_v9.0.0`). + +Move into the top level UPP directory and create and move into the build directory. Build the UPP code. +The path ``INSTALL_PREFIX`` should point to the location of the pre-installed NCEP libraries. + +.. code-block:: console + + cd EMC_post + mkdir build && cd build + + cmake .. -DCMAKE_INSTALL_PREFIX=.. -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} + make install + +.. note:: + To build in debug mode, you can add :bolditalic:`-DCMAKE_BUILD_TYPE=Debug` to the cmake command. + This removes compiler optimization flags and adds -g to the fortran compilation. You can also use + :bolditalic:`-DCMAKE_BUILD_TYPE=RELWITHDEBINFO`, which gives the -g, but keeps the -O2 optimization + for the fortran compilation. + +Move back to the top level UPP directory and create a directory for the CRTM fix files to be unpacked +in. Download the fix files from the Github `release page +`_ or use the wget command. Unpack the +tar file. + +.. code-block:: console + + cd ../ + mkdir crtm && cd crtm + wget https://github.com/NOAA-EMC/EMC_post/releases/download/upp_v9.0.0/fix.tar.gz + tar -xzf fix.tar.gz + +.. note:: + To make a clean build, simply remove both the **/build** directory and the + :bolditalic:`bin/ncep_post` executable and then re-create the build from step #2. This is + recommended if a mistake is made during the installation process or if a change is made to the build + environment or UPP code. + +======================= +UPP Directory Structure +======================= + +Under the main directory **EMC_post** reside the following relevant subdirectories (The * indicates a +directory that exists only after the build is complete): + + | **bin***: Contains the :bolditalic:`ncep_post` executable after successful compilation + + | **build**: Contains the UPP build + + | **include***: Source include modules built/used during compilation of UPP + + | **lib***: Libraries built/used by UPP that are separate from NCEPlibs + + | **parm**: Contains parameter files, which can be modified by the user to control how the post + processing is performed. + + | **scripts**: Contains a sample run script to process fv3 history files. + | - **run_upp**: runs :bolditalic:`ncep_post`. + + | **sorc**: Contains source codes for: + | - **ncep_post.fd**: Source code for the UPP diff --git a/docs/Introduction.rst b/docs/Introduction.rst index 9759f18db..4dc972b54 100644 --- a/docs/Introduction.rst +++ b/docs/Introduction.rst @@ -2,7 +2,20 @@ Introduction ************ -The Unified Post Processor (UPP) software package is a software package designed to generate useful products from raw model output. The UPP is currently used in operations with the Global Forecast System (GFS), GFS Ensemble Forecast System (GEFS), North American Mesoscale (NAM), Rapid Refresh (RAP), High Resolution Rapid Refresh (HRRR), Short Range Ensemble Forecast (SREF), Hurricane WRF (HWRF) applications, and is also used in Unified Forecasting System (UFS) applications. The UPP provides the capability to compute a variety of diagnostic fields and interpolate to pressure levels or other vertical coordinates. UPP also incorporates the Joint Center for Satellite Data Assimilation (JCSDA) Community Radiative Transfer Model (CRTM) to compute model derived brightness temperature (TB) for various instruments and channels. This additional feature enables the generation of a number of simulated satellite products including GOES products. Output from the UPP is in National Weather Service (NWS) and World Meteorological Organization (WMO) GRIB2 format and can be used directly by visualization, plotting, or verification packages, or for further downstream post-processing, e.g. statistical post-processing techniques. +The Unified Post Processor (UPP) software package is a software package designed to generate useful +products from raw model output. The UPP is currently used in operations with the Global Forecast +System (GFS), GFS Ensemble Forecast System (GEFS), North American Mesoscale (NAM), Rapid Refresh (RAP), +High Resolution Rapid Refresh (HRRR), Short Range Ensemble Forecast (SREF), Hurricane WRF (HWRF) +applications, and is also used in Unified Forecasting System (UFS) applications. The UPP provides the +capability to compute a variety of diagnostic fields and interpolate to pressure levels or other +vertical coordinates. UPP also incorporates the Joint Center for Satellite Data Assimilation (JCSDA) +Community Radiative Transfer Model (CRTM) to compute model derived brightness temperature (TB) for +various instruments and channels. This additional feature enables the generation of a number of +simulated satellite products including GOES products. Output from the UPP is in National Weather +Service (NWS) and World Meteorological Organization (WMO) GRIB2 format and can be used directly by +visualization, plotting, or verification packages, or for further downstream post-processing, e.g. +statistical post-processing techniques. + Examples of UPP products include: - T, Z, humidity, wind, cloud water, cloud ice, rain, and snow on pressure levels @@ -16,4 +29,5 @@ Examples of UPP products include: - Radar reflectivity products - Satellite look-alike products -Support for the UFS UPP is provided through the UFS Forum by the Developmental Testbed Center (DTC) for FV3-based applications. +Support for the UFS UPP is provided through the UFS Forum by the Developmental Testbed Center (DTC) for +FV3-based applications. diff --git a/docs/Regridding.rst b/docs/Regridding.rst index 81bf5774b..148181d91 100644 --- a/docs/Regridding.rst +++ b/docs/Regridding.rst @@ -2,17 +2,18 @@ Regridding ********** -Users that wish to interpolate their unipost output to a different grid -may do so with the *wgrib2* utility. The general format for re-gridding -to various common projections are outlined in the following examples. +Users that wish to interpolate their unipost output to a different grid may do so with the *wgrib2* +utility. The general format for re-gridding to various common projections are outlined in the following +examples. -*Wgrib2* is a versatile program that has the ability to convert -grib2 files from one grid to another for various user-defined grids as -well as pre-defined NCEP grids. Complete documentation with examples of -re-gridding for all available grid definitions can be found at: +*Wgrib2* is a versatile program that has the ability to convert grib2 files from one grid to another +for various user-defined grids as well as pre-defined NCEP grids. Complete documentation with examples +of re-gridding for all available grid definitions can be found at: http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/new_grid.html. +.. _Examples-of-wgrib2 + ================== Examples of wgrib2 ================== @@ -93,13 +94,13 @@ Examples of wgrib2 *-new_grid_winds grid(or earth)* -+----------+---------------------------------------------+ -| Variable | Description | -+==========+=============================================+ -| grid | U-wind goes from grid (i,J) to (i+1,j) | -+----------+---------------------------------------------+ -| earth | U-wind goes eastward, V-wind goes northward | -+----------+---------------------------------------------+ ++----------+----------------------------------------------+ +| Variable | Description | ++==========+==============================================+ +| grid | U-wind goes from grid (i,J) to (i+1,j) | ++----------+----------------------------------------------+ +| earth | U-wind goes eastward, V-wind goes northward | ++----------+----------------------------------------------+ **Interpolation** @@ -109,16 +110,18 @@ The default interpolation type is bilinear, but it can be set to another type (e **Operational Example** -Interpolates to a 0.25 degree latitude-longitude grid using various interpolation types depending on the variable. +Interpolates to a 0.25 degree latitude-longitude grid using various interpolation types depending on +the variable. + +.. code-block:: console -| *wgrib2 infile -set_grib_type same -new_grid_winds earth |* -| *-new_grid_interpolation bilinear |* -| *-if ":(CRAIN|CICEP|CFRZR|CSNOW|ICSEV):" -new_grid_interpolation neighbor -fi |* -| *-set_bitmap 1 -set_grib_max_bits 16 |* -| *-if ":(APCP|ACPCP|PRATE|CPRAT):" -set_grib_max_bits 25 -fi |* -| *-if ":(APCP|ACPCP|PRATE|CPRAT|DZDT):" -new_grid_interpolation budget -if |* -| *-new_grid "latlon 0:1440:0.25 90:721:-0.25" outfile* + wgrib2 infile -set_grib_type same -new_grid_winds earth | + -new_grid_interpolation bilinear | + -if ":(CRAIN|CICEP|CFRZR|CSNOW|ICSEV):" -new_grid_interpolation neighbor -fi | + -set_bitmap 1 -set_grib_max_bits 16 | + -if ":(APCP|ACPCP|PRATE|CPRAT):" -set_grib_max_bits 25 -fi | + -if ":(APCP|ACPCP|PRATE|CPRAT|DZDT):" -new_grid_interpolation budget -if | + -new_grid "latlon 0:1440:0.25 90:721:-0.25" outfile -**Note:** *wgrib2 is not distributed within the UFS weather -application. Users may download and install from -http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/.* +**Note:** *wgrib2 is not distributed within the UFS weather application. Users may download and install +from http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/.* diff --git a/docs/Running.rst b/docs/Running.rst new file mode 100644 index 000000000..17233f05b --- /dev/null +++ b/docs/Running.rst @@ -0,0 +1,126 @@ +.. role:: underline + :class: underline +.. role:: bolditalic + :class: bolditalic + +*********************** +Running UPP Stand-Alone +*********************** + +A script for running the UPP package is included in the **/scripts** directory: + - :bolditalic:`run_upp` + +:underline:`Before running the script, perform the following instructions:` + +1. :bolditalic:`cd` to your **DOMAINPATH** directory. This is the top working directory for the run. + +2. Make a directory to put the UPP results in. + + .. code-block:: console + + mkdir postprd + +3. Make a directory for staging a copy of the desired control file. + + .. code-block:: console + + mkdir parm + +4. Optional: If desired, edit the control **XML** file(s) in **/EMC_post/parm** to reflect the fields + and levels you want UPP to output. It is recommended that you make copies of the original + beforehand. + + | **GFS XMLs**: :bolditalic:`postcntrl_gfs_f00.xml` (0-hour lead time) and + :bolditalic:`postcntrl_gfs.xml` (all other lead times) + | **LAM (Limited Area Model) XML**: :bolditalic:`fv3lam.xml` + + Re-make the flat text file(s) following the steps in the "Control File: Creating the Flat Text File" + section. + +5. Copy the flat text file(s) to the **/parm** directory in your **DOMAINPATH**. These are the files + that UPP reads directly. + + | **GFS text files**: :bolditalic:`postxconfig-NT-GFS-F00.txt` (0-hour lead time) and + :bolditalic:`postxconfig-NT-GFS.txt` (all other lead times). + | **LAM text file**: :bolditalic:`postxconfig-NT-fv3lam.txt` + +6. Copy the :bolditalic:`/scripts/run_upp` script to the **/postprd** directory. + +7. Edit the run script as outlined in the "Run Script Overview" section. Once these directories are set + up and the edits outlined below are complete, the script can be run interactively from the + **/postprd** directory by simply typing the script name on the command line. + +=================== +Run Script Overview +=================== + +.. note:: + It is recommended that the user refer to the :bolditalic:`run_upp` script while reading this + overview. All user modified variables are contained at the top of the :bolditalic:`run_upp` script + in the user-edit section, along with a brief description. Descriptions below follow the + :bolditalic:`run_upp` script. + +1. Set up basic path variables + + | **TOP_DIR**: Top level directory for building and running UPP + | **DOMAINPATH**: Working directory for this run + | **UNIPOST_HOME**: Location of the **EMC_post** directory + | **POSTEXEC**: Location of the **EMC_post** executable + | **modelDataPath**: Location of the model output data files to be processed + | **txtCntrlFile**: Name and location of the flat text file that lists desired fields for + output. + + .. note:: + For FV3, the scripts are configured such that UPP expects the flat text file to be in **/parm**, + and the postprocessor working directory to be called **/postprd**, all under **DOMAINPATH**. + This setup is for user convenience to have a script ready to run, paths may be modified but be + sure to check the run script to make sure settings are correct. + +2. Specify dynamic core being run + + | **model**: What model is used ("GFS" or "LAM" - Limited Area Model) + +3. Specify the format for the input model files and output UPP files + + | **inFormat**: Format of the model data ("binarynemsiompiio": GFS only or "netcdf": GFS/LAM) + | **outFormat**: Format of output from UPP ("grib2") + +4. Specify the forecast cycles to be post-processed + + | **startdate**: Forecast start date (YYYYMMDDHH) + | **fhr**: First forecast hour to be post-processed + | **lastfhr**: Last forecast hour to be post-processed + | **incrementhr**: Increment (in hours) between forecast files + | *Do not set to 0 or the script will loop continuously* + +5. Set/uncomment the run command for your system. (i.e. mpirun, etc). + + | **RUN_COMMAND**: System run commands + + | - The default execution command in the distributed scripts is for a single processor: + | ``./ncep_post > upp.${fhr}.out 2>&1`` + + | - To run UPP using mpi (dmpar compilation), the command line should be: + | >> LINUX-MPI systems: ``mpirun -np N ncep_post > outpost 2>&1`` + | (Note: On some systems a host file also needs to be specified: + ``-machinefile "host"``) + | >> IBM: ``mpirun.lsf ncep_post < itag > outpost`` + | >> SGI MPT: ``mpiexec_mpt ncep_post < itag > outpost`` + +6. Set naming convention for prefix and extension of output file name + - **comsp** is the initial string of the output file name. By default it is not set and the prefix + of the output file will be the string set in the XML file DATSET parameter. If set it will + concatenate the setting to the front of the string specified in the XML file DATSET parameter. + - **tmmark** is used for the file extension (in :bolditalic:`run_upp`, *tmmark=tm00*; if not set, + it is set to .GrbF) + +Upon a successful run, UPP will generate output files for each forecast hour in the +**/postprd** directory. + +If the run did not complete successfully, a log file in the **/postprd** directory called +:bolditalic:`upp.fhhh.out` where :bolditalic:`"hhh"` is the forecast hour, may be consulted for further +information. + +.. note:: + FV3 output is on a Guassian grid. To interpolate to a lat/lon or other projection, use wgrib2 (see + :ref:`Examples-of-wgrib2` section). diff --git a/docs/SRW_BGDAWP_table.csv b/docs/SRW_BGDAWP_table.csv index 00ae6d370..6426ec95b 100644 --- a/docs/SRW_BGDAWP_table.csv +++ b/docs/SRW_BGDAWP_table.csv @@ -33,222 +33,226 @@ 32,Cloud ice mixing ratio on pressure surface,isobaric,ICMR,46 33,Cloud water mixing ratio on pressure surface,isobaric,CLWMR,46 34,Rain mixing ratio on pressure surface,isobaric,RWMR,46 -35,Snow mixing ratio on pressure surface,isobaric,SNMR,46 -36,Rimming factor for Ferrier scheme on pressure surface,isobaric,RIME,46 -37,Mesinger (Membrane) sea level pressure,mean sea level,MSLET,1 -38,Shuell sea level pressure,mean sea level,PRES,1 -39,Temperature at 2m,height agl,TMP,1 -40,Specific humidity at 2m,height agl,SPFH,1 -41,Dew point temperature at 2m,height agl,DPT,1 -42,Relative humidity at 2m,height agl,RH,1 -43,U component of wind at 10m,height agl,UGRD,1 -44,V component of wind at 10m,height agl,VGRD,1 -45,Surface wind gust,surface,GUST,1 -46,LCL level pressure,pressure layer agl,PLPL,1 -47,Potential temperature at 10m,height agl,POT,1 -48,Specific humidity at 10m,height agl,SPFH,1 -49,Surface Pressure,surface,PRES,1 -50,Terrain height,surface,HGT,1 -51,Skin potential temperature,surface,POT,1 -52,Skin specific humidity,surface,SPFH,1 -53,Skin temperature,surface,TMP,1 -54,Soil temperature at 3m,depth below land surface,TSOIL,1 -55,Soil temperature in between each soil layer,depth below land surface,TSOIL,4 -56,Soil moisture in between each soil layer,depth below land surface,SOILW,4 -57,Liquid soil moisture in between each soil layer,depth below land surface,SOILL,4 -58,Total soil moisture,depth below land surface,SOILM,1 -59,Plant canopy surface water,surface,CNWAT,1 -60,Snow water equivalent,surface,WEASD,1 -61,Snow cover in percentage,surface,SNOWC,1 -62,Heat exchange coeff at surface,surface,SFEXC,1 -63,Vegetation cover,surface,VEG,1 -64,Vegetation type,surface,VGTYP,1 -65,Soil type,surface,SOTYP,1 -66,Snow free albedo,surface,SNFALB,1 -67,Maximum snow albedo,surface,MXSALB,1 -68,Canopy conductance,surface,CCOND,1 -69,Canopy conductance - solar component,surface,RCS,1 -70,Canopy conductance - temperature component,surface,RCT,1 -71,Canopy conductance - humidity component,surface,RCQ,1 -72,Canopy conductance - soil component,surface,RCSOL,1 -73,Soil moist reference,surface,SMREF,1 -74,Soil moist porosity,surface,POROS,1 -75,Number of root layers,surface,RLYRS,1 -76,Minimum stomatal resistance,surface,RSMIN,1 -77,Snow depth,surface,SNOD,1 -78,Air dry soil moisture,surface,SMDRY,1 -79,Soil moist wilting point,surface,WILT,1 -80,Soil moisture availability,depth below land surface,MSTAV,1 -81,Ground heat flux (instantaneous),surface,GFLUX,1 -82,Lifted index—surface based (500-1000 hPa),isobaric,LFTX,1 -83,Lifted index—best,pressure above ground,4LFTX,1 -84,Lifted index—parcel,pressure above ground,PLI,1 -85,Convective available potential energy,surface,CAPE,1 -86,Best cape,pressure above ground,CAPE,1 -87,Mixed layer cape,pressure above ground,CAPE,1 -88,Unstable cape,pressure above ground,CAPE,1 -89,Convective inhibition,surface,CIN,1 -90,Best cin,pressure above ground,CIN,1 -91,Mixed layer cin,pressure above ground,CIN,1 -92,Unstable cin,pressure above ground,CIN,1 -93,Column integrated precipitable water,entire atmosphere,PWAT,1 -94,Helicity,height agl,HLCY,2 -95,U component storm motion,height agl,USTM,1 -96,V component storm motion,height agl,VSTM,1 -97,Accumulated total precipitation,surface,APCP,1 -98,Accumulated grid-scale precipitation,surface,NCPCP,1 -99,Accumulated snowfall,surface,WEASD,1 -100,Accumulated total snow melt,surface,SNOM,1 -101,Accumulated storm surface runoff,surface,SSRUN,1 -102,Accumulated base flow runoff,surface,BGRUN,1 -103,Average water runoff,surface,WATR,1 -104,Categorical rain (instantaneous),surface,CRAIN,1 -105,Categorical snow (instantaneous),surface,CSNOW,1 -106,Categorical ice pellets (instantaneous),surface,CICEP,1 -107,Categorical freezing rain (instantaneous),surface,CFRZR,1 -108,Precipitation rate (instantaneous),surface,PRATE,1 -109,Fraction of frozen precipitation,surface,CPOFP,1 -110,Cloud water mixing ratio on model surface,hybrid,CLWMR,2 -111,Cloud ice mixing ratio on model surface,hybrid,ICMR,2 -112,Graupel mixing ratio on model surface,hybrid,GRLE,1 -113,Cloud fraction on model surface,hybrid,TCDC,2 -114,Low level cloud fraction,low cloud layer,LCDC,1 -115,Mid level cloud fraction,mid cloud layer,MCDC,1 -116,High level cloud fraction,high cloud layer,HCDC,1 -117,Total cloud fraction,entire atmosphere,TCDC,1 -118,Total cloud fraction (time-averaged),entire atmosphere,TCDC,1 -119,stratospheric cloud fraction (time-averaged),entire atmosphere,CDLYR,1 -120,Visibility,surface,VIS,1 -121,GSD visibility,cloud top,VIS,1 -122,Above-ground height of LCL,adiabatic condensation from surface,HGT,1 -123,Pressure of LCL,adiabatic condensation from surface,PRES,1 -124,Outgoing surface shortwave radiation (instantaneous),surface,USWRF,1 -125,Outgoing surface longwave radiation (instantaneous),surface,ULWRF,1 -126,Incoming surface shortwave radiation (time-averaged),surface,DSWRF,1 -127,Incoming surface longwave radiation (time-averaged),surface,DLWRF,1 -128,Outgoing surface shortwave radiation (time-averaged),surface,USWRF,1 -129,Outgoing surface longwave radiation (time-averaged),surface,ULWRF,1 -130,Outgoing model top shortwave radiation (time-averaged),top of atmosphere,USWRF,1 -131,Outgoing model top longwave radiation (time-averaged),top of atmosphere,ULWRF,1 -132,Outgoing longwave at top of atmosphere (instantaneous),top of atmosphere,ULWRF,1 -133,Total spectrum brightness temperature,top of atmosphere,BRTMP,1 -134,Incoming surface shortwave radiation (instantaneous),surface,DSWRF,1 -135,Incoming surface longwave radiation (instantaneous),surface,DLWRF,1 -136,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 -137,Roughness length,surface,SFCR,1 -138,Friction velocity,surface,FRICV,1 -139,Surface drag coefficient,surface,CD,1 -140,Surface u wind stress,surface,UFLX,1 -141,Surface v wind stress,surface,VFLX,1 -142,Surface sensible heat flux (time-averaged),surface,SHTFL,1 -143,Ground heat flux (time-averaged),surface,GFLUX,1 -144,Snow phase change heat flux (time-averaged),surface,SNOHF,1 -145,Surface latent heat flux (time-averaged),surface,LHTFL,1 -146,Accumulated surface evaporation,surface,EVP,1 -147,Accumulated potential evaporation,surface,PEVAP,1 -148,Surface sensible heat flux (instantaneous),surface,SHTFL,1 -149,Surface latent heat flux (instantaneous),surface,LHTFL,1 -150,Latitude,surface,NLAT,1 -151,Longitude,surface,ELON,1 -152,Land sea mask (land=1 sea=0),surface,LAND,1 -153,Sea ice mask,surface,ICEC,1 -154,Surface albedo,surface,ALBDO,1 -155,Sea surface temperature,surface,WTMP,1 -156,Pressure at tropopause,tropopause,PRES,1 -157,Height at tropopause,tropopause,HGT,1 -158,Temperature at tropopause,tropopause,TMP,1 -159,Potential temperature at tropopause,tropopause,POT,1 -160,U component of wind at tropopause,tropopause,UGRD,1 -161,V component of wind at tropopause,tropopause,VGRD,1 -162,Wind shear at tropopause,tropopause,VWSH,1 -163,U component of 0-6km level wind shear,height agl,VUCSH,1 -164,V-component of 0-6km level wind shear,height agl,VVCSH,1 -165,Temperature at flight levels,height msl,TMP,10 -166,Temperature at flight levels,height agl,TMP,4 -167,U component of wind at flight levels,height msl,UGRD,10 -168,U component of wind at flight levels,height agl,UGRD,4 -169,V component of wind at flight levels,height msl,VGRD,10 -170,V component of wind at flight levels,height agl,VGRD,4 -171,Specific humidity at flight levels,height msl,SPFH,1 -172,Specific humidity at flight levels,height agl,SPFH,4 -173,Pressure at flight levels,height agl,PRES,4 -174,Freezing level height,0 degree isotherm,HGT,1 -175,Freezing level relative humidity,0 degree isotherm,RH,1 -176,Highest freezing level height,highest tropospheric frz lvl,HGT,1 -177,Lowest wet bulb zero height,lowest lvl wet bulb zero,HGT,1 -178,Pressure in boundary layer (30 mb means),pressure agl,PRES,6 -179,Temperature in boundary layer (30 mb means),pressure agl,TMP,6 -180,Potential temperature in boundary layer (30 mb means),pressure agl,POT,1 -181,Dew point temperature in boundary layer (30 mb means),pressure agl,DPT,1 -182,Specific humidity in boundary layer (30 mb means),pressure agl,SPFH,6 -183,RH in boundary layer (30 mb means),pressure agl,RH,6 -184,Moisture convergence in boundary layer (30 mb means),pressure agl,MCONV,1 -185,Precipitable water in boundary layer (30 mb means),pressure agl,PWAT,1 -186,U wind in boundary layer (30 mb means),pressure agl,UGRD,6 -187,V wind in boundary layer (30 mb means),pressure agl,VGRD,6 -188,Omega in boundary layer (30 mb means),pressure agl,VVEL,3 -189,Cloud bottom pressure,cloud base,PRES,1 -190,Cloud top pressure,cloud top,PRES,1 -191,Cloud top temperature,cloud top,TMP,1 -192,Cloud bottom height (above MSL),cloud base,HGT,1 -193,Cloud top height (above MSL),cloud top,HGT,1 -194,Maximum wind pressure level,max wind,PRES,1 -195,Maximum wind height,max wind,HGT,1 -196,U-component of maximum wind,max wind,UGRD,1 -197,V-component of maximum wind,max wind,VGRD,1 -198,Composite radar reflectivity,entire atmosphere,REFC,1 -199,Composite rain radar reflectivity,entire atmosphere,REFZR,1 -200,Composite ice radar reflectivity,entire atmosphere,REFZI,1 -201,Radar reflectivity at certain above ground heights,height agl,REFD,2 -202,Radar reflectivity from rain,height agl,REFZR,2 -203,Radar reflectivity from ice,height agl,REFZI,2 -204,Planetary boundary layer height,surface,HPBL,1 -205,Grid scale cloud bottom pressure,grid scale cloud bottom,PRES,1 -206,Grid scale cloud top pressure,grid scale cloud top,PRES,1 -207,Column integrated cloud water,entire atmosphere,TCOLW,1 -208,Column integrated cloud ice,entire atmosphere,TCOLI,1 -209,Column integrated rain,entire atmosphere,TCOLR,1 -210,Column integrated snow,entire atmosphere,TCOLS,1 -211,Column integrated total condensate,entire atmosphere,TCOLC,1 -212,Column integrated super cool liquid water,entire atmosphere,TCLSW,1 -213,Column integrated melting ice,entire atmosphere,TCOLM,1 -214,Height of lowest level super cool liquid water,lwst bot lvl of supercooled liq wtr,HGT,1 -215,Height of highest level super cool liquid water,hghst top lvl of supercooled liq wtr,HGT,1 -216,Ceiling height,cloud ceiling,HGT,1 -217,Accumulated land surface model precipitation,surface,LSPA,1 -218,Model top pressure,top of atmosphere,PRES,1 -219,Total column shortwave temperature tendency,entire atmosphere,SWHR,1 -220,Total column longwave temperature tendency,entire atmosphere,LWHR,1 -221,Total column gridded temperature tendency,entire atmosphere,LRGHR,1 -222,Column integrated moisture convergence,entire atmosphere,MCONV,1 -223,Temperature on sigma levels,sigma level,TMP,5 -224,Planetary boundary layer regime,surface,PBLREG,1 -225,Transport wind u component,planetary boundary layer,UGRD,1 -226,Transport wind v component,planetary boundary layer,VGRD,1 -227,Richardson number planetary boundary layer height,planetary boundary layer,HGT,1 -228,Mixing height,surface,MIXHT,1 -229,Radar echo top,entire atmosphere,RETOP,1 -230,Ventilation rate,planetary boundary layer,VRATE,1 -231,Haines index,surface,HINDEX,1 -232,Maximum 2m temperature,height agl,TMAX,1 -233,Minimum 2m temperature,height agl,TMIN,1 -234,Maximum 2m RH,height agl,MAXRH,1 -235,Minimum 2m RH,height agl,MINRH,1 -236,Maximum U-component wind at 10m,height agl,MAXUW,1 -237,Maximum V-component wind at 10m,height agl,MAXVW,1 -238,Maximum wind speed at 10m,height agl,WIND,1 -239,Maximum 1km reflectivity,height agl,MAXREF,1 -240,Maximum updraft vertical velocity,isobaric layer,MAXUVV,1 -241,Maximum downdraft vertical velocity,isobaric layer,MAXDVV,1 -242,Lightning,surface,LTNG,1 -243,Radar derived vertically integrated liquid,entire atmosphere,VIL,1 -244,Updraft helicity (2-5 km),height agl,UPHL,1 -245,Maximum updraft helicity (2-5 km),height agl,MXUPHL,1 -246,Minimum updraft helicity (2-5 km),height agl,MNUPHL,1 -247,Minimum updraft helicity (0-3 km),height agl,MNUPHL,1 -248,Maximum updraft helicity (0-3 km),height agl,MXUPHL,1 -249,Maximum relative vertical vorticity (0-1 km),height agl,RELV,1 -250,Maximum relative vertical vorticity at hybrid level 1,hybrid,RELV,1 -251,Maximum relative vertical vorticity (0-2 km),height agl,RELV,1 -252,Maximum derived radar reflectivity at -10 C,isothermal,MAXREF,1 -253,Radar reflectivity at -10 C,isothermal,REFD,1 \ No newline at end of file +35,Graupel mixing ratio on pressure surface,isobaric,GRLE,46 +36,Snow mixing ratio on pressure surface,isobaric,SNMR,46 +37,Rimming factor for Ferrier scheme on pressure surface,isobaric,RIME,46 +38,Mesinger (Membrane) sea level pressure,mean sea level,MSLET,1 +39,Shuell sea level pressure,mean sea level,PRES,1 +40,Temperature at 2m,height agl,TMP,1 +41,Specific humidity at 2m,height agl,SPFH,1 +42,Dew point temperature at 2m,height agl,DPT,1 +43,Relative humidity at 2m,height agl,RH,1 +44,U component of wind at 10m,height agl,UGRD,1 +45,V component of wind at 10m,height agl,VGRD,1 +46,Surface wind gust,surface,GUST,1 +47,LCL level pressure,pressure layer agl,PLPL,1 +48,Potential temperature at 10m,height agl,POT,1 +49,Specific humidity at 10m,height agl,SPFH,1 +50,Surface Pressure,surface,PRES,1 +51,Terrain height,surface,HGT,1 +52,Skin potential temperature,surface,POT,1 +53,Skin specific humidity,surface,SPFH,1 +54,Skin temperature,surface,TMP,1 +55,Soil temperature at 3m,depth below land surface,TSOIL,1 +56,Soil temperature in between each soil layer,depth below land surface,TSOIL,4 +57,Soil moisture in between each soil layer,depth below land surface,SOILW,4 +58,Liquid soil moisture in between each soil layer,depth below land surface,SOILL,4 +59,Total soil moisture,depth below land surface,SOILM,1 +60,Plant canopy surface water,surface,CNWAT,1 +61,Snow water equivalent,surface,WEASD,1 +62,Snow cover in percentage,surface,SNOWC,1 +63,Heat exchange coeff at surface,surface,SFEXC,1 +64,Vegetation cover,surface,VEG,1 +65,Vegetation type,surface,VGTYP,1 +66,Soil type,surface,SOTYP,1 +67,Snow free albedo,surface,SNFALB,1 +68,Maximum snow albedo,surface,MXSALB,1 +69,Canopy conductance,surface,CCOND,1 +70,Canopy conductance - solar component,surface,RCS,1 +71,Canopy conductance - temperature component,surface,RCT,1 +72,Canopy conductance - humidity component,surface,RCQ,1 +73,Canopy conductance - soil component,surface,RCSOL,1 +74,Soil moist reference,surface,SMREF,1 +75,Soil moist porosity,surface,POROS,1 +76,Number of root layers,surface,RLYRS,1 +77,Minimum stomatal resistance,surface,RSMIN,1 +78,Snow depth,surface,SNOD,1 +79,Air dry soil moisture,surface,SMDRY,1 +80,Soil moist wilting point,surface,WILT,1 +81,Soil moisture availability,depth below land surface,MSTAV,1 +82,Ground heat flux (instantaneous),surface,GFLUX,1 +83,Lifted index—surface based (500-1000 hPa),isobaric,LFTX,1 +84,Lifted index—best,pressure above ground,4LFTX,1 +85,Lifted index—parcel,pressure above ground,PLI,1 +86,Convective available potential energy,surface,CAPE,1 +87,Best cape,pressure above ground,CAPE,1 +88,Mixed layer cape,pressure above ground,CAPE,1 +89,Unstable cape,pressure above ground,CAPE,1 +90,Convective inhibition,surface,CIN,1 +91,Best cin,pressure above ground,CIN,1 +92,Mixed layer cin,pressure above ground,CIN,1 +93,Unstable cin,pressure above ground,CIN,1 +94,Column integrated precipitable water,entire atmosphere,PWAT,1 +95,Helicity,height agl,HLCY,2 +96,U component storm motion,height agl,USTM,1 +97,V component storm motion,height agl,VSTM,1 +98,Accumulated total precipitation,surface,APCP,1 +99,Accumulated grid-scale precipitation,surface,NCPCP,1 +100,Continuous accumulated total precipitation,surface,APCP,1 +101,Continuous accumulated grid-scale precipitation,surface,NCPCP,1 +102,Accumulated snowfall,surface,WEASD,1 +103,Accumulated total snow melt,surface,SNOM,1 +104,Accumulated storm surface runoff,surface,SSRUN,1 +105,Accumulated base flow runoff,surface,BGRUN,1 +106,Average water runoff,surface,WATR,1 +107,Categorical rain (instantaneous),surface,CRAIN,1 +108,Categorical snow (instantaneous),surface,CSNOW,1 +109,Categorical ice pellets (instantaneous),surface,CICEP,1 +110,Categorical freezing rain (instantaneous),surface,CFRZR,1 +111,Precipitation rate (instantaneous),surface,PRATE,1 +112,Fraction of frozen precipitation,surface,CPOFP,1 +113,Cloud water mixing ratio on model surface,hybrid,CLWMR,2 +114,Cloud ice mixing ratio on model surface,hybrid,ICMR,2 +115,Graupel mixing ratio on model surface,hybrid,GRLE,1 +116,Cloud fraction on model surface,hybrid,TCDC,2 +117,Low level cloud fraction,low cloud layer,LCDC,1 +118,Mid level cloud fraction,mid cloud layer,MCDC,1 +119,High level cloud fraction,high cloud layer,HCDC,1 +120,Total cloud fraction,entire atmosphere,TCDC,1 +121,Total cloud fraction (time-averaged),entire atmosphere,TCDC,1 +122,stratospheric cloud fraction (time-averaged),entire atmosphere,CDLYR,1 +123,Visibility,surface,VIS,1 +124,GSD visibility,cloud top,VIS,1 +125,Above-ground height of LCL,adiabatic condensation from surface,HGT,1 +126,Pressure of LCL,adiabatic condensation from surface,PRES,1 +127,Outgoing surface shortwave radiation (instantaneous),surface,USWRF,1 +128,Outgoing surface longwave radiation (instantaneous),surface,ULWRF,1 +129,Incoming surface shortwave radiation (time-averaged),surface,DSWRF,1 +130,Incoming surface longwave radiation (time-averaged),surface,DLWRF,1 +131,Outgoing surface shortwave radiation (time-averaged),surface,USWRF,1 +132,Outgoing surface longwave radiation (time-averaged),surface,ULWRF,1 +133,Outgoing model top shortwave radiation (time-averaged),top of atmosphere,USWRF,1 +134,Outgoing model top longwave radiation (time-averaged),top of atmosphere,ULWRF,1 +135,Outgoing longwave at top of atmosphere (instantaneous),top of atmosphere,ULWRF,1 +136,Total spectrum brightness temperature,top of atmosphere,BRTMP,1 +137,Incoming surface shortwave radiation (instantaneous),surface,DSWRF,1 +138,Incoming surface longwave radiation (instantaneous),surface,DLWRF,1 +139,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 +140,Roughness length,surface,SFCR,1 +141,Friction velocity,surface,FRICV,1 +142,Surface drag coefficient,surface,CD,1 +143,Surface u wind stress,surface,UFLX,1 +144,Surface v wind stress,surface,VFLX,1 +145,Surface sensible heat flux (time-averaged),surface,SHTFL,1 +146,Ground heat flux (time-averaged),surface,GFLUX,1 +147,Snow phase change heat flux (time-averaged),surface,SNOHF,1 +148,Surface latent heat flux (time-averaged),surface,LHTFL,1 +149,Accumulated surface evaporation,surface,EVP,1 +150,Accumulated potential evaporation,surface,PEVAP,1 +151,Surface sensible heat flux (instantaneous),surface,SHTFL,1 +152,Surface latent heat flux (instantaneous),surface,LHTFL,1 +153,Latitude,surface,NLAT,1 +154,Longitude,surface,ELON,1 +155,Land sea mask (land=1 sea=0),surface,LAND,1 +156,Sea ice mask,surface,ICEC,1 +157,Surface albedo,surface,ALBDO,1 +158,Sea surface temperature,surface,WTMP,1 +159,Pressure at tropopause,tropopause,PRES,1 +160,Height at tropopause,tropopause,HGT,1 +161,Temperature at tropopause,tropopause,TMP,1 +162,Potential temperature at tropopause,tropopause,POT,1 +163,U component of wind at tropopause,tropopause,UGRD,1 +164,V component of wind at tropopause,tropopause,VGRD,1 +165,Wind shear at tropopause,tropopause,VWSH,1 +166,U component of 0-6km level wind shear,height agl,VUCSH,1 +167,V-component of 0-6km level wind shear,height agl,VVCSH,1 +168,Temperature at flight levels,height msl,TMP,10 +169,Temperature at flight levels,height agl,TMP,4 +170,U component of wind at flight levels,height msl,UGRD,10 +171,U component of wind at flight levels,height agl,UGRD,4 +172,V component of wind at flight levels,height msl,VGRD,10 +173,V component of wind at flight levels,height agl,VGRD,4 +174,Specific humidity at flight levels,height msl,SPFH,1 +175,Specific humidity at flight levels,height agl,SPFH,4 +176,Pressure at flight levels,height agl,PRES,4 +177,Freezing level height,0 degree isotherm,HGT,1 +178,Freezing level relative humidity,0 degree isotherm,RH,1 +179,Highest freezing level height,highest tropospheric frz lvl,HGT,1 +180,Lowest wet bulb zero height,lowest lvl wet bulb zero,HGT,1 +181,Pressure in boundary layer (30 mb means),pressure agl,PRES,6 +182,Temperature in boundary layer (30 mb means),pressure agl,TMP,6 +183,Potential temperature in boundary layer (30 mb means),pressure agl,POT,1 +184,Dew point temperature in boundary layer (30 mb means),pressure agl,DPT,1 +185,Specific humidity in boundary layer (30 mb means),pressure agl,SPFH,6 +186,RH in boundary layer (30 mb means),pressure agl,RH,6 +187,Moisture convergence in boundary layer (30 mb means),pressure agl,MCONV,1 +188,Precipitable water in boundary layer (30 mb means),pressure agl,PWAT,1 +189,U wind in boundary layer (30 mb means),pressure agl,UGRD,6 +190,V wind in boundary layer (30 mb means),pressure agl,VGRD,6 +191,Omega in boundary layer (30 mb means),pressure agl,VVEL,3 +192,Cloud bottom pressure,cloud base,PRES,1 +193,Cloud top pressure,cloud top,PRES,1 +194,Cloud top temperature,cloud top,TMP,1 +195,Cloud bottom height (above MSL),cloud base,HGT,1 +196,Cloud top height (above MSL),cloud top,HGT,1 +197,Maximum wind pressure level,max wind,PRES,1 +198,Maximum wind height,max wind,HGT,1 +199,U-component of maximum wind,max wind,UGRD,1 +200,V-component of maximum wind,max wind,VGRD,1 +201,Composite radar reflectivity,entire atmosphere,REFC,1 +202,Composite rain radar reflectivity,entire atmosphere,REFZR,1 +203,Composite ice radar reflectivity,entire atmosphere,REFZI,1 +204,Radar reflectivity at certain above ground heights,height agl,REFD,2 +205,Radar reflectivity from rain,height agl,REFZR,2 +206,Radar reflectivity from ice,height agl,REFZI,2 +207,Planetary boundary layer height,surface,HPBL,1 +208,Grid scale cloud bottom pressure,grid scale cloud bottom,PRES,1 +209,Grid scale cloud top pressure,grid scale cloud top,PRES,1 +210,Column integrated cloud water,entire atmosphere,TCOLW,1 +211,Column integrated cloud ice,entire atmosphere,TCOLI,1 +212,Column integrated rain,entire atmosphere,TCOLR,1 +213,Column integrated snow,entire atmosphere,TCOLS,1 +214,Column integrated total condensate,entire atmosphere,TCOLC,1 +215,Column integrated graupel,entire atmosphere,TCOLG,1 +216,Column integrated super cool liquid water,entire atmosphere,TCLSW,1 +217,Column integrated melting ice,entire atmosphere,TCOLM,1 +218,Height of lowest level super cool liquid water,lwst bot lvl of supercooled liq wtr,HGT,1 +219,Height of highest level super cool liquid water,hghst top lvl of supercooled liq wtr,HGT,1 +220,Ceiling height,cloud ceiling,HGT,1 +221,Accumulated land surface model precipitation,surface,LSPA,1 +222,Model top pressure,top of atmosphere,PRES,1 +223,Total column shortwave temperature tendency,entire atmosphere,SWHR,1 +224,Total column longwave temperature tendency,entire atmosphere,LWHR,1 +225,Total column gridded temperature tendency,entire atmosphere,LRGHR,1 +226,Column integrated moisture convergence,entire atmosphere,MCONV,1 +227,Temperature on sigma levels,sigma level,TMP,5 +228,Planetary boundary layer regime,surface,PBLREG,1 +229,Transport wind u component,planetary boundary layer,UGRD,1 +230,Transport wind v component,planetary boundary layer,VGRD,1 +231,Richardson number planetary boundary layer height,planetary boundary layer,HGT,1 +232,Mixing height,surface,MIXHT,1 +233,Radar echo top,entire atmosphere,RETOP,1 +234,Ventilation rate,planetary boundary layer,VRATE,1 +235,Haines index,surface,HINDEX,1 +236,Maximum 2m temperature,height agl,TMAX,1 +237,Minimum 2m temperature,height agl,TMIN,1 +238,Maximum 2m RH,height agl,MAXRH,1 +239,Minimum 2m RH,height agl,MINRH,1 +240,Maximum U-component wind at 10m,height agl,MAXUW,1 +241,Maximum V-component wind at 10m,height agl,MAXVW,1 +242,Maximum wind speed at 10m,height agl,WIND,1 +243,Maximum 1km reflectivity,height agl,MAXREF,1 +244,Maximum updraft vertical velocity,isobaric layer,MAXUVV,1 +245,Maximum downdraft vertical velocity,isobaric layer,MAXDVV,1 +246,Lightning,surface,LTNG,1 +247,Radar derived vertically integrated liquid,entire atmosphere,VIL,1 +248,Updraft helicity (2-5 km),height agl,UPHL,1 +249,Maximum updraft helicity (2-5 km),height agl,MXUPHL,1 +250,Minimum updraft helicity (2-5 km),height agl,MNUPHL,1 +251,Minimum updraft helicity (0-3 km),height agl,MNUPHL,1 +252,Maximum updraft helicity (0-3 km),height agl,MXUPHL,1 +253,Maximum relative vertical vorticity (0-1 km),height agl,RELV,1 +254,Maximum relative vertical vorticity at hybrid level 1,hybrid,RELV,1 +255,Maximum relative vertical vorticity (0-2 km),height agl,RELV,1 +256,Maximum derived radar reflectivity at -10 C,isothermal,MAXREF,1 +257,Radar reflectivity at -10 C,isothermal,REFD,1 \ No newline at end of file diff --git a/docs/SRW_BGRD3D_table.csv b/docs/SRW_BGRD3D_table.csv index ac12f6b85..d9567b15d 100644 --- a/docs/SRW_BGRD3D_table.csv +++ b/docs/SRW_BGRD3D_table.csv @@ -64,150 +64,154 @@ 63,Column integrated precipitable water,entire atmosphere,PWAT,1 64,Accumulated total precipitation,surface,APCP,1 65,Accumulated grid-scale precipitation,surface,NCPCP,1 -66,Accumulated snowfall,surface,WEASD,1 -67,Accumulated total snow melt,surface,SNOM,1 -68,Accumulated storm surface runoff,surface,SSRUN,1 -69,Accumulated base flow runoff,surface,BGRUN,1 -70,Categorical rain (instantaneous),surface,CRAIN,1 -71,Categorical snow (instantaneous),surface,CSNOW,1 -72,Categorical ice pellets (instantaneous),surface,CICEP,1 -73,Categorical freezing rain (instantaneous),surface,CFRZR,1 -74,Precipitation rate (instantaneous),surface,PRATE,1 -75,Fraction of frozen precipitation,surface,CPOFP,1 -76,Cloud water mixing ratio on model surface,hybrid,CLWMR,64 -77,Cloud ice mixing ratio on model surface,hybrid,ICMR,64 -78,Cloud fraction on model surface,hybrid,TCDC,64 -79,Rain mixing ratio on model surface,hybrid,RWMR,64 -80,Snow mixing ratio on model surface,hybrid,SNMR,64 -81,Rimming factor for Ferrier scheme on model surface,hybrid,RIME,64 -82,Total condensate for Ferrier scheme on mode surface,hybrid,TCOND,64 -83,Model level fraction of rain for Ferrier scheme,hybrid,FRAIN,64 -84,Model level fraction of ice for Ferrier scheme,hybrid,FICE,64 -85,Low level cloud fraction,low cloud layer,LCDC,1 -86,Mid level cloud fraction,mid cloud layer,MCDC,1 -87,High level cloud fraction,high cloud layer,HCDC,1 -88,Total cloud fraction,entire atmosphere,TCDC,1 -89,Total cloud fraction (time-averaged),entire atmosphere,TCDC,1 -90,stratospheric cloud fraction (time-averaged),entire atmosphere,CDLYR,1 -91,Outgoing surface shortwave radiation (instantaneous),surface,USWRF,1 -92,Outgoing surface longwave radiation (instantaneous),surface,ULWRF,1 -93,Incoming surface shortwave radiation (time-averaged),surface,DSWRF,1 -94,Incoming surface longwave radiation (time-averaged),surface,DLWRF,1 -95,Outgoing surface shortwave radiation (time-averaged),surface,USWRF,1 -96,Outgoing surface longwave radiation (time-averaged),surface,ULWRF,1 -97,Outgoing model top shortwave radiation (time-averaged),top of atmosphere,USWRF,1 -98,Outgoing model top longwave radiation (time-averaged),top of atmosphere,ULWRF,1 -99,Incoming surface shortwave radiation (instantaneous),surface,DSWRF,1 -100,Incoming surface longwave radiation (instantaneous),surface,DLWRF,1 -101,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 -102,Roughness length,surface,SFCR,1 -103,Friction velocity,surface,FRICV,1 -104,Surface drag coefficient,surface,CD,1 -105,Surface u wind stress,surface,UFLX,1 -106,Surface v wind stress,surface,VFLX,1 -107,Surface sensible heat flux (time-averaged),surface,SHTFL,1 -108,Ground heat flux (time-averaged),surface,GFLUX,1 -109,Snow phase change heat flux (time-averaged),surface,SNOHF,1 -110,Surface latent heat flux (time-averaged),surface,LHTFL,1 -111,Accumulated surface evaporation,surface,EVP,1 -112,Accumulated potential evaporation,surface,PEVAP,1 -113,Surface sensible heat flux (instantaneous),surface,SHTFL,1 -114,Surface latent heat flux (instantaneous),surface,LHTFL,1 -115,Latitude,surface,NLAT,1 -116,Longitude,surface,ELON,1 -117,Land sea mask (land=1 sea=0),surface,LAND,1 -118,Sea ice mask,surface,ICEC,1 -119,Mass point at eta surface mask,surface,LMH,1 -120,Velocity point at eta surface mask,surface,LMV,1 -121,Surface albedo,surface,ALBDO,1 -122,Sea surface temperature,surface,WTMP,1 -123,Pressure in boundary layer (30 mb means),pressure agl,PRES,6 -124,Temperature in boundary layer (30 mb means),pressure agl,TMP,6 -125,Potential temperature in boundary layer (30 mb means),pressure agl,POT,1 -126,Dew point temperature in boundary layer (30 mb means),pressure agl,DPT,1 -127,Specific humidity in boundary layer (30 mb means),pressure agl,SPFH,6 -128,RH in boundary layer (30 mb means),pressure agl,RH,6 -129,Moisture convergence in boundary layer (30 mb means),pressure agl,MCONV,1 -130,Precipitable water in boundary layer (30 mb means),pressure agl,PWAT,1 -131,U wind in boundary layer (30 mb means),pressure agl,UGRD,6 -132,V wind in boundary layer (30 mb means),pressure agl,VGRD,6 -133,Accumulated land surface model precipitation,surface,LSPA,1 -134,Model top pressure,top of atmosphere,PRES,1 -135,Pressure thickness,hybrid,PRES,1 -136,Sigma pressure thickness,hybrid,PRES,1 -137,Plant canopy surface water,surface,CNWAT,1 -138,Ground heat flux (instantaneous),surface,GFLUX,1 -139,Lifted index—surface based (500-1000 hPa),isobaric,LFTX,1 -140,Convective available potential energy,surface,CAPE,1 -141,Best cape,pressure above ground,CAPE,1 -142,Mixed layer cape,pressure above ground,CAPE,1 -143,Unstable cape,pressure above ground,CAPE,1 -144,Convective inhibition,surface,CIN,1 -145,Best cin,pressure above ground,CIN,1 -146,Mixed layer cin,pressure above ground,CIN,1 -147,Unstable cin,pressure above ground,CIN,1 -148,LCL level pressure,pressure layer agl,PLPL,1 -149,Helicity,height agl,HLCY,2 -150,U component storm motion,height agl,USTM,1 -151,V component storm motion,height agl,VSTM,1 -152,Cloud bottom pressure,cloud base,PRES,1 -153,Cloud top pressure,cloud top,PRES,1 -154,Cloud top temperature,cloud top,TMP,1 -155,Pressure at tropopause,tropopause,PRES,1 -156,Height at tropopause,tropopause,HGT,1 -157,Temperature at tropopause,tropopause,TMP,1 -158,U component of wind at tropopause,tropopause,UGRD,1 -159,V component of wind at tropopause,tropopause,VGRD,1 -160,Wind shear at tropopause,tropopause,VWSH,1 -161,Temperature at flight levels,height msl,TMP,10 -162,U component of wind at flight levels,height msl,UGRD,10 -163,V component of wind at flight levels,height msl,VGRD,10 -164,Freezing level height,0 degree isotherm,HGT,1 -165,Freezing level relative humidity,0 degree isotherm,RH,1 -166,Highest freezing level height,highest tropospheric frz lvl,HGT,1 -167,Maximum wind pressure level,max wind,PRES,1 -168,Maximum wind height,max wind,HGT,1 -169,U-component of maximum wind,max wind,UGRD,1 -170,V-component of maximum wind,max wind,VGRD,1 -171,Maximum wind speed at 10m,height agl,WIND,1 -172,Cloud bottom height (above MSL),cloud base,HGT,1 -173,Cloud top height (above MSL),cloud top,HGT,1 -174,Visibility,surface,VIS,1 -175,Composite radar reflectivity,entire atmosphere,REFC,1 -176,Grid scale cloud bottom pressure,grid scale cloud bottom,PRES,1 -177,Grid scale cloud top pressure,grid scale cloud top,PRES,1 -178,Column integrated cloud water,entire atmosphere,TCOLW,1 -179,Column integrated cloud ice,entire atmosphere,TCOLI,1 -180,Column integrated rain,entire atmosphere,TCOLR,1 -181,Column integrated snow,entire atmosphere,TCOLS,1 -182,Column integrated total condensate,entire atmosphere,TCOLC,1 -183,Vegetation type,surface,VGTYP,1 -184,Soil type,surface,SOTYP,1 -185,Canopy conductance,surface,CCOND,1 -186,Planetary boundary layer height,surface,HPBL,1 -187,Snow depth,surface,SNOD,1 -188,Snow sublimation,surface,SBSNO,1 -189,Air dry soil moisture,surface,SMDRY,1 -190,Soil moist porosity,surface,POROS,1 -191,Minimum stomatal resistance,surface,RSMIN,1 -192,Number of root layers,surface,RLYRS,1 -193,Soil moist wilting point,surface,WILT,1 -194,Soil moist reference,surface,SMREF,1 -195,Canopy conductance - solar component,surface,RCS,1 -196,Canopy conductance - temperature component,surface,RCT,1 -197,Canopy conductance - humidity component,surface,RCQ,1 -198,Canopy conductance - soil component,surface,RCSOL,1 -199,Potential evaporation,surface,PEVPR,1 -200,Surface wind gust,surface,GUST,1 -201,Lowest wet bulb zero height,lowest lvl wet bulb zero,HGT,1 -202,Leaf area index,surface,LAI,1 -203,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 -204,Cloud fraction on sigma surface,sigma,TCDC,22 -205,Richardson number planetary boundary layer height,planetary boundary layer,HGT,1 -206,Mixing height,surface,MIXHT,1 -207,Temperature at 10m,height agl,TMP,1 -208,Time-averaged percentage snow cover,surface,SNOWC,1 -209,Time-averaged surface pressure,surface,PRES,1 -210,Time-averaged 10m temperature,height agl,TMP,1 -211,Time-averaged mass exchange coefficient,surface,AKHS,1 -212,Time-averaged wind exchange coefficient,surface,AKMS,1 \ No newline at end of file +66,Continuous accumulated total precipitation,surface,APCP,1 +67,Continuous accumulated grid-scale precipitation,surface,NCPCP,1 +68,Accumulated snowfall,surface,WEASD,1 +69,Accumulated total snow melt,surface,SNOM,1 +70,Accumulated storm surface runoff,surface,SSRUN,1 +71,Accumulated base flow runoff,surface,BGRUN,1 +72,Categorical rain (instantaneous),surface,CRAIN,1 +73,Categorical snow (instantaneous),surface,CSNOW,1 +74,Categorical ice pellets (instantaneous),surface,CICEP,1 +75,Categorical freezing rain (instantaneous),surface,CFRZR,1 +76,Precipitation rate (instantaneous),surface,PRATE,1 +77,Fraction of frozen precipitation,surface,CPOFP,1 +78,Cloud water mixing ratio on model surface,hybrid,CLWMR,64 +79,Cloud ice mixing ratio on model surface,hybrid,ICMR,64 +80,Graupel mixing ratio on mmodel surface,hybrid,GRLE,64 +81,Cloud fraction on model surface,hybrid,TCDC,64 +82,Rain mixing ratio on model surface,hybrid,RWMR,64 +83,Snow mixing ratio on model surface,hybrid,SNMR,64 +84,Rimming factor for Ferrier scheme on model surface,hybrid,RIME,64 +85,Total condensate for Ferrier scheme on mode surface,hybrid,TCOND,64 +86,Model level fraction of rain for Ferrier scheme,hybrid,FRAIN,64 +87,Model level fraction of ice for Ferrier scheme,hybrid,FICE,64 +88,Low level cloud fraction,low cloud layer,LCDC,1 +89,Mid level cloud fraction,mid cloud layer,MCDC,1 +90,High level cloud fraction,high cloud layer,HCDC,1 +91,Total cloud fraction,entire atmosphere,TCDC,1 +92,Total cloud fraction (time-averaged),entire atmosphere,TCDC,1 +93,stratospheric cloud fraction (time-averaged),entire atmosphere,CDLYR,1 +94,Outgoing surface shortwave radiation (instantaneous),surface,USWRF,1 +95,Outgoing surface longwave radiation (instantaneous),surface,ULWRF,1 +96,Incoming surface shortwave radiation (time-averaged),surface,DSWRF,1 +97,Incoming surface longwave radiation (time-averaged),surface,DLWRF,1 +98,Outgoing surface shortwave radiation (time-averaged),surface,USWRF,1 +99,Outgoing surface longwave radiation (time-averaged),surface,ULWRF,1 +100,Outgoing model top shortwave radiation (time-averaged),top of atmosphere,USWRF,1 +101,Outgoing model top longwave radiation (time-averaged),top of atmosphere,ULWRF,1 +102,Incoming surface shortwave radiation (instantaneous),surface,DSWRF,1 +103,Incoming surface longwave radiation (instantaneous),surface,DLWRF,1 +104,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 +105,Roughness length,surface,SFCR,1 +106,Friction velocity,surface,FRICV,1 +107,Surface drag coefficient,surface,CD,1 +108,Surface u wind stress,surface,UFLX,1 +109,Surface v wind stress,surface,VFLX,1 +110,Surface sensible heat flux (time-averaged),surface,SHTFL,1 +111,Ground heat flux (time-averaged),surface,GFLUX,1 +112,Snow phase change heat flux (time-averaged),surface,SNOHF,1 +113,Surface latent heat flux (time-averaged),surface,LHTFL,1 +114,Accumulated surface evaporation,surface,EVP,1 +115,Accumulated potential evaporation,surface,PEVAP,1 +116,Surface sensible heat flux (instantaneous),surface,SHTFL,1 +117,Surface latent heat flux (instantaneous),surface,LHTFL,1 +118,Latitude,surface,NLAT,1 +119,Longitude,surface,ELON,1 +120,Land sea mask (land=1 sea=0),surface,LAND,1 +121,Sea ice mask,surface,ICEC,1 +122,Mass point at eta surface mask,surface,LMH,1 +123,Velocity point at eta surface mask,surface,LMV,1 +124,Surface albedo,surface,ALBDO,1 +125,Sea surface temperature,surface,WTMP,1 +126,Pressure in boundary layer (30 mb means),pressure agl,PRES,6 +127,Temperature in boundary layer (30 mb means),pressure agl,TMP,6 +128,Potential temperature in boundary layer (30 mb means),pressure agl,POT,1 +129,Dew point temperature in boundary layer (30 mb means),pressure agl,DPT,1 +130,Specific humidity in boundary layer (30 mb means),pressure agl,SPFH,6 +131,RH in boundary layer (30 mb means),pressure agl,RH,6 +132,Moisture convergence in boundary layer (30 mb means),pressure agl,MCONV,1 +133,Precipitable water in boundary layer (30 mb means),pressure agl,PWAT,1 +134,U wind in boundary layer (30 mb means),pressure agl,UGRD,6 +135,V wind in boundary layer (30 mb means),pressure agl,VGRD,6 +136,Accumulated land surface model precipitation,surface,LSPA,1 +137,Model top pressure,top of atmosphere,PRES,1 +138,Pressure thickness,hybrid,PRES,1 +139,Sigma pressure thickness,hybrid,PRES,1 +140,Plant canopy surface water,surface,CNWAT,1 +141,Ground heat flux (instantaneous),surface,GFLUX,1 +142,Lifted index—surface based (500-1000 hPa),isobaric,LFTX,1 +143,Convective available potential energy,surface,CAPE,1 +144,Best cape,pressure above ground,CAPE,1 +145,Mixed layer cape,pressure above ground,CAPE,1 +146,Unstable cape,pressure above ground,CAPE,1 +147,Convective inhibition,surface,CIN,1 +148,Best cin,pressure above ground,CIN,1 +149,Mixed layer cin,pressure above ground,CIN,1 +150,Unstable cin,pressure above ground,CIN,1 +151,LCL level pressure,pressure layer agl,PLPL,1 +152,Helicity,height agl,HLCY,2 +153,U component storm motion,height agl,USTM,1 +154,V component storm motion,height agl,VSTM,1 +155,Cloud bottom pressure,cloud base,PRES,1 +156,Cloud top pressure,cloud top,PRES,1 +157,Cloud top temperature,cloud top,TMP,1 +158,Pressure at tropopause,tropopause,PRES,1 +159,Height at tropopause,tropopause,HGT,1 +160,Temperature at tropopause,tropopause,TMP,1 +161,U component of wind at tropopause,tropopause,UGRD,1 +162,V component of wind at tropopause,tropopause,VGRD,1 +163,Wind shear at tropopause,tropopause,VWSH,1 +164,Temperature at flight levels,height msl,TMP,10 +165,U component of wind at flight levels,height msl,UGRD,10 +166,V component of wind at flight levels,height msl,VGRD,10 +167,Freezing level height,0 degree isotherm,HGT,1 +168,Freezing level relative humidity,0 degree isotherm,RH,1 +169,Highest freezing level height,highest tropospheric frz lvl,HGT,1 +170,Maximum wind pressure level,max wind,PRES,1 +171,Maximum wind height,max wind,HGT,1 +172,U-component of maximum wind,max wind,UGRD,1 +173,V-component of maximum wind,max wind,VGRD,1 +174,Maximum wind speed at 10m,height agl,WIND,1 +175,Cloud bottom height (above MSL),cloud base,HGT,1 +176,Cloud top height (above MSL),cloud top,HGT,1 +177,Visibility,surface,VIS,1 +178,Composite radar reflectivity,entire atmosphere,REFC,1 +179,Grid scale cloud bottom pressure,grid scale cloud bottom,PRES,1 +180,Grid scale cloud top pressure,grid scale cloud top,PRES,1 +181,Column integrated cloud water,entire atmosphere,TCOLW,1 +182,Column integrated cloud ice,entire atmosphere,TCOLI,1 +183,Column integrated rain,entire atmosphere,TCOLR,1 +184,Column integrated snow,entire atmosphere,TCOLS,1 +185,Column integrated total condensate,entire atmosphere,TCOLC,1 +186,Column integrated graupel,entire atmosphere,TCOLG,1 +187,Vegetation type,surface,VGTYP,1 +188,Soil type,surface,SOTYP,1 +189,Canopy conductance,surface,CCOND,1 +190,Planetary boundary layer height,surface,HPBL,1 +191,Snow depth,surface,SNOD,1 +192,Snow sublimation,surface,SBSNO,1 +193,Air dry soil moisture,surface,SMDRY,1 +194,Soil moist porosity,surface,POROS,1 +195,Minimum stomatal resistance,surface,RSMIN,1 +196,Number of root layers,surface,RLYRS,1 +197,Soil moist wilting point,surface,WILT,1 +198,Soil moist reference,surface,SMREF,1 +199,Canopy conductance - solar component,surface,RCS,1 +200,Canopy conductance - temperature component,surface,RCT,1 +201,Canopy conductance - humidity component,surface,RCQ,1 +202,Canopy conductance - soil component,surface,RCSOL,1 +203,Potential evaporation,surface,PEVPR,1 +204,Surface wind gust,surface,GUST,1 +205,Lowest wet bulb zero height,lowest lvl wet bulb zero,HGT,1 +206,Leaf area index,surface,LAI,1 +207,Clear sky incoming surface shortwave (instantaneous),surface,CSDSF,1 +208,Cloud fraction on sigma surface,sigma,TCDC,22 +209,Richardson number planetary boundary layer height,planetary boundary layer,HGT,1 +210,Mixing height,surface,MIXHT,1 +211,Temperature at 10m,height agl,TMP,1 +212,Time-averaged percentage snow cover,surface,SNOWC,1 +213,Time-averaged surface pressure,surface,PRES,1 +214,Time-averaged 10m temperature,height agl,TMP,1 +215,Time-averaged mass exchange coefficient,surface,AKHS,1 +216,Time-averaged wind exchange coefficient,surface,AKMS,1 \ No newline at end of file diff --git a/docs/UPP_GRIB2_Table.csv b/docs/UPP_GRIB2_Table.csv new file mode 100644 index 000000000..7fcc873cb --- /dev/null +++ b/docs/UPP_GRIB2_Table.csv @@ -0,0 +1,439 @@ +Field Description,Name in Grib2 Control File,Grib2 pname,Vertical Level,UPP ID +Radar reflectivity on model surface*,REFD_ON_HYBRID_LVL,REFD,109,250 +Pressure on model surface,PRES_ON_HYBRID_LVL,PRES,109,1 +Height on model surface,HGT_ON_HYBRID_LVL,HGT,109,77 +Temperature on model surface,TMP_ON_HYBRID_LVL,TMP,109,2 +Potential temperature on model surface,POT_ON_HYBRID_LVL,POT,109,3 +Dew point temperature on model surface,DPT_ON_HYBRID_LVL,DPT,109,4 +Specific humidity on model surface,SPFH_ON_HYBRID_LVL,SPFH,109,5 +Relative humidity on model surface,RH_ON_HYBRID_LVL,RH,109,6 +Moisture convergence on model surface,MCONV_ON_HYBRID_LVL,MCONV,109,83 +U component wind on model surface,UGRD_ON_HYBRID_LVL,UGRD,109,7 +V component wind on model surface,VGRD_ON_HYBRID_LVL,VGRD,109,8 +Cloud water on model surface,CLWMR_ON_HYBRID_LVL,CLWMR,109,124 +Cloud ice on model surface,CICE_ON_HYBRID_LVL,CICE,109,125 +Rain on model surface,RWMR_ON_HYBRID_LVL,RWMR,109,181 +Snow on model surface,SNMR_ON_HYBRID_LVL,SNMR,109,182 +Cloud fraction on model surface,TCDC_ON_HYBRID_LVL,TCDC,109,145 +Omega on model surface,VVEL_ON_HYBRID_LVL,VVEL,109,9 +Absolute vorticity on model surface,ABSV_ON_HYBRID_LVL,ABSV,109,10 +Geostrophic streamfunction on model surface,STRM_ON_HYBRID_LVL,STRM,109,84 +Turbulent kinetic energy on model surface,TKE_ON_HYBRID_LVL,TKE,109,11 +Richardson number on model surface,RI_ON_HYBRID_LVL,RI,109,111 +Master length scale on model surface,BMIXL_ON_HYBRID_LVL,BMIXL,109,146 +Asymptotic length scale on model surface,AMIXL_ON_HYBRID_LVL,AMIXL,109,147 +Radar reflectivity on pressure surface*,REFD_ON_ISOBARIC_SFC,REFD,100,251 +Height on pressure surface,HGT_ON_ISOBARIC_SFC,HGT,100,12 +Temperature on pressure surface,TMP_ON_ISOBARIC_SFC,TMP,100,13 +Potential temperature on pressure surface,POT_ON_ISOBARIC_SFC,POT,100,14 +Dew point temperature on pressure surface,DPT_ON_ISOBARIC_SFC,DPT,100,15 +Specific humidity on pressure surface,SPFH_ON_ISOBARIC_SFC,SPFH,100,16 +Relative humidity on pressure surface,RH_ON_ISOBARIC_SFC,RH,100,17 +Moisture convergence on pressure surface,MCONV_ON_ISOBARIC_SFC,MCONV,100,85 +U component wind on pressure surface,UGRD_ON_ISOBARIC_SFC,UGRD,100,18 +V component wind on pressure surface,VGRD_ON_ISOBARIC_SFC,VGRD,100,19 +Omega on pressure surface,VVEL_ON_ISOBARIC_SFC,VVEL,100,20 +Absolute vorticity on pressure surface,ABSV_ON_ISOBARIC_SFC,ABSV,100,21 +Geostrophic streamfunction on pressure surface,STRM_ON_ISOBARIC_SFC,STRM,100,86 +Turbulent kinetic energy on pressure surface,TKE_ON_ISOBARIC_SFC,TKE,100,22 +Cloud water on pressure surface,CLWMR_ON_ISOBARIC_SFC,CLWMR,100,153 +Cloud ice on pressure surface,CICE_ON_ISOBARIC_SFC,CICE,100,166 +Rain on pressure surface,RWMR_ON_ISOBARIC_SFC,RWMR,100,183 +Snow water on pressure surface,SNMR_ON_ISOBARIC_SFC,SNMR,100,184 +Total condensate on pressure surface,TCOND_ON_ISOBARIC_SFC,TCOND,100,198 +Mesinger (Membrane) sea level pressure,MSLET_ON_MEAN_SEA_LVL,MSLET,102,23 +Shuell sea level pressure,PRES_ON_MEAN_SEA_LVL,PRMSL,102,105 +2 M pressure,PRES_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,PRES,105,138 +2 M temperature,TMP_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,TMP,105,106 +2 M specific humidity,SPFH_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,SPFH,105,112 +2 M mixing ratio,Not currently available for grib2,NA,105,414 +2 M dew point temperature,DPT_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,DPT,105,113 +2 M RH,RH_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,RH,105,114 +10 M u component wind,UGRD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,UGRD,105,64 +10 M v component wind,VGRD_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,VGRD,105,65 +10 M potential temperature,POT_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,POT,105,158 +10 M specific humidity,SPFH_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,SPFH,105,159 +Surface pressure,PRES_ON_SURFACE,PRES,1,24 +Terrain height,HGT_ON_SURFACE,HGT,1,25 +Skin potential temperature,POT_ON_SURFACE,POT,1,27 +Skin specific humidity,SPFH_ON_SURFACE,SPFH,1,28 +Skin dew point temperature,DPT_ON_SURFACE,DPT,1,29 +Skin Relative humidity,RH_ON_SURFACE,RH,1,76 +Skin temperature,TMP_ON_SURFACE,TMP,1,26 +Soil temperature at the bottom of soil layers,TSOIL_ON_DEPTH_BEL_LAND_SFC_3m,TSOIL,111,115/571 +Soil temperature in between each of soil layers,TSOIL_ON_DEPTH_BEL_LAND_SFC,TSOIL,112,116 +Soil moisture in between each of soil layers,SOILW_ON_DEPTH_BEL_LAND_SFC,SOILW,112,117 +Snow water equivalent,WEASD_ON_SURFACE,WEASD,1,119 +Snow cover in percentage,SNOWC_ON_SURFACE,SNOWC,1,120 +Heat exchange coeff at surface,SFEXC_ON_SURFACE,SFEXC,1,169 +Vegetation cover,VEG_ON_SURFACE,VEG,1,170 +Soil moisture availability,MSTAV_ON_DEPTH_BEL_LAND_SFC,MSTAV,112,171 +Ground heat flux - instantaneous,INST_GFLUX_ON_SURFACE,GFLUX,1,152 +Lifted index—surface based,LFTX_ON_ISOBARIC_SFC_500-1000hpa,LFTX,101,30 +Lifted index—best,4LFTX_ON_SPEC_PRES_ABOVE_GRND,4LFTX,116,31 +Lifted index—from boundary layer,PLI_ON_SPEC_PRES_ABOVE_GRND,PLI,116,75 +CAPE (4 types) ***,CAPE_ON_SURFACE,CAPE,1,32 +CIN (4 types) ***,CIN_ON_SURFACE,CIN,1,107 +Column integrated precipitable water,PWAT_ON_ENTIRE_ATMOS_SINGLE_LYR,PWAT,200,80 +Column integrated cloud water,TCOLW_ON_ENTIRE_ATMOS,TCOLW,200,200 +Column integrated cloud ice,TCOLI_ON_ENTIRE_ATMOS,TCOLI,200,201 +Column integrated rain,TCOLR_ON_ENTIRE_ATMOS,TCOLR,200,202 +Column integrated snow,TCOLS_ON_ENTIRE_ATMOS,TCOLS,200,203 +Column integrated total condensate,TCOLC_ON_ENTIRE_ATMOS,TCOLC,200,204 +Column integrated cloud water,CWAT_ON_ENTIRE_ATMOS_SINGLE_LYR,CWAT,200,575 +Helicity,HLCY_ON_SPEC_HGT_LVL_ABOVE_GRND,HLCY,106,162 +U component storm motion,USTM_ON_SPEC_HGT_LVL_ABOVE_GRND,USTM,106,163 +V component storm motion,VSTM_ON_SPEC_HGT_LVL_ABOVE_GRND,VSTM,106,164 +Accumulated total precipitation,ACM_APCP_ON_SURFACE,APCP,1,87 +Accumulated convective precipitation,ACM_ACPCP_ON_SURFACE,ACPCP,1,33 +Accumulated grid-scale precipitation,ACM_NCPCP_ON_SURFACE,NCPCP,1,34 +Accumulated snowfall,ACM_WEASD_ON_SURFACE,WEASD,1,35 +Accumulated large scale snow,Not currently available for grib2,NA,1,244 +Accumulated total snow melt,ACM_SNOM_ON_SURFACE,SNOM,1,121 +Precipitation type (4 types) – instantaneous,INST_CRAIN_ON_SURFACE,CRAIN,1,160 +Precipitation rate - instantaneous,INST_PRATE_ON_SURFACE,PRATE,1,167 +Composite radar reflectivity*,REFC_ON_ENTIRE_ATMOS,REFC,200,252 +Low level cloud fraction,LCDC_ON_LOW_CLOUD_LYR,LCDC,214,37 +Mid level cloud fraction,MCDC_ON_MID_CLOUD_LYR,MCDC,224,38 +High level cloud fraction,HCDC_ON_HIGH_CLOUD_LYR,HCDC,234,39 +Total cloud fraction,INST_TCDC_ON_ENTIRE_ATMOS,TCDC,200,161 +Time-averaged total cloud fraction,AVE_TCDC_ON_ENTIRE_ATMOS,TCDC,200,144 +Time-averaged stratospheric cloud fraction,AVE_CDLYR_ON_ENTIRE_ATMOS,CDLYR,200,139 +Time-averaged convective cloud fraction,AVE_CDCON_ON_ENTIRE_ATMOS,CDCON,200,143 +Cloud bottom pressure,PRES_ON_CLOUD_BASE,PRES,2,148 +Cloud top pressure,PRES_ON_CLOUD_TOP,PRES,3,149 +Cloud bottom height (above MSL),HGT_ON_CLOUD_BASE,HGT,2,178 +Cloud top height (above MSL),HGT_ON_CLOUD_TOP,HGT,3,179 +Convective cloud bottom pressure,PRES_ON_CONVECTIVE_CLOUD_BOT_LVL,PRES,242,188 +Convective cloud top pressure,PRES_ON_CONVECTIVE_CLOUD_TOP_LVL,PRES,243,189 +Shallow convective cloud bottom pressure,PRES_ON_SHALL_CONVECTIVE_CLOUD_BOT_LVL,PRES,248,190 +Shallow convective cloud top pressure,PRES_ON_SHALL_CONVECTIVE_CLOUD_TOP_LVL,PRES,249,191 +Deep convective cloud bottom pressure,PRES_ON_DEEP_CONVECTIVE_CLOUD_BOT_LVL,PRES,251,192 +Deep convective cloud top pressure,PRES_ON_DEEP_CONVECTIVE_CLOUD_TOP_LVL,PRES,252,193 +Grid scale cloud bottom pressure,PRES_ON_GRID_SCALE_CLOUD_BOT_LVL,PRES,206,194 +Grid scale cloud top pressure,PRES_ON_GRID_SCALE_CLOUD_TOP_LVL,PRES,207,195 +Convective cloud fraction,CDCON_ON_ENTIRE_ATMOS,CDCON,200,196 +Convective cloud efficiency,CUEFI_ON_ENTIRE_ATMOS_SINGLE_LYR,CUEFI,200,197 +Above-ground height of LCL,HGT_ON_LVL_OF_ADIAB_COND_FROM_SFC,HGT,5,109 +Pressure of LCL,PRES_ON_LVL_OF_ADIAB_COND_FROM_SFC,PRES,5,110 +Cloud top temperature,TMP_ON_CLOUD_TOP,TMP,3,168 +Temperature tendency from radiative fluxes,TTRAD_ON_HYBRID_LVL,TTRAD,109,140 +Temperature tendency from shortwave radiative flux,SWHR_ON_HYBRID_LVL,SWHR,109,40 +Temperature tendency from longwave radiative flux,LWHR_ON_HYBRID_LVL,LWHR,109,41 +Outgoing surface shortwave radiation - instantaneous,INST_USWRF_ON_SURFACE,USWRF,1,141 +Outgoing surface longwave radiation - instantaneous,INST_ULWRF_ON_SURFACE,ULWRF,1,142 +Incoming surface shortwave radiation - time-averaged,AVE_DSWRF_ON_SURFACE,DSWRF,1,126 +Incoming surface longwave radiation - time-averaged,AVE_DLWRF_ON_SURFACE,DLWRF,1,127 +Outgoing surface shortwave radiation - time-averaged,AVE_USWRF_ON_SURFACE,USWRF,1,128 +Outgoing surface longwave radiation - time-averaged,AVE_ULWRF_ON_SURFACE,ULWRF,1,129 +Outgoing model top shortwave radiation - time-averaged,AVE_USWRF_ON_TOP_OF_ATMOS,USWRF,8,130 +Outgoing model top longwave radiation - time-averaged,AVE_ULWRF_ON_TOP_OF_ATMOS,ULWRF,8,131 +Incoming surface shortwave radiation - instantaneous,INST_DSWRF_ON_SURFACE,DSWRF,1,156 +Incoming surface longwave radiation - instantaneous,INST_DLWRF_ON_SURFACE,DLWRF,1,157 +Roughness length,SFCR_ON_SURFACE,SFCR,1,44 +Friction velocity,FRICV_ON_SURFACE,FRICV,1,45 +Surface drag coefficient,CD_ON_SURFACE,CD,1,132 +Surface u wind stress,UFLX_ON_SURFACE,UFLX,1,133 +Surface v wind stress,VFLX_ON_SURFACE,VFLX,1,134 +Surface sensible heat flux - time-averaged,AVE_SHTFL_ON_SURFACE,SHTFL,1,43 +Ground heat flux - time-averaged,AVE_GFLUX_ON_SURFACE,GFLUX,1,135 +Surface latent heat flux - time-averaged,AVE_LHTFL_ON_SURFACE,LHTFL,1,42 +Surface momentum flux - time-averaged,AVE_MFLX_ON_SURFACE,MFLX,1,46 +Accumulated surface evaporation,ACM_EVP_ON_SURFACE,EVP,1,47 +Surface sensible heat flux – instantaneous,INST_SHTFL_ON_SURFACE,SHTFL,1,154 +Surface latent heat flux - instantaneous,INST_LHTFL_ON_SURFACE,LHTFL,1,155 +Latitude,NLAT_ON_SURFACE,NLAT,1,48 +Longitude,ELON_ON_SURFACE,ELON,1,49 +Land sea mask (land=1 sea=0),LAND_ON_SURFACE,LAND,1,50 +Sea ice mask,ICEC_ON_SURFACE,ICEC,1,51 +Surface midday albedo,ALBDO_ON_SURFACE,ALBDO,1,150 +Sea surface temperature,WTMP_ON_SURFACE,WTMP,1,151 +Press at tropopause,PRES_ON_TROPOPAUSE,PRES,7,54 +Temperature at tropopause,TMP_ON_TROPOPAUSE,TMP,7,55 +Potential temperature at tropopause,POT_ON_TROPOPAUSE,POT,7,108 +U wind at tropopause,UGRD_ON_TROPOPAUSE,UGRD,7,56 +V wind at tropopause,VGRD_ON_TROPOPAUSE,VGRD,7,57 +Wind shear at tropopause,VWSH_ON_TROPOPAUSE,VWSH,7,58 +Height at tropopause,HGT_ON_TROPOPAUSE,HGT,7,177 +Temperature at flight levels,TMP_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL,TMP,103,59 +U wind at flight levels,UGRD_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL,UGRD,103,60 +V wind at flight levels,VGRD_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL,VGRD,103,61 +Freezing level height (above mean sea level),HGT_ON_0C_ISOTHERM,HGT,4,62 +Freezing level RH,RH_ON_0C_ISOTHERM,RH,4,63 +Highest freezing level height,HGT_ON_HGHST_TROP_FRZ_LVL,HGT,204,165 +Pressure in boundary layer (30 mb mean),PRES_ON_SPEC_PRES_ABOVE_GRND,PRES,116,67 +Temperature in boundary layer (30 mb mean),TMP_ON_SPEC_PRES_ABOVE_GRND,TMP,116,68 +Potential temperature in boundary layers (30 mb mean),POT_ON_SPEC_PRES_ABOVE_GRND,POT,116,69 +Dew point temperature in boundary layer (30 mb mean),DPT_ON_SPEC_PRES_ABOVE_GRND,DPT,116,70 +Specific humidity in boundary layer (30 mb mean),SPFH_ON_SPEC_PRES_ABOVE_GRND,SPFH,116,71 +RH in boundary layer (30 mb mean),RH_ON_SPEC_PRES_ABOVE_GRND,RH,116,72 +Moisture convergence in boundary layer (30 mb mean),MCONV_ON_SPEC_PRES_ABOVE_GRND,MCONV,116,88 +Precipitable water in boundary layer (30 mb mean),PWAT_ON_SPEC_PRES_ABOVE_GRND,PWAT,116,89 +U wind in boundary layer (30 mb mean),UGRD_ON_SPEC_PRES_ABOVE_GRND,UGRD,116,73 +V wind in boundary layer (30 mb mean),VGRD_ON_SPEC_PRES_ABOVE_GRND,VGRD,116,74 +Omega in boundary layer (30 mb mean),VVEL_ON_SPEC_PRES_ABOVE_GRND,VVEL,116,90 +Visibility,VIS_ON_SURFACE,VIS,1,180 +Vegetation type,VGTYP_ON_SURFACE,VGTYP,1,218 +Soil type,SOTYP_ON_SURFACE,SOTYP,1,219 +Canopy conductance,CCOND_ON_SURFACE,CCOND,1,220 +PBL height,HPBL_ON_SURFACE,HPBL,1,221 +Slope type,SLTYP_ON_SURFACE,SLTYP,1,223 +Snow depth,SNOD_ON_SURFACE,SNOD,1,224 +Liquid soil moisture,SOILL_ON_DEPTH_BEL_LAND_SFC,SOILL,112,225 +Snow free albedo,SNFALB_ON_SURFACE,SNFALB,1,226 +Maximum snow albedo,MXSALB_ON_SURFACE,MXSALB,1,227 +Canopy water evaporation,EVCW_ON_SURFACE,EVCW,1,228 +Direct soil evaporation,EVBS_ON_SURFACE,EVBS,1,229 +Plant transpiration,TRANS_ON_SURFACE,TRANS,1,230 +Snow sublimation,SBSNO_ON_SURFACE,SBSNO,1,231 +Air dry soil moisture,SMDRY_ON_SURFACE,SMDRY,1,232 +Soil moist porosity,POROS_ON_SURFACE,POROS,1,233 +Minimum stomatal resistance,RSMIN_ON_SURFACE,RSMIN,1,234 +Number of root layers,RLYRS_ON_SURFACE,RLYRS,1,235 +Soil moist wilting point,WILT_ON_SURFACE,WILT,1,236 +Soil moist reference,SMREF_ON_SURFACE,SMREF,1,237 +Canopy conductance - solar component,RCS_ON_SURFACE,RCS,1,238 +Canopy conductance - temperature component,RCT_ON_SURFACE,RCT,1,239 +Canopy conductance - humidity component,RCQ_ON_SURFACE,RCQ,1,240 +Canopy conductance - soil component,RCSOL_ON_SURFACE,RCSOL,1,241 +Potential evaporation,PEVPR_ON_SURFACE,PEVPR,1,242 +Heat diffusivity on sigma surface,VEDH_ON_SIGMA_LVLS,VEDH,107,243 +Surface wind gust,GUST_ON_SURFACE,GUST,1,245 +Convective precipitation rate,CPRAT_ON_SURFACE,CPRAT,1,249 +Radar reflectivity at certain above ground heights*,REFD_ON_SPEC_HGT_LVL_ABOVE_GRND,REFD,105,253 +MAPS Sea Level Pressure,MAPS_PRMSL_ON_MEAN_SEA_LVL,PRMSL,102,445 +Total soil moisture,SOILM_ON_DEPTH_BEL_LAND_SFC,SOILM,112,36 +Plant canopy surface water,CNWAT_ON_SURFACE,CNWAT,1,118 +Accumulated storm surface runoff,ACM_SSRUN_ON_SURFACE,SSRUN,1,122 +Accumulated baseflow runoff,ACM_BGRUN_ON_SURFACE,BGRUN,1,123 +Fraction of frozen precipitation,CPOFP_ON_SURFACE,CPOFP,1,172 +GSD Cloud Base pressure,Not currently available for grib2,NA,2,787 +GSD Cloud Top pressure,GSD_PRES_ON_CLOUD_TOP,PRES,3,406 +Averaged temperature tendency from grid scale latent heat release,AVE_LRGHR_ON_HYBRID_LVL,LRGHR,109,78 +Averaged temperature tendency from convective latent heat release,AVE_CNVHR_ON_HYBRID_LVL,CNVHR,109,79 +Average snow phase change heat flux,AVE_SNOHF_ON_SURFACE,SNOHF,1,136 +Accumulated potential evaporation,ACM_PEVAP_ON_SURFACE,PEVAP,1,137 +Highest freezing level relative humidity,RH_ON_HGHST_TROP_FRZ_LVL,RH,204,350 +Maximum wind pressure level,PRES_ON_MAX_WIND,PRES,6,173 +Maximum wind height,HGT_ON_MAX_WIND,HGT,6,174 +U-component of maximum wind,UGRD_ON_MAX_WIND,UGRD,6,175 +V-component of maximum wind,VGRD_ON_MAX_WIND,VGRD,6,176 +GSD cloud base height,GSD_HGT_ON_CLOUD_BASE,HGT,2,408 +GSD cloud top height,GSD_HGT_ON_CLOUD_TOP,HGT,3,409 +GSD visibility,GSD_VIS_ON_CLOUD_TOP,VIS,3,410 +Wind energy potential,WMIXE_ON_SPEC_HGT_LVL_ABOVE_GRND,WMIXE,105,411 +U wind at 80 m above ground,UGRD_ON_SPEC_HGT_LVL_ABOVE_GRND,UGRD,105,412 +V wind at 80 m above ground,VGRD_ON_SPEC_HGT_LVL_ABOVE_GRND,VGRD,105,413 +Graupel on model surface,GRMR_ON_HYBRID_LVL,GRMR,109,415 +Graupel on pressure surface,GRMR_ON_ISOBARIC_SFC,GRMR,100,416 +Maximum updraft helicity,MAX_UPHL_ON_SPEC_HGT_LVL_ABOVE_GRND_2-5km,MXUPHL,106,420 +Maximum 1km reflectivity,MAX_REF_ON_SPEC_HGT_LVL_ABOVE_GRND_1km,MAXREF,105,421 +Maximum wind speed at 10m,MAX_WIND_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,WIND,105,422 +Maximum updraft vertical velocity,MAX_MAXUVV_ON_ISOBARIC_SFC_40-100hpa,MAXUVV,106,423 +Maximum downdraft vertical velocity,MAX_MAXDVV_ON_ISOBARIC_SFC_40-100hpa,MAXDVV,106,424 +Mean vertical velocity,AVE_DZDT_ON_SIGMA_LVL_0.5-0.8,DZDT,108,425 +Radar echo top in KDT,HGT_ON_SPEC_HGT_LVL_ABOVE_GRND,HGT,105,426 +Updraft helicity,UPHL_ON_SPEC_HGT_LVL_ABOVE_GRND_2-5km,MXUPHL,106,427 +Column integrated graupel,GRMR_ON_ENTIRE_ATMOS_SINGLE_LYR,GRMR,200,428 +Column integrated maximum graupel,MAXVIG_ON_ENTIRE_ATMOS_SINGLE_LYR,TCOLG,200,429 +U-component of 0-1km level wind shear,VUCSH_ON_SPEC_HGT_LVL_ABOVE_GRND_0-1km,VUCSH,106,430 +V-component of 0-1km level wind shear,VVCSH_ON_SPEC_HGT_LVL_ABOVE_GRND_0-1km,VVCSH,106,431 +U-component of 0-6km level wind shear,VUCSH_ON_SPEC_HGT_LVL_ABOVE_GRND_0-6km,VUCSH,106,432 +V-component of 0-6km level wind shear,VVCSH_ON_SPEC_HGT_LVL_ABOVE_GRND_0-6km,VVCSH,106,433 +Total precipitation accumulated over user-specified bucket,BUCKET_APCP_ON_SURFACE,APCP,1,434 +Convective precipitation accumulated over user-specified bucket,BUCKET_ACPCP_ON_SURFACE,ACPCP,1,435 +Grid-scale precipitation accumulated over user-specified bucket,BUCKET_NCPCP_ON_SURFACE,NCPCP,1,436 +Snow accumulated over user-specified bucket,BUCKET_WEASD_ON_SURFACE,WEASD,1,437 +Model level fraction of rain for Ferrier scheme,FRAIN_ON_HYBRID_LVL,FRAIN,109,185 +Model level fraction of ice for Ferrier scheme,FICE_ON_HYBRID_LVL,FICE,109,186 +Model level riming factor for Ferrier scheme,RIME_ON_HYBRID_LVL,RIME,109,187 +Model level total condensate for Ferrier scheme,TCOND_ON_HYBRID_LVL,TCOND,109,199 +Height of sigma surface,HGT_ON_SIGMA_LVLS,HGT,107,205 +Temperature on sigma surface,TMP_ON_SIGMA_LVLS,TMP,107,206 +Specific humidity on sigma surface,SPFH_ON_SIGMA_LVLS,SPFH,107,207 +U-wind on sigma surface,UGRD_ON_SIGMA_LVLS,UGRD,107,208 +V-wind on sigma surface,VGRD_ON_SIGMA_LVLS,VGRD,107,209 +Omega on sigma surface,VVEL_ON_SIGMA_LVLS,VVEL,107,210 +Cloud water on sigma surface,CLWMR_ON_SIGMA_LVLS,CLWMR,107,211 +Cloud ice on sigma surface,CICE_ON_SIGMA_LVLS,CICE,107,212 +Rain on sigma surface,RWMR_ON_SIGMA_LVLS,RWMR,107,213 +Snow on sigma surface,SNMR_ON_SIGMA_LVLS,SNMR,107,214 +Condensate on sigma surface,TCOND_ON_SIGMA_LVLS,TCOND,107,215 +Pressure on sigma surface,PRES_ON_SIGMA_LVLS,PRES,107,216 +Turbulent kinetic energy on sigma surface,TKE_ON_SIGMA_LVLS,TKE,107,217 +Cloud fraction on sigma surface,TCDC_ON_SIGMA_LVLS,TCDC,107,222 +Graupel on sigma surface,GRLE_ON_SIGMA_LVLS,GRLE,107,255 +LCL level pressure,PLPL_ON_SPEC_PRES_ABOVE_GRND,PLPL,116,246 +LOWEST WET BULB ZERO HEIGHT,HGT_ON_LWST_LVL_OF_WET_BULB_ZERO,HGT,245,247 +Leaf area index,LAI_ON_SURFACE,LAI,1,254 +Accumulated land surface model precipitation,ACM_LSPA_ON_SURFACE,LSPA,1,256 +In-flight icing,TIPD_ON_ISOBARIC_SFC,TIPD,100,257 +Clear air turbulence,TPFI_ON_ISOBARIC_SFC,TPFI,100,258 +Wind shear between shelter level and 2000 FT,VWSH_ON_SPEC_HGT_LVL_ABOVE_GRND,VWSH,106,259 +Ceiling,HGT_ON_CLOUD_CEILING,HGT,215,260 +Flight restriction,VIS_ON_CLOUD_BASE,VIS,2,261 +Instantaneous clear sky incoming surface shortwave,INST_CSDSF_ON_SURFACE,CSDSF,1,262 +Pressure level riming factor for Ferrier scheme,RIME_ON_ISOBARIC_SFC,RIME,100,263 +Model level vertical velocity,DZDT_ON_HYBRID_LVL,DZDT,109,264 +Brightness temperature,SBT122_ON_TOP_OF_ATMOS_FROM_LWRAD,SBT122,8,265 +Average albedo,AVE_ALBDO_ON_SURFACE,ALBDO,1,266 +Ozone on model surface,O3MR_ON_HYBRID_LVL,O3MR,109,267 +Ozone on pressure surface,O3MR_ON_ISOBARIC_SFC,O3MR,100,268 +Surface zonal momentum flux,AVE_UFLX_ON_SURFACE,UFLX,1,269 +Surface meridional momentum flux,AVE_VFLX_ON_SURFACE,VFLX,1,270 +Average precipitation rate,AVE_PRATE_ON_SURFACE,PRATE,1,271 +Average convective precipitation rate,AVE_CPRAT_ON_SURFACE,CPRAT,1,272 +Instantaneous outgoing longwave at top of atmosphere,INST_ULWRF_ON_TOP_OF_ATMOS,ULWRF,8,274 +Total spectrum brightness temperature,BRTMP_ON_TOP_OF_ATMOS,BRTMP,8,275 +Model top pressure,PRES_ON_TOP_OF_ATMOS,PRES,8,282 +Composite rain radar reflectivity,REFZR_ON_ENTIRE_ATMOS,REFZR,200,276 +Composite ice radar reflectivity,REFZI_ON_ENTIRE_ATMOS,REFZI,200,277 +Composite radar reflectivity from convection,REFZC_ON_ENTIRE_ATMOS,REFZC,200,278 +Rain radar reflecting angle,REFZR_ON_SPEC_HGT_LVL_ABOVE_GRND,REFZR,105,279 +Ice radar reflecting angle,REFZI_ON_SPEC_HGT_LVL_ABOVE_GRND,REFZI,105,280 +Convection radar reflecting angle,REFZC_ON_SPEC_HGT_LVL_ABOVE_GRND,REFZC,105,281 +Model level vertical velocity,DZDT_ON_ISOBARIC_SFC,DZDT,100,284 +Column integrated super cool liquid water,TCLSW_ON_ENTIRE_ATMOS,TCLSW,200,285 +Column integrated melting ice,TCOLM_ON_ENTIRE_ATMOS,TCOLM,200,286 +Height of lowest level super cool liquid water,HGT_ON_LWST_BOT_LVL_OF_SUPERCOOLED_LIQ_WATER_LYR,HGT,253,287 +Height of highest level super cool liquid water,HGT_ON_HGHST_TOP_LVL_OF_SUPERCOOLED_LIQ_WATER_LYR,HGT,254,288 +Richardson number planetary boundary layer height,HGT_ON_PLANETARY_BOUND_LYR,HGT,220,289 +Total column shortwave temperature tendency,SWHR_ON_ENTIRE_ATMOS,SWHR,200,290 +Total column longwave temperature tendency,LWHR_ON_ENTIRE_ATMOS,LWHR,200,291 +Total column gridded temperature tendency,AVE_LRGHR_ON_ENTIRE_ATMOS,LRGHR,200,292 +Total column convective temperature tendency,AVE_CNVHR_ON_ENTIRE_ATMOS,CNVHR,200,293 +Radiative flux temperature tendency on pressure level,TTRAD_ON_ISOBARIC_SFC,TTRAD,100,294 +Column integrated moisture convergence,MCONV_ON_ENTIRE_ATMOS,MCONV,200,295 +Time averaged clear sky incoming UV-B shortwave,AVE_CDUVB_ON_SURFACE,CDUVB,1,297 +Time averaged incoming UV-B shortwave,AVE_DUVB_ON_SURFACE,DUVB,1,298 +Total column ozone,TOZNE_ON_ENTIRE_ATMOS_SINGLE_LYR,TOZNE,200,299 +Average low cloud fraction,AVE_TCDC_ON_LOW_CLOUD_LYR,TCDC,214,300 +Average mid cloud fraction,AVE_TCDC_ON_MID_CLOUD_LYR,TCDC,224,301 +Average high cloud fraction,AVE_TCDC_ON_HIGH_CLOUD_LYR,TCDC,234,302 +Average low cloud bottom pressure,AVE_PRES_ON_LOW_CLOUD_BOT_LVL,PRES,212,303 +Average low cloud top pressure,AVE_PRES_ON_LOW_CLOUD_TOP_LVL,PRES,213,304 +Average low cloud top temperature,AVE_TMP_ON_LOW_CLOUD_TOP_LVL,TMP,213,305 +Average mid cloud bottom pressure,AVE_PRES_ON_MID_CLOUD_BOT_LVL,PRES,222,306 +Average mid cloud top pressure,AVE_PRES_ON_MID_CLOUD_TOP_LVL,PRES,223,307 +Average mid cloud top temperature,AVE_TMP_ON_MID_CLOUD_TOP_LVL,TMP,223,308 +Average high cloud bottom pressure,AVE_PRES_ON_HIGH_CLOUD_BOT_LVL,PRES,232,309 +Average high cloud top pressure,AVE_PRES_ON_HIGH_CLOUD_TOP_LVL,PRES,233,310 +Average high cloud top temperature,AVE_TMP_ON_HIGH_CLOUD_TOP_LVL,TMP,233,311 +Total column relative humidity,RH_ON_ENTIRE_ATMOS_SINGLE_LYR,RH,200,312 +Cloud work function,AVE_CWORK_ON_ENTIRE_ATMOS_SINGLE_LYR,CWORK,200,313 +Temperature at maximum wind level,TMP_ON_MAX_WIND,TMP,6,314 +Time averaged zonal gravity wave stress,AVE_U-GWD_ON_SURFACE,U-GWD,1,315 +Time averaged meridional gravity wave stress,AVE_V-GWD_ON_SURFACE,V-GWD,1,316 +Average precipitation type,AVE_CRAIN_ON_SURFACE,CRAIN,1,317 +Simulated GOES 12 channel 2 brightness temperature,SBT122_ON_TOP_OF_ATMOS,SBT122,8,327 +Simulated GOES 12 channel 3 brightness temperature,SBT123_ON_TOP_OF_ATMOS,SBT123,8,328 +Simulated GOES 12 channel 4 brightness temperature,SBT124_ON_TOP_OF_ATMOS,SBT124,8,329 +Simulated GOES 12 channel 5 brightness temperature,SBT126_ON_TOP_OF_ATMOS,SBT126,8,330 +Cloud fraction on pressure surface,TCDC_ON_ISOBARIC_SFC,TCDC,100,331 +U-wind on theta surface,UGRD_ON_ISENTROPIC_LVL,UGRD,113,332 +V-wind on theta surface,VGRD_ON_ISENTROPIC_LVL,VGRD,113,333 +Temperature on theta surface,TMP_ON_ISENTROPIC_LVL,TMP,113,334 +Potential vorticity on theta surface,PVORT_ON_ISENTROPIC_LVL,PVORT,113,335 +Montgomery streamfunction on theta surface,MNTSF_ON_ISENTROPIC_LVL,MNTSF,113,353 +Relative humidity on theta surface,RH_ON_ISENTROPIC_LVL,RH,113,352 +U wind on constant PV surface,UGRD_ON_POT_VORT_SFC,UGRD,117,336 +V wind on constant PV surface,VGRD_ON_POT_VORT_SFC,VGRD,117,337 +Temperature on constant PV surface,TMP_ON_POT_VORT_SFC,TMP,117,338 +Height on constant PV surface,HGT_ON_POT_VORT_SFC,HGT,117,339 +Pressure on constant PV surface,PRES_ON_POT_VORT_SFC,PRES,117,340 +Wind shear on constant PV surface,VWSH_ON_POT_VORT_SFC,VWSH,117,341 +Planetary boundary layer cloud fraction,AVE_TCDC_ON_BOUND_LYR_CLOUD_LYR,TCDC,211,342 +Average water runoff,ACM_WATR_ON_SURFACE,WATR,1,343 +Planetary boundary layer regime,PBLREG_ON_SURFACE,PBLREG,1,344 +Maximum 2m temperature,MAX_TMAX_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,TMAX,105,345 +Minimum 2m temperature,MIN_TMIN_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,TMIN,105,346 +Maximum 2m RH,MAX_MAXRH_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,MAXRH,105,347 +Minimum 2m RH,MIN_MINRH_ON_SPEC_HGT_LVL_ABOVE_GRND_2m,MINRH,105,348 +Ice thickness,ICETK_ON_SURFACE,ICETK,1,349 +Shortwave tendency on pressure surface,SWHR_ON_ISOBARIC_SFC,SWHR,100,354 +Longwave tendency on pressure surface,LWHR_ON_ISOBARIC_SFC,LWHR,100,355 +Deep convective tendency on pressure surface,CNVHR_ON_ISOBARIC_SFC,CNVHR,100,357 +Shallow convective tendency on pressure surface,SHAHR_ON_ISOBARIC_SFC,SHAHR,100,358 +Grid scale tendency on pressure surface,LRGHR_ON_ISOBARIC_SFC,LRGHR,100,359 +Deep convective moisture on pressure surface,CNVMR_ON_ISOBARIC_SFC,CNVMR,100,361 +Shallow convective moisture on pressure surface,SHAMR_ON_ISOBARIC_SFC,SHAMR,100,362 +Ozone tendency on pressure surface,TOZ_ON_ISOBARIC_SFC,TOZ,100,366 +Mass weighted potential vorticity,PVMW_ON_ISOBARIC_SFC,PVMW,100,367 +Simulated GOES 12 channel 3 brightness count,SBC123_ON_TOP_OF_ATMOS,SBC123,8,376 +Simulated GOES 12 channel 4 brightness count,SBC124_ON_TOP_OF_ATMOS,SBC124,8,377 +Omega on theta surface,VVEL_ON_ISENTROPIC_LVL,VVEL,113,378 +Mixing height,MIXHT_ON_SURFACE,MIXHT,1,381 +Average clear-sky incoming longwave at surface,AVE_CSDLF_ON_SURFACE,CSDLF,1,382 +Average clear-sky incoming shortwave at surface,AVE_CSDSF_ON_SURFACE,CSDSF,1,383 +Average clear-sky outgoing longwave at surface,AVE_CSULF_ON_SURFACE,CSULF,1,384 +Average clear-sky outgoing longwave at top of atmosphere,AVE_CSULF_ON_TOP_OF_ATMOS,CSULF,8,385 +Average clear-sky outgoing shortwave at surface,AVE_CSUSF_ON_SURFACE,CSUSF,1,386 +Average clear-sky outgoing shortwave at top of atmosphere,AVE_CSUSF_ON_TOP_OF_ATMOS,CSUSF,8,387 +Average incoming shortwave at top of atmosphere,AVE_DSWRF_ON_TOP_OF_ATMOS,DSWRF,8,388 +Transport wind u component,UGRD_ON_PLANETARY_BOUND_LYR,UGRD,220,389 +Transport wind v component,VGRD_ON_PLANETARY_BOUND_LYR,VGRD,220,390 +Sunshine duration,SUNSD_ON_SURFACE,SUNSD,1,396 +Field capacity,FLDCP_ON_SURFACE,FLDCP,1,397 +ICAO height at maximum wind level,ICAHT_ON_MAX_WIND,ICAHT,6,398 +ICAO height at tropopause,ICAHT_ON_TROPOPAUSE,ICAHT,7,399 +Radar echo top,RETOP_ON_ENTIRE_ATMOS_SINGLE_LYR,RETOP,200,400 +Time averaged surface Visible beam downward solar flux,AVE_VBDSF_ON_SURFACE,VBDSF,1,401 +Time averaged surface Visible diffuse downward solar flux,AVE_VDDSF_ON_SURFACE,VDDSF,1,402 +Time averaged surface Near IR beam downward solar flux,AVE_NBDSF_ON_SURFACE,NBDSF,1,403 +Time averaged surface Near IR diffuse downward solar flux,AVE_NDDSF_ON_SURFACE,NDDSF,1,404 +Average snowfall rate,AVE_SRWEQ_ON_SURFACE,SRWEQ,1,405 +Dust 1 on pressure surface,DUST1_ON_ISOBARIC_LVL,MASSMR,100,438 +Dust 2 on pressure surface,DUST2_ON_ISOBARIC_LVL,MASSMR,100,439 +Dust 3 on pressure surface,DUST3_ON_ISOBARIC_LVL,MASSMR,100,440 +Dust 4 on pressure surface,DUST4_ON_ISOBARIC_LVL,MASSMR,100,441 +Dust 5 on pressure surface,DUST5_ON_ISOBARIC_LVL,MASSMR,100,442 +Equilibrium level height,HGT_ON_EQUIL_LVL,HGT,247,443 +Lightning,LTNG_ON_SURFACE,LTNG,1,444 +Goes west channel 2 brightness temperature,SBT112_ON_TOP_OF_ATMOS,SBT112,8,446 +Goes west channel 3 brightness temperature,SBT113_ON_TOP_OF_ATMOS,SBT113,8,447 +Goes west channel 4 brightness temperature,SBT114_ON_TOP_OF_ATMOS,SBT114,8,448 +Goes west channel 5 brightness temperature,SBT115_ON_TOP_OF_ATMOS,SBT115,8,449 +In flight icing from NCAR algorithm,ICIP_ON_ISOBARIC_SFC,ICIP,100,450 +Specific humidity at flight levels,SPFH_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL,SPFH,103,451 +Virtual temperature based convective available potential energy,VTCAPE_ON_SURFACE,CAPE,1,452 +Virtual temperature based convective inhibition,VTCIN_ON_SURFACE,CIN,1,453 +Virtual temperature on model surfaces,Not currently available for grib2,NA,109,909 +Virtual temperature on pressure surfaces,Not currently available for grib2,NA,100,910 +Virtual temperature on flight levels,Not currently available for grib2,NA,103,911 +Ventilation rate,VRATE_ON_PLANETARY_BOUND_LYR,VRATE,220,454 +Haines index,HINDEX_ON_SURFACE,HINDEX,1,455 +Pressure at flight levels,PRES_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL,PRES,103,482 +Time-averaged percentage snow cover,AVE_SNOWC_ON_SURFACE,SNOWC,1,500 +Time-averaged surface pressure,AVE_PRES_ON_SURFACE,PRES,1,501 +Time-averaged 10m temperature,AVE_TMP_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,TMP,105,502 +Time-averaged mass exchange coefficient,AVE_AKHS_ON_SURFACE,AKHS,1,503 +Time-averaged wind exchange coefficient,AVE_AKMS_ON_SURFACE,AKMS,1,504 +Temperature at 10m,TMP_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,TMP,105,505 +Maximum U-component wind at 10m,MAX_MAXUW_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,MAXUW,105,506 +Maximum V-component wind at 10m,MAX_MAXVW_ON_SPEC_HGT_LVL_ABOVE_GRND_10m,MAXVW,105,507 +Simulated GOES 12 channel 2 brightness temperature with satellite angle correction,NON_NADIR_SBT122_ON_TOP_OF_ATMOS,SBT122,8,456 +Simulated GOES 12 channel 3 brightness temperature with satellite angle correction,NON_NADIR_SBT123_ON_TOP_OF_ATMOS,SBT123,8,457 +Simulated GOES 12 channel 4 brightness temperature with satellite angle correction,NON_NADIR_SBT124_ON_TOP_OF_ATMOS,SBT124,8,458 +Simulated GOES 12 channel 5 brightness temperature with satellite angle correction,NON_NADIR_SBT126_ON_TOP_OF_ATMOS,SBT126,8,459 +Simulated GOES 11 channel 2 brightness temperature with satellite angle correction,SBT112_ON_TOP_OF_ATMOS,SBT112,8,460 +Simulated GOES 11 channel 3 brightness temperature with satellite angle correction,SBT113_ON_TOP_OF_ATMOS,SBT113,8,461 +Simulated GOES 11 channel 4 brightness temperature with satellite angle correction,SBT114_ON_TOP_OF_ATMOS,SBT114,8,462 +Simulated GOES 11 channel 5 brightness temperature with satellite angle correction,SBT115_ON_TOP_OF_ATMOS,SBT115,8,463 +Simulated GOES 15 channel 5 brightness temperature with satellite angle correction,Not currently available for grib2,NA,109,872 +Simulated GOES 13 channel 2 brightness temperature with satellite angle correction,Not currently available for grib2,NA,109,868 +Simulated AMSR-E channel 9 brightness temperature,AMSRE9_ON_TOP_OF_ATMOS,AMSRE9,8,483 +Simulated AMSR-E channel 10 brightness temperature,AMSRE10_ON_TOP_OF_ATMOS,AMSRE10,8,484 +Simulated AMSR-E channel 11 brightness temperature,AMSRE11_ON_TOP_OF_ATMOS,AMSRE11,8,485 +Simulated AMSR-E channel 12 brightness temperature,AMSRE12_ON_TOP_OF_ATMOS,AMSRE12,8,486 +SSMI F13 (19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,800 +SSMI F14 (19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,806 +SSMI F15 (19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,812 +SSMIS F16 (183H 19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,818 +SSMIS F17 (183H 19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,825 +SSMIS F18 (183H 19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,832 +SSMIS F19 (183H 19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,839 +SSMIS F20 (183H 19H 19V 37H 37V 85H 85V),Not currently available for grib2,NA,109,846 +MTSAT-1r imager channels 1-4 (backup for mtsat2),Not currently available for grib2,NA,109,864 +MTSAT2 imager channels 1-4,Not currently available for grib2,NA,109,860 +Seviri brightness temperature channels 5-11,Not currently available for grib2,NA,109,876 +Insat 3d brightness temperature IR channels 1-4,Not currently available for grib2,NA,109,865 diff --git a/docs/UPP_GRIB2_Table.rst b/docs/UPP_GRIB2_Table.rst new file mode 100644 index 000000000..d266f0804 --- /dev/null +++ b/docs/UPP_GRIB2_Table.rst @@ -0,0 +1,14 @@ +******************************** +GRIB2 Fields Produced by Unipost +******************************** + +GRIB2 fields produced by *unipost* (column 1), abbreviated names +used in the *postcntrl.xml* file (column 2), corresponding standard +grib2 pname (column 3), corresponding grib identification number for the +vertical coordinate (column 4), and corresponding array location UPP +uses to store the variable in parallel arrays (column 5). + +.. csv-table:: + :file: UPP_GRIB2_Table.csv + :widths: 25, 30, 15, 15, 15 + :header-rows: 1 diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 000000000..9984a0bb3 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,12 @@ +.underline { + text-decoration: underline; +} + +.bolditalic { + font-weight: bold; + font-style: italic; +} + +td { + word-break: break-all; +} diff --git a/docs/conf.py b/docs/conf.py index 4e9248c66..a57aa1977 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,7 +58,13 @@ # html_theme_options = {} html_theme_options = {"body_max_width": "none"} +# html_sidebar_options = {} +html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] } + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] + +# Add custom style sheet +html_css_files = ['custom.css'] diff --git a/docs/index.rst b/docs/index.rst index 2ed89e5c3..55dbb9e87 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,7 @@ Welcome to the UPP User's Guide Introduction CodeOverview InputsOutputs + Installation + Running Regridding - BuildRunWithoutApp Acknowledgments From d55a8a748f6c318dcc1b988b5c00c2346e04b8ff Mon Sep 17 00:00:00 2001 From: Tracy Date: Wed, 18 Nov 2020 12:52:59 -0700 Subject: [PATCH 18/33] Remove Hera GNU from list of supported platforms --- docs/Installation.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/Installation.rst b/docs/Installation.rst index 5eef8f3f9..49d4b7a15 100644 --- a/docs/Installation.rst +++ b/docs/Installation.rst @@ -34,8 +34,6 @@ Certain machines do have the NCEP libraries in a pre-installed location for use | | GNU 9.1.0 | /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/gnu-9.1.0/mpt-2.19 | +---------------+----------------------+--------------------------------------------------------------------------------+ | NOAA Hera | Intel 18.0.5.274 | /scratch1/BMC/gmtb/software/NCEPLIBS-ufs-v2.0.0/intel-18.0.5.274/impi-2018.0.4 | -| +----------------------+--------------------------------------------------------------------------------+ -| | GNU 9.2.0 | /scratch1/BMC/gmtb/software/NCEPLIBS-ufs-v2.0.0/gnu-9.2.0/mpich-3.3.2 | +---------------+----------------------+--------------------------------------------------------------------------------+ ============================ @@ -52,8 +50,6 @@ Building and running UPP V9.0.0 has been tested on the following platforms using | | GNU 9.1.0 | +---------------+----------------------+ | NOAA Hera | Intel 18.0.5.274 | -| +----------------------+ -| | GNU 9.2.0 | +---------------+----------------------+ Move to the directory where you want to clone and build UPP and clone the repository into the directory From 0dc795425acd8a07351b732721c0a420a6a9b4e7 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 24 Nov 2020 15:40:50 -0700 Subject: [PATCH 19/33] Add link to external wiki page listing NCEPLIBS locations on pre-configured machines --- docs/CodeOverview.rst | 4 ++-- docs/Installation.rst | 15 ++++----------- docs/_static/custom.css | 10 ++++++++++ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/CodeOverview.rst b/docs/CodeOverview.rst index 01a9d3bef..5ca2284ce 100644 --- a/docs/CodeOverview.rst +++ b/docs/CodeOverview.rst @@ -16,5 +16,5 @@ UPP Functionalities: relative humidity). A full list of fields that can be generated by the UPP is provided in :doc:`UPP_GRIB2_Table`. - - Outputs the results in NWS and WMO standard GRIB2 format (see `Grib documentation - `_). + - Outputs the results in NWS and WMO standard GRIB2 format (see + `Grib documentation `_). diff --git a/docs/Installation.rst b/docs/Installation.rst index 49d4b7a15..579015ccb 100644 --- a/docs/Installation.rst +++ b/docs/Installation.rst @@ -24,17 +24,10 @@ An introduction of each can be found in their respective top level :bolditalic:` Detailed instructions for building the libraries on various platforms can be found in the repository **NCEPLIBS-external/doc** directory. -Certain machines do have the NCEP libraries in a pre-installed location for use to build UPP. - -+---------------+----------------------+--------------------------------------------------------------------------------+ -| System | Compiler and Version | Directory where NCEPLIBS-external and NCEPLIBS are installed in | -+===============+======================+================================================================================+ -| NCAR Cheyenne | Intel 19.1.1 | /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/intel-19.1.1/mpt-2.19 | -| +----------------------+--------------------------------------------------------------------------------+ -| | GNU 9.1.0 | /glade/p/ral/jntp/GMTB/tools/NCEPLIBS-ufs-v2.0.0/gnu-9.1.0/mpt-2.19 | -+---------------+----------------------+--------------------------------------------------------------------------------+ -| NOAA Hera | Intel 18.0.5.274 | /scratch1/BMC/gmtb/software/NCEPLIBS-ufs-v2.0.0/intel-18.0.5.274/impi-2018.0.4 | -+---------------+----------------------+--------------------------------------------------------------------------------+ +Certain machines do have the NCEP libraries in a pre-installed location for use to build UPP. Paths to +these pre-installed libraries are available on the +`UFS-SRW wiki `_ +and include platform name and compiler version. ============================ Obtaining and Installing UPP diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 9984a0bb3..21c91d1e5 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -10,3 +10,13 @@ td { word-break: break-all; } + +table.align-default { + margin-left: 0px; + margin-right: auto; +} + +table.align-center { + margin-left: 0px; + margin-right: auto; +} From 68be84cbb8453e078b5f97905a1910badd23e7fe Mon Sep 17 00:00:00 2001 From: Tracy Date: Thu, 3 Dec 2020 16:47:15 -0700 Subject: [PATCH 20/33] Adding advanced documentation on how to add a new variable --- docs/AddNewVariable.rst | 266 ++++++++++++++++++---------------------- docs/index.rst | 1 + 2 files changed, 117 insertions(+), 150 deletions(-) diff --git a/docs/AddNewVariable.rst b/docs/AddNewVariable.rst index d0477271b..e4aa45337 100644 --- a/docs/AddNewVariable.rst +++ b/docs/AddNewVariable.rst @@ -58,66 +58,67 @@ with examples in the sections below. *These files are used for controlling which fields are output by UPP for grib2.* -**Example Procedure: Steps for adding the new variable ‘ACLHF’** +**Example Procedure: Steps for adding a new variable ‘TG3’** -- This example illustrates a new variable from the WRF output that will be read into UPP - and directly output into the grib output files (i.e. no additional computations/calculations +- This example illustrates adding a new variable from GFS output that will be read into UPP + and directly output into the Grib2 output files (i.e. no additional computations/calculations are needed for the field). -- Additions to each of the routines are highlighted in green. +- Additions to each of the routines are highlighted. - Locations of routines are in /EMC_post/sorc/ncep_post.fd unless specified otherwise. -- A sample wrfout file for the following procedures is available for download from: +- Sample GFS files for the following procedures are available for download from: - https://dtcenter.org/sites/default/files/community-code/AddNewVariableData.tar.gz - - This data is the 6-hr forecast of a WRF initialization of 2009-12-17_12:00:00 + - This data is the 6-hr forecast of a GFS initialization of 2019-06-15_00:00:00 + - The new variable, TG3, added in this example is found in the sfcf006.nc; however, both the sfcf006.nc + and atmf006.nc output files are required to run UPP for GFS. + - TG3 is the averaged climatology of surface temperature, which the LSMs use to specify bottom soil T, + where the depth of the bottom is LSM dependent. For this example, a depth of 500cm is used. New variable to add:: - float ACLHF(Time, south_north, west_east) ; - ACLHF:FieldType = 104 ; - ACLHF:MemoryOrder = "XY" ; - ACLHF:description = "ACCUMULATED UPWARD LATENT HEAT FLUX AT THE SURFACE" ; - ACLHF:units = "J m-2" ; - ACLHF:stagger = "" ; - ACLHF:coordinates = "XLONG XLAT" ; + float tg3(time, grid_yt, grid_xt) ; + tg3:long_name = "deep soil temperature" ; + tg3:units = "K" ; + tg3:missing_value = 9.99e+20 ; + tg3:cell_methods = "time: point" ; + tg3:output_file = "sfc" ; 1. Allocate the new variable in ALLOCATE_ALL.f This file is the instantiation or allocation of the variable. Note that the variables are defined based on the parallel processing capability of UPP - use an example from the file. User Procedure - - Add in VRBLS2D section as: + - Add in VRBLS2D GFS section as: :: - allocate(aclhf(im,jsta_2l:jend_2u)) + allocate(tg3(im,jsta_2l:jend_2u)) 2. De-allocate the variable to give the resources back in DEALLOCATE.f All good programmers give back their resources when they are done. Please update this - routine to return your resource to the system. + routine to return your resources to the system. User procedure - - Add as: + - Add in VRBLS2D GFS section as: :: - deallocate(aclhf) + deallocate(tg3) 3. Declare the new variable in the appropriate file depending on its dimensions; VRBLS2D_mod.f, VRBLS3D_mod.f or VRBLS4D_mod.f User procedure - - ACLHF is a 2-dimensional field, so declare it in VRBLS2D_mod.f - - Add to the end of the first section of allocations as: + - tg3 is a 2-dimensional field, so declare it in VRBLS2D_mod.f + - Add to the GFS section for adding new fields as: :: - ACLHF(:,:) + tg3(:,:) 4. List the new variable in RQSTFLD.F which includes a list of all possible fields to be output by - UPP, as well as the corresponding key-word character string the user places in wrf_cntrl.parm - file, the UPP ID for internal code, and grib IDs. Be sure to pick a unique identifier that is not - already used for the new variable. The unique identifier or index are typically assigned in groups - Hopefully a community area will be added in the future or a defined method to avoid overwriting - others values. Right now using 900's for community contributions. + UPP, as well as the corresponding UPP ID for internal code, variable character stings, and grib IDs. + Be sure to pick a unique identifier that is not already used for the new variable. Right now, the + 900's are being used for community contributions. Example Entry @@ -129,56 +130,55 @@ with examples in the sections below. Where: - **IFILV** Identifies field as MASS/VELOCITY point (e.g. 1) - - **AVBL** is the model output character string variable name for grib1 (e.g. MODEL SFC V WIND STR) + - **AVBL** is the model output character string variable name for Grib1 (e.g. MODEL SFC V WIND STR) - **IQ** is the GRIB PDS OCTET 9 (table 2) - Indicator of parameter and units (e.g. 125) - **IS** is the GRIB PDS OCTET 10 (table 3&3a) - Indicator of type of level or layer (e.g. 001) - - **AVBLGRB2** is the model output character string variable name for grib2 (e.g. V_FLX ON surface) + - **AVBLGRB2** is the model output character string variable name for Grib2 (e.g. V_FLX ON surface) - A UNIQUE array location UPP uses to store this variable in parallel arrays (e.g. **901**) User procedure - - A latent heat flux variable (LHTFL) was found in the GRIB1 parameter tables, so add a - new unused parameter number (237) using Table 130 to define the new field. + - Soil temperature (TSOIL) is found in the Grib1 parameter tables as parameter number 085, so this + can be used for the Grib1 ID. http://www.nco.ncep.noaa.gov/pmb/docs/on388/table2.html - - Use level type surface, which is 001 + - Use level type 'depth below land surface', which is 111. http://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html - Add as: :: - DATA IFILV(950),AVBL(950),IQ(950),IS(950),AVBLGRB2(950) & - & /1,'ACC SFC LAT HEAT FX ',237,001, & - & 'ACC LHTFL ON surface '/ !Table 130 + DATA IFILV(979),AVBL(979),IQ(979),IS(979),AVBLGRB2(979) & + & /1,'DEEP SOIL TMP',085,111, & + & 'DEEP TSOIL ON depth_bel_land_sfc'/ + + .. note:: + Since Grib1 is no longer supported, the variable character strings and Grib IDs for Grib1 are not + important, but still need to be included here for correct formatting. -5. Read the model output field from the wrfout file by adding the new variable into INITPOST.F - This file is used for reading the WRF-ARW model output files in netcdf format. +5. Read the field from the GFS model output file by adding the new variable into INITPOST_GFS_NETCDF.f. + This file is used for reading the GFS model output files in netcdf format. User procedure - - Add using the 2D variable SNDEPAC (snowfall accumulation), which is also a 2D - surface based accumulation field, as a template by following it through the routine. - Add to top section of the routine in ‘use vrbls2d’ to initiate the new variable as: :: - aclhf + tg3 - - Read in the new variable as: + - Read in the new variable in the section 'start reading 2D netcdf file' using another 2D variable + as an example, such as 'hpbl'. Add as: :: - VarName='ACLHF' - call getVariable(fileName,DateStr,DataHandle,VarName,DUMMY, & - IM,1,JM,1,IM,JS,JE,1) - do j = jsta_2l, jend_2u - do i = 1, im - ACLHF ( i, j ) = dummy ( i, j ) - end do - end do + ! deep soil temperature + VarName='tg3' + call read_netcdf_2d_scatter(me,ncid2d,1,im,jm,jsta,jsta_2l & + ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName,tg3) 6. Determine the correct routine to add the new variable to (e.g. SURFCE.f, MDLFLD.f, MDL2P.f, etc). You will need to determine the correct routine to add your field into; this is the - place that you will fill the array with the data and call gribit to output the field. The correct routine - will depend on what your field is. For example, if you have a new diagnostic called foo, and you - want it interpolated to pressure levels, you would need to add it to MDL2P.f. If foo was only a + place that you will fill the array with the data and output the field. The correct + routine will depend on what your field is. For example, if you have a new diagnostic called foo, and + you want it interpolated to pressure levels, you would need to add it to MDL2P.f. If foo was only a surface variable, you would add it to SURFCE.f. If you wanted foo on native model levels, you would add it to MDLFLD.f. If you’re not sure which routine to add the new variable to, choose a similar variable as a template. @@ -187,72 +187,37 @@ with examples in the sections below. be required. User procedure - - Treat ACLHF like a surface field (SURFCE.f) - - Using the variable SNDEPAC (accumulated depth of snowfall) as a template which is - also an accumulated field that is just being read through and output, similar to what we - want. - - Add in top section in ‘use vrbls2d, only’ to initiate the new variable as: + - Treat tg3 like a surface field (SURFCE.f), similar to the other soil fields. + - Use another 2D variable, such as 'SNOW WATER EQUIVALENT' as a template. This variable is also + being read through and output, similar to what we want. + - Add to top section in ‘use vrbls2d, only’ to initiate the new variable as: :: - aclhf + tg3 - - Add in main section using the template variable as a guide. - - Note that ID(02), which is the ID for table version number, is added and set to 130. - This is the table that we are adding the new variable to. - - The block of code within the '--' is for metadata for the accumulation field being added - in this example and is not needed unless an accumulated type field is being added. - For example, for an instantaneous field, you would not need that block. + - Add in main section using a template variable as a guide. :: - - ! ACCUM UPWARD LATENT HEAT FLUX AT SURFACE - IF (IGET(950).GT.0) THEN - ID(1:25) = 0 - ID(02) = 130 - !----------------------------------------------------------- - ITPREC = NINT(TPREC) - !mp - IF(ITPREC .NE. 0) THEN - IFINCR = MOD(IFHR,ITPREC) - IF(IFMIN .GE. 1)IFINCR = MOD(IFHR*60+IFMIN,ITPREC*60) - ELSE - IFINCR = 0 - ENDIF - !mp - ID(18) = 0 - ID(19) = IFHR - IF(IFMIN .GE. 1)ID(19)=IFHR*60+IFMIN - ID(20) = 4 - IF (IFINCR.EQ.0) THEN - ID(18) = IFHR-ITPREC - ELSE - ID(18) = IFHR-IFINCR - IF(IFMIN .GE. 1)ID(18)=IFHR*60+IFMIN-IFINCR - ENDIF - IF (ID(18).LT.0) ID(18) = 0 - !----------------------------------------------------------- - if(grib=='grib1') then - DO J=JSTA,JEND - DO I=1,IM - GRID1(I,J) = ACLHF(I,J) - ENDDO - ENDDO - CALL GRIBIT(IGET(950),LVLS(1,IGET(950)), GRID1,IM,JM) - elseif(grib=='grib2') then - cfld=cfld+1 - fld_info(cfld)%ifld=IAVBLFLD(IGET(950)) - fld_info(cfld)%ntrange=1 - fld_info(cfld)%tinvstat=IFHR-ID(18) - !$omp parallel do private(i,j,jj) - do j=1,jend-jsta+1 - jj = jsta+j-1 - do i=1,im - datapd(i,j,cfld) = ACLHF(i,jj) - enddo + ! DEEP SOIL TEMPERATURE + IF ( IGET(979).GT.0 ) THEN + ID(1:25) = 0 + If(grib=='grib2') then + cfld=cfld+1 + fld_info(cfld)%ifld=IAVBLFLD(IGET(979)) + !$omp parallel do private(i,j,jj) + do j=1,jend-jsta+1 + jj = jsta+j-1 + do i=1,im + datapd(i,j,cfld) = TG3(i,jj) enddo - endif - ENDIF + enddo + endiF + ENDIF + + .. note:: + Since Grib1 is no longer supported, the if-statement for filling the grid for this output type is + removed here and is only filled for Grib2 output. 7. Add the new variable to /EMC_post/parm/params_grib2_tbl_new. For all current UPP output fields, this table lists, in order, the: @@ -264,30 +229,32 @@ with examples in the sections below. - Abbreviated Variable Name (from the parameters table) User Procedure - - Since there is already a latent heat flux (LHTFL) parameter in this table, create a new - Latent Heat Flux parameter so as to not overwrite the current one, just in case you want - both to be output - - Latent heat flux is a meteorological field (discipline=0) - - Latent heat flux is a temperature product (category=0) - - Pick an unused parameter number from the table defined by discipline=0 and + - Here we could just use TSOIL, which is already in the table; howerver, instead we will add this + using a new name, TG3, to demonstrate this step. + - TG3 is a land surface product (discipline=2) + - TG3 is a vegetation/biomass product (category=0) + - Pick an unused parameter number from the table defined by discipline=2 and category=0 (Table 4.2-0-0: http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4- - 2-0-0.shtml). In this case, the unused parameter number 205 was chosen. + 2-0-0.shtml). The parameter number should not be in use in table 4.2 or the current + params_grib2_tbl_new. In this case, the unused parameter number 231 was chosen. - Add using the NCEP local table (table=1) - - Choose an abbreviated parameter name to describe your field (e.g. ACLHF) + - Choose an abbreviated parameter name to describe your field (e.g. TG3) - Add as: :: - 0 0 205 1 ACLHF + 2 0 231 1 TG3 8. Add the new variable to the /EMC_post/parm/post_avblflds.xml, which lists all fields available - for output in GRIB2 format. + for output in GRIB2 format. This file is generally not modified unless adding a new field or + modifying an existing one. - Post_avblfldidx: the unique array number given in the RQSTFLD.f routine. - Shortname: name describing the variable and level type - - Pname: the abbreviation for your variable + - Pname: the abbreviation for your variable (should match what is used in params_grib2_tbl_new) - Table info: table used if not standard WMO - Fixed_sfc1_type: level type - - Scale: precision of data written out to grib2 file + - Level: Generally only used here if it's a fixed level specific to the variable (e.g. T2m, TSOIL5m) + - Scale: precision of data written out to Grib2 file User procedure - Add as: @@ -295,17 +262,18 @@ with examples in the sections below. :: - 950 - ACC_LATENT_HEAT_FLUX_ON_SURFACE - ACLHF + 979 + DEEP_TSOIL_ON_DEPTH_BEL_LAND_SFC + TG3 + depth_bel_land_sfc NCEP - surface - 4.0 + 500. + 3.0 -9. Add the new variable to the /EMC_post/parm/postcntrl.xml file, which lists all fields and levels - you wish to output for GRIB2. Remake the /UPPV4.1/parm/postxconfig-NT.txt file, which - contains the information from the xml that UPP reads. +9. Add the new variable to the /EMC_post/parm/postcntrl_gfs.xml file, which lists all fields and levels + you wish to output for GRIB2. Remake the /EMC_post/parm/postxconfig-NT-GFS.txt file, which is read by + UPP and contains the information from the xml. - See the User’s guide on steps for creating the text control file User procedure @@ -314,39 +282,37 @@ with examples in the sections below. :: - ACC_LATENT_HEAT_FLUX_ON_SURFACE - ACLHF + DEEP_TSOIL_ON_DEPTH_BEL_LAND_SFC 4.0 -10. Run clean on the code and recompile the code to include the changes before running your - UPP run script. +10. Build or rebuild the code to include the changes before running your UPP run script. - User procedure + User procedure IF you already have the code built. Otherwise, see the User's Guide for instructions + on building. :: - >> ./clean -a - >> ./configure - >> ./compile >& compile.log & + >> cd EMC_post/build + >> make install -11. Assuming the modified code compiled successfully and you were able to produce grib - output, you can check the grib file for your new variable. +11. Assuming the modified code built successfully and you were able to produce Grib2 + output, you can check the Grib2 file for your new variable. GRIB2 output of the new variable from this example procedure (using the wgrib2 utility if available on your system). - The new variable will not be defined by the variable name. Instead it will be defined - using the grib2 parameter information you entered into params_grib2_tbl_new from + using the Grib2 parameter information you entered into params_grib2_tbl_new from step 7 of this procedure. :: - 456:43204412:vt=2009121718:surface:6 hour fcst:var discipline=0 center=7 local_table=1 - parmcat=0 parm=205: - ndata=121002:undef=0:mean=1.97108e+06:min=-1.12e+06:max=2.406e+07 - grid_template=30:winds(grid): - Lambert Conformal: (402 x 301) input WE:SN output WE:SN res 8 - Lat1 14.807213 Lon1 231.818604 LoV 258.040009 - LatD 38.270000 Latin1 38.270000 Latin2 38.270000 - LatSP 0.000000 LonSP 0.000000 - North Pole (402 x 301) Dx 15000.000000 m Dy 15000.000000 m mode 8 + wgrib2 -V GFSPRS.006 + + 714:37697079:vt=2019061506:500 m underground:6 hour fcst:var discipline=2 center=7 local_table=1 parmcat=0 parm=231: + ndata=73728:undef=0:mean=278.383:min=215.47:max=302.4 + grid_template=40:winds(N/S): + Gaussian grid: (384 x 192) units 1e-06 input WE:NS output WE:SN + number of latitudes between pole-equator=96 #points=73728 + lat 89.284225 to -89.284225 + lon 0.000000 to 359.062500 by 0.937500 diff --git a/docs/index.rst b/docs/index.rst index 55dbb9e87..c9146cc86 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,4 +11,5 @@ Welcome to the UPP User's Guide Installation Running Regridding + AddNewVariable Acknowledgments From 3375e90296100d8c36fbcd28ed72c3c59103afd8 Mon Sep 17 00:00:00 2001 From: Tracy Date: Fri, 4 Dec 2020 16:54:16 -0700 Subject: [PATCH 21/33] modify User Support link and data download link --- docs/AddNewVariable.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/AddNewVariable.rst b/docs/AddNewVariable.rst index e4aa45337..df294f01f 100644 --- a/docs/AddNewVariable.rst +++ b/docs/AddNewVariable.rst @@ -7,10 +7,11 @@ Please keep in mind it may not be an exhaustive step-by-step depending on your p While we can provide general assistance for adding a new variable, users should be aware that this requires good knowledge of Fortran and thorough understanding of the code. -We encourage users to contact us at upp-help@ucar.edu to make us aware of modifications you are making. -In some cases, if we determine the changes you are making may be relevant for operational and/or -community purposes, we will be interested in incorporating your changes into the code base for support -and future release. We would then work with you to make this possible. +We encourage users to contact us via the UPP `forum `_ +to make us aware of modifications you are making. In some cases, if we determine the changes you are +making may be relevant for operational and/or community purposes, we will be interested in incorporating +your changes into the code base for support and future release. We would then work with you to make this +possible. The following outlines a brief description of the steps to be taken and are described in more detail with examples in the sections below. @@ -65,8 +66,8 @@ with examples in the sections below. are needed for the field). - Additions to each of the routines are highlighted. - Locations of routines are in /EMC_post/sorc/ncep_post.fd unless specified otherwise. -- Sample GFS files for the following procedures are available for download from: - - https://dtcenter.org/sites/default/files/community-code/AddNewVariableData.tar.gz +- Sample GFS files for the following procedures are available for download + `here `_. - This data is the 6-hr forecast of a GFS initialization of 2019-06-15_00:00:00 - The new variable, TG3, added in this example is found in the sfcf006.nc; however, both the sfcf006.nc and atmf006.nc output files are required to run UPP for GFS. @@ -199,6 +200,7 @@ with examples in the sections below. - Add in main section using a template variable as a guide. :: + ! DEEP SOIL TEMPERATURE IF ( IGET(979).GT.0 ) THEN ID(1:25) = 0 From 9d68943b72b17197ddc74d8471713a10e1d59ca9 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 20:45:33 -0700 Subject: [PATCH 22/33] Update wgrib2 output, links to grib table descriptions --- docs/AddNewVariable.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/AddNewVariable.rst b/docs/AddNewVariable.rst index df294f01f..b8681d9ae 100644 --- a/docs/AddNewVariable.rst +++ b/docs/AddNewVariable.rst @@ -223,9 +223,9 @@ with examples in the sections below. 7. Add the new variable to /EMC_post/parm/params_grib2_tbl_new. For all current UPP output fields, this table lists, in order, the: - - Discipline (http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table0-0.shtml) - - Category (http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-1.shtml) - - Parameter Number (http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2.shtml) + - Discipline (https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table0-0.shtml) + - Category (https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-1.shtml) + - Parameter Number (https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2.shtml) - Table information (0 for parameters from the WMO table; 1 for parameters from the local NCEP table) - Abbreviated Variable Name (from the parameters table) @@ -236,8 +236,8 @@ with examples in the sections below. - TG3 is a land surface product (discipline=2) - TG3 is a vegetation/biomass product (category=0) - Pick an unused parameter number from the table defined by discipline=2 and - category=0 (Table 4.2-0-0: http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4- - 2-0-0.shtml). The parameter number should not be in use in table 4.2 or the current + category=0 (Table 4.2-0-0: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-2-0.shtml). + The parameter number should not be in use in table 4.2 or the current params_grib2_tbl_new. In this case, the unused parameter number 231 was chosen. - Add using the NCEP local table (table=1) - Choose an abbreviated parameter name to describe your field (e.g. TG3) @@ -311,10 +311,11 @@ with examples in the sections below. wgrib2 -V GFSPRS.006 - 714:37697079:vt=2019061506:500 m underground:6 hour fcst:var discipline=2 center=7 local_table=1 parmcat=0 parm=231: + 716:37731711:vt=2019061506:500 m underground:6 hour fcst:var discipline=2 center=7 local_table=1 parmcat=0 parm=231: ndata=73728:undef=0:mean=278.383:min=215.47:max=302.4 grid_template=40:winds(N/S): Gaussian grid: (384 x 192) units 1e-06 input WE:NS output WE:SN number of latitudes between pole-equator=96 #points=73728 lat 89.284225 to -89.284225 lon 0.000000 to 359.062500 by 0.937500 + From bcf8e7823185fa4b3c9e636b3777d099aa2cbcf9 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 21:26:53 -0700 Subject: [PATCH 23/33] Try inter-chapter link --- docs/AddNewVariable.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/AddNewVariable.rst b/docs/AddNewVariable.rst index b8681d9ae..27b346295 100644 --- a/docs/AddNewVariable.rst +++ b/docs/AddNewVariable.rst @@ -273,10 +273,7 @@ with examples in the sections below. 3.0 -9. Add the new variable to the /EMC_post/parm/postcntrl_gfs.xml file, which lists all fields and levels - you wish to output for GRIB2. Remake the /EMC_post/parm/postxconfig-NT-GFS.txt file, which is read by - UPP and contains the information from the xml. - - See the User’s guide on steps for creating the text control file +9. Add the new variable to the /EMC_post/parm/postcntrl_gfs.xml file, which lists all fields and levels you wish to output for GRIB2. Remake the /EMC_post/parm/postxconfig-NT-GFS.txt file (as described in the section :ref:`Creating the Flat Text File`), which is read by UPP and contains the information from the xml. User procedure - Add as: From a3c26fb9ebb6644b60cc8bccd5b7f4e64b60cb85 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 21:30:14 -0700 Subject: [PATCH 24/33] Another inter-chapter link attempt --- docs/AddNewVariable.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/AddNewVariable.rst b/docs/AddNewVariable.rst index 27b346295..7d60929a3 100644 --- a/docs/AddNewVariable.rst +++ b/docs/AddNewVariable.rst @@ -273,7 +273,7 @@ with examples in the sections below. 3.0 -9. Add the new variable to the /EMC_post/parm/postcntrl_gfs.xml file, which lists all fields and levels you wish to output for GRIB2. Remake the /EMC_post/parm/postxconfig-NT-GFS.txt file (as described in the section :ref:`Creating the Flat Text File`), which is read by UPP and contains the information from the xml. +9. Add the new variable to the /EMC_post/parm/postcntrl_gfs.xml file, which lists all fields and levels you wish to output for GRIB2. Remake the /EMC_post/parm/postxconfig-NT-GFS.txt file (as described in the section :ref:`InputsOutputs:Creating the Flat Text File`), which is read by UPP and contains the information from the xml. User procedure - Add as: From ed9fa29c78f58921f67838eed9a435f495e7c574 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 21:34:02 -0700 Subject: [PATCH 25/33] Need autosectionlabel extension for this to work --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index a57aa1977..81504c537 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,10 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'sphinx.ext.autosectionlabel' ] +autosectionlabel_prefix_document = True +autosectionlabel_maxdepth = 4 # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From 5d23ae7cc11ba40e025b4792a30f33645281eca1 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 21:46:29 -0700 Subject: [PATCH 26/33] Various spelling and format fixes in InputsOutputs --- docs/InputsOutputs.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/InputsOutputs.rst b/docs/InputsOutputs.rst index ce807b70b..58cfff76d 100644 --- a/docs/InputsOutputs.rst +++ b/docs/InputsOutputs.rst @@ -53,7 +53,7 @@ which fields and levels to process. A default control file, :bolditalic:`postxconfig-NT.txt`, is provided and read by the UPP. For users wishing to customize the control file to add or remove fields and/or levels, they may do so by -modyfying the :bolditalic:`postcntrl.xml` and then remaking the text file required by the UPP. +modifying the :bolditalic:`postcntrl.xml` and then remaking the text file as described in the later section :ref:`Creating the Flat Text File`. .. Note:: The control file names :bolditalic:`postxconfig-NT.txt` and :bolditalic:`postcntrl.xml` are generic @@ -84,7 +84,7 @@ isobaric or height levels), the desired levels to be output must be listed (see Controlling which levels the UPP outputs ---------------------------------------- -The tag in the postcntrl.xml is used to list the desired levels for output. The following +The tag in the postcntrl.xml file is used to list the desired levels for output. The following levels are currently available for output: - For isobaric output, 46 levels are possible, from 2 to 1000 hPa (*2, 5, 7, 10, 20, 30, 50, 70 mb and @@ -148,9 +148,9 @@ working directory. These files will include all fields that were requested in th When running UPP stand-alone, the following Grib2 output files will be generated: | **GFS Model**: GFSPRS.HHH - | **LAM (Limeted Area Model)**: BGDAWP.HHH (surface and other 2D fields) and BGRD3D.HHH (model level + | **LAM (Limited Area Model)**: BGDAWP.HHH (surface and other 2D fields) and BGRD3D.HHH (model level fields) -If the run did not complete successfully, a log file in the post-processor working directory called -:bolditalic:`upp.fHHH.out` where :bolditalic:`HHH` is the forecast hour, may be consulted for further -information. +When executed with the provided run script, UPP provides log filesin the post-processor working directory named +:bolditalic:`upp.fHHH.out`, where :bolditalic:`HHH` is the forecast hour. These log files may be consulted for further +run-time information in the event of an error. From 0836819f23526187d9af961ca6e3661846fd4be4 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 21:51:47 -0700 Subject: [PATCH 27/33] Minor updates to Installation chapter --- docs/Installation.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/Installation.rst b/docs/Installation.rst index 579015ccb..85daf2b91 100644 --- a/docs/Installation.rst +++ b/docs/Installation.rst @@ -20,9 +20,8 @@ available on your system. These libraries include: - The NCEP libraries https://github.com/NOAA-EMC/NCEPLIBS -An introduction of each can be found in their respective top level :bolditalic:`README.md` file. -Detailed instructions for building the libraries on various platforms can be found in the repository -**NCEPLIBS-external/doc** directory. +An introduction of each can be found in their respective top level :bolditalic:`README.md` files. +Detailed instructions for building the libraries on various platforms can be found in the **NCEPLIBS-external/doc** directory. Certain machines do have the NCEP libraries in a pre-installed location for use to build UPP. Paths to these pre-installed libraries are available on the @@ -55,7 +54,7 @@ EMC_post. where, ``release-tag-name`` is the release tag you wish to clone (e.g. for stand-alone UPP version 9, use the release tag :bolditalic:`upp_v9.0.0`). -Move into the top level UPP directory and create and move into the build directory. Build the UPP code. +Move into the top level UPP directory and create and move into the build directory. Then build the UPP code using the cmake utility. The path ``INSTALL_PREFIX`` should point to the location of the pre-installed NCEP libraries. .. code-block:: console @@ -87,8 +86,8 @@ tar file. .. note:: To make a clean build, simply remove both the **/build** directory and the :bolditalic:`bin/ncep_post` executable and then re-create the build from step #2. This is - recommended if a mistake is made during the installation process or if a change is made to the build - environment or UPP code. + recommended if a mistake is made during the installation process. If a simple change is made to the code, + you can simply type :bolditalic:`make install` again in the pre-existing build directory. ======================= UPP Directory Structure @@ -101,7 +100,7 @@ directory that exists only after the build is complete): | **build**: Contains the UPP build - | **include***: Source include modules built/used during compilation of UPP + | **include***: Contains include modules built/used during compilation of UPP | **lib***: Libraries built/used by UPP that are separate from NCEPlibs From 9effad503b870865af6ce54a4b95d6048148c2bf Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 22 Feb 2021 21:56:48 -0700 Subject: [PATCH 28/33] Some more minor changes --- docs/InputsOutputs.rst | 2 +- docs/Running.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/InputsOutputs.rst b/docs/InputsOutputs.rst index 58cfff76d..9a028d044 100644 --- a/docs/InputsOutputs.rst +++ b/docs/InputsOutputs.rst @@ -151,6 +151,6 @@ When running UPP stand-alone, the following Grib2 output files will be generated | **LAM (Limited Area Model)**: BGDAWP.HHH (surface and other 2D fields) and BGRD3D.HHH (model level fields) -When executed with the provided run script, UPP provides log filesin the post-processor working directory named +When executed with the provided run script, UPP provides log files in the post-processor working directory named :bolditalic:`upp.fHHH.out`, where :bolditalic:`HHH` is the forecast hour. These log files may be consulted for further run-time information in the event of an error. diff --git a/docs/Running.rst b/docs/Running.rst index 17233f05b..ed42901b3 100644 --- a/docs/Running.rst +++ b/docs/Running.rst @@ -117,9 +117,9 @@ Run Script Overview Upon a successful run, UPP will generate output files for each forecast hour in the **/postprd** directory. -If the run did not complete successfully, a log file in the **/postprd** directory called -:bolditalic:`upp.fhhh.out` where :bolditalic:`"hhh"` is the forecast hour, may be consulted for further -information. +When executed with the provided run script, UPP provides log files in the post-processor working directory named +:bolditalic:`upp.fHHH.out`, where :bolditalic:`HHH` is the forecast hour. These log files may be consulted for further +run-time information in the event of an error. .. note:: FV3 output is on a Guassian grid. To interpolate to a lat/lon or other projection, use wgrib2 (see From a80521d8d0c08552192ad823435a4b42e932cb94 Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Fri, 9 Apr 2021 10:03:19 -0600 Subject: [PATCH 29/33] Update CMakeModules --- CMakeModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules b/CMakeModules index 8aaef34fa..09ff76f1f 160000 --- a/CMakeModules +++ b/CMakeModules @@ -1 +1 @@ -Subproject commit 8aaef34fa720212cf14fe50e3f959ac8036bf388 +Subproject commit 09ff76f1f69ecaab97c59782fc718c124c174dfb From 388fac2cb0809a4dc5445d48dace27a472e4589e Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Fri, 9 Apr 2021 10:13:48 -0600 Subject: [PATCH 30/33] remove duplicate cldfra variable accidently added in merge --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 1bb81c706..056c8ff35 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -1091,16 +1091,6 @@ SUBROUTINE INITPOST_NETCDF(ncid3d) print*,'tprec = ',tprec -! instantaneous 3D cloud fraction - VarName='cldfra' -! do l=1,lm - call read_netcdf_3d_scatter(me,ncid2d,1,im,jm,jsta,jsta_2l & - ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName & - ,lm,cfr(1,jsta_2l,1)) -! if(debugprint)print*,'sample ',VarName,'isa,jsa,l =' & -! ,cfr(isa,jsa,l),isa,jsa,l -! enddo - ! instantaneous 3D cloud fraction VarName='cldfra' ! do l=1,lm From 54c0d0b6255d3928357b208c89754a15e387623f Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Mon, 12 Apr 2021 09:54:44 -0600 Subject: [PATCH 31/33] Documentation updates for GNU version and minor syntax fix. --- docs/Installation.rst | 1 + docs/Regridding.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Installation.rst b/docs/Installation.rst index 85daf2b91..90dcc75d2 100644 --- a/docs/Installation.rst +++ b/docs/Installation.rst @@ -40,6 +40,7 @@ Building and running UPP V9.0.0 has been tested on the following platforms using | NCAR Cheyenne | Intel 19.1.1 | | +----------------------+ | | GNU 9.1.0 | +| | GNU 10.1.0 | +---------------+----------------------+ | NOAA Hera | Intel 18.0.5.274 | +---------------+----------------------+ diff --git a/docs/Regridding.rst b/docs/Regridding.rst index 148181d91..c41f96b46 100644 --- a/docs/Regridding.rst +++ b/docs/Regridding.rst @@ -10,7 +10,7 @@ examples. for various user-defined grids as well as pre-defined NCEP grids. Complete documentation with examples of re-gridding for all available grid definitions can be found at: -http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/new_grid.html. +http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/new_grid.html .. _Examples-of-wgrib2 From 517dae2b2f05f8c9cab44060e328bcc9ba74f3db Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Mon, 12 Apr 2021 12:59:40 -0600 Subject: [PATCH 32/33] Revert module files for Odin and Stampede per ywangwof since build env is handled at app level for these machines --- modulefiles/post/v8.0.0-odin | 82 ++++++++++++++++++++------------ modulefiles/post/v8.0.0-stampede | 58 ++++++++++------------ 2 files changed, 77 insertions(+), 63 deletions(-) diff --git a/modulefiles/post/v8.0.0-odin b/modulefiles/post/v8.0.0-odin index 6c8eca1ad..cde6d1d3b 100644 --- a/modulefiles/post/v8.0.0-odin +++ b/modulefiles/post/v8.0.0-odin @@ -1,12 +1,14 @@ #%Module###################################################################### ############################################################# -## NSSL -## post v8.0.0 +## Lin.Gan@noaa.gov +## EMC +## post v7.0.0 +## Wen Meng 07/2018: set post to v8.0.0 for fv3gfs ############################################################# proc ModulesHelp { } { - puts stderr "Set environment veriables for post" - puts stderr "This module initializes the users environment" - puts stderr "to build the post for WCOSS production.\n" +puts stderr "Set environment veriables for post" +puts stderr "This module initializes the users environment" +puts stderr "to build the post for WCOSS production.\n" } module-whatis "post" @@ -22,39 +24,59 @@ module load cray-libsci module load cray-netcdf-hdf5parallel module load cray-parallel-netcdf module load cray-hdf5-parallel -module load gcc/8.3.0 +module load gcc/6.1.0 module load slurm # Loding nceplibs modules -module use -a /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/modules -module load sigio -module load sfcio -module load nemsio -module load bacio -#module load g2 -module load gfsio -module load ip -module load sp -module load w3emc -module load w3nco -module load crtm -module load g2 -module load g2tmpl -module load wrf_io - -setenv SIGIO_INC4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sigio-2.3.2/include -setenv GFSIO_INC4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/gfsio-1.4.1/include -setenv SFCIO_INC4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sfcio-1.4.1/include - -setenv GFSIO_LIB4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/gfsio-1.4.1/lib/libgfsio.a -setenv SIGIO_LIB4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sigio-2.3.2/lib/libsigio.a -setenv SFCIO_LIB4 /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/sfcio-1.4.1/lib/libsfcio.a -setenv WRFIO_LIB /oldscratch/ywang/external/NCEPLIBS_SRWv2.0/wrf_io-1.1.1/lib/libwrf_io.a +module use -a /oldscratch/ywang/external/modulefiles +module load sigio/v2.0.1 +#module load jasper/v1.900.1 +#module load png/v1.2.44 +#module load z/v1.2.6 +module load sfcio/v1.0.0 +module load nemsio/v2.2.2 +module load bacio/v2.0.2 +#module load g2/v2.5.2 +#module load xmlparse/v2.0.0 +module load gfsio/v1.1.0 +module load ip/v3.0.0 +module load sp/v2.0.2 +module load w3emc/v2.3.0 +module load w3nco/v2.0.6 +module load crtm/v2.2.5 +module load g2/v3.1.0 +module load g2tmpl/v1.5.0 +module load wrfio/1.1.1 +#module load netcdf/3.6.3 +#module load netcdf/4.6.1 setenv NETCDF /opt/cray/pe/netcdf-hdf5parallel/4.6.3.2/INTEL/19.0 setenv JASPER_LIB "-ljasper" setenv PNG_LIB "-lpng" +#setenv NCEPLIBS /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib + +#module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/modulefiles +#module load g2tmpl-intel/1.5.0 + +#module use /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/modulefiles +#module load wrf-io-v1.1.1 +# +#setenv WRFIO_LIB /mnt/lfs3/projects/hfv3gfs/gwv/ljtjet/lib/wrf.post.lib/v1.1.1/lib/wrf_io/libwrfio_nf.a + + +#set dlib /mnt/lfs3/projects/hfv3gfs/gwv/ltmp2/lib/g2/v3.1.0/ +#set bname "G2" +# +### Export environment variables +#setenv ${bname}_SRC $dlib/src +#setenv ${bname}_INC4 $dlib/intel/include/g2_v3.1.0_4 +#setenv ${bname}_INCd $dlib/intel/include/g2_v3.1.0_d +#setenv ${bname}_LIB4 $dlib/intel/libg2_v3.1.0_4.a +#setenv ${bname}_LIBd $dlib/intel/libg2_v3.1.0_d.a +#setenv ${bname}_VER v3.1.0 + +#setenv WRFPATH /mnt/lfs3/projects/hfv3gfs/nwprod/wrf_shared.v1.1.0/ setenv myFC ftn setenv OPENMP "-qopenmp" setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp -target-cpu=x86-64" diff --git a/modulefiles/post/v8.0.0-stampede b/modulefiles/post/v8.0.0-stampede index 1502090eb..95ad14a5c 100644 --- a/modulefiles/post/v8.0.0-stampede +++ b/modulefiles/post/v8.0.0-stampede @@ -1,14 +1,15 @@ #%Module###################################################################### ############################################################# -## NSSL -## post v8.0.0 +## Lin.Gan@noaa.gov +## EMC +## post v7.0.0 +## Wen Meng 07/2018: set post to v8.0.0 for fv3gfs ############################################################# proc ModulesHelp { } { - puts stderr "Set environment veriables for post" - puts stderr "This module initializes the users environment" - puts stderr "to build the post for WCOSS production.\n" +puts stderr "Set environment veriables for post" +puts stderr "This module initializes the users environment" +puts stderr "to build the post for WCOSS production.\n" } - module-whatis "post" set ver v8.0.0 @@ -21,32 +22,23 @@ module load parallel-netcdf/4.6.2 module load phdf5/1.10.4 # Loding nceplibs modules -# DH* todo - shared directory -module use -a /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/modules -# *DH -module load bacio/2.4.0 -module load crtm/2.3.0 -module load g2/3.4.0 -module load g2tmpl/1.9.0 -module load ip/3.3.0 -module load nemsio/2.5.1 -module load sp/2.3.0 -module load w3emc/2.7.0 -module load w3nco/2.4.0 - -module load gfsio/1.4.0 -module load sfcio/1.4.0 -module load sigio/2.3.0 -module load wrf_io/1.1.1 - -setenv SIGIO_INC4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sigio-2.3.0/include -setenv GFSIO_INC4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/gfsio-1.4.0/include -setenv SFCIO_INC4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sfcio-1.4.0/include - -setenv GFSIO_LIB4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/gfsio-1.4.0/lib/libgfsio.a -setenv SIGIO_LIB4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sigio-2.3.0/lib/libsigio.a -setenv SFCIO_LIB4 /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/sfcio-1.4.0/lib/libsfcio.a -setenv WRFIO_LIB /work/06146/tg854455/stampede2/ufs-stack-20200728/intel-18.0.2/impi-18.0.2/wrf_io-1.1.1/lib/libwrf_io.a +#module use -a /mnt/lfs3/projects/hfv3gfs/nwprod/lib/modulefiles +module use -a /work/00315/tg455890/stampede2/external/modulefiles +module load sigio/v2.1.0 +module load sfcio/v1.0.0 +module load nemsio/v2.2.3 +module load bacio/v2.0.2 +#module load g2/v2.5.2 +#module load xmlparse/v2.0.0 +module load gfsio/v1.1.0 +module load ip/v3.0.0 +module load sp/v2.0.2 +module load w3emc/v2.3.0 +module load w3nco/v2.0.6 +module load crtm/v2.2.3 +module load g2/v3.1.0 +module load g2tmpl/v1.6.0 +module load wrfio/1.1.1 setenv NETCDF /opt/apps/intel18/netcdf/4.6.2/x86_64 setenv JASPER_LIB "-ljasper" @@ -58,5 +50,5 @@ setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenm # #setenv myFCFLAGS "-O0 -convert big_endian -fp-model source -openmp -g -check all -ftrapuv -fp-stack-check -fstack-protector -heap-arrays -recursive -traceback" -setenv myCPP /lib/cpp +setenv myCPP /lib/cpp setenv myCPPFLAGS "-P" From cf5b92163cef7d88f2272ba78944acbdf5a7112d Mon Sep 17 00:00:00 2001 From: Kate Fossell Date: Mon, 19 Apr 2021 13:47:29 -0600 Subject: [PATCH 33/33] remove extraneous conflict HEAD line --- parm/makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/parm/makefile b/parm/makefile index 0709a7c68..d06ab47ea 100644 --- a/parm/makefile +++ b/parm/makefile @@ -144,5 +144,4 @@ $(RTMA3DFLATFILENAME): $(RTMA3DXMLS) clean: @echo @echo '==== CLEAN ===================================================' -<<<<<<< HEAD /bin/rm -f $(GFSFLATFILENAME) $(GFSGOESFLATFILENAME) $(GFSANLFLATFILENAME) $(GFSF00FLATFILENAME) $(NMMFLATFILENAME) $(NGACFLATFILENAME) $(GEFSFLATFILENAME) $(GEFSANLFLATFILENAME) $(GEFSF00FLATFILENAME) $(FV3LAMFLATFILENAME) $(HAFSFLATFILENAME) $(GFSTWOFLATFILENAME) $(GFSTWOF00FLATFILENAME) $(HRRRFLATFILENAME) $(RAPFLATFILENAME) $(RTMA3DFLATFILENAME)