Skip to content

Commit

Permalink
import rv4_4 source code from ftp site
Browse files Browse the repository at this point in the history
  • Loading branch information
avaldebe committed Aug 23, 2016
1 parent f4452c6 commit 9806b5c
Show file tree
Hide file tree
Showing 69 changed files with 2,005 additions and 2,468 deletions.
Empty file modified AOTnPOD_ml.f90
100644 → 100755
Empty file.
Empty file modified Advection_ml.f90
100644 → 100755
Empty file.
Empty file modified Aero_water_ml.f90
100644 → 100755
Empty file.
Empty file modified AirEmis_ml.f90
100644 → 100755
Empty file.
Empty file modified Ammonium_ml.f90
100644 → 100755
Empty file.
Empty file modified Aqueous_n_WetDep_ml.f90
100644 → 100755
Empty file.
9 changes: 3 additions & 6 deletions Biogenics_ml.f90
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module Biogenics_ml
use ModelConstants_ml, only : NPROC, MasterProc, TINY, &
USE_PFT_MAPS, NLANDUSEMAX, IOU_INST, &
KT => KCHEMTOP, KG => KMAX_MID, &
EURO_SOILNOX_DEPSCALE, &
DEBUG_BIO, BVOC_USED, MasterProc
use NetCDF_ml, only : ReadField_CDF, printCDF
use OwnDataTypes_ml, only : Deriv, TXTLEN_SHORT
Expand Down Expand Up @@ -113,10 +114,6 @@ module Biogenics_ml
AnnualNdep, & ! N-dep in mgN/m2/
SoilNOx, SoilNH3

! To avoid pre-runs of the model for scenario years, we assume that changes
! can ve approximated by EU N emission changes
real, public, save :: Ndep_trends = 1.0 ! for scaling assumed soil N-dep


! Set true if LCC read from e.g. EMEP_EuroBVOC.nc:
! (Currently for 1st four LCC, CF, DF, BF, NF)
Expand Down Expand Up @@ -644,7 +641,7 @@ subroutine Set_SoilNOx()
if( DEBUG_SOILNOX .and. debug_proc ) then
write(*,*)"Biogenic_ml DEBUG_SOILNOX EURO: ",&
current_date%day, current_date%hour, current_date%seconds,&
USE_EURO_SOILNOX, Ndep_trends
USE_EURO_SOILNOX, EURO_SOILNOX_DEPSCALE
end if

if ( .not. USE_EURO_SOILNOX ) return ! and fSW has been set to 1. at start
Expand All @@ -671,7 +668,7 @@ subroutine Set_SoilNOx()
! We use a factor normalised to 1.0 at 5000 mgN/m2/a

fn = AnnualNdep(i,j)/5000.0 ! scale for now
fn = fn * Ndep_trends ! For e.g. 2030, see Emissions_ml
fn = fn * EURO_SOILNOX_DEPSCALE ! See ModelConstants_ml

ftn = ft * fn * hfac

Expand Down
Empty file modified BoundaryConditions_ml.f90
100644 → 100755
Empty file.
Empty file modified Chem_ml.f90
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions Country_ml.f90
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ module Country_ml
integer, parameter, public :: IC_TAIW = 234 ! Taiwan
integer, parameter, public :: IC_THAI = 235 ! Thailand
integer, parameter, public :: IC_VIET = 236 ! Vietnam
integer, parameter, public :: IC_EGYP = 237 ! Egypt

! extra subdivisions of ship emissions into shipping categories:
! Baltic Sea (30)
Expand Down Expand Up @@ -514,6 +515,7 @@ subroutine Country_Init()
Country(IC_TAIW) = cc( "TAIW", 234, F,234, -100, "Taiwan")
Country(IC_THAI) = cc( "THAI", 235, F,235, -100, "Thailand")
Country(IC_VIET) = cc( "VIET", 236, F,236, -100, "Vietnam")
Country(IC_EGYP) = cc( "EGYP", 237, F,237, -100, "Egypt")
Country(IC_INTSHIPS ) = cc( "INTSHIPS" ,350 ,T, 350, -100 , "International ships, RCP6" )
end subroutine Country_Init

Expand Down
Empty file modified DefPhotolysis_ml.f90
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions Derived_ml.f90
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module Derived_ml
,FORECAST & ! only dayly (and hourly) output on FORECAST mode
,NTDAY & ! Number of 2D O3 to be saved each day (for SOMO)
! output types corresponding to instantaneous,year,month,day
,IOU_INST, IOU_YEAR, IOU_MON, IOU_DAY, IOU_HOUR_PREVIOUS, IOU_HOUR, IOU_HOUR_MEAN
,IOU_INST, IOU_YEAR, IOU_MON, IOU_DAY, IOU_YEAR_LASTHH, IOU_HOUR, IOU_HOUR_MEAN

use MosaicOutputs_ml, only: nMosaic, MosaicOutput
use OwnDataTypes_ml, only: Deriv,TXTLEN_DERIV,TXTLEN_SHORT ! type & length of names
Expand Down Expand Up @@ -146,7 +146,7 @@ module Derived_ml
! fields we use daily outputs. For the big 3d fields, monthly output
! is sufficient.

integer, public, parameter :: LENOUT2D = IOU_HOUR_PREVIOUS ! Allows INST..DAY,H.PREV. for 2d fields
integer, public, parameter :: LENOUT2D = IOU_YEAR_LASTHH ! Allows INST..DAY,H.PREV. for 2d fields
integer, public, parameter :: LENOUT3D = IOU_DAY ! Allows INST..DAY for 3d fields

!will be used for:
Expand Down
Empty file modified DryDep_ml.f90
100644 → 100755
Empty file.
Empty file modified EQSAM_ml.f90
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion EcoSystem_ml.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ subroutine Init_EcoSystems()
!Deriv(name, class, subc, txt, unit
!Deriv index, f2d, dt_scale, scale, avg? Inst Yr Mn Day
DepEcoSystem(iEco) = Deriv( &
name, "EcoFrac", "Area",DEF_ECOSYSTEMS(iEco) , unit, &
trim(name), "EcoFrac", "Area",trim(DEF_ECOSYSTEMS(iEco)) , trim(unit), &
iEco, -99, F, 1.0, F, IOU_YEAR )

if(DEBUG_ECOSYSTEMS .and. MasterProc) &
Expand Down
Empty file modified Emergency_ml.f90
100644 → 100755
Empty file.
Empty file modified EmisDef_ml.f90
100644 → 100755
Empty file.
24 changes: 14 additions & 10 deletions EmisGet_ml.f90
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -201,33 +201,37 @@ subroutine EmisGetCdf(iem, fname,incl,excl)

!/ We can include or exclude countries:
if ( present(excl) ) then
if(MasterProc) print "(a,50a4)", "INCEXCTEST-E "// &
trim(code)!, (trim(excl(i)),i=1,size(excl))
!if(MasterProc) print "(a,50a4)", "INCEXCTEST-E "// &
! trim(code)!, (trim(excl(i)),i=1,size(excl))
if ( find_index( code, excl ) >0 ) then
!if(MasterProc) print *, "INCEXCTEST-XX ", &
! trim(code), find_index( code, excl )
!! if(MasterProc) write(*,"(a,a,i5)") "EmisGetCdf"//trim(fname)// &
!! "exludes:", trim(code), find_index( code, excl )
cycle
else
if(MasterProc) print *, "INCEXCTEST-XY ", &
trim(code), find_index( code, Country(:)%code )
end if
end if
if ( present(incl) ) then
if ( find_index( code, incl ) <1 ) then
if(MasterProc) print "(a,i5,50a4)", "INCEXCTEST-I "//trim(code), &
find_index( code, incl ) !!, (trim(incl(i)),i=1,size(incl))
!! if(MasterProc) write(*,"(a,a,i5)") "EmisGetCdf"//trim(fname)// &
!! "exludes:", trim(code), find_index( code, excl )
cycle
end if
end if

!if(MasterProc) write(*,"(3a,i5)") "EmisGetCdf"//trim(fname), &
! "includes:", trim(code), find_index( code, excl )
!if(MasterProc) print *, "!!EmisGetCdf"//trim(fname), &
! "includes:", trim(code), find_index( code, excl )

ic = find_index( code, Country(:)%code ) !from Country_ml
if(MasterProc) print "(a)", "INCEXCTEST-A "//trim(code)
if(MasterProc) print "(a)", "INCEXCTEST-A "//trim(fname)//":"//trim(code)

if ( Country(ic)%code == "N/A" ) then
if(MasterProc) print *, "CDFCYCLE ", ic, trim(Country(ic)%code)
cycle ! see Country_ml
end if
call CheckStop( ic < 1 , "CDFEMIS NegIC"//trim(code) )
call CheckStop( ic < 1 , "CDFEMIS NegIC:"//trim(fname)//":"//trim(code) )

!if( DEBUG .and. debug_proc ) write( *,*) 'EmisGetCdf ', trim(fname), varid,trim(varname), &
! " ", trim(code), ic, isec
Expand Down Expand Up @@ -293,7 +297,7 @@ subroutine EmisGetCdf(iem, fname,incl,excl)
sumcdfemis(:,iem) = sumcdfemis(:,iem) + sumcdfemis_iem(:)
do ic = 1, NLAND
if ( sumcdfemis(ic,iem) > 1.0e-10 ) &
write(*,"(a,i3,f12.3)") "CDFSUM "//trim(fname), ic, sumcdfemis(ic,iem)
write(*,"(a,i5,f12.3)") "CDFSUM "//trim(fname), ic, sumcdfemis(ic,iem)
end do
end if

Expand Down
Loading

0 comments on commit 9806b5c

Please sign in to comment.