SUBROUTINE dynredem0(fichnom,idayref,anneeref,phis,nq) IMPLICIT NONE c======================================================================= c Ecriture du fichier de redemarrage sous format NetCDF (initialisation) c======================================================================= c Declarations: c ------------- #include "dimensions.h" #include "paramet.h" #include "comconst.h" #include "comvert.h" #include "comgeom.h" #include "temps.h" #include "ener.h" #include "logic.h" #include "netcdf.inc" #include "description.h" #include "serre.h" #include "advtrac.h" c Arguments: c ---------- INTEGER*4 idayref,anneeref REAL phis(ip1jmp1) CHARACTER*(*) fichnom INTEGER nq c Local: c ------ INTEGER iq,l CHARACTER str3*3 INTEGER length PARAMETER (length = 100) REAL tab_cntrl(length) ! tableau des parametres du run INTEGER ierr character*20 modname character*80 abort_message character(len=80) :: txt ! to store some text c Variables locales pour NetCDF: c INTEGER dims2(2), dims3(3), dims4(4) INTEGER idim_index INTEGER idim_rlonu, idim_rlonv, idim_rlatu, idim_rlatv INTEGER idim_llm, idim_llmp1 INTEGER idim_tim INTEGER nid,nvarid REAL zan0,zjulian,hours REAL sigs(llm) INTEGER yyears0,jjour0, mmois0 data yyears0 /1/ data jjour0 /1/ data mmois0 /1/ character*30 unites c----------------------------------------------------------------------- modname='dynredem' do l=1,llm sigs(l)=float(l) enddo DO l=1,length tab_cntrl(l) = 0. ENDDO tab_cntrl(1) = FLOAT(iim) tab_cntrl(2) = FLOAT(jjm) tab_cntrl(3) = FLOAT(llm) tab_cntrl(4) = FLOAT(idayref) tab_cntrl(5) = rad tab_cntrl(6) = omeg tab_cntrl(7) = g tab_cntrl(8) = cpp tab_cntrl(9) = kappa tab_cntrl(10) = daysec tab_cntrl(11) = dtvr tab_cntrl(12) = etot0 tab_cntrl(13) = ptot0 tab_cntrl(14) = ztot0 tab_cntrl(15) = stot0 tab_cntrl(16) = ang0 tab_cntrl(17) = pa tab_cntrl(18) = preff c c ..... parametres pour le zoom ...... tab_cntrl(19) = clon tab_cntrl(20) = clat tab_cntrl(21) = grossismx tab_cntrl(22) = grossismy c IF ( fxyhypb ) THEN tab_cntrl(23) = 1. tab_cntrl(24) = dzoomx tab_cntrl(25) = dzoomy tab_cntrl(26) = 0. tab_cntrl(27) = taux tab_cntrl(28) = tauy ELSE tab_cntrl(23) = 0. tab_cntrl(24) = dzoomx tab_cntrl(25) = dzoomy tab_cntrl(26) = 0. tab_cntrl(27) = 0. tab_cntrl(28) = 0. IF( ysinus ) tab_cntrl(26) = 1. ENDIF c c ......................................................... c c Creation du fichier: c ierr = NF_CREATE(fichnom, NF_CLOBBER, nid) IF (ierr.NE.NF_NOERR) THEN WRITE(6,*)" Failed creating file "//fichnom WRITE(6,*)' ierr = ', ierr CALL ABORT ENDIF c c Preciser quelques attributs globaux: c ierr = NF_PUT_ATT_TEXT (nid,NF_GLOBAL,"title",18, . "Dynamic start file") if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed writing title in file "//fichnom call abort endif c c Definir les dimensions du fichiers: c ierr = NF_DEF_DIM (nid, "index", length, idim_index) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "rlonu", iip1, idim_rlonu) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "latitude", jjp1, idim_rlatu) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "longitude", iip1, idim_rlonv) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "rlatv", jjm, idim_rlatv) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "altitude", llm, idim_llm) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "interlayer", llmp1, idim_llmp1) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension ", & "in file "//fichnom call abort endif ierr = NF_DEF_DIM (nid, "Time", NF_UNLIMITED, idim_tim) if (ierr.ne.NF_NOERR) then write(*,*) "dynredem0: Failed defining dimension