- Timestamp:
- Jul 23, 2024, 7:14:34 PM (8 weeks ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.f90
r5104 r5105 2 2 ! $Id$ 3 3 4 4 SUBROUTINE writehist(time,vcov,ucov,teta,phi,q,masse,ps,phis) 5 5 6 USE ioipsl 7 USE infotrac, ONLY: nqtot 8 use com_io_dyn_mod, ONLY: histid,histvid,histuid 9 USE temps_mod, ONLY: itau_dyn 10 11 implicit none 6 USE ioipsl 7 USE infotrac, ONLY: nqtot 8 use com_io_dyn_mod, ONLY: histid,histvid,histuid 9 USE temps_mod, ONLY: itau_dyn 12 10 13 C 14 C Ecriture du fichier histoire au format IOIPSL 15 C 16 C Appels succesifs des routines: histwrite 17 C 18 C Entree: 19 C time: temps de l'ecriture 20 C vcov: vents v covariants 21 C ucov: vents u covariants 22 C teta: temperature potentielle 23 C phi : geopotentiel instantane 24 C q : traceurs 25 C masse: masse 26 C ps :pression au sol 27 C phis : geopotentiel au sol 28 C 29 C 30 C L. Fairhead, LMD, 03/99 31 C 32 C ===================================================================== 33 C 34 C Declarations 35 include "dimensions.h" 36 include "paramet.h" 37 include "comgeom.h" 38 include "description.h" 39 include "iniprint.h" 11 implicit none 40 12 41 C 42 C Arguments 43 C 13 ! 14 ! Ecriture du fichier histoire au format IOIPSL 15 ! 16 ! Appels succesifs des routines: histwrite 17 ! 18 ! Entree: 19 ! time: temps de l'ecriture 20 ! vcov: vents v covariants 21 ! ucov: vents u covariants 22 ! teta: temperature potentielle 23 ! phi : geopotentiel instantane 24 ! q : traceurs 25 ! masse: masse 26 ! ps :pression au sol 27 ! phis : geopotentiel au sol 28 ! 29 ! 30 ! L. Fairhead, LMD, 03/99 31 ! 32 ! ===================================================================== 33 ! 34 ! Declarations 35 include "dimensions.h" 36 include "paramet.h" 37 include "comgeom.h" 38 include "description.h" 39 include "iniprint.h" 44 40 45 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 46 REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm) 47 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 48 REAL phis(ip1jmp1) 49 REAL q(ip1jmp1,llm,nqtot) 50 integer time 41 ! 42 ! Arguments 43 ! 44 45 REAL :: vcov(ip1jm,llm),ucov(ip1jmp1,llm) 46 REAL :: teta(ip1jmp1,llm),phi(ip1jmp1,llm) 47 REAL :: ps(ip1jmp1),masse(ip1jmp1,llm) 48 REAL :: phis(ip1jmp1) 49 REAL :: q(ip1jmp1,llm,nqtot) 50 integer :: time 51 51 52 52 53 ! This routine needs IOIPSL to work54 CVariables locales55 C 56 integeriq, ii, ll57 integerndexu(ip1jmp1*llm),ndexv(ip1jm*llm),ndex2d(ip1jmp1)58 logicalok_sync59 integeritau_w60 REALvnat(ip1jm,llm),unat(ip1jmp1,llm)53 ! This routine needs IOIPSL to work 54 ! Variables locales 55 ! 56 integer :: iq, ii, ll 57 integer :: ndexu(ip1jmp1*llm),ndexv(ip1jm*llm),ndex2d(ip1jmp1) 58 logical :: ok_sync 59 integer :: itau_w 60 REAL :: vnat(ip1jm,llm),unat(ip1jmp1,llm) 61 61 62 C 63 CInitialisations64 C 65 66 67 68 69 70 ! Passage aux composantes naturelles du vent71 72 C 73 CAppels a histwrite pour l'ecriture des variables a sauvegarder74 C 75 CVents U76 C 77 CALL histwrite(histuid, 'u', itau_w, unat,78 .iip1*jjp1*llm, ndexu)79 C 80 CVents V81 C 82 CALL histwrite(histvid, 'v', itau_w, vnat,83 .iip1*jjm*llm, ndexv)62 ! 63 ! Initialisations 64 ! 65 ndexu = 0 66 ndexv = 0 67 ndex2d = 0 68 ok_sync =.TRUE. 69 itau_w = itau_dyn + time 70 ! Passage aux composantes naturelles du vent 71 CALL covnat(llm, ucov, vcov, unat, vnat) 72 ! 73 ! Appels a histwrite pour l'ecriture des variables a sauvegarder 74 ! 75 ! Vents U 76 ! 77 CALL histwrite(histuid, 'u', itau_w, unat, & 78 iip1*jjp1*llm, ndexu) 79 ! 80 ! Vents V 81 ! 82 CALL histwrite(histvid, 'v', itau_w, vnat, & 83 iip1*jjm*llm, ndexv) 84 84 85 C 86 CTemperature potentielle87 C 88 CALL histwrite(histid, 'teta', itau_w, teta,89 .iip1*jjp1*llm, ndexu)90 C 91 CGeopotentiel92 C 93 CALL histwrite(histid, 'phi', itau_w, phi,94 .iip1*jjp1*llm, ndexu)95 C 96 CTraceurs97 C 98 !DO iq=1,nqtot99 !CALL histwrite(histid, tracers(iq)%longName, itau_w,100 !. q(:,:,iq), iip1*jjp1*llm, ndexu)101 !enddo102 !C103 CMasse104 C 105 106 C 107 CPression au sol108 C 109 110 C 111 CGeopotentiel au sol112 C 113 !CALL histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)114 C 115 CFin116 C 117 118 119 120 121 122 123 end 85 ! 86 ! Temperature potentielle 87 ! 88 CALL histwrite(histid, 'teta', itau_w, teta, & 89 iip1*jjp1*llm, ndexu) 90 ! 91 ! Geopotentiel 92 ! 93 CALL histwrite(histid, 'phi', itau_w, phi, & 94 iip1*jjp1*llm, ndexu) 95 ! 96 ! Traceurs 97 ! 98 ! DO iq=1,nqtot 99 ! CALL histwrite(histid, tracers(iq)%longName, itau_w, 100 ! . q(:,:,iq), iip1*jjp1*llm, ndexu) 101 ! enddo 102 !C 103 ! Masse 104 ! 105 CALL histwrite(histid,'masse',itau_w, masse,iip1*jjp1*llm,ndexu) 106 ! 107 ! Pression au sol 108 ! 109 CALL histwrite(histid, 'ps', itau_w, ps, iip1*jjp1, ndex2d) 110 ! 111 ! Geopotentiel au sol 112 ! 113 ! CALL histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d) 114 ! 115 ! Fin 116 ! 117 if (ok_sync) then 118 CALL histsync(histid) 119 CALL histsync(histvid) 120 CALL histsync(histuid) 121 endif 122 return 123 end subroutine writehist
Note: See TracChangeset
for help on using the changeset viewer.