Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved deposition parametrisation #134

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0a8a8d1
Stricter compile option for fimex
magnusuMET May 4, 2023
76ba042
Allow float height in releasefile
magnusuMET Mar 30, 2023
ec16220
Save number of used particles (max)
magnusuMET Feb 21, 2023
d875069
Use grav settling for all particles
magnusuMET Mar 31, 2023
8ff08f5
First prototype of dry deposition
magnusuMET Feb 2, 2022
701ebdf
Revamp wet deposition scheme selector
magnusuMET Feb 28, 2023
249850d
Implement conventional scheme
magnusuMET Feb 28, 2023
a2df38a
Add output of wet deposition rate
magnusuMET Mar 1, 2023
0532ac5
Implement wetdep takemura
magnusuMET Mar 7, 2023
e79d8ca
Move prc reset to wetdep module
magnusuMET Apr 11, 2023
555b070
Add bartnicki 3D
magnusuMET Apr 24, 2023
befc9c2
Cloud cover
magnusuMET Apr 25, 2023
08f6f75
Implement arome_3dprecip reading
magnusuMET Apr 25, 2023
9e77a1c
Recompute wetdep on read of new fields
magnusuMET May 2, 2023
eafbc75
Output wetscavrate
magnusuMET May 3, 2023
0a95d6a
Datatype of input fields
magnusuMET May 4, 2023
3009d54
toggle for vertical layers
magnusuMET May 4, 2023
88f1966
Output 3D params
magnusuMET May 5, 2023
1d36203
Use cloud cover for precip intensity
magnusuMET May 8, 2023
cf70cfb
Make ccf togglable
magnusuMET May 10, 2023
5cb9da8
Implement incloud schemes
magnusuMET May 30, 2023
20d6e40
Correct time factor
magnusuMET Jul 24, 2023
2845fb2
Compose wetdep schemes
magnusuMET Jul 25, 2023
06782b2
Reenable Bartnicki vertical scheme
magnusuMET Jul 28, 2023
17e2acd
Conventional on 3D precip
magnusuMET Jul 31, 2023
9ca07db
Correct ccf conventional
magnusuMET Jul 31, 2023
bb492cd
Use acc ccf
magnusuMET Jul 31, 2023
03ea119
Add toggle for convective/Bartniciki
magnusuMET Aug 3, 2023
c7f238a
Add Dockerfile
magnusuMET Feb 9, 2023
7ee6f5b
Fix dependency order in makefile
magnusuMET Aug 7, 2024
086c573
Feature gate read_landfractions
magnusuMET Aug 7, 2024
4709d1c
Landfraction output in high res
magnusuMET Oct 7, 2024
8397b9a
Fix output dry deposition velocity
magnusuMET Oct 8, 2024
6d72cac
Drydep for output factor
magnusuMET Oct 8, 2024
febc130
More hres output
magnusuMET Oct 8, 2024
abbe351
Checkpoint
magnusuMET Oct 10, 2024
13623ee
Easier wetdep.scheme selection
magnusuMET Oct 11, 2024
0f1539b
belowcloud -> subcloud
magnusuMET Oct 11, 2024
f4bb917
Config options
magnusuMET Oct 11, 2024
e661a83
Update test fields
magnusuMET Oct 16, 2024
b62b03f
Fixup code review nits
magnusuMET Oct 17, 2024
24ec37f
Drydep split and cleanup
magnusuMET Oct 22, 2024
a54462b
Rearrange wetdep
magnusuMET Oct 23, 2024
21e272f
Compile gate unsupported schemes
magnusuMET Oct 24, 2024
f0a3c1f
Checkpoint
magnusuMET Oct 25, 2024
0cd6aa6
Use cloud water+ice in vertical for ecemep
magnusuMET Nov 25, 2024
4b7e247
Move parameters to snapmetML
magnusuMET Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,17 @@ Snappy.egg-info
/src/naccident/snap_batch_copy.f90
/src/naccident/snap_batch_copy.F90

/src/nbomb/*.inc
/src/nbomb/*.mod
/src/nbomb/bsnap_nbomb
/src/nbomb/create_bomb_input
/src/nbomb/snap_batch_copy.f90
/src/nbomb/snap_batch_copy.F90

/src/test/testDateCalc
/src/test/find_parameters_fi_test
/src/test/snap_batch_copy.F90

/src/traj/*.inc
/src/traj/*.mod
/src/traj/bsnap_traj
/src/traj/create_traj_input
/src/traj/snap_batch_copy.f90
/src/traj/snap_batch_copy.F90

/src/volcano/*.mod
/src/volcano/*.inc
/src/volcano/snapargos.inc
/src/volcano/bsnap_volcano
/src/volcano/snap_batch_copy.f90
/src/volcano/snap_batch_copy.F90

src/test/snap_testdata


docs/html
docs/latex

bsnap_*

utils/SnapPy/Snappy.egg-info
src/test/snap_testdata
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:22.04 AS builder

ENV SNAP_FIMEX_VERSION=1.9

RUN apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:met-norway/fimex && \
apt-get update -y && \
apt-get install -y libnetcdff-dev gfortran libfimex-$SNAP_FIMEX_VERSION-dev make && \
apt-get remove -y software-properties-common && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*

WORKDIR /snap
ARG VERSION="latest"
ADD src .
RUN ln --symbolic --force gcc_pkgconfig.mk current.mk
ENV SNAP_USE_OMP=1
RUN make clean && make

FROM ubuntu:22.04

ENV SNAP_FIMEX_VERSION=1.9

RUN apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:met-norway/fimex && \
apt-get update -y && \
apt-get install -y libnetcdff7 libfimex-$SNAP_FIMEX_VERSION-0 tini && \
apt-get remove -y software-properties-common && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*

WORKDIR /snap
COPY --from=builder /snap/naccident/bsnap_naccident /snap/bsnap

ENTRYPOINT ["/usr/bin/env", "TINI_VERBOSITY=0", "/usr/bin/tini", "-g", "--", "/snap/bsnap"]
37 changes: 35 additions & 2 deletions src/common/allocateFields.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ module allocateFieldsML
depdry, depwet, accprec, avgprec, avghbl, precip, &
pmsl1, pmsl2, field1, field2, field3, field4, field3d1, xm, ym, &
garea, field_hr1, field_hr2, field_hr3, hbl_hr, &
precip3d, cw3d, &
max_column_scratch, max_column_concentration, &
aircraft_doserate, aircraft_doserate_scratch, t1_abs, t2_abs, &
aircraft_doserate_threshold_height, &
total_activity_released, total_activity_lost_domain, total_activity_lost_other
aircraft_doserate_threshold_height, vd_dep, &
xflux, yflux, hflux, t2m, z0, leaf_area_index, &
roa, ustar, monin_l, raero, vs, rs, &
total_activity_released, total_activity_lost_domain, total_activity_lost_other, &
wscav, cloud_cover
USE snapfilML, only: idata, fdata
USE snapgrdML, only: ahalf, bhalf, vhalf, alevel, blevel, vlevel, imodlevel, &
compute_column_max_conc, compute_aircraft_doserate, aircraft_doserate_threshold
Expand All @@ -44,6 +48,9 @@ subroutine allocateFields
USE snapdimML, only: nx, ny, nk, output_resolution_factor, ldata, maxsiz
USE snapparML, only: ncomp, iparnum
USE releaseML, only: mplume, iplume, plume_release, mpart
USE drydep, only: drydep_scheme, DRYDEP_SCHEME_EMEP, DRYDEP_SCHEME_EMERSON, &
DRYDEP_SCHEME_ZHANG
USE snapmetML, only: met_params

logical, save :: FirstCall = .TRUE.
integer :: AllocateStatus
Expand Down Expand Up @@ -147,6 +154,14 @@ subroutine allocateFields

ALLOCATE ( precip(nx,ny), STAT = AllocateStatus)
IF (AllocateStatus /= 0) ERROR STOP errmsg
if (met_params%use_3d_precip) then
ALLOCATE(precip3d(nx,ny,nk), cw3d(nx,ny,nk), STAT=AllocateStatus)
if (AllocateStatus /= 0) ERROR STOP errmsg
ALLOCATE(wscav(nx,ny,nk,ncomp),STAT=AllocateStatus)
if (AllocateStatus /= 0) ERROR STOP errmsg
wscav(:,:,:,:) = 0.0
allocate(cloud_cover(nx,ny,nk))
endif

! the calculation-fields
ALLOCATE ( avghbl(nx,ny), STAT = AllocateStatus)
Expand Down Expand Up @@ -222,6 +237,15 @@ subroutine allocateFields
total_activity_released(:) = 0.0
total_activity_lost_domain(:) = 0.0
total_activity_lost_other(:) = 0.0
if (drydep_scheme == DRYDEP_SCHEME_EMEP .or. &
drydep_scheme == DRYDEP_SCHEME_ZHANG .or. &
drydep_scheme == DRYDEP_SCHEME_EMERSON) then
allocate(vd_dep(nx,ny,ncomp), STAT=AllocateStatus)
if (AllocateStatus /= 0) ERROR STOP errmsg
allocate(xflux, yflux, hflux, t2m, z0, leaf_area_index, mold=ps2)
allocate(roa(nx, ny))
allocate(ustar, monin_l, raero, vs, rs, mold=roa)
endif

end subroutine allocateFields

Expand Down Expand Up @@ -276,6 +300,10 @@ subroutine deAllocateFields
DEALLOCATE ( pmsl2)

DEALLOCATE ( precip)
if (allocated(precip3d)) deallocate(precip3d)
if (allocated(cw3d)) deallocate(cw3d)
if (allocated(wscav)) deallocate(wscav)
if (allocated(cloud_cover)) deallocate(cloud_cover)

DEALLOCATE ( avghbl )
DEALLOCATE ( avgprec )
Expand Down Expand Up @@ -316,6 +344,11 @@ subroutine deAllocateFields
DEALLOCATE ( plume_release )

DEALLOCATE( total_activity_released, total_activity_lost_domain, total_activity_lost_other )
if (allocated(vd_dep)) then
deallocate(vd_dep)
deallocate(xflux, yflux, hflux, t2m, z0, leaf_area_index)
deallocate(roa, ustar, monin_l, raero, vs, rs)
endif

end subroutine deAllocateFields
end module allocateFieldsML
Loading
Loading