PROGRAM IGCM3
Author : Marc, 3l50
Date : April 2003
Modified:
-----------------------------------------------------------------
What it does
============
-----------------------------------------------------------------
Structure of Routine
====================
- call INI_GRAPHICS
- call INITAL
- 1 CONTINUE - label 1 is here
- set tendencies to zero
- IF (KOUNT.EQ.0) THEN
- Initialise new tracer fields - IF (.NOT. LRSTRT) CALL ICTRAC
- Add white noise perturbation - IF (LNOISE.AND..NOT.LRSTRT) CALL
NOISE
- Calculate restoration arrays - IF (.NOT. LRESTIJ) CALL SETRES
- IF (DAY.LT.0.1) THEN set surface pressure to 976mb
- Main loop over latitudes - DO 5 IH=1,JG
- IF(JGL.EQ.1) READ(25) ALP,DALP,RLP,RDLP
- Go from spectral space to grid point space using inverse
Legendre and Fourier transforms - call to LTI and calls to FFT991
- Calculate nonlinear terms - CALL MGRMLT
- Save grid point fields for use in XSECT
- Go from grid point space to spectral space using direct
Legendre and Fourier transforms - calls to FFT991 and LTD
- IF (LBALAN) and (KOUNT.LT.0) THEN
- Balance spectral fields - IF (.NOT.LTBAL) CALL BALANC,
IF ( LTBAL) CALL TBAL, CALL
ENERGY, GO TO 1
- First timestep - output history and diagnostics - IF
(KOUNT.EQ.0) THEN
- RODATA calculations
- write to units 9, 2 and 13.
- call XSECT, SPOP, ENERGY.
- ELSE IF (KOUNT.EQ.KSTART) CALL ENERGY
- IF (LRESTIJ) THEN - Write a restoration record to units 2 and 13
- IF (KOUTR.EQ.KOUNTR) THEN - Write a restart record to units 2,
11 and 19
- IF (KOUTH.EQ.KOUNTH) THEN - Write a history record to units 2
and 9
- Output diagnostics -
- IF (KOUTP.EQ.KOUNTP) THEN call XSECT, plotfields and SPOP
- IF (KOUTE.EQ.KOUNTE) THEN CALL ENERGY
- IF (KOUNT.LT.KTOTAL) THEN
- add 1 to KOUTP, KOUTE, KOUTH, KOUTR and KOUNT, i.e. add
one to timestep.
- calc. DAY, i.e.
- DAY=DAY+DELT/PI2
- IF (.NOT. LPERPET) DOY=DOY+DELT/PI2
- IF (DOY.GE.361) DOY = DOY-360.0
- Adiabatic part of timestep - CALL TSTEP
- Mass correction - IF (LMASCOR) CALL MASCOR ELSE IF(LRESTIJ)
SP(1)=CMPLX(0.,0.)
- Diabatic part of timestep. Preset tendencies to zero.
- Set parameters for optional Newtonian cooling. - IF (LRESTIJ)
CALL SETTEE
- Preset accumulated diagnostics - IF (KOUTH.EQ.1) THEN ADDZ=0
- IF (JGL.EQ.1) REWIND(25)
- Loop over latitude for spectral transforms and calculation of
diabatic tendencies. - DO 260 IH=1,JG
- IF(JGL.EQ.1) READ(25) ALP,DALP,RLP,RDLP
- Go from spectral space to grid point space using inverse
Legendre and Fourier transforms - call LTI and calls to FFT991
- Calculate diabatic terms - CALL DGRMLT
- Write accumulated diagnostics to history file.
- Go from grid point space to spectral space using direct
Legendre and Fourier transforms - calls to FFT991 and call LTDDIA
- Write zonally averaged diagnostics and spectral heating to
history file - possible calls to plotfields2, netout2
- 300 CONTINUE - there's no D0 300 ???
- Apply dissipation and optional linear restoration - CALL DIFUSE
- Update spectral fields in the diabatic timestep - CALL DSTEP
- End of timestep - DO J=1,IGB,
TAVE(j*2-1)=TAVE(J*2-1)+REAL(T(J)), TAVE(j*2)=TAVE(J*2)+AIMAG(T(J)),
ENDDO
- GO TO 1 ! time loop
- Write the final restart record - call end_netcdf, and write to
units 2, 12, 13 or 17
- call end_graphics
- STOP
-----------------------------------------------------------------
Program calls
====================
-----------------------------------------------------------------
 |
Return to IGCM home page
|