Changeset 587 for codes/icosagcm/devel/src/diagnostics/diagflux.f90
- Timestamp:
- 10/16/17 15:22:59 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/diagnostics/diagflux.f90
r585 r587 4 4 SAVE 5 5 6 TYPE(t_field),POINTER :: f_qfluxt(:), f_qfluxt_i(:) ! time-integrated flux of scalars and its reconstruction at cell centers 7 6 TYPE(t_field),POINTER :: f_qfluxt(:), f_qfluxt_lon(:), f_qfluxt_lat(:) ! time-integrated flux of scalars and its reconstruction at cell centers 8 7 LOGICAL :: diagflux_on 9 8 !$OMP THREADPRIVATE(diagflux_on) … … 17 16 IF(diagflux_on) THEN 18 17 CALL allocate_field(f_qfluxt, field_u,type_real,llm,nqtot, name="qfluxt") 19 CALL allocate_field(f_qfluxt_i, field_t,type_real,llm,nqtot, name="qfluxt_i") 18 CALL allocate_field(f_qfluxt_lon, field_t,type_real,llm,nqtot, name="qfluxt_lon") 19 CALL allocate_field(f_qfluxt_lat, field_t,type_real,llm,nqtot, name="qfluxt_lat") 20 20 CALL zero_qfluxt 21 21 ELSE 22 STOP ! FIXME 22 23 CALL allocate_field(f_qfluxt, field_u,type_real,llm,0, name="qfluxt") 23 CALL allocate_field(f_qfluxt_i, field_t,type_real,llm,0, name="qfluxt_i") 24 CALL allocate_field(f_qfluxt_lon, field_t,type_real,llm,0, name="qfluxt_lon") 25 CALL allocate_field(f_qfluxt_lat, field_t,type_real,llm,0, name="qfluxt_lat") 24 26 END IF 25 27 END SUBROUTINE init_diagflux … … 38 40 END SUBROUTINE zero_qfluxt 39 41 40 SUBROUTINE flux_centered_lonlat(f_flux, f_flux_lon, f_flux_lat) 42 SUBROUTINE flux_centered_lonlat(scale, f_flux, f_flux_lon, f_flux_lat) 43 REAL(rstd), INTENT(IN) :: scale 41 44 TYPE(t_field),POINTER :: f_flux(:), f_flux_lon(:), f_flux_lat(:) 42 45 REAL(rstd), POINTER :: flux(:,:,:), flux_lon(:,:,:), flux_lat(:,:,:) … … 47 50 CALL swap_geometry(ind) 48 51 flux=f_flux(ind) 52 flux_lon=f_flux_lon(ind) 53 flux_lat=f_flux_lat(ind) 49 54 DO itrac=1,nqtot 50 CALL compute_flux_centered_lonlat( flux(:,:,itrac), flux_lon(:,:,itrac), flux_lat(:,:,itrac))55 CALL compute_flux_centered_lonlat(scale, flux(:,:,itrac), flux_lon(:,:,itrac), flux_lat(:,:,itrac)) 51 56 END DO 52 57 END DO 53 58 END SUBROUTINE flux_centered_lonlat 54 59 55 SUBROUTINE compute_flux_centered_lonlat(flux, flux_lon, flux_lat) 60 SUBROUTINE compute_flux_centered_lonlat(scale, flux, flux_lon, flux_lat) 61 USE wind_mod 62 REAL(rstd), INTENT(IN) :: scale 56 63 REAL(rstd), INTENT(IN) :: flux(3*iim*jjm,llm) 57 64 REAL(rstd), INTENT(OUT) :: flux_lon(iim*jjm,llm), flux_lat(iim*jjm,llm) 58 65 REAL(rstd) :: flux_3d(iim*jjm,llm,3) 59 CALL compute_flux_centered( flux, flux_3d)66 CALL compute_flux_centered(scale, flux, flux_3d) 60 67 CALL compute_wind_centered_lonlat_compound(flux_3d, flux_lon, flux_lat) 61 68 END SUBROUTINE compute_flux_centered_lonlat
Note: See TracChangeset
for help on using the changeset viewer.