Changeset 3861 for dynamico_lmdz/aquaplanet/ICOSAGCM/src/write_field.f90
- Timestamp:
- Jan 7, 2016, 9:50:58 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/ICOSAGCM/src/write_field.f90
r3845 r3861 1171 1171 INTEGER :: nij 1172 1172 CHARACTER(LEN=255) :: name 1173 1173 INTEGER :: l,level_size, levId, dimlevId 1174 1174 1175 1175 name=TRIM(ADJUSTL(name_in)) … … 1223 1223 status = NF90_DEF_DIM(ncid,'cell_i',ncell,ncellId) 1224 1224 status = NF90_DEF_DIM(ncid,'nvert_i',nvert,nvertid) 1225 1225 level_size=0 1226 1226 IF (Field(ind_b)%ndim==2) THEN 1227 1227 FieldVarId(NbField)%size=1 … … 1231 1231 ALLOCATE(FieldVarId(NbField)%nc_id(1)) 1232 1232 status = NF90_DEF_DIM(ncid,'lev',size(field(ind_b)%rval3d,2),dim3id) 1233 level_size=size(field(ind_b)%rval3d,2) 1233 1234 ELSE IF (Field(1)%ndim==4) THEN 1234 1235 FieldVarId(NbField)%size=size(field(ind_b)%rval4d,3) 1235 1236 ALLOCATE(FieldVarId(NbField)%nc_id(FieldVarId(NbField)%size)) 1236 1237 status = NF90_DEF_DIM(ncid,'lev',size(field(ind_b)%rval4d,2),dim3id) 1238 level_size=size(field(ind_b)%rval4d,2) 1237 1239 ! status = NF90_DEF_DIM(ncid,'Q',size(field(ind_b)%rval4d,3),dim4id) 1238 1240 ENDIF 1239 1241 PRINT*,"LEVEL_SIZE=",level_size 1242 1240 1243 status = NF90_DEF_DIM(ncid,'time_counter',NF90_UNLIMITED,timeId) 1241 1244 IF (level_size>0) THEN 1245 status = NF90_DEF_VAR(ncid,'lev',NF90_DOUBLE,(/ dim3id /),levId) 1246 status = NF90_PUT_ATT(ncid,levId,"axis","Z") 1247 ENDIF 1248 1242 1249 status = NF90_DEF_VAR(ncid,'lon_i',NF90_DOUBLE,(/ ncellId /),lonId) 1243 1250 status = NF90_PUT_ATT(ncid,lonId,"long_name","longitude") … … 1280 1287 1281 1288 status = NF90_ENDDEF(ncid) 1289 1290 if (level_size>0) status = NF90_PUT_VAR(ncid,levId,(/ (l,l=1,level_size) /)) 1282 1291 1283 1292 ALLOCATE(lon(ncell),lat(ncell),bounds_lon(0:nvert-1,ncell),bounds_lat(0:nvert-1,ncell))
Note: See TracChangeset
for help on using the changeset viewer.