UPP (develop)
Loading...
Searching...
No Matches
GFSPOSTSIG.F File Reference

RTSIG reads a sigma file and transforms the fields to a designated global grid. More...

Go to the source code of this file.

Functions/Subroutines

subroutine getomega (jcap, nc, km, idvc, idvm, idrt, idsl, nvcoord, vcoord, lonb, latb, ijn, j1, j2, jc, sd, sps, psi, ti, ui, vi, wi, pm, pd)
 Computes omega.
 
subroutine modstuff (km, idvc, idsl, nvcoord, vcoord, ps, psx, psy, d, u, v, pi, pm, om)
 Computes model coordinate dependent functions.
 
subroutine modstuff2 (im, ix, km, idvc, idsl, nvcoord, vcoord, ps, psx, psy, d, u, v, pi, pm, om, me)
 Computes model coordinate dependent functions.
 
subroutine rtsig (lusig, head, k1, k2, kgds, ijo, levs, ntrac, jcap, lnt2, me, h, p, px, py, t, u, v, d, trc, iret)
 Reads and transforms a sigma file.
 
subroutine trssc (jcap, nc, km, ntrac, idvc, idvm, idsl, nvcoord, vcoord, cpi, idrt, lonb, latb, ijl, ijn, j1, j2, jc, chgq0, szs, sps, st, sd, sz, sq, gfszs, gfsps, gfsp, gfsdp, gfst, gfsu, gfsv, gfsq, gfsw)
 Transforms sigma spectral fields to grid.
 

Detailed Description

RTSIG reads a sigma file and transforms the fields to a designated global grid.

Program History Log

Date Programmer Comments
1999-10-18 Mark Iredell Initial
2013-04-19 Jun Wang Add option to get tmp and ps(in pascal) from enthalpy and ps(cb) option
2013-05-06 Shrinivas Moorthi Initialize midea to 0
2013-05-07 Shrinivas Moorthi Remove mo3, mct, midea and define io3, ict etc correctly and get correct cloud condensate.
2013-08-02 Shrinivas Moorthi Rewrote the whole routine to read the sigma file differently and to read all tracers. Added sptezj for two 2d fields
2014-02-20 Shrinivas Moorthi Modified conversion from spectral to grid taking advantage of threding in SP library. This really speeds up the code. Also threaded loop for Temperature from Tv
Author
Mark Iredell np23
Date
1999-10-18

Definition in file GFSPOSTSIG.F.

Function/Subroutine Documentation

◆ getomega()

subroutine getomega ( integer, intent(in)  jcap,
integer, intent(in)  nc,
integer, intent(in)  km,
integer, intent(in)  idvc,
integer, intent(in)  idvm,
integer, intent(in)  idrt,
integer, intent(in)  idsl,
integer, intent(in)  nvcoord,
real*8, dimension(km+1,nvcoord), intent(in)  vcoord,
integer, intent(in)  lonb,
integer, intent(in)  latb,
integer, intent(in)  ijn,
integer, intent(in)  j1,
integer, intent(in)  j2,
integer, intent(in)  jc,
real, dimension(nc,km), intent(in)  sd,
real, dimension(nc), intent(in)  sps,
real, dimension(ijn), intent(in)  psi,
real, dimension(ijn,km), intent(in)  ti,
real, dimension(ijn,km), intent(in)  ui,
real, dimension(ijn,km), intent(in)  vi,
real, dimension(ijn,km), intent(out)  wi,
real, dimension(ijn,km), intent(out)  pm,
real, dimension(ijn,km), intent(out)  pd 
)

Computes omega.

Parameters
[in]jcapinteger spectral truncation.
[in]ncinteger first dimension (nc>=(jcap+1)*(jcap+2)).
[in]kminteger number of levels.
[in]idvcinteger
[in]idvminteger mass variable id.
[in]idrtinteger data representation type.
[in]idslinteger
[in]nvcoordinteger number of vertical coordinates.
[in]vcoordreal (km+1,nvcoord) vertical coordinates.
[in]lonbinteger number of longitudes.
[in]latbinteger number of latitudes.
[in]ijninteger
[in]j1integer first latitude.
[in]j2integer last latitude.
[in]jcinteger number of cpus.
[in]sdreal (nc,km) divergence.
[in]spsreal (nc) log surface pressure.
[in]psireal (ijn)
[in]tireal (ijn,km)
[in]uireal (ijn,km)
[in]vireal (ijn,km)
[out]wireal (ijn,km)
[out]pmreal (ijn,km)
[out]pdreal (ijn,km)

Definition at line 640 of file GFSPOSTSIG.F.

Referenced by trssc().

◆ modstuff()

subroutine modstuff ( integer, intent(in)  km,
integer, intent(in)  idvc,
integer, intent(in)  idsl,
integer, intent(in)  nvcoord,
real, dimension(km+1,nvcoord), intent(in)  vcoord,
real, intent(in)  ps,
real, intent(in)  psx,
real, intent(in)  psy,
real, dimension(km), intent(in)  d,
real, dimension(km), intent(in)  u,
real, dimension(km), intent(in)  v,
real*8, dimension(km+1), intent(out)  pi,
real*8, dimension(km), intent(out)  pm,
real, dimension(km), intent(out)  om 
)

Computes model coordinate dependent functions.

This subprogram computes fields which depend on the model coordinate such as pressure thickness and vertical velocity.

Parameters
[in]kminteger number of levels.
[in]idvcinteger vertical coordinate id (1 for sigma and 2 for hybrid).
[in]idslinteger type of sigma structure (1 for phillips or 2 for mean).
[in]nvcoordinteger number of vertical coordinates.
[in]vcoordreal (km+1,nvcoord) vertical coordinates.
[in]psreal surface pressure (Pa).
[in]psxreal log surface pressure x-gradient (1/m).
[in]psyreal log surface pressure y-gradient (1/m).
[in]dreal (km) wind divergence (1/s).
[in]ureal (km) x-component wind (m/s).
[in]vreal (km) y-component wind (m/s).
[out]pireal (km+1) interface pressure (Pa).
[out]pmreal (km) mid-layer pressure (Pa).
[out]omreal (km) vertical velocity (Pa/s).

Program History Log

Date Programmer Comments
1999-10-18 Mark Iredell Initial
2013-04-19 Jun Wang Add option to get pi by using 8 byte real computation
Author
Mark Iredell np23
Date
1999-10-18

Definition at line 248 of file GFSPOSTSIG.F.

◆ modstuff2()

subroutine modstuff2 ( integer, intent(in)  im,
integer, intent(in)  ix,
integer, intent(in)  km,
integer, intent(in)  idvc,
integer, intent(in)  idsl,
integer, intent(in)  nvcoord,
real, dimension(km+1,nvcoord), intent(in)  vcoord,
real, dimension(ix), intent(in)  ps,
real, dimension(ix), intent(in)  psx,
real, dimension(ix), intent(in)  psy,
real, dimension(ix,km), intent(in)  d,
real, dimension(ix,km), intent(in)  u,
real, dimension(ix,km), intent(in)  v,
real*8, dimension(ix,km+1), intent(out)  pi,
real*8, dimension(ix,km), intent(out)  pm,
real, dimension(ix,km), intent(out)  om,
integer, intent(in)  me 
)

Computes model coordinate dependent functions.

This subprogram computes fields which depend on the model coordinate such as pressure thickness and vertical velocity.

Parameters
[in]iminteger inner computational domain.
[in]ixinteger maximum inner dimension.
[in]kminteger number of levels.
[in]idvcinteger vertical coordinate id (1 for sigma and 2 for hybrid).
[in]idslinteger type of sigma structure (1 for phillips or 2 for mean).
[in]nvcoordinteger number of vertical coordinates.
[in]vcoordreal (km+1,nvcoord) vertical coordinates.
[in]psreal surface pressure (Pa).
[in]psxreal log surface pressure x-gradient (1/m).
[in]psyreal log surface pressure y-gradient (1/m).
[in]dreal (km) wind divergence (1/s).
[in]ureal (km) x-component wind (m/s).
[in]vreal (km) y-component wind (m/s).
[out]pireal (km+1) interface pressure (Pa).
[out]pmreal (km) mid-layer pressure (Pa).
[out]omreal (km) vertical velocity (Pa/s).
[in]meinteger

Program History Log

Date Programmer Comments
1999-10-18 Mark Iredell Initial
2013-04-19 Jun Wang Add option to get pi by using 8 byte real computation
2013-08-13 Shrinivas Moorthi Modified to include im points and thread
Author
Mark Iredell np23
Date
1999-10-18

Definition at line 327 of file GFSPOSTSIG.F.

Referenced by initpost_gfs_nems_mpiio().

◆ rtsig()

subroutine rtsig ( integer(sigio_intkind), intent(in)  lusig,
type(sigio_head), intent(in)  head,
integer, intent(in)  k1,
integer, intent(in)  k2,
integer, dimension(200), intent(in)  kgds,
integer, intent(in)  ijo,
integer, intent(in)  levs,
integer, intent(in)  ntrac,
integer, intent(in)  jcap,
integer, intent(in)  lnt2,
integer, intent(in)  me,
real, dimension(ijo), intent(out)  h,
real, dimension(ijo), intent(out)  p,
real, dimension(ijo), intent(out)  px,
real, dimension(ijo), intent(out)  py,
real, dimension(ijo,k1:k2), intent(out)  t,
real, dimension(ijo,k1:k2), intent(out)  u,
real, dimension(ijo,k1:k2), intent(out)  v,
real, dimension(ijo,k1:k2), intent(out)  d,
real, dimension(ijo,k1:k2,ntrac), intent(out), target  trc,
integer, intent(out)  iret 
)

Reads and transforms a sigma file.

Parameters
[out]lusiginteger(sigio_intkind) sigma file unit number.
[out]headtype(sigio_head) sigma file header.
[out]k1integer first model level to return.
[out]k2integer last model level to return.
[out]kgdsinteger (200) GDS to which to transform.
[out]ijointeger dimension of output fields.
[out]levsinteger number of total vertical levels.
[in]meinteger MPI rank.
[out]ntracinteger number of output tracers.
[out]jcapinteger number of waves.
[out]lnt2integer (jcap+1)*(jcap+2).
[out]hreal (ijo) surface orography (m).
[out]preal (ijo) surface pressure (Pa).
[out]pxreal (ijo) log surface pressure x-gradient (1/m).
[out]pyreal (ijo) log surface pressure y-gradient (1/m).
[out]treal (ijo,k1:k2) temperature (K).
[out]ureal (ijo,k1:k2) x-component wind (m/s).
[out]vreal (ijo,k1:k2) y-component wind (m/s).
[out]dreal (ijo,k1:k2) wind divergence (1/s).
[out]trcreal (ijo,k1:k2,ntrac) tracers.
                                   1 = specific humidity (kg/kg)
                                   2 = Ozone mixing ratio (kg/kg)
                                   3 = cloud condensate mixing ratio (kg/kg)
                                       atomic oxyge, oxygen etc
 
[out]iretInteger return code.

Definition at line 45 of file GFSPOSTSIG.F.

◆ trssc()

subroutine trssc ( integer, intent(in)  jcap,
integer, intent(in)  nc,
integer, intent(in)  km,
integer, intent(in)  ntrac,
integer, intent(in)  idvc,
integer, intent(in)  idvm,
integer, intent(in)  idsl,
integer, intent(in)  nvcoord,
real*8, dimension(km+1,nvcoord), intent(in)  vcoord,
real, dimension(0:ntrac), intent(in)  cpi,
integer, intent(in)  idrt,
integer, intent(in)  lonb,
integer, intent(in)  latb,
integer, intent(in)  ijl,
integer, intent(in)  ijn,
integer, intent(in)  j1,
integer, intent(in)  j2,
integer, intent(in)  jc,
integer, intent(in)  chgq0,
real, dimension(nc), intent(in)  szs,
real, dimension(nc), intent(in)  sps,
real, dimension(nc,km), intent(in)  st,
real, dimension(nc,km), intent(in)  sd,
real, dimension(nc,km), intent(in)  sz,
real, dimension(nc,km*ntrac), intent(in)  sq,
real, dimension(ijn), intent(inout)  gfszs,
real, dimension(ijn), intent(inout)  gfsps,
real, dimension(ijn,km), intent(inout)  gfsp,
real, dimension(ijn,km), intent(inout)  gfsdp,
real, dimension(ijn,km), intent(inout)  gfst,
real, dimension(ijn,km), intent(inout)  gfsu,
real, dimension(ijn,km), intent(inout)  gfsv,
real, dimension(ijn,km*ntrac), intent(inout)  gfsq,
real, dimension(ijn,km), intent(inout)  gfsw 
)

Transforms sigma spectral fields to grid.

Transforms sigma spectral fields to grid and converts log surface pressure to surface pressure and virtual temperature to temperature.

Parameters
[in]jcapinteger spectral truncation.
[in]ncinteger first dimension (nc>=(jcap+1)*(jcap+2)).
[in]kminteger number of levels.
[in]ntracinteger number of tracers.
[in]idvcinteger
[in]idvminteger mass variable id.
[in]idslinteger
[in]nvcoordinteger number of vertical coordinates.
[in]vcoordreal (km+1,nvcoord) vertical coordinates.
[in]cpireal
[in]idrtinteger data representation type.
[in]lonbinteger number of longitudes.
[in]latbinteger number of latitudes.
[in]ijlinteger horizontal dimension.
[in]ijninteger
[in]j1integer first latitude.
[in]j2integer last latitude.
[in]jcinteger number of cpus.
[in]chgq0integer
[in]szsreal (nc) orography.
[in]spsreal (nc) log surface pressure.
[in]streal (nc,levs) virtual temperature.
[in]sdreal (nc,levs) divergence.
[in]szreal (nc,levs) vorticity.
[in]sqreal (nc,levs*ntrac) tracers.
[in,out]gfszsreal (ijn)
[in,out]gfspsreal (ijn)
[in,out]gfspreal (ijn, km)
[in,out]gfsdpreal (ijn, km)
[in,out]gfstreal (ijn, km)
[in,out]gfsureal (ijn, km)
[in,out]gfsvreal (ijn, km)
[in,out]gfsqreal (ijn, km*ntrac)
[in,out]gfswreal (ijn, km)

Program History Log

Date Programmer Comments
1999-10-18 Mark Iredell Initial
Author
Mark Iredell w/nmc23
Date
1992-10-31

Definition at line 448 of file GFSPOSTSIG.F.

References getomega().