Giter Site home page Giter Site logo

Comments (8)

trondkr avatar trondkr commented on May 12, 2024

from model2roms.

nilodna avatar nilodna commented on May 12, 2024

Hi @trondkr

Thank you for the suggestion. Change to "hours since 1950-01-01" doesn't work, but gave me some insights. I tried a few combinations and it happens that when I set jdref and jd as showed below, the output will have the right datetime (and everything goes well in the ROMS run with ERA5 forcing files).

In [6]: jdref = date2num(datetime(1948, 1, 1), units="seconds since 1948-01-01 00:00:00",calendar=cdf.variables["time"].calendar)                                                                                  

In [7]: jdref                                                                                                                                                                                                      
Out[7]: 0.0

In [8]: mycalendar = cdf.variables["time"].calendar                                                      

In [9]: mycalendar                                                                                       
Out[9]: 'gregorian'

In [10]: myunits = 'seconds since 1948-01-01 00:00:00'      

In [13]: currentdate = datetime(year, month, day) 

In [15]: jd = date2num(currentdate, myunits, calendar=mycalendar)                                        

In [16]: jd                                                                                              
Out[16]: 2239142400.0

However, I don't know if this solution is appropriate, because the jdref is set to zero. Is that right?

About the pull request, I'm at the early stages to adapt model2roms to work withglorys12v1. As soon as I'm sure everything is adjusted and working properly, I'll create a PR.

Best.

from model2roms.

trondkr avatar trondkr commented on May 12, 2024

@nilodna - did you resolve this issue and have you been able to use model2roms as you needed?

from model2roms.

AMIRJALA avatar AMIRJALA commented on May 12, 2024

Hi @trondkr

I'm new in ROMS and I have a problem with the year of ROMS and your code

I get this error in the output of ROMS after adding the forcing files and running:

"MULTIFILE_INFO_S2D - Error while processing forcing multi-files:
data does not include initialization time = 2013-01-01 00:00:00.00"

in this link below, you can see my ROMS input and your code that I changed:

[https://drive.google.com/file/d/1m0xorpsoeAm80nn7JCgoUaXHFjy_oKoo/view?usp=sharing]

Thanks a lot

from model2roms.

trondkr avatar trondkr commented on May 12, 2024

from model2roms.

nilodna avatar nilodna commented on May 12, 2024

Hi @trondkr

Actually, I didn't have time to continue on this. I'll dig my files to see if I have some hardcoded adaptation and I can send it to you.

from model2roms.

AMIRJALA avatar AMIRJALA commented on May 12, 2024

Thanks a lot for your helping @trondkr
I made it as you said but I have an error again from my log file:

NETCDF_GET_TIME_1D - error while inquiring ID for variable: srf_time
in input file: era5_msdwswrf_year_2013_roms.nc
call from: ROMS/Utility/get_cycle.F
NetCDF: Variable not found

the time from the data that downloaded from your cod is lwrad_time but the model needs srf_time!

thanks again for your response

from model2roms.

trondkr avatar trondkr commented on May 12, 2024

@AMIRJALA According to the code the following values are used when creating the ERA5 ROMS file:

'mean_surface_downward_short_wave_radiation_flux': {'parameter_id': 'None',
									 'short_name': 'msdwswrf',
									 'roms_name': 'swrad',
									 'name': 'Mean surface downward short-wave radiation flux',
							                 'units': 'W m-2',
							                 'time_name': 'swrad_time'}}[parameter]

So you see the time name used is swrad_time. It's possible your ROMS code expects a different time-variable name but then you have to look into your settings in the cppdefs.h and varinfo.datfiles.

Closing this as it does not seem caused by this toolbox but feel free to re-open if still an issue.

from model2roms.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.