mauro_morichetti
New member
Hi all,
we are trying to implement an additional auxinput in WRF-Chem to ingest data from ERA5 reanalysis, in particular the wave peak period available at CDS in both netCDF and grib2 format.
The wave peak period is used in the “./chem/module_gocart_seasalt.F” to define some specific parameters to finally calculate the sea spray source function.
We understood that the call for the different auxinput variables, is done on "./share/mediation_integrate.F", for example the auxinput6 (biogenic emission):
So, we what need si to add a subroutine as above with a new auxinput, and define the variables and coordinates, or you have some better way in order to do that?
Thank you in advance for any suggestions you could give us.
Mauro
we are trying to implement an additional auxinput in WRF-Chem to ingest data from ERA5 reanalysis, in particular the wave peak period available at CDS in both netCDF and grib2 format.
The wave peak period is used in the “./chem/module_gocart_seasalt.F” to define some specific parameters to finally calculate the sea spray source function.
We understood that the call for the different auxinput variables, is done on "./share/mediation_integrate.F", for example the auxinput6 (biogenic emission):
Code:
2759 SUBROUTINE med_read_wrf_chem_bioemiss ( grid , config_flags )
2760 ! Driver layer
2761 USE module_domain , ONLY : domain , domain_clock_get
2762 USE module_io_domain
2763 USE module_timing
2764 USE module_configure , ONLY : grid_config_rec_type
2765 ! Model layer
2766 USE module_bc_time_utilities
2767 #ifdef DM_PARALLEL
2768 USE module_dm
2769 #endif
2770 USE module_date_time
2771 USE module_utility
2772
2773 IMPLICIT NONE
2774
2775 ! Arguments
2776 TYPE(domain) :: grid
2777
2778 TYPE (grid_config_rec_type) , INTENT(IN) :: config_flags
2779
2780 ! Local data
2781 LOGICAL, EXTERNAL :: wrf_dm_on_monitor
2782
2783 INTEGER :: ierr, efid
2784 REAL :: time, tupdate
2785 real, allocatable :: dumc0(:,:,:)
2786 CHARACTER (LEN=256) :: message, current_date_char, date_string
2787 CHARACTER (LEN=256) :: inpname
2788
2789 #include "wrf_io_flags.h"
2790 ! IF ( grid%id .EQ. 1 ) THEN
2791
2792 CALL domain_clock_get( grid, current_timestr=current_date_char )
2793
2794 CALL construct_filename1 ( inpname , 'wrfbiochemi' , grid%id , 2 )
2795 WRITE(message,*)'mediation_integrate: med_read_wrf_chem_bioemissions: Open file ',TRIM(inpname)
2796 CALL wrf_message( TRIM(message) )
2797
2798 if( grid%auxinput6_oid .NE. 0 ) then
2799 CALL close_dataset ( grid%auxinput6_oid , config_flags , "DATASET=AUXINPUT6" )
2800 endif
2801
2802 CALL open_r_dataset ( grid%auxinput6_oid, TRIM(inpname) , grid , config_flags, &
2803 "DATASET=AUXINPUT6", ierr )
2804 IF ( ierr .NE. 0 ) THEN
2805 WRITE( message , * ) 'med_read_wrf_chem_bioemissions: error opening ', TRIM( inpname )
2806 CALL wrf_error_fatal( TRIM( message ) )
2807 ENDIF
2808
2809 WRITE(message,*)'mediation_integrate: med_read_wrf_chem_bioemissions: Read biogenic emissions at time ',&
2810 TRIM(current_date_char)
2811 CALL wrf_message( TRIM(message) )
2812
2813 CALL wrf_debug (100 , 'mediation_integrate: calling input_auxinput6' )
2814 CALL input_auxinput6 ( grid%auxinput6_oid, grid , config_flags , ierr )
2815
2816 CALL close_dataset ( grid%auxinput6_oid , config_flags , "DATASET=AUXINPUT6" )
2817
2818 ! ENDIF
2819 CALL wrf_debug (100 , 'mediation_integrate: med_read_wrf_chem_bioemissions: exit' )
2820
2821 END SUBROUTINE med_read_wrf_chem_bioemiss
So, we what need si to add a subroutine as above with a new auxinput, and define the variables and coordinates, or you have some better way in order to do that?
Thank you in advance for any suggestions you could give us.
Mauro