Ignore:
Timestamp:
Jul 26, 2016 7:52:02 AM (8 years ago)
Author:
maronga
Message:

further modularization of land surface model (2D/3D output and restart data)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/data_output_3d.f90

    r1961 r1972  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Output of land surface quantities is now done directly in the respective module.
     22! Unnecessary directive __parallel removed.
    2223!
    2324! Former revisions:
     
    144145   
    145146    USE land_surface_model_mod,                                                &
    146         ONLY: m_soil, m_soil_av, nzb_soil, nzt_soil, t_soil, t_soil_av
     147        ONLY: land_surface, lsm_data_output_3d, nzb_soil, nzt_soil
    147148
    148149#if defined( __netcdf )
     
    272273             ELSE
    273274                to_be_resorted => lpt_av
    274              ENDIF
    275 
    276           CASE ( 'm_soil' )
    277              nzb_do = nzb_soil
    278              nzt_do = nzt_soil
    279 !
    280 !--          For soil model quantities, it is required to re-allocate local_pf
    281              DEALLOCATE ( local_pf )
    282              ALLOCATE( local_pf(nxlg:nxrg,nysg:nyng,nzb_do:nzt_do) )
    283 
    284              IF ( av == 0 )  THEN
    285                 to_be_resorted => m_soil
    286              ELSE
    287                 to_be_resorted => m_soil_av
    288275             ENDIF
    289276
     
    581568             ENDIF
    582569
    583           CASE ( 't_soil' )
    584              nzb_do = nzb_soil
    585              nzt_do = nzt_soil
    586 !
    587 !--          For soil model quantities, it is required to re-allocate local_pf
    588              DEALLOCATE ( local_pf )
    589              ALLOCATE( local_pf(nxlg:nxrg,nysg:nyng,nzb_do:nzt_do) )
    590 
    591              IF ( av == 0 )  THEN
    592                 to_be_resorted => t_soil
    593              ELSE
    594                 to_be_resorted => t_soil_av
    595              ENDIF
    596 
    597570          CASE ( 'u' )
    598571             IF ( av == 0 )  THEN
     
    624597
    625598          CASE DEFAULT
     599
     600!
     601!--          Land surface quantity
     602             IF ( land_surface )  THEN
     603!
     604!--             For soil model quantities, it is required to re-allocate local_pf
     605                nzb_do = nzb_soil
     606                nzt_do = nzt_soil
     607
     608                DEALLOCATE ( local_pf )
     609                ALLOCATE( local_pf(nxlg:nxrg,nysg:nyng,nzb_do:nzt_do) )
     610
     611                CALL lsm_data_output_3d( av, do3d(av,if), found, local_pf )
     612                resorted = .TRUE.
     613             ENDIF
     614
    626615!
    627616!--          User defined quantity
    628              CALL user_data_output_3d( av, do3d(av,if), found, local_pf,       &
    629                                        nzb_do, nzt_do )
    630              resorted = .TRUE.
     617             IF ( .NOT. found )  THEN
     618                CALL user_data_output_3d( av, do3d(av,if), found, local_pf,    &
     619                                          nzb_do, nzt_do )
     620                resorted = .TRUE.
     621             ENDIF
    631622
    632623             IF ( .NOT. found )  THEN
     
    667658                WRITE ( 30 )  local_pf(:,:,nzb_do:nzt_do)
    668659             ENDIF
    669 #if defined( __parallel )
     660
    670661             CALL MPI_BARRIER( comm2d, ierr )
    671 #endif
     662
    672663          ENDDO
    673664
Note: See TracChangeset for help on using the changeset viewer.