Changeset 999 for trunk/LMDZ.MARS/libf/dyn3d/dynredem.F
- Timestamp:
- Jul 2, 2013, 9:40:28 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dyn3d/dynredem.F
r410 r999 36 36 character*80 abort_message 37 37 character(len=80) :: txt ! to store some text 38 39 !REAL hour_ini ! fraction of day of stored date. Equivalent of day_ini, but 0=<hour_ini<1 40 38 41 39 42 c Variables locales pour NetCDF: … … 72 75 tab_cntrl(7) = g 73 76 tab_cntrl(8) = cpp 74 tab_cntrl(9) = kappa77 tab_cntrl(9) = kappa 75 78 tab_cntrl(10) = daysec 76 79 tab_cntrl(11) = dtvr … … 82 85 tab_cntrl(17) = pa 83 86 tab_cntrl(18) = preff 87 88 tab_cntrl(29) = hour_ini 89 84 90 c 85 91 c ..... parametres pour le zoom ...... … … 106 112 IF( ysinus ) tab_cntrl(26) = 1. 107 113 ENDIF 114 115 108 116 c 109 117 c ......................................................... … … 983 991 character*80 abort_message 984 992 c 993 994 INTEGER edges(4),corner(4) 995 985 996 INTEGER nb,i,j 986 SAVE nb 987 DATA nb / 0 / 997 988 998 989 999 modname = 'dynredem1' … … 993 1003 CALL abort 994 1004 ENDIF 1005 1006 c On a single run, different files can be written with dynredem1. 1007 c Therefore, get the last time index from the file itself: 1008 ierr = NF_INQ_DIMID(nid,"Time",nvarid) 1009 ierr = NF_INQ_DIMLEN(nid,nvarid,nb) 995 1010 996 1011 c Ecriture/extension de la coordonnee temps … … 1008 1023 ierr = NF_PUT_VAR1_REAL (nid,nvarid,nb,time) 1009 1024 #endif 1010 PRINT*, "Enregistrement pour ", nb, time 1025 IF (ierr .NE. NF_NOERR) THEN 1026 print*, "Erreur ecriture temps!!" 1027 print*, NF_STRERROR(ierr) 1028 ENDIF 1029 !PRINT*, "Enregistrement pour ", nb, time 1011 1030 1012 1031 c Ecriture des champs 1013 1032 c 1033 corner(1)=1 1034 corner(2)=1 1035 corner(3)=1 1036 corner(4)=nb 1037 edges(1)=iip1 1038 edges(2)=jjm 1039 edges(3)=llm 1040 edges(4)=1 1041 ierr = NF_INQ_VARID(nid, "vcov", nvarid) 1042 IF (ierr .NE. NF_NOERR) THEN 1043 PRINT*, "Variable vcov n est pas definie" 1044 CALL abort 1045 ENDIF 1046 #ifdef NC_DOUBLE 1047 ierr = NF_PUT_VARA_DOUBLE (nid,nvarid,corner,edges,vcov) 1048 #else 1049 ierr = NF_PUT_VARA_REAL (nid,nvarid,corner,edges,vcov) 1050 #endif 1051 IF (ierr .NE. NF_NOERR) THEN 1052 print*, "Erreur ecriture vcov!!" 1053 print*, NF_STRERROR(ierr) 1054 ENDIF 1055 1056 c Following corner and egdes are the same for ucov, teta, tracers and masse: 1057 corner(1)=1 1058 corner(2)=1 1059 corner(3)=1 1060 corner(4)=nb 1061 edges(1)=iip1 1062 edges(2)=jjp1 1063 edges(3)=llm 1064 edges(4)=1 1014 1065 ierr = NF_INQ_VARID(nid, "ucov", nvarid) 1015 1066 IF (ierr .NE. NF_NOERR) THEN … … 1018 1069 ENDIF 1019 1070 #ifdef NC_DOUBLE 1020 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,ucov) 1021 #else 1022 ierr = NF_PUT_VAR_REAL (nid,nvarid,ucov) 1023 #endif 1024 1025 ierr = NF_INQ_VARID(nid, "vcov", nvarid) 1026 IF (ierr .NE. NF_NOERR) THEN 1027 PRINT*, "Variable vcov n est pas definie" 1028 CALL abort 1029 ENDIF 1030 #ifdef NC_DOUBLE 1031 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,vcov) 1032 #else 1033 ierr = NF_PUT_VAR_REAL (nid,nvarid,vcov) 1034 #endif 1071 ierr = NF_PUT_VARA_DOUBLE (nid,nvarid,corner,edges,ucov) 1072 #else 1073 ierr = NF_PUT_VARA_REAL (nid,nvarid,corner,edges,ucov) 1074 #endif 1075 IF (ierr .NE. NF_NOERR) THEN 1076 print*, "Erreur ecriture ucov!!" 1077 print*, NF_STRERROR(ierr) 1078 ENDIF 1079 1035 1080 1036 1081 ierr = NF_INQ_VARID(nid, "teta", nvarid) … … 1040 1085 ENDIF 1041 1086 #ifdef NC_DOUBLE 1042 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,teta) 1043 #else 1044 ierr = NF_PUT_VAR_REAL (nid,nvarid,teta) 1045 #endif 1087 ierr = NF_PUT_VARA_DOUBLE (nid,nvarid,corner,edges,teta) 1088 #else 1089 ierr = NF_PUT_VARA_REAL (nid,nvarid,corner,edges,teta) 1090 #endif 1091 IF (ierr .NE. NF_NOERR) THEN 1092 print*, "Erreur ecriture teta!!" 1093 print*, NF_STRERROR(ierr) 1094 ENDIF 1046 1095 1047 1096 IF (nq.GT.99) THEN … … 1068 1117 enddo 1069 1118 #ifdef NC_DOUBLE 1070 ierr = NF_PUT_VAR _DOUBLE (nid,nvarid,q3d)1071 #else 1072 ierr = NF_PUT_VAR _REAL (nid,nvarid,q3d)1119 ierr = NF_PUT_VARA_DOUBLE (nid,nvarid,corner,edgesq3d) 1120 #else 1121 ierr = NF_PUT_VARA_REAL (nid,nvarid,corner,edges,q3d) 1073 1122 #endif 1074 1123 IF (ierr .NE. NF_NOERR) THEN … … 1079 1128 ENDIF 1080 1129 c 1130 1081 1131 ierr = NF_INQ_VARID(nid, "masse", nvarid) 1082 1132 IF (ierr .NE. NF_NOERR) THEN … … 1085 1135 ENDIF 1086 1136 #ifdef NC_DOUBLE 1087 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,masse) 1088 #else 1089 ierr = NF_PUT_VAR_REAL (nid,nvarid,masse) 1090 #endif 1091 c 1137 ierr = NF_PUT_VARA_DOUBLE (nid,nvarid,corner,edges,masse) 1138 #else 1139 ierr = NF_PUT_VARA_REAL (nid,nvarid,corner,edges,masse) 1140 #endif 1141 IF (ierr .NE. NF_NOERR) THEN 1142 print*, "Erreur ecriture masse!!" 1143 print*, NF_STRERROR(ierr) 1144 ENDIF 1145 c 1146 1147 corner(1)=1 1148 corner(2)=1 1149 corner(3)=nb 1150 edges(1)=iip1 1151 edges(2)=jjp1 1152 edges(3)=1 1092 1153 ierr = NF_INQ_VARID(nid, "ps", nvarid) 1093 1154 IF (ierr .NE. NF_NOERR) THEN … … 1096 1157 ENDIF 1097 1158 #ifdef NC_DOUBLE 1098 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,ps) 1099 #else 1100 ierr = NF_PUT_VAR_REAL (nid,nvarid,ps) 1101 #endif 1159 ierr = NF_PUT_VARA_DOUBLE (nid,nvarid,corner,edges,ps) 1160 #else 1161 ierr = NF_PUT_VARA_REAL (nid,nvarid,corner,edges,ps) 1162 #endif 1163 IF (ierr .NE. NF_NOERR) THEN 1164 print*, "Erreur ecriture ps!!" 1165 print*, NF_STRERROR(ierr) 1166 ENDIF 1102 1167 1103 1168 ierr = NF_CLOSE(nid)
Note: See TracChangeset
for help on using the changeset viewer.