Hi
I try to make a forcing file using era5. I use roms_get_era5_NCARds633_bulkflux in this code which is for wikin.
I can use it.
The problem is bbox.
latitude is work! Ok!
My domain along longitude is 12-20.8 E. But, the forcing gives me -348-339.5.
I put -348 -339.5, the problem has not been solved!
I can understand why?
As mentioned in the codes, it is for the western Atlantic!
But, when we use for eastern part positively longitude how we should define it?
Best,
Matlab code(wikin code) for forcing
Re: Matlab code(wikin code) for forcing
That was an easy to solve bug. It's fixed now and updated in GitHub.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: Matlab code(wikin code) for forcing
Hi Wikin
Thanks!
This problem has been solved!
But,
Another point is that this error when applying on ROMS:
REGRID - input gridded data does not contain model grid:
Gridded: LonMin = 12.0000 LonMax = 20.5000
LatMin = 39.2500 LatMax = 45.7500
Model: LonMin = 12.0000 LonMax = 20.8000
LatMin = 38.9000 LatMax = 45.9044
This is because era5 data is 0.25 deg.
The code cannot interpolate correctly the exact grid as there is no data on the edge!
I remember that I had the same matter with d_ecmwf2roms. But, I have solved this matter by increasing my domain when downloading data! After that, the Matlab code makes the appropriate file due to the exact model grid!
Here, all of the actions are simultaneous! If I add my domain, again I will face the same error!
Best,
Thanks!
This problem has been solved!
But,
Another point is that this error when applying on ROMS:
REGRID - input gridded data does not contain model grid:
Gridded: LonMin = 12.0000 LonMax = 20.5000
LatMin = 39.2500 LatMax = 45.7500
Model: LonMin = 12.0000 LonMax = 20.8000
LatMin = 38.9000 LatMax = 45.9044
This is because era5 data is 0.25 deg.
The code cannot interpolate correctly the exact grid as there is no data on the edge!
I remember that I had the same matter with d_ecmwf2roms. But, I have solved this matter by increasing my domain when downloading data! After that, the Matlab code makes the appropriate file due to the exact model grid!
Here, all of the actions are simultaneous! If I add my domain, again I will face the same error!
Best,
Re: Matlab code(wikin code) for forcing
Yes, you have to request a bounding box that is larger than your domain by at least the 0.25 deg resolution of ERA5. Make it 1 or 2 deg more ... there is no reason not to.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: Matlab code(wikin code) for forcing
Hi
Based on this method, I have made it for 7 years(84 months).
Now, I define it in .in file like this
NFFILES == 1 ! number of unique forcing files
FRCNAME == /scratch/f85015jb/MedSea/Adriatic/2012/frc_MY_APPLICATION_ERA5_bulkflux_201201.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201202.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201203.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201204.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201205.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201206.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201208.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201209.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201210.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201211.nc|
/scratch/f85015jb/MedSea/Adr/2012/frc_MY_APPLICATION_ERA5_bulkflux_201212.nc|
/scratch/f85015jb/MedSea/Adr/2013/frc_MY_APPLICATION_ERA5_bulkflux_201301.nc|
.
.
.
here Nfiles should be 1 as it is unique?? This style of definition is right?
Based on this method, I have made it for 7 years(84 months).
Now, I define it in .in file like this
NFFILES == 1 ! number of unique forcing files
FRCNAME == /scratch/f85015jb/MedSea/Adriatic/2012/frc_MY_APPLICATION_ERA5_bulkflux_201201.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201202.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201203.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201204.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201205.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201206.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201208.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201209.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201210.nc|
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201211.nc|
/scratch/f85015jb/MedSea/Adr/2012/frc_MY_APPLICATION_ERA5_bulkflux_201212.nc|
/scratch/f85015jb/MedSea/Adr/2013/frc_MY_APPLICATION_ERA5_bulkflux_201301.nc|
.
.
.
here Nfiles should be 1 as it is unique?? This style of definition is right?
Re: Matlab code(wikin code) for forcing
I have faced an unusual error.
when defining forcing files with multiple files, I have faced this error
0 2012-01-01 00:00:00.00 0.000000E+00 3.029579E+03 3.029579E+03 9.673655E+13
(000,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
DEF_HIS - creating history file, Grid 01: roms_his.nc
Found Error: ** Line: 143 Source: ROMS/Utility/def_var.F
DEF_VAR - Grid 01, unable to define variable: Tobc_in
in NetCDF file: roms_his.nc
Found Error: 03 Line: 1933 Source: ROMS/Utility/def_info.F
Found Error: 03 Line: 411 Source: ROMS/Utility/def_his.F
Found Error: 03 Line: 151 Source: ROMS/Nonlinear/output.F
Found Error: 03 Line: 518 Source: ROMS/Nonlinear/main3d.F
Found Error: 03 Line: 302 Source: ROMS/Drivers/nl_ocean.h, ROMS_run
It seems that when defining 201201 up to 201607 files(55)! it works! but, I add 201608 I will face this error!
I downloaded the file again and then made it! The problem is the same!
I have separately added 201608 it works!
Is there any limitation to putting forcing? what to do?
Best,
when defining forcing files with multiple files, I have faced this error
0 2012-01-01 00:00:00.00 0.000000E+00 3.029579E+03 3.029579E+03 9.673655E+13
(000,000,00) 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00
DEF_HIS - creating history file, Grid 01: roms_his.nc
Found Error: ** Line: 143 Source: ROMS/Utility/def_var.F
DEF_VAR - Grid 01, unable to define variable: Tobc_in
in NetCDF file: roms_his.nc
Found Error: 03 Line: 1933 Source: ROMS/Utility/def_info.F
Found Error: 03 Line: 411 Source: ROMS/Utility/def_his.F
Found Error: 03 Line: 151 Source: ROMS/Nonlinear/output.F
Found Error: 03 Line: 518 Source: ROMS/Nonlinear/main3d.F
Found Error: 03 Line: 302 Source: ROMS/Drivers/nl_ocean.h, ROMS_run
It seems that when defining 201201 up to 201607 files(55)! it works! but, I add 201608 I will face this error!
I downloaded the file again and then made it! The problem is the same!
I have separately added 201608 it works!
Is there any limitation to putting forcing? what to do?
Best,
Re: Matlab code(wikin code) for forcing
Ok. It has been solved!
I try to explain it as others maybe use it!
There is a limitation in terms of the number of characters!
should use this
/scratch/f85015jb/MedSea/Ad/2012/201202.nc|
instead of:
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201202.nc|
Thanks!
I try to explain it as others maybe use it!
There is a limitation in terms of the number of characters!
should use this
/scratch/f85015jb/MedSea/Ad/2012/201202.nc|
instead of:
/scratch/f85015jb/MedSea/Ad/2012/frc_MY_APPLICATION_ERA5_bulkflux_201202.nc|
Thanks!
Re: Matlab code(wikin code) for forcing
Or use NCO tools ncrcat to merge the monthly files into fewer files.
Also, perhaps it's not obvious in the script documentation but my intention with
is that the user chooses a meaningful name and sets it in ROMS_APP, e.g.
>> ROMS_APP = 'BayBengal';
then line 69 in the script creates file names accordingly
Also, perhaps it's not obvious in the script documentation but my intention with
Code: Select all
% Output file name prefix. If not set, name is MY_APPLICATION
if ~exist('ROMS_APP','var')
ROMS_APP = 'MY_APPLICATION';
end
>> ROMS_APP = 'BayBengal';
then line 69 in the script creates file names accordingly
Code: Select all
ncname = "frc_"+ROMS_APP+"_ERA5_"+fluxopt+"_"+YYYY+MM+".nc";
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu