Skip to content

Commit 405a909

Browse files
author
Jekabs Nelsons
committed
Latest version
1 parent 154bc6a commit 405a909

24 files changed

Lines changed: 1453 additions & 219 deletions

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,18 @@
22
docs/_build
33
docs/_static
44
docs/_templates
5-
5+
results/*
6+
resultsbash/*
7+
projects/AVISO/results
8+
projects/AVISO/setup_data
9+
projects/AVISO/check_results.ipynb
10+
projects/NEMO/orca1phys
11+
projects/NEMO/namelist_analytical.in
12+
projects/NEMO/namelist_days1.in
13+
projects/NEMO/namelist_days5.in
14+
projects/NEMO/namelist_days15.in
15+
projects/NEMO/namelist_months1.in
16+
projects/NEMO/namelist_NEMO_cycle10.in
17+
projects/NEMO/namelist_streamfunctions.in
18+
projects/NEMO_AVISO
19+
projects/NEMO_Nordic

Makefile

100644100755
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
#================================================================
44

55
# Project and case definition
6-
PROJECT = Theoretical
7-
CASE = Theoretical
8-
RUNFILE = runtracmass
6+
PROJECT = NEMO_AVISO
7+
CASE = AVISO
8+
RUNFILE = runtracmass
99
ARCH =
10-
NETCDFLIBS = none
10+
NETCDFLIBS = automatic-44
1111
#================================================================
1212

1313
# Possible architectures:
@@ -37,6 +37,8 @@ endif
3737
PROJECT_FLAG = -DPROJECT_NAME=\'$(PROJECT)\'
3838
CASE_FLAG = -DCASE_NAME=\'$(CASE)\'
3939

40+
41+
4042
#================================================================
4143

4244
# NetCDF libraries
@@ -68,7 +70,7 @@ FF = -g -O3 -traceback -pg
6870

6971
else
7072
FC = gfortran
71-
FF = -g -O3 -fbacktrace -fbounds-check -Wall -Wno-maybe-uninitialized -Wno-unused-dummy-argument
73+
FF = -g -O3 -fbacktrace -fbounds-check -Wall -Wno-maybe-uninitialized -Wno-unused-dummy-argument -Wno-lto-type-mismatch
7274

7375
endif
7476

@@ -91,7 +93,7 @@ endif
9193
# Object definitions
9294
OBJDIR := _build
9395

94-
objects := $(addprefix $(OBJDIR)/,mod_vars.o mod_subdomain.o mod_getfile.o mod_calendar.o \
96+
objects := $(addprefix $(OBJDIR)/,mod_vars.o mod_subdomain.o mod_getfile.o mod_calendar.o mod_bio.o \
9597
mod_tracerf.o mod_tracers.o setup_grid.o kill_zones.o mod_vertvel.o mod_swap.o read_field.o mod_clock.o \
9698
mod_write.o mod_error.o mod_seed.o mod_diffusion.o mod_divergence.o mod_stream.o \
9799
mod_pos_tstep.o mod_pos_tanalytical.o mod_init.o mod_print.o mod_loop.o mod_postprocess.o TRACMASS.o)

projects/AVISO/Makefile.prj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Vertical velocities
55
#------------------------------------------------------------------------
6-
fl01 = -Dw_2dim # Turn off vertical velocities.
6+
fl01 = -Dw_3dim # Turn off vertical velocities.
77

88
# Time analytical scheme
99
#------------------------------------------------------------------------

projects/AVISO/kill_zones.F90

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,60 +26,60 @@ SUBROUTINE kill_zones
2626

2727
SELECT CASE(exitType)
2828

29-
! Exit domain defined by the boxes [ienw, iene]x[jens, jenn]
30-
! in the namelist
31-
CASE(1)
32-
DO nexit = 1, 10
33-
IF(ienw(nexit) <= x1 .AND. x1 <= iene(nexit) .AND. &
34-
jens(nexit) <= y1 .AND. y1 <= jenn(nexit) ) THEN
35-
nend = nexit +1
36-
END IF
37-
END DO
29+
! Exit domain defined by the boxes [ienw, iene]x[jens, jenn]
30+
! in the namelist
31+
CASE(1)
32+
DO nexit = 1, 10
33+
IF(ienw(nexit) <= x1 .AND. x1 <= iene(nexit) .AND. &
34+
jens(nexit) <= y1 .AND. y1 <= jenn(nexit) ) THEN
35+
nend = nexit +1
36+
END IF
37+
END DO
3838

39-
! Exit domain defined by the value of tracers in the namelist tracere
40-
CASE(2)
39+
! Exit domain defined by the value of tracers in the namelist tracere
40+
CASE(2)
4141

42-
numexit = MINLOC(tracerchoice, DIM=1,MASK=(tracerchoice==999)) - 1
42+
numexit = MINLOC(tracerchoice, DIM=1,MASK=(tracerchoice==999)) - 1
4343

44-
DO nexit = 1, numexit
45-
itrac = tracerchoice(nexit)
44+
DO nexit = 1, numexit
45+
itrac = tracerchoice(nexit)
4646

47-
IF ( maxormin(nexit)*tracervalue(itrac)>= maxormin(nexit)*tracere(nexit) ) THEN
48-
nend = nexit +1
49-
END IF
47+
IF ( maxormin(nexit)*tracervalue(itrac)>= maxormin(nexit)*tracere(nexit) ) THEN
48+
nend = nexit +1
49+
END IF
5050

51-
END DO
51+
END DO
5252

53-
! Exit domain defined by the value of tracers in the namelist tracere and domain
54-
CASE(3)
53+
! Exit domain defined by the value of tracers in the namelist tracere and domain
54+
CASE(3)
5555

56-
! First thermodynamic killing zone
57-
numexit = MINLOC(tracerchoice, DIM=1,MASK=(tracerchoice==999)) - 1
56+
! First thermodynamic killing zone
57+
numexit = MINLOC(tracerchoice, DIM=1,MASK=(tracerchoice==999)) - 1
5858

59-
DO nexit = 1, numexit
60-
itrac = tracerchoice(nexit)
59+
DO nexit = 1, numexit
60+
itrac = tracerchoice(nexit)
6161

62-
IF ( maxormin(nexit)*tracervalue(itrac)>= maxormin(nexit)*tracere(nexit) ) THEN
63-
nend = nexit +1
64-
END IF
62+
IF ( maxormin(nexit)*tracervalue(itrac)>= maxormin(nexit)*tracere(nexit) ) THEN
63+
nend = nexit +1
64+
END IF
6565

66-
END DO
66+
END DO
6767

68-
! Next the geographical killing zone
69-
DO nexit = 1, 10
70-
IF(ienw(nexit) <= x1 .AND. x1 <= iene(nexit) .AND. &
71-
jens(nexit) <= y1 .AND. y1 <= jenn(nexit) ) THEN
72-
nend = nexit +1 + numexit
73-
END IF
74-
END DO
68+
! Next the geographical killing zone
69+
DO nexit = 1, 10
70+
IF(ienw(nexit) <= x1 .AND. x1 <= iene(nexit) .AND. &
71+
jens(nexit) <= y1 .AND. y1 <= jenn(nexit) ) THEN
72+
nend = nexit +1 + numexit
73+
END IF
74+
END DO
7575

76-
! If the exit domained is defined in a different way:
77-
! - Read from a file
78-
! - Defined by curve, no linear shape, ...
79-
! This must be hard coded below.
8076

81-
CASE(4)
82-
PRINT*, 'Hard coded limits of the domain'
77+
! If the exit domained is defined in a different way:
78+
! - Read from a file
79+
! - Defined by curve, no linear shape, ...
80+
! This must be hard coded below.
81+
CASE(4)
82+
PRINT*, 'Hard coded limits of the domain'
8383

8484
END SELECT
8585

projects/AVISO/namelist_AVISO.in

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,50 @@
44
zeroindx = .TRUE.
55

66
! Describe filenames
7-
physDataDir = '', ! directory of physical data (u,v,T,S,MLD,etc)
8-
physPrefixForm = 'dt_global_allsat_phy_l4',
9-
dateFormat = '_YYYYMMDD_20180516',
7+
physDataDir = 'projects/AVISO/setup_data/', ! directory of physical data (u,v,T,S,MLD,etc)
8+
physPrefixForm = 'BAL-NEMO_PHY-',
9+
dateFormat = '2025060100',
1010
fileSuffix = '.nc', ! suffix of files, e.g. ".nc"
1111

1212
! Describe variable names
13-
ueul_name = 'ugos', ! name of resolved zonal velocity
14-
veul_name = 'vgos', ! ---- " ------- meridional
13+
ueul_name = 'uo', ! name of resolved zonal velocity
14+
veul_name = 'vo', ! ---- " ------- meridional
1515
/
1616

1717
&INIT_GRID_SIZE
1818
! Size of global grid
19-
imt = 1440, ! number of global i points
20-
jmt = 720, ! number of global j points
21-
km = 1, ! number of global k points
19+
imt = 763, ! number of global i points
20+
jmt = 774, ! number of global j points
21+
km = 56, ! number of global k points
2222

23-
iperio = 1 ! zonal periodic
24-
jperio = 1 ! meridional boundary conditions
23+
iperio = 0 ! zonal periodic
24+
jperio = 0 ! meridional boundary conditions
2525
/
2626

2727
&INIT_GRID_SUBDOMAIN
28-
28+
l_subdom = .TRUE. ! Initialise subdomain
29+
imindom = 200 ! Eastern and western wall for subdomain
30+
imaxdom = 400
31+
jmindom = 200 ! Southern and northern wall for subdomain
32+
jmaxdom = 400
2933
/
3034

3135
&INIT_GRID_TIME
3236
ngcm_step = 1, ! time between two time levels
3337
! if ncgcm_unit = 5, then ngcm_step = 3 means 3 months
34-
ngcm_unit = 4, ! units of ngcm
38+
ngcm_unit = 3, ! units of ngcm
3539
!
36-
iter = 24, ! number of subcycles between time levels ! stopped
40+
iter = 12, ! number of subcycles between time levels ! stopped
3741
/
3842

3943
&INIT_START_DATE
4044
startsec = 0, ! start time
4145
startmin = 0,
4246
starthour = 0,
4347
startday = 1, ! start date
44-
startmon = 1,
45-
startyear = 2017,
46-
noleap = .FALSE., ! dont use leap years?
48+
startmon = 6,
49+
startyear = 2025,
50+
noleap = .TRUE., ! dont use leap years?
4751
mon30day = .FALSE.
4852
/
4953

@@ -58,19 +62,19 @@
5862
log_level = 0
5963

6064
! Information of run time
61-
intrun = 731 ! number of time steps for run
65+
intrun = 12 ! number of time steps for run
6266
/
6367

6468
&INIT_WRITE_TRAJ
65-
write_frec = 1 ! 1 = write at time intervals of gcm datasets (each ints)
69+
write_frec = 2 ! 1 = write at time intervals of gcm datasets (each ints)
6670
! 2 = write at each time iteration
6771
! 3 = write each spatial grid-crossing
6872
! 4 = write all the time steps
6973
! 5 = write only start and end positions
7074

7175

7276

73-
outDataDir = '',
77+
outDataDir = 'projects/AVISO/results/domain2/',
7478
outDataFile = '',
7579

7680
timeformat = 0 ! Format of the time array
@@ -83,7 +87,7 @@
8387
isec = 2, ! = 1 start on zonal cell wall
8488
! = 2 start on meridional cell wall
8589
! = 3 start on vertical wall
86-
idir = -1, ! = 1 start only when flux > 0
90+
idir = 1, ! = 1 start only when flux > 0
8791
! = -1 only when flux < 0
8892
nqua = 1, ! number of trajectories can be set by
8993
! = 1 constant number of particles in all seeding cells
@@ -93,16 +97,16 @@
9397
! = 3 Each particle reflects air/water mass/volume at seeding.
9498
! set by partQuant in m3 or kg per particle
9599

96-
partquant = 10, ! particles/gridcell or m3s-1/particle or m3/particle
100+
partquant = 1, ! particles/gridcell or m3s-1/particle or m3/particle
97101
loneparticle = 0, ! start only one trajectory for debugging
98102
seedtype = 1, ! = 1 seed using ist,jst,kst (below)
99103
! = 2 seed using file with start positions
100104

101105
! when seedtype = 1
102-
ist1 = 135, ! seed in box in range i = [ist1,ist2]
103-
ist2 = 135, ! j = [jst1,jst2]
104-
jst1 = 250, ! k = [kst1,kst2]
105-
jst2 = 250,
106+
ist1 = 285, ! seed in box in range i = [ist1,ist2]
107+
ist2 = 325, ! j = [jst1,jst2]
108+
jst1 = 270, ! k = [kst1,kst2]
109+
jst2 = 330,
106110
kst1 = 1,
107111
kst2 = 1,
108112
! when seedtype = 2
@@ -114,7 +118,7 @@
114118

115119
! when seedtime = 1
116120
tst1 = 1, ! seed only between tst1 and tst2
117-
tst2 = 365,
121+
tst2 = 1,
118122

119123
! when seedtime = 2
120124
timefile = '', ! name of seed file
@@ -131,6 +135,8 @@
131135
&INIT_KILLZONES
132136
timax = 365 ! time limit for traj [days]
133137

138+
!l_nosurface = .TRUE.
139+
134140
exitType = 1
135141

136142
! If exitType = 1: killing zone defined by a box
@@ -143,10 +149,10 @@
143149
! jenn = 300, 470,
144150
! sets up two killzones, the first i = [0,100], j = [200,300]
145151
! the other i = [500,1000], j = [450,470]
146-
ienw = 0, 100, 180, 0,
147-
iene = 100, 180, 180, 0,
148-
jens = 250, 250, 0, 0,
149-
jenn = 250, 250, 250, 250,
152+
ienw = 1,
153+
iene = 1,
154+
jens = 1,
155+
jenn = 1,
150156

151157
! If exitType = 2: killing zone defined by tracer value
152158
! Tracerchoice defines which tracer is used for the killing zone

projects/IFS/read_field.F90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ SUBROUTINE read_field
5050
ALLOCATE(tmptracer(imt,jmt,km),tmpuflux(imt,0:jmt,km), tmpvflux(imt,0:jmt,km))
5151
ALLOCATE(tmp3d(imt,0:jmt,km), tmp2d(imt,0:jmt), da(km), db(km))
5252

53+
! Here we read in the data
5354
! surface pressure
5455
IF (ints == 0) THEN
5556

projects/NEMO/Makefile.prj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ fl01 = -Dw_3dim # Compute 3D vertical velocities.
1313

1414
#========================================================================
1515

16-
ORM_FLAGS= -D$(PROJECT) \
17-
$(fl01)$(fl02)
16+
ORM_FLAGS= -D$(PROJECT)$(fl01)$(fl02)

0 commit comments

Comments
 (0)