source: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90 @ 5103

Last change on this file since 5103 was 5103, checked in by abarral, 2 months ago

Handle CPP_INLANDSIS in lmdz_cppkeys_wrapper.F90
Remove obsolete key wrgrads_thermcell, _ADV_HALO, _ADV_HALLO, isminmax
Remove redundant uses of CPPKEY_INCA (thanks acozic)
Remove obsolete misc/write_field.F90
Remove unused ioipsl_* wrappers
Remove calls to WriteField_u with wrong signature
Convert .F -> .[fF]90
(lint) uppercase fortran operators
[note: 1d and iso still broken - working on it]

File size: 4.4 KB
RevLine 
[4094]1PROGRAM rejouer
2
[4350]3USE mod_const_mpi, ONLY: comm_lmdz
4USE inigeomphy_mod, ONLY: inigeomphy
5USE comvert_mod, ONLY: presnivs
[5101]6USE comvert_mod, ONLY:  preff, pa
[4350]7USE ioipsl, only: getin
[4094]8
9
[4110]10
[4350]11
[4094]12      implicit none
[4593]13      INCLUDE "dimensions.h"
[4094]14
15real :: airefi
16real :: zcufi    = 1.
17real :: zcvfi    = 1.
18real :: rlat_rad(1),rlon_rad(1)
19
20integer ntime
[4350]21integer jour0,mois0,an0,day_step,anneeref,dayref
[4094]22integer klev,klon
[4350]23CHARACTER (len=10) :: calend
24CHARACTER(len=20) :: calendrier
[4094]25
[4350]26
[4094]27!---------------------------------------------------------------------
28! L'appel a inigeomphy n'est utile que pour avoir getin_p dans
29! les initialisations
30!---------------------------------------------------------------------
31  zcufi=1.
32  zcvfi=1.
33  rlat_rad(1)=0.
34  rlon_rad(1)=0.
[4110]35
36preff=101325.
[4350]37!preff=100000.
[4110]38pa=50000.
39  CALL disvert()
[4094]40  CALL inigeomphy(1,1,llm, &
41               1, comm_lmdz, &
42           (/rlat_rad(1),0./),(/0./), &
43           (/0.,0./),(/rlon_rad(1),0./),  &
44           (/ (/airefi,0./),(/0.,0./) /), &
45           (/zcufi,0.,0.,0./), &
46           (/zcvfi,0./))
47
48CALL suphel
[4350]49!ntime=4320
50ntime=10000000
51dayref=1
52anneeref=2000
[5103]53CALL getin('dayref',dayref)
54CALL getin('anneeref',anneeref)
55CALL getin('calend',calend)
56CALL getin('day_step',day_step)
[4350]57calendrier=calend
[5103]58IF ( calendrier == "earth_360d" ) calendrier="360_day"
[4350]59
60
61jour0=dayref
62mois0=(jour0-1)/30+1
63jour0=jour0-30*((jour0-1)/30)
64an0=anneeref
65
[5103]66!PRINT*,"REPLAY1D jour0,mois0,an0",jour0,mois0,an0
[4350]67
68
[4094]69klon=1
70klev=llm
[5103]71CALL iotd_ini('phys.nc',1,1,klev,0.,0.,presnivs,jour0,mois0,an0,0.,86400./day_step,calendrier)
[4350]72! Consistent with ... CALL iophys_ini(600.)
[4094]73
74!---------------------------------------------------------------------
75! Initialisation de la parametrisation
76!---------------------------------------------------------------------
[5103]77CALL call_ini_replay
[4094]78
79!---------------------------------------------------------------------
80! Boucle en temps sur l'appel à la parametrisation
81!---------------------------------------------------------------------
[5103]82CALL call_param_replay(klon,klev)
[4094]83
[4350]84end
[4094]85
86!---------------------------------------------------------------------
87!/////////////////////////////////////////////////////////////////////
88!/////////////////////////////////////////////////////////////////////
89!     routine additionnelles utiles, prises dans 1DUTILS.h
90!/////////////////////////////////////////////////////////////////////
91!/////////////////////////////////////////////////////////////////////
92!---------------------------------------------------------------------
93
94!=======================================================================
95      SUBROUTINE abort_gcm(modname, message, ierr)
96      USE IOIPSL
97! Stops the simulation cleanly, closing files and printing various
98! comments
99!=======================================================================
[5099]100
[4094]101!  Input: modname = name of calling program
102!         message = stuff to print
103!         ierr    = severity of situation ( = 0 normal )
104 
105      character(len=*) modname
106      integer ierr
107      character(len=*) message
108 
109      write(*,*) 'in abort_gcm'
[5103]110      CALL histclo
[4094]111      write(*,*) 'out of histclo'
112      write(*,*) 'Stopping in ', modname
113      write(*,*) 'Reason = ',message
[5103]114      CALL getin_dump
[5099]115
[5082]116      if (ierr == 0) then
[4094]117        write(*,*) 'Everything is cool'
118      else
119        write(*,*) 'Houston, we have a problem ', ierr
120      endif
121      STOP
122      END
123
124!=======================================================================
125      SUBROUTINE gr_dyn_fi(nfield,im,jm,ngrid,pdyn,pfi)
126      IMPLICIT NONE
127!   passage d'un champ de la grille scalaire a la grille physique
128!=======================================================================
129 
130!-----------------------------------------------------------------------
131!   declarations:
132!   -------------
133 
134      INTEGER im,jm,ngrid,nfield
135      REAL pdyn(im,jm,nfield)
136      REAL pfi(ngrid,nfield)
137 
138      INTEGER j,ifield,ig
139 
140!-----------------------------------------------------------------------
141!   calcul:
142!   -------
143 
[5082]144      IF(ngrid/=2+(jm-2)*(im-1).AND.ngrid/=1)                          &
[5087]145      STOP 'probleme de dim'
[4094]146!   traitement des poles
147      CALL SCOPY(nfield,pdyn,im*jm,pfi,ngrid)
148      CALL SCOPY(nfield,pdyn(1,jm,1),im*jm,pfi(ngrid,1),ngrid)
149 
150!   traitement des point normaux
151      DO ifield=1,nfield
152         DO j=2,jm-1
153            ig=2+(j-2)*(im-1)
154            CALL SCOPY(im-1,pdyn(1,j,ifield),1,pfi(ig,ifield),1)
155         ENDDO
156      ENDDO
157 
158      RETURN
159      END
Note: See TracBrowser for help on using the repository browser.